@patternfly/chatbot 2.2.0-prerelease.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.d.ts +1 -0
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.js +52 -0
- package/dist/cjs/Chatbot/Chatbot.d.ts +2 -1
- package/dist/cjs/Chatbot/Chatbot.js +1 -0
- package/dist/cjs/Chatbot/Chatbot.test.d.ts +1 -0
- package/dist/cjs/Chatbot/Chatbot.test.js +28 -0
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.d.ts +1 -0
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.js +27 -0
- package/dist/cjs/ChatbotContent/ChatbotContent.test.d.ts +1 -0
- package/dist/cjs/ChatbotContent/ChatbotContent.test.js +18 -0
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +3 -3
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +3 -1
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +27 -4
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +24 -12
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +99 -3
- package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.d.ts +11 -0
- package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.js +29 -0
- package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.d.ts +4 -0
- package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.js +45 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.d.ts +1 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +18 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.d.ts +1 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.js +87 -0
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.d.ts +1 -1
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +1 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.js +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.js +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +20 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.js +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +20 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +43 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +6 -4
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +41 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.d.ts +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.js +4 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.js +55 -0
- package/dist/cjs/ChatbotToggle/ChatbotToggle.js +3 -1
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +19 -11
- package/dist/cjs/Compare/Compare.d.ts +17 -0
- package/dist/cjs/Compare/Compare.js +50 -0
- package/dist/cjs/Compare/Compare.test.d.ts +1 -0
- package/dist/cjs/Compare/Compare.test.js +20 -0
- package/dist/cjs/Compare/index.d.ts +2 -0
- package/dist/cjs/Compare/index.js +23 -0
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.d.ts +4 -0
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.js +26 -0
- package/dist/cjs/Message/ImageMessage/ImageMessage.d.ts +4 -0
- package/dist/cjs/Message/ImageMessage/ImageMessage.js +25 -0
- package/dist/cjs/Message/LinkMessage/LinkMessage.d.ts +4 -0
- package/dist/cjs/Message/LinkMessage/LinkMessage.js +30 -0
- package/dist/cjs/Message/Message.d.ts +49 -8
- package/dist/cjs/Message/Message.js +70 -18
- package/dist/cjs/Message/Message.test.js +269 -3
- package/dist/cjs/Message/QuickResponse/QuickResponse.d.ts +17 -0
- package/dist/cjs/Message/QuickResponse/QuickResponse.js +34 -0
- package/dist/cjs/Message/QuickStarts/FallbackImg.d.ts +13 -0
- package/dist/cjs/Message/QuickStarts/FallbackImg.js +34 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTile.d.ts +27 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTile.js +82 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.d.ts +23 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.js +64 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.d.ts +1 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.js +76 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.d.ts +11 -0
- package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.js +30 -0
- package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.d.ts +30 -0
- package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.js +77 -0
- package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart.d.ts +30 -0
- package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart.js +77 -0
- package/dist/cjs/Message/QuickStarts/types.d.ts +132 -0
- package/dist/cjs/Message/QuickStarts/types.js +17 -0
- package/dist/cjs/Message/TableMessage/TableMessage.d.ts +20 -0
- package/dist/cjs/Message/TableMessage/TableMessage.js +67 -0
- package/dist/cjs/Message/TableMessage/TbodyMessage.d.ts +7 -0
- package/dist/cjs/Message/TableMessage/TbodyMessage.js +33 -0
- package/dist/cjs/Message/TableMessage/TdMessage.d.ts +5 -0
- package/dist/cjs/Message/TableMessage/TdMessage.js +26 -0
- package/dist/cjs/Message/TableMessage/ThMessage.d.ts +5 -0
- package/dist/cjs/Message/TableMessage/ThMessage.js +26 -0
- package/dist/cjs/Message/TableMessage/TheadMessage.d.ts +5 -0
- package/dist/cjs/Message/TableMessage/TheadMessage.js +26 -0
- package/dist/cjs/Message/TableMessage/TrMessage.d.ts +7 -0
- package/dist/cjs/Message/TableMessage/TrMessage.js +37 -0
- package/dist/cjs/Message/TextMessage/TextMessage.d.ts +2 -1
- package/dist/cjs/Message/TextMessage/TextMessage.js +2 -2
- package/dist/cjs/Message/UserFeedback/CloseButton.d.ts +10 -0
- package/dist/cjs/Message/UserFeedback/CloseButton.js +14 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.d.ts +39 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.js +54 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.d.ts +1 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +133 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +42 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +117 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.d.ts +1 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +249 -0
- package/dist/cjs/MessageBar/AttachButton.js +4 -2
- package/dist/cjs/MessageBar/MessageBar.d.ts +11 -4
- package/dist/cjs/MessageBar/MessageBar.js +127 -46
- package/dist/cjs/MessageBar/MessageBar.test.js +12 -4
- package/dist/cjs/MessageBar/MicrophoneButton.d.ts +1 -1
- package/dist/cjs/MessageBar/SendButton.js +3 -1
- package/dist/cjs/MessageBar/StopButton.js +3 -1
- package/dist/cjs/MessageBox/MessageBox.test.d.ts +1 -0
- package/dist/cjs/MessageBox/MessageBox.test.js +22 -0
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.d.ts +1 -0
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.js +28 -0
- package/dist/cjs/ResponseActions/ResponseActionButton.d.ts +4 -1
- package/dist/cjs/ResponseActions/ResponseActionButton.js +21 -6
- package/dist/cjs/ResponseActions/ResponseActions.d.ts +8 -2
- package/dist/cjs/ResponseActions/ResponseActions.js +7 -7
- package/dist/cjs/ResponseActions/ResponseActions.test.js +2 -2
- package/dist/cjs/Settings/SettingsForm.test.d.ts +1 -0
- package/dist/cjs/Settings/SettingsForm.test.js +26 -0
- package/dist/cjs/__mocks__/rehype-external-links.d.ts +2 -0
- package/dist/cjs/__mocks__/rehype-external-links.js +4 -0
- package/dist/cjs/__mocks__/rehype-sanitize.d.ts +2 -0
- package/dist/cjs/__mocks__/rehype-sanitize.js +4 -0
- package/dist/cjs/__mocks__/rehype-unwrap-images.d.ts +2 -0
- package/dist/cjs/__mocks__/rehype-unwrap-images.js +4 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/tracking/console_tracking_provider.d.ts +10 -0
- package/dist/cjs/tracking/console_tracking_provider.js +27 -0
- package/dist/cjs/tracking/index.d.ts +2 -0
- package/dist/cjs/tracking/index.js +23 -0
- package/dist/cjs/tracking/posthog_tracking_provider.d.ts +9 -0
- package/dist/cjs/tracking/posthog_tracking_provider.js +37 -0
- package/dist/cjs/tracking/segment_tracking_provider.d.ts +10 -0
- package/dist/cjs/tracking/segment_tracking_provider.js +50 -0
- package/dist/cjs/tracking/trackingProviderProxy.d.ts +9 -0
- package/dist/cjs/tracking/trackingProviderProxy.js +24 -0
- package/dist/cjs/tracking/tracking_api.d.ts +8 -0
- package/dist/cjs/tracking/tracking_api.js +2 -0
- package/dist/cjs/tracking/tracking_registry.d.ts +4 -0
- package/dist/cjs/tracking/tracking_registry.js +33 -0
- package/dist/cjs/tracking/tracking_spi.d.ts +9 -0
- package/dist/cjs/tracking/tracking_spi.js +2 -0
- package/dist/cjs/tracking/umami_tracking_provider.d.ts +14 -0
- package/dist/cjs/tracking/umami_tracking_provider.js +44 -0
- package/dist/css/main.css +438 -147
- package/dist/css/main.css.map +1 -1
- package/dist/dynamic/Compare/package.json +1 -0
- package/dist/dynamic/tracking/package.json +1 -0
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.d.ts +1 -0
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.js +47 -0
- package/dist/esm/Chatbot/Chatbot.d.ts +2 -1
- package/dist/esm/Chatbot/Chatbot.js +1 -0
- package/dist/esm/Chatbot/Chatbot.test.d.ts +1 -0
- package/dist/esm/Chatbot/Chatbot.test.js +23 -0
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.d.ts +1 -0
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.js +22 -0
- package/dist/esm/ChatbotContent/ChatbotContent.test.d.ts +1 -0
- package/dist/esm/ChatbotContent/ChatbotContent.test.js +13 -0
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +3 -3
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +3 -1
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +27 -4
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +24 -12
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +99 -3
- package/dist/esm/ChatbotConversationHistoryNav/EmptyState.d.ts +11 -0
- package/dist/esm/ChatbotConversationHistoryNav/EmptyState.js +22 -0
- package/dist/esm/ChatbotConversationHistoryNav/LoadingState.d.ts +4 -0
- package/dist/esm/ChatbotConversationHistoryNav/LoadingState.js +38 -0
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.d.ts +1 -0
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +13 -0
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.d.ts +1 -0
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.js +82 -0
- package/dist/esm/ChatbotFooter/ChatbotFootnote.d.ts +1 -1
- package/dist/esm/ChatbotFooter/ChatbotFootnote.js +1 -1
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.js +13 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.js +13 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +15 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.js +13 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +15 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +38 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +6 -4
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +36 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.d.ts +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.js +4 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.js +50 -0
- package/dist/esm/ChatbotToggle/ChatbotToggle.js +3 -1
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +19 -11
- package/dist/esm/Compare/Compare.d.ts +17 -0
- package/dist/esm/Compare/Compare.js +43 -0
- package/dist/esm/Compare/Compare.test.d.ts +1 -0
- package/dist/esm/Compare/Compare.test.js +15 -0
- package/dist/esm/Compare/index.d.ts +2 -0
- package/dist/esm/Compare/index.js +2 -0
- package/dist/esm/Message/ErrorMessage/ErrorMessage.d.ts +4 -0
- package/dist/esm/Message/ErrorMessage/ErrorMessage.js +21 -0
- package/dist/esm/Message/ImageMessage/ImageMessage.d.ts +4 -0
- package/dist/esm/Message/ImageMessage/ImageMessage.js +20 -0
- package/dist/esm/Message/LinkMessage/LinkMessage.d.ts +4 -0
- package/dist/esm/Message/LinkMessage/LinkMessage.js +25 -0
- package/dist/esm/Message/Message.d.ts +49 -8
- package/dist/esm/Message/Message.js +68 -16
- package/dist/esm/Message/Message.test.js +269 -3
- package/dist/esm/Message/QuickResponse/QuickResponse.d.ts +17 -0
- package/dist/esm/Message/QuickResponse/QuickResponse.js +27 -0
- package/dist/esm/Message/QuickStarts/FallbackImg.d.ts +13 -0
- package/dist/esm/Message/QuickStarts/FallbackImg.js +9 -0
- package/dist/esm/Message/QuickStarts/QuickStartTile.d.ts +27 -0
- package/dist/esm/Message/QuickStarts/QuickStartTile.js +52 -0
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.d.ts +23 -0
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.js +35 -0
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.d.ts +1 -0
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.js +48 -0
- package/dist/esm/Message/QuickStarts/QuickStartTileHeader.d.ts +11 -0
- package/dist/esm/Message/QuickStarts/QuickStartTileHeader.js +5 -0
- package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.d.ts +30 -0
- package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.js +74 -0
- package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart.d.ts +30 -0
- package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart.js +74 -0
- package/dist/esm/Message/QuickStarts/types.d.ts +132 -0
- package/dist/esm/Message/QuickStarts/types.js +14 -0
- package/dist/esm/Message/TableMessage/TableMessage.d.ts +20 -0
- package/dist/esm/Message/TableMessage/TableMessage.js +62 -0
- package/dist/esm/Message/TableMessage/TbodyMessage.d.ts +7 -0
- package/dist/esm/Message/TableMessage/TbodyMessage.js +28 -0
- package/dist/esm/Message/TableMessage/TdMessage.d.ts +5 -0
- package/dist/esm/Message/TableMessage/TdMessage.js +21 -0
- package/dist/esm/Message/TableMessage/ThMessage.d.ts +5 -0
- package/dist/esm/Message/TableMessage/ThMessage.js +21 -0
- package/dist/esm/Message/TableMessage/TheadMessage.d.ts +5 -0
- package/dist/esm/Message/TableMessage/TheadMessage.js +21 -0
- package/dist/esm/Message/TableMessage/TrMessage.d.ts +7 -0
- package/dist/esm/Message/TableMessage/TrMessage.js +32 -0
- package/dist/esm/Message/TextMessage/TextMessage.d.ts +2 -1
- package/dist/esm/Message/TextMessage/TextMessage.js +3 -3
- package/dist/esm/Message/UserFeedback/CloseButton.d.ts +10 -0
- package/dist/esm/Message/UserFeedback/CloseButton.js +9 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.d.ts +39 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.js +49 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.test.d.ts +1 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.test.js +128 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +42 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +112 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.d.ts +1 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +244 -0
- package/dist/esm/MessageBar/AttachButton.js +4 -2
- package/dist/esm/MessageBar/MessageBar.d.ts +11 -4
- package/dist/esm/MessageBar/MessageBar.js +127 -46
- package/dist/esm/MessageBar/MessageBar.test.js +12 -4
- package/dist/esm/MessageBar/MicrophoneButton.d.ts +1 -1
- package/dist/esm/MessageBar/SendButton.js +3 -1
- package/dist/esm/MessageBar/StopButton.js +3 -1
- package/dist/esm/MessageBox/MessageBox.test.d.ts +1 -0
- package/dist/esm/MessageBox/MessageBox.test.js +17 -0
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.d.ts +1 -0
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.js +23 -0
- package/dist/esm/ResponseActions/ResponseActionButton.d.ts +4 -1
- package/dist/esm/ResponseActions/ResponseActionButton.js +18 -3
- package/dist/esm/ResponseActions/ResponseActions.d.ts +8 -2
- package/dist/esm/ResponseActions/ResponseActions.js +7 -7
- package/dist/esm/ResponseActions/ResponseActions.test.js +2 -2
- package/dist/esm/Settings/SettingsForm.test.d.ts +1 -0
- package/dist/esm/Settings/SettingsForm.test.js +21 -0
- package/dist/esm/__mocks__/rehype-external-links.d.ts +2 -0
- package/dist/esm/__mocks__/rehype-external-links.js +2 -0
- package/dist/esm/__mocks__/rehype-sanitize.d.ts +2 -0
- package/dist/esm/__mocks__/rehype-sanitize.js +2 -0
- package/dist/esm/__mocks__/rehype-unwrap-images.d.ts +2 -0
- package/dist/esm/__mocks__/rehype-unwrap-images.js +2 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/tracking/console_tracking_provider.d.ts +10 -0
- package/dist/esm/tracking/console_tracking_provider.js +23 -0
- package/dist/esm/tracking/index.d.ts +2 -0
- package/dist/esm/tracking/index.js +2 -0
- package/dist/esm/tracking/posthog_tracking_provider.d.ts +9 -0
- package/dist/esm/tracking/posthog_tracking_provider.js +33 -0
- package/dist/esm/tracking/segment_tracking_provider.d.ts +10 -0
- package/dist/esm/tracking/segment_tracking_provider.js +46 -0
- package/dist/esm/tracking/trackingProviderProxy.d.ts +9 -0
- package/dist/esm/tracking/trackingProviderProxy.js +22 -0
- package/dist/esm/tracking/tracking_api.d.ts +8 -0
- package/dist/esm/tracking/tracking_api.js +1 -0
- package/dist/esm/tracking/tracking_registry.d.ts +4 -0
- package/dist/esm/tracking/tracking_registry.js +26 -0
- package/dist/esm/tracking/tracking_spi.d.ts +9 -0
- package/dist/esm/tracking/tracking_spi.js +1 -0
- package/dist/esm/tracking/umami_tracking_provider.d.ts +14 -0
- package/dist/esm/tracking/umami_tracking_provider.js +40 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -9
- package/patternfly-docs/content/extensions/chatbot/about-chatbot.md +8 -2
- package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +192 -15
- package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +219 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +214 -12
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDropZone.tsx +2 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithAttachment.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +71 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +27 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +31 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +61 -9
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +244 -14
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +54 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/explore-pipeline-quickstart.ts +65 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFooter.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFootnote.tsx +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +36 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerNavigation.tsx +67 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerResizable.tsx +94 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomePrompt.tsx +7 -7
- package/patternfly-docs/content/extensions/chatbot/examples/UI/SquareChatbotToggle.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +21 -6
- package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +14 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +39 -1
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +48 -35
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +453 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +11 -11
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +206 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Feedback.tsx +104 -0
- package/patternfly-docs/content/extensions/chatbot/img/ai-action-inpage.svg +85 -0
- package/patternfly-docs/content/extensions/chatbot/img/ai-action-message.svg +63 -0
- package/patternfly-docs/content/extensions/chatbot/img/analytics-example.svg +127 -0
- package/patternfly-docs/content/extensions/chatbot/img/attached-file.svg +24 -29
- package/patternfly-docs/content/extensions/chatbot/img/attachment-menu.svg +4 -4
- package/patternfly-docs/content/extensions/chatbot/img/attachment-unsent.svg +30 -58
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-analytics.svg +51 -0
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-elements.svg +11 -12
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-quickstarts-tile.svg +58 -0
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-settings.svg +83 -0
- package/patternfly-docs/content/extensions/chatbot/img/comparison.svg +45 -0
- package/patternfly-docs/content/extensions/chatbot/img/conversation-history.svg +6 -29
- package/patternfly-docs/content/extensions/chatbot/img/docked.svg +259 -241
- package/patternfly-docs/content/extensions/chatbot/img/drawer.svg +255 -0
- package/patternfly-docs/content/extensions/chatbot/img/error-state.svg +30 -0
- package/patternfly-docs/content/extensions/chatbot/img/feedback-form.svg +88 -0
- package/patternfly-docs/content/extensions/chatbot/img/footnote.svg +1 -1
- package/patternfly-docs/content/extensions/chatbot/img/fullscreen.svg +25 -16
- package/patternfly-docs/content/extensions/chatbot/img/listening-pulse.svg +22 -0
- package/patternfly-docs/content/extensions/chatbot/img/listening.svg +1 -1
- package/patternfly-docs/content/extensions/chatbot/img/loading-state.svg +28 -0
- package/patternfly-docs/content/extensions/chatbot/img/masthead-toggle-notification.svg +49 -0
- package/patternfly-docs/content/extensions/chatbot/img/masthead-toggle.svg +75 -0
- package/patternfly-docs/content/extensions/chatbot/img/message-bar-elements.svg +3 -3
- package/patternfly-docs/content/extensions/chatbot/img/message-elements.svg +84 -142
- package/patternfly-docs/content/extensions/chatbot/img/message-feedback.svg +52 -0
- package/patternfly-docs/content/extensions/chatbot/img/message-responses.svg +54 -0
- package/patternfly-docs/content/extensions/chatbot/img/new-chat-emptystate.svg +27 -0
- package/patternfly-docs/content/extensions/chatbot/img/no-results-emptystate.svg +27 -0
- package/patternfly-docs/content/extensions/chatbot/img/overlay.svg +54 -39
- package/patternfly-docs/content/extensions/chatbot/img/posthog.svg +30 -0
- package/patternfly-docs/content/extensions/chatbot/img/segment.svg +36 -0
- package/patternfly-docs/content/extensions/chatbot/img/settings-menu.svg +122 -0
- package/patternfly-docs/content/extensions/chatbot/img/source-tile.svg +62 -0
- package/patternfly-docs/content/extensions/chatbot/img/thank-you-card.svg +81 -0
- package/patternfly-docs/content/extensions/chatbot/img/toggle-customizations.svg +12 -0
- package/patternfly-docs/content/extensions/chatbot/img/toggle-tooltips.svg +38 -0
- package/patternfly-docs/content/extensions/chatbot/img/umami.svg +30 -0
- package/patternfly-docs/content/extensions/chatbot/img/welcome-elements.svg +82 -0
- package/patternfly-docs/content/extensions/chatbot/img/welcome-message.svg +94 -0
- package/src/AttachMenu/AttachMenu.scss +1 -1
- package/src/AttachmentEdit/AttachmentEdit.test.tsx +55 -0
- package/src/Chatbot/Chatbot.scss +20 -1
- package/src/Chatbot/Chatbot.test.tsx +31 -0
- package/src/Chatbot/Chatbot.tsx +2 -1
- package/src/ChatbotAlert/ChatbotAlert.test.tsx +31 -0
- package/src/ChatbotContent/ChatbotContent.scss +1 -0
- package/src/ChatbotContent/ChatbotContent.test.tsx +15 -0
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +10 -4
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +24 -1
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +242 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +94 -26
- package/src/ChatbotConversationHistoryNav/EmptyState.tsx +44 -0
- package/src/ChatbotConversationHistoryNav/LoadingState.tsx +38 -0
- package/src/ChatbotFooter/ChatbotFooter.scss +8 -4
- package/src/ChatbotFooter/ChatbotFooter.test.tsx +15 -0
- package/src/ChatbotFooter/ChatbotFooternote.test.tsx +84 -0
- package/src/ChatbotFooter/ChatbotFootnote.tsx +2 -2
- package/src/ChatbotHeader/ChatbotHeader.scss +5 -6
- package/src/ChatbotHeader/ChatbotHeader.test.tsx +15 -0
- package/src/ChatbotHeader/ChatbotHeaderActions.test.tsx +17 -0
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx +20 -0
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +7 -1
- package/src/ChatbotHeader/ChatbotHeaderMain.test.tsx +17 -0
- package/src/ChatbotHeader/ChatbotHeaderMenu.test.tsx +19 -0
- package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +7 -1
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx +45 -0
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +8 -1
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx +43 -0
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +11 -4
- package/src/ChatbotHeader/ChatbotHeaderTitle.test.tsx +75 -0
- package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +7 -2
- package/src/ChatbotModal/ChatbotModal.scss +12 -12
- package/src/ChatbotToggle/ChatbotToggle.tsx +6 -1
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +2 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +26 -18
- package/src/ChatbotWelcomePrompt/__snapshots__/ChatbotWelcomePrompt.test.tsx.snap +2 -2
- package/src/CodeModal/CodeModal.scss +7 -4
- package/src/Compare/Compare.scss +72 -0
- package/src/Compare/Compare.test.tsx +31 -0
- package/src/Compare/Compare.tsx +98 -0
- package/src/Compare/index.ts +2 -0
- package/src/FileDetails/FileDetails.scss +1 -1
- package/src/FileDetailsLabel/FileDetailsLabel.scss +2 -2
- package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +4 -4
- package/src/Message/ErrorMessage/ErrorMessage.tsx +14 -0
- package/src/Message/ImageMessage/ImageMessage.scss +9 -0
- package/src/Message/ImageMessage/ImageMessage.tsx +14 -0
- package/src/Message/LinkMessage/LinkMessage.tsx +34 -0
- package/src/Message/ListMessage/ListMessage.scss +6 -6
- package/src/Message/Message.scss +4 -26
- package/src/Message/Message.test.tsx +367 -3
- package/src/Message/Message.tsx +157 -31
- package/src/Message/MessageLoading.scss +2 -2
- package/src/Message/QuickResponse/QuickResponse.scss +33 -0
- package/src/Message/QuickResponse/QuickResponse.tsx +54 -0
- package/src/Message/QuickStarts/FallbackImg.tsx +24 -0
- package/src/Message/QuickStarts/QuickStartTile.scss +24 -0
- package/src/Message/QuickStarts/QuickStartTile.tsx +147 -0
- package/src/Message/QuickStarts/QuickStartTileDescription.test.tsx +57 -0
- package/src/Message/QuickStarts/QuickStartTileDescription.tsx +81 -0
- package/src/Message/QuickStarts/QuickStartTileHeader.tsx +21 -0
- package/src/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.ts +75 -0
- package/src/Message/QuickStarts/monitor-sampleapp-quickstart.ts +75 -0
- package/src/Message/QuickStarts/types.ts +154 -0
- package/src/Message/TableMessage/TableMessage.scss +23 -0
- package/src/Message/TableMessage/TableMessage.tsx +83 -0
- package/src/Message/TableMessage/TbodyMessage.tsx +20 -0
- package/src/Message/TableMessage/TdMessage.tsx +11 -0
- package/src/Message/TableMessage/ThMessage.tsx +11 -0
- package/src/Message/TableMessage/TheadMessage.tsx +11 -0
- package/src/Message/TableMessage/TrMessage.tsx +27 -0
- package/src/Message/TextMessage/TextMessage.scss +21 -12
- package/src/Message/TextMessage/TextMessage.tsx +3 -3
- package/src/Message/UserFeedback/CloseButton.tsx +21 -0
- package/src/Message/UserFeedback/UserFeedback.scss +53 -0
- package/src/Message/UserFeedback/UserFeedback.test.tsx +236 -0
- package/src/Message/UserFeedback/UserFeedback.tsx +128 -0
- package/src/Message/UserFeedback/UserFeedbackComplete.test.tsx +255 -0
- package/src/Message/UserFeedback/UserFeedbackComplete.tsx +211 -0
- package/src/MessageBar/AttachButton.scss +19 -3
- package/src/MessageBar/AttachButton.tsx +3 -1
- package/src/MessageBar/MessageBar.scss +58 -24
- package/src/MessageBar/MessageBar.test.tsx +12 -4
- package/src/MessageBar/MessageBar.tsx +164 -65
- package/src/MessageBar/MicrophoneButton.scss +8 -8
- package/src/MessageBar/MicrophoneButton.tsx +1 -1
- package/src/MessageBar/SendButton.tsx +2 -0
- package/src/MessageBar/StopButton.scss +17 -3
- package/src/MessageBar/StopButton.tsx +2 -0
- package/src/MessageBox/JumpButton.scss +6 -6
- package/src/MessageBox/MessageBox.scss +1 -0
- package/src/MessageBox/MessageBox.test.tsx +26 -0
- package/src/PreviewAttachment/PreviewAttachment.test.tsx +51 -0
- package/src/ResponseActions/ResponseActionButton.tsx +14 -2
- package/src/ResponseActions/ResponseActions.scss +2 -2
- package/src/ResponseActions/ResponseActions.test.tsx +4 -2
- package/src/ResponseActions/ResponseActions.tsx +26 -2
- package/src/Settings/Settings.scss +2 -2
- package/src/Settings/SettingsForm.test.tsx +28 -0
- package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.scss +2 -2
- package/src/SourcesCard/SourcesCard.scss +9 -3
- package/src/TermsOfUse/TermsOfUse.scss +1 -1
- package/src/__mocks__/rehype-external-links.ts +3 -0
- package/src/__mocks__/rehype-sanitize.ts +3 -0
- package/src/__mocks__/rehype-unwrap-images.tsx +3 -0
- package/src/index.ts +6 -0
- package/src/main.scss +6 -6
- package/src/tracking/console_tracking_provider.ts +30 -0
- package/src/tracking/index.ts +3 -0
- package/src/tracking/posthog_tracking_provider.ts +42 -0
- package/src/tracking/segment_tracking_provider.ts +62 -0
- package/src/tracking/trackingProviderProxy.ts +28 -0
- package/src/tracking/tracking_api.ts +11 -0
- package/src/tracking/tracking_registry.ts +33 -0
- package/src/tracking/tracking_spi.ts +14 -0
- package/src/tracking/umami_tracking_provider.ts +54 -0
@@ -0,0 +1,27 @@
|
|
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 React from 'react';
|
13
|
+
import { Label, LabelGroup } from '@patternfly/react-core';
|
14
|
+
import { CheckIcon } from '@patternfly/react-icons';
|
15
|
+
export const QuickResponse = ({ quickResponses, quickResponseContainerProps = { numLabels: 5 }, onSelect }) => {
|
16
|
+
const [selectedQuickResponse, setSelectedQuickResponse] = React.useState();
|
17
|
+
const handleQuickResponseClick = (id, onClick) => {
|
18
|
+
setSelectedQuickResponse(id);
|
19
|
+
onClick && onClick();
|
20
|
+
onSelect && onSelect(id);
|
21
|
+
};
|
22
|
+
return (React.createElement(LabelGroup, Object.assign({ className: `pf-chatbot__message-quick-response ${(quickResponseContainerProps === null || quickResponseContainerProps === void 0 ? void 0 : quickResponseContainerProps.className) ? quickResponseContainerProps === null || quickResponseContainerProps === void 0 ? void 0 : quickResponseContainerProps.className : ''}` }, quickResponseContainerProps), quickResponses.map((_a) => {
|
23
|
+
var { id, onClick, content, className } = _a, props = __rest(_a, ["id", "onClick", "content", "className"]);
|
24
|
+
return (React.createElement(Label, Object.assign({ variant: id === selectedQuickResponse ? undefined : 'outline', icon: id === selectedQuickResponse ? React.createElement(CheckIcon, null) : undefined, color: "blue", key: id, onClick: () => handleQuickResponseClick(id, onClick), className: `${id === selectedQuickResponse ? 'pf-chatbot__message-quick-response--selected' : ''} ${className ? className : ''}` }, props), content));
|
25
|
+
})));
|
26
|
+
};
|
27
|
+
export default QuickResponse;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface FallbackImgProps {
|
3
|
+
/** Image source */
|
4
|
+
src: string;
|
5
|
+
/** Alt text for image */
|
6
|
+
alt?: string;
|
7
|
+
/** ClassName applied to image */
|
8
|
+
className?: string;
|
9
|
+
/** Fallback */
|
10
|
+
fallback?: React.ReactNode;
|
11
|
+
}
|
12
|
+
declare const FallbackImg: React.FC<FallbackImgProps>;
|
13
|
+
export default FallbackImg;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
const FallbackImg = ({ src, alt, className, fallback }) => {
|
3
|
+
const [isSrcValid, setIsSrcValid] = React.useState(true);
|
4
|
+
if (src && isSrcValid) {
|
5
|
+
return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
|
6
|
+
}
|
7
|
+
return React.createElement(React.Fragment, null, fallback);
|
8
|
+
};
|
9
|
+
export default FallbackImg;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { QuickStart, QuickstartAction } from './types';
|
3
|
+
export declare const camelize: (str: string) => string;
|
4
|
+
export interface QuickStartTileProps {
|
5
|
+
/** ClassName applied to the card */
|
6
|
+
className?: string;
|
7
|
+
/** The quickstart object triggered by this tile */
|
8
|
+
quickStart: QuickStart;
|
9
|
+
/** Event handler attached to the tile */
|
10
|
+
onClick?: () => void;
|
11
|
+
/** Action config for button rendered next to title */
|
12
|
+
action?: QuickstartAction;
|
13
|
+
/** Callback that returns active quick start value when clicked */
|
14
|
+
onSelectQuickStart: (id?: string) => void;
|
15
|
+
/** Label for the English word "minute". */
|
16
|
+
minuteWord?: string;
|
17
|
+
/** Label for the English word "minutes". */
|
18
|
+
minuteWordPlural?: string;
|
19
|
+
/** Label for the English word "Prerequisite" */
|
20
|
+
prerequisiteWord?: string;
|
21
|
+
/** Label for the English word "Prerequisites" */
|
22
|
+
prerequisiteWordPlural?: string;
|
23
|
+
/** Aria-label for the quick start description button */
|
24
|
+
quickStartButtonAriaLabel?: string;
|
25
|
+
}
|
26
|
+
declare const QuickStartTile: React.FC<QuickStartTileProps>;
|
27
|
+
export default QuickStartTile;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import RocketIcon from '@patternfly/react-icons/dist/js/icons/rocket-icon';
|
3
|
+
import OutlinedBookmarkIcon from '@patternfly/react-icons/dist/js/icons/outlined-bookmark-icon';
|
4
|
+
import { Card, CardBody, CardHeader, CardFooter, CardTitle, Icon, Button, Flex, Stack, Label, pluralize } from '@patternfly/react-core';
|
5
|
+
import OutlinedClockIcon from '@patternfly/react-icons/dist/js/icons/outlined-clock-icon';
|
6
|
+
import QuickStartTileHeader from './QuickStartTileHeader';
|
7
|
+
import QuickStartTileDescription from './QuickStartTileDescription';
|
8
|
+
import FallbackImg from './FallbackImg';
|
9
|
+
export const camelize = (str) => str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) {
|
10
|
+
if (+match === 0) {
|
11
|
+
return '';
|
12
|
+
} // or if (/\s+/.test(match)) for white spaces
|
13
|
+
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
14
|
+
});
|
15
|
+
const QuickStartTile = ({ className, quickStart, onClick, onSelectQuickStart, minuteWord = 'minute', minuteWordPlural = 'minutes', prerequisiteWord, prerequisiteWordPlural, quickStartButtonAriaLabel, action }) => {
|
16
|
+
const { metadata: { name: id }, spec: { icon, displayName, description, durationMinutes, prerequisites, link, type } } = quickStart;
|
17
|
+
let quickStartIcon;
|
18
|
+
if (typeof icon === 'object') {
|
19
|
+
quickStartIcon = React.createElement(Icon, { size: "2xl" }, icon);
|
20
|
+
}
|
21
|
+
else {
|
22
|
+
quickStartIcon = (React.createElement(Icon, { size: "2xl" },
|
23
|
+
React.createElement(FallbackImg, { src: icon, alt: "", className: "pfext-catalog-item-icon__img", fallback: React.createElement(RocketIcon, null) })));
|
24
|
+
}
|
25
|
+
const onSelect = () => {
|
26
|
+
if (!link) {
|
27
|
+
onSelectQuickStart(id);
|
28
|
+
}
|
29
|
+
else {
|
30
|
+
window.open(link.href, '_blank', 'noopener,noreferrer');
|
31
|
+
}
|
32
|
+
onClick && onClick();
|
33
|
+
};
|
34
|
+
const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon;
|
35
|
+
const additionalAction = action ? (React.createElement(Button, Object.assign({ "aria-label": action['aria-label'], icon: React.createElement(ActionIcon, null), variant: "plain", onClick: action.onClick }, action.buttonProps))) : undefined;
|
36
|
+
return (React.createElement(Card, { className: `pf-chatbot__quickstarts-tile ${className ? className : ''}`, id: `${id}-chatbot-qs-tile`, style: { height: '100%' }, "data-testid": `chatbot-qs-card-${camelize(displayName)}` },
|
37
|
+
React.createElement(CardHeader, Object.assign({}, (action && {
|
38
|
+
actions: { actions: additionalAction }
|
39
|
+
})), quickStartIcon),
|
40
|
+
React.createElement(CardTitle, null,
|
41
|
+
React.createElement(QuickStartTileHeader, { name: displayName, onSelect: onSelect, quickStartId: id })),
|
42
|
+
React.createElement(CardBody, null,
|
43
|
+
React.createElement(Stack, { hasGutter: true },
|
44
|
+
React.createElement(Flex, { spaceItems: { default: 'spaceItemsSm' } },
|
45
|
+
type && React.createElement(Label, { color: type.color }, type.text),
|
46
|
+
durationMinutes && (React.createElement(Label, { variant: "outline", "data-test": "duration", icon: React.createElement(OutlinedClockIcon, null) }, pluralize(durationMinutes, minuteWord, minuteWordPlural)))),
|
47
|
+
React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites, prerequisiteWord: prerequisiteWord, prerequisiteWordPlural: prerequisiteWordPlural, quickStartButtonAriaLabel: quickStartButtonAriaLabel }))),
|
48
|
+
React.createElement(CardFooter, null,
|
49
|
+
React.createElement(Button, { variant: "link", isInline: true, onClick: onSelect },
|
50
|
+
React.createElement("span", { className: "pf-v6-c-button__text" }, "Start")))));
|
51
|
+
};
|
52
|
+
export default QuickStartTile;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface QuickStartTileDescriptionProps {
|
3
|
+
/** QuickStart description */
|
4
|
+
description: string;
|
5
|
+
/** QuickStart prerequisites */
|
6
|
+
prerequisites?: string[];
|
7
|
+
/** Label for the English word "Prerequisite" */
|
8
|
+
prerequisiteWord?: string;
|
9
|
+
/** Label for the English word "Prerequisites" */
|
10
|
+
prerequisiteWordPlural?: string;
|
11
|
+
/** Aria-label for the quick start button */
|
12
|
+
quickStartButtonAriaLabel?: string;
|
13
|
+
}
|
14
|
+
/** This function is a helper for pluralizing strings stolen from React.
|
15
|
+
*
|
16
|
+
* @param {number} i The quantity of the string you want to pluralize
|
17
|
+
* @param {string} singular The singular version of the string
|
18
|
+
* @param {string} plural The change to the string that should occur if the quantity is not equal to 1.
|
19
|
+
* Defaults to adding an 's'.
|
20
|
+
*/
|
21
|
+
export declare function pluralizeWord(i: number, singular: string, plural?: string): string;
|
22
|
+
declare const QuickStartTileDescription: React.FC<QuickStartTileDescriptionProps>;
|
23
|
+
export default QuickStartTileDescription;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Button, Flex, pluralize, Popover } from '@patternfly/react-core';
|
3
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
4
|
+
/** This function is a helper for pluralizing strings stolen from React.
|
5
|
+
*
|
6
|
+
* @param {number} i The quantity of the string you want to pluralize
|
7
|
+
* @param {string} singular The singular version of the string
|
8
|
+
* @param {string} plural The change to the string that should occur if the quantity is not equal to 1.
|
9
|
+
* Defaults to adding an 's'.
|
10
|
+
*/
|
11
|
+
export function pluralizeWord(i, singular, plural) {
|
12
|
+
if (!plural) {
|
13
|
+
plural = `${singular}s`;
|
14
|
+
}
|
15
|
+
return `${i === 1 ? singular : plural}`;
|
16
|
+
}
|
17
|
+
const QuickStartTileDescription = ({ description, prerequisites, prerequisiteWord = 'Prerequisite', prerequisiteWordPlural = 'Prerequisites', quickStartButtonAriaLabel = 'Show prerequisites' }) => {
|
18
|
+
const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
|
19
|
+
const buttonRef = React.useRef(null);
|
20
|
+
const pluralizedPrereq = pluralizeWord((prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) || 0, prerequisiteWord, prerequisiteWordPlural);
|
21
|
+
return (React.createElement(React.Fragment, null,
|
22
|
+
description,
|
23
|
+
prereqs && prereqs.length > 0 && (React.createElement(Flex, { spaceItems: { default: 'spaceItemsSm' } },
|
24
|
+
React.createElement("h5", null, pluralize(prereqs.length, prerequisiteWord, prerequisiteWordPlural)),
|
25
|
+
React.createElement(Button, { variant: "link", isInline: true, "data-testid": "qs-card-prereqs", ref: buttonRef, onClick: (e) => {
|
26
|
+
e.preventDefault();
|
27
|
+
e.stopPropagation();
|
28
|
+
}, "aria-label": quickStartButtonAriaLabel },
|
29
|
+
React.createElement(InfoCircleIcon, null)),
|
30
|
+
React.createElement(Popover, { "aria-label": pluralizedPrereq, headerContent: pluralizedPrereq, triggerRef: buttonRef, bodyContent: React.createElement("div", null,
|
31
|
+
React.createElement("ul", { "aria-label": pluralizedPrereq }, prereqs.map((prerequisite, index) => (
|
32
|
+
// eslint-disable-next-line react/no-array-index-key
|
33
|
+
React.createElement("li", { key: index }, prerequisite))))) })))));
|
34
|
+
};
|
35
|
+
export default QuickStartTileDescription;
|
@@ -0,0 +1 @@
|
|
1
|
+
import '@testing-library/jest-dom';
|
@@ -0,0 +1,48 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import React from 'react';
|
11
|
+
import { render, screen } from '@testing-library/react';
|
12
|
+
import '@testing-library/jest-dom';
|
13
|
+
import userEvent from '@testing-library/user-event';
|
14
|
+
import { monitorSampleAppQuickStart } from './monitor-sampleapp-quickstart';
|
15
|
+
import QuickStartTileDescription, { pluralizeWord } from './QuickStartTileDescription';
|
16
|
+
describe('pluralizeWord function', () => {
|
17
|
+
it('should render no plural correctly', () => {
|
18
|
+
expect(pluralizeWord(2, 'pizza')).toBe('pizzas');
|
19
|
+
});
|
20
|
+
});
|
21
|
+
describe('QuickStart tile description', () => {
|
22
|
+
it('should render no prereqs correctly', () => {
|
23
|
+
render(React.createElement(QuickStartTileDescription, { description: monitorSampleAppQuickStart.spec.description }));
|
24
|
+
expect(screen.queryByRole('heading')).toBeFalsy();
|
25
|
+
});
|
26
|
+
it('should render singular prereq correctly', () => {
|
27
|
+
render(React.createElement(QuickStartTileDescription, { description: monitorSampleAppQuickStart.spec.description, prerequisites: [`You completed the "Getting started with a sample" quick start.`] }));
|
28
|
+
expect(screen.getByRole('heading', { name: /1 Prerequisite/i })).toBeTruthy();
|
29
|
+
expect(screen.getByRole('button', { name: /Show prerequisite/i })).toBeTruthy();
|
30
|
+
});
|
31
|
+
it('should render plural prereq correctly', () => {
|
32
|
+
render(React.createElement(QuickStartTileDescription, { description: monitorSampleAppQuickStart.spec.description, prerequisites: [
|
33
|
+
`You completed the "Getting started with a sample" quick start.`,
|
34
|
+
`You completed the app quick start`
|
35
|
+
] }));
|
36
|
+
expect(screen.getByRole('heading', { name: /2 Prerequisites/i })).toBeTruthy();
|
37
|
+
expect(screen.getByRole('button', { name: /Show prerequisites/i })).toBeTruthy();
|
38
|
+
});
|
39
|
+
it('should be able to click prereqs link', () => __awaiter(void 0, void 0, void 0, function* () {
|
40
|
+
render(React.createElement(QuickStartTileDescription, { description: monitorSampleAppQuickStart.spec.description, prerequisites: [`You completed the "Getting started with a sample" quick start.`] }));
|
41
|
+
const button = screen.getByRole('button', { name: /Show prerequisites/i });
|
42
|
+
expect(screen.queryByRole('dialog', { name: /Prerequisite/i })).toBeFalsy();
|
43
|
+
yield userEvent.click(button);
|
44
|
+
expect(screen.getByRole('dialog', { name: /Prerequisite/i })).toBeTruthy();
|
45
|
+
expect(screen.getByRole('button', { name: /Close/i })).toBeTruthy();
|
46
|
+
expect(screen.getByText(/You completed the "Getting started with a sample" quick start./i)).toBeTruthy();
|
47
|
+
}));
|
48
|
+
});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface QuickStartTileHeaderProps {
|
3
|
+
/** Name for the header */
|
4
|
+
name: string;
|
5
|
+
/** Id for the QuickStart */
|
6
|
+
quickStartId?: string;
|
7
|
+
/** Callback for when the name of the QuickStart is clicked */
|
8
|
+
onSelect: (e: React.FormEvent<HTMLInputElement> | React.MouseEvent<Element, MouseEvent>) => void;
|
9
|
+
}
|
10
|
+
declare const QuickStartTileHeader: React.FC<QuickStartTileHeaderProps>;
|
11
|
+
export default QuickStartTileHeader;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Button, Flex } from '@patternfly/react-core';
|
3
|
+
const QuickStartTileHeader = ({ name, quickStartId, onSelect }) => (React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
|
4
|
+
React.createElement(Button, { "data-test": "title", id: quickStartId, variant: "link", isInline: true, onClick: onSelect }, name)));
|
5
|
+
export default QuickStartTileHeader;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
export declare const monitorSampleAppQuickStartWithImage: {
|
2
|
+
apiVersion: string;
|
3
|
+
kind: string;
|
4
|
+
metadata: {
|
5
|
+
name: string;
|
6
|
+
};
|
7
|
+
spec: {
|
8
|
+
icon: string;
|
9
|
+
version: number;
|
10
|
+
displayName: string;
|
11
|
+
durationMinutes: number;
|
12
|
+
description: string;
|
13
|
+
prerequisites: string[];
|
14
|
+
introduction: string;
|
15
|
+
tasks: {
|
16
|
+
title: string;
|
17
|
+
description: string;
|
18
|
+
review: {
|
19
|
+
instructions: string;
|
20
|
+
failedTaskHelp: string;
|
21
|
+
};
|
22
|
+
summary: {
|
23
|
+
success: string;
|
24
|
+
failed: string;
|
25
|
+
};
|
26
|
+
}[];
|
27
|
+
conclusion: string;
|
28
|
+
nextQuickStart: string[];
|
29
|
+
};
|
30
|
+
};
|
@@ -0,0 +1,74 @@
|
|
1
|
+
export const monitorSampleAppQuickStartWithImage = {
|
2
|
+
apiVersion: 'console.openshift.io/v1',
|
3
|
+
kind: 'QuickStarts',
|
4
|
+
metadata: {
|
5
|
+
name: 'monitor-sampleapp'
|
6
|
+
},
|
7
|
+
spec: {
|
8
|
+
icon: 'test.png', // this is only difference
|
9
|
+
version: 4.7,
|
10
|
+
displayName: 'Monitoring your sample application',
|
11
|
+
durationMinutes: 10,
|
12
|
+
description: `Now that you’ve created a sample application and added health checks, let’s monitor your application.`,
|
13
|
+
prerequisites: [`You completed the "Getting started with a sample" quick start.`],
|
14
|
+
introduction: `### This quick start shows you how to monitor your sample application.
|
15
|
+
You should have previously created the **sample-app** application and **nodejs-sample** deployment via the **Get started with a sample** quick start. If you haven't, you may be able to follow these tasks with any existing deployment.`,
|
16
|
+
tasks: [
|
17
|
+
{
|
18
|
+
title: `Viewing the monitoring details of your sample application`,
|
19
|
+
description: `### To view the details of your sample application:
|
20
|
+
1. Go to the project your sample application was created in.
|
21
|
+
2. In the **</> Developer** perspective, go to **Topology** view.
|
22
|
+
3. Click on the **nodejs-sample** deployment to view its details.
|
23
|
+
4. Click on the **Monitoring** tab in the side panel.
|
24
|
+
You can see context sensitive metrics and alerts in the **Monitoring** tab.`,
|
25
|
+
review: {
|
26
|
+
instructions: `#### To verify you can view the monitoring information:
|
27
|
+
1. Do you see a **Metrics** accordion in the side panel?
|
28
|
+
2. Do you see a **View monitoring dashboard** link in the **Metrics** accordion?
|
29
|
+
3. Do you see three charts in the **Metrics** accordion: **CPU Usage**, **Memory Usage** and **Receive Bandwidth**?`,
|
30
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`
|
31
|
+
},
|
32
|
+
summary: {
|
33
|
+
success: `You have learned how you can monitor your sample app!`,
|
34
|
+
failed: `Try the steps again.`
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
title: `Viewing your project monitoring dashboard`,
|
39
|
+
description: `### To view the project monitoring dashboard in the context of **nodejs-sample**:
|
40
|
+
1. Click on the **View monitoring dashboard** link in the side panel.
|
41
|
+
2. You can change the **Time Range** and **Refresh Interval** of the dashboard.
|
42
|
+
3. You can change the context of the dashboard as well by clicking on the drop-down list. Select a specific workload or **All Workloads** to view the dashboard in the context of the entire project.`,
|
43
|
+
review: {
|
44
|
+
instructions: `#### To verify that you are able to view the monitoring dashboard:
|
45
|
+
Do you see metrics charts in the dashboard?`,
|
46
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`
|
47
|
+
},
|
48
|
+
summary: {
|
49
|
+
success: `You have learned how to view the dashboard in the context of your sample app!`,
|
50
|
+
failed: `Try the steps again.`
|
51
|
+
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
title: `Viewing custom metrics`,
|
55
|
+
description: `### To view custom metrics:
|
56
|
+
1. Click on the **Metrics** tab of the **Monitoring** page.
|
57
|
+
2. Click the **Select Query** drop-down list to see the available queries.
|
58
|
+
3. Click on **Filesystem Usage** from the list to run the query.`,
|
59
|
+
review: {
|
60
|
+
instructions: `#### Verify you can see the chart associated with the query:
|
61
|
+
Do you see a chart displayed with filesystem usage for your project? Note: select **Custom Query** from the dropdown to create and run a custom query utilizing PromQL.
|
62
|
+
`,
|
63
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`
|
64
|
+
},
|
65
|
+
summary: {
|
66
|
+
success: `You have learned how to run a query!`,
|
67
|
+
failed: `Try the steps again.`
|
68
|
+
}
|
69
|
+
}
|
70
|
+
],
|
71
|
+
conclusion: `You have learned how to access workload monitoring and metrics!`,
|
72
|
+
nextQuickStart: [``]
|
73
|
+
}
|
74
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
export declare const monitorSampleAppQuickStart: {
|
2
|
+
apiVersion: string;
|
3
|
+
kind: string;
|
4
|
+
metadata: {
|
5
|
+
name: string;
|
6
|
+
};
|
7
|
+
spec: {
|
8
|
+
version: number;
|
9
|
+
displayName: string;
|
10
|
+
durationMinutes: number;
|
11
|
+
icon: string;
|
12
|
+
description: string;
|
13
|
+
prerequisites: string[];
|
14
|
+
introduction: string;
|
15
|
+
tasks: {
|
16
|
+
title: string;
|
17
|
+
description: string;
|
18
|
+
review: {
|
19
|
+
instructions: string;
|
20
|
+
failedTaskHelp: string;
|
21
|
+
};
|
22
|
+
summary: {
|
23
|
+
success: string;
|
24
|
+
failed: string;
|
25
|
+
};
|
26
|
+
}[];
|
27
|
+
conclusion: string;
|
28
|
+
nextQuickStart: string[];
|
29
|
+
};
|
30
|
+
};
|
@@ -0,0 +1,74 @@
|
|
1
|
+
export const monitorSampleAppQuickStart = {
|
2
|
+
apiVersion: 'console.openshift.io/v1',
|
3
|
+
kind: 'QuickStarts',
|
4
|
+
metadata: {
|
5
|
+
name: 'monitor-sampleapp'
|
6
|
+
},
|
7
|
+
spec: {
|
8
|
+
version: 4.7,
|
9
|
+
displayName: 'Monitoring your sample application',
|
10
|
+
durationMinutes: 10,
|
11
|
+
icon: '',
|
12
|
+
description: `Now that you’ve created a sample application and added health checks, let’s monitor your application.`,
|
13
|
+
prerequisites: [`You completed the "Getting started with a sample" quick start.`],
|
14
|
+
introduction: `### This quick start shows you how to monitor your sample application.
|
15
|
+
You should have previously created the **sample-app** application and **nodejs-sample** deployment via the **Get started with a sample** quick start. If you haven't, you may be able to follow these tasks with any existing deployment.`,
|
16
|
+
tasks: [
|
17
|
+
{
|
18
|
+
title: `Viewing the monitoring details of your sample application`,
|
19
|
+
description: `### To view the details of your sample application:
|
20
|
+
1. Go to the project your sample application was created in.
|
21
|
+
2. In the **</> Developer** perspective, go to **Topology** view.
|
22
|
+
3. Click on the **nodejs-sample** deployment to view its details.
|
23
|
+
4. Click on the **Monitoring** tab in the side panel.
|
24
|
+
You can see context sensitive metrics and alerts in the **Monitoring** tab.`,
|
25
|
+
review: {
|
26
|
+
instructions: `#### To verify you can view the monitoring information:
|
27
|
+
1. Do you see a **Metrics** accordion in the side panel?
|
28
|
+
2. Do you see a **View monitoring dashboard** link in the **Metrics** accordion?
|
29
|
+
3. Do you see three charts in the **Metrics** accordion: **CPU Usage**, **Memory Usage** and **Receive Bandwidth**?`,
|
30
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`
|
31
|
+
},
|
32
|
+
summary: {
|
33
|
+
success: `You have learned how you can monitor your sample app!`,
|
34
|
+
failed: `Try the steps again.`
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
title: `Viewing your project monitoring dashboard`,
|
39
|
+
description: `### To view the project monitoring dashboard in the context of **nodejs-sample**:
|
40
|
+
1. Click on the **View monitoring dashboard** link in the side panel.
|
41
|
+
2. You can change the **Time Range** and **Refresh Interval** of the dashboard.
|
42
|
+
3. You can change the context of the dashboard as well by clicking on the drop-down list. Select a specific workload or **All Workloads** to view the dashboard in the context of the entire project.`,
|
43
|
+
review: {
|
44
|
+
instructions: `#### To verify that you are able to view the monitoring dashboard:
|
45
|
+
Do you see metrics charts in the dashboard?`,
|
46
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`
|
47
|
+
},
|
48
|
+
summary: {
|
49
|
+
success: `You have learned how to view the dashboard in the context of your sample app!`,
|
50
|
+
failed: `Try the steps again.`
|
51
|
+
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
title: `Viewing custom metrics`,
|
55
|
+
description: `### To view custom metrics:
|
56
|
+
1. Click on the **Metrics** tab of the **Monitoring** page.
|
57
|
+
2. Click the **Select Query** drop-down list to see the available queries.
|
58
|
+
3. Click on **Filesystem Usage** from the list to run the query.`,
|
59
|
+
review: {
|
60
|
+
instructions: `#### Verify you can see the chart associated with the query:
|
61
|
+
Do you see a chart displayed with filesystem usage for your project? Note: select **Custom Query** from the dropdown to create and run a custom query utilizing PromQL.
|
62
|
+
`,
|
63
|
+
failedTaskHelp: `This task isn’t verified yet. Try the task again.`
|
64
|
+
},
|
65
|
+
summary: {
|
66
|
+
success: `You have learned how to run a query!`,
|
67
|
+
failed: `Try the steps again.`
|
68
|
+
}
|
69
|
+
}
|
70
|
+
],
|
71
|
+
conclusion: `You have learned how to access workload monitoring and metrics!`,
|
72
|
+
nextQuickStart: [``]
|
73
|
+
}
|
74
|
+
};
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import { ButtonProps } from '@patternfly/react-core';
|
2
|
+
export interface AccessReviewResourceAttributes {
|
3
|
+
group?: string;
|
4
|
+
resource?: string;
|
5
|
+
subresource?: string;
|
6
|
+
verb?: K8sVerb;
|
7
|
+
name?: string;
|
8
|
+
namespace?: string;
|
9
|
+
}
|
10
|
+
export type K8sVerb = 'create' | 'get' | 'list' | 'update' | 'patch' | 'delete' | 'deletecollection' | 'watch';
|
11
|
+
export interface QuickStart {
|
12
|
+
apiVersion?: string;
|
13
|
+
kind?: string;
|
14
|
+
metadata: ObjectMetadata;
|
15
|
+
spec: QuickStartSpec;
|
16
|
+
}
|
17
|
+
export interface ObjectMetadata {
|
18
|
+
name: string;
|
19
|
+
annotations?: {
|
20
|
+
[key: string]: string;
|
21
|
+
};
|
22
|
+
clusterName?: string;
|
23
|
+
creationTimestamp?: string;
|
24
|
+
deletionGracePeriodSeconds?: number;
|
25
|
+
deletionTimestamp?: string;
|
26
|
+
finalizers?: string[];
|
27
|
+
generateName?: string;
|
28
|
+
generation?: number;
|
29
|
+
labels?: {
|
30
|
+
[key: string]: string;
|
31
|
+
};
|
32
|
+
managedFields?: any[];
|
33
|
+
namespace?: string;
|
34
|
+
ownerReferences?: OwnerReference[];
|
35
|
+
resourceVersion?: string;
|
36
|
+
uid?: string;
|
37
|
+
language?: string;
|
38
|
+
country?: string;
|
39
|
+
locale?: string;
|
40
|
+
[key: string]: any;
|
41
|
+
}
|
42
|
+
export interface OwnerReference {
|
43
|
+
name: string;
|
44
|
+
kind: string;
|
45
|
+
uid: string;
|
46
|
+
apiVersion: string;
|
47
|
+
controller?: boolean;
|
48
|
+
blockOwnerDeletion?: boolean;
|
49
|
+
}
|
50
|
+
export interface QuickStartTask {
|
51
|
+
title?: string;
|
52
|
+
description?: string;
|
53
|
+
review?: QuickStartTaskReview;
|
54
|
+
summary?: QuickStartTaskSummary;
|
55
|
+
proc?: string;
|
56
|
+
}
|
57
|
+
export interface QuickStartTaskReview {
|
58
|
+
instructions?: string;
|
59
|
+
failedTaskHelp?: string;
|
60
|
+
}
|
61
|
+
export interface QuickStartTaskSummary {
|
62
|
+
success?: string;
|
63
|
+
failed?: string;
|
64
|
+
}
|
65
|
+
export interface QuickstartAction {
|
66
|
+
/** Screen reader aria label. */
|
67
|
+
'aria-label': string;
|
68
|
+
/** Icon to be rendered as a plain button, by default Bookmark outlined will be used. */
|
69
|
+
icon?: React.ComponentType<unknown>;
|
70
|
+
/** Callback with synthetic event parameter. */
|
71
|
+
onClick?: (e: React.SyntheticEvent) => void;
|
72
|
+
/** Additional button props to be rendered as extra props. */
|
73
|
+
buttonProps?: ButtonProps;
|
74
|
+
}
|
75
|
+
export interface QuickStart {
|
76
|
+
apiVersion?: string;
|
77
|
+
kind?: string;
|
78
|
+
metadata: ObjectMetadata;
|
79
|
+
spec: QuickStartSpec;
|
80
|
+
}
|
81
|
+
export interface QuickStartSpec {
|
82
|
+
version?: number;
|
83
|
+
displayName: string;
|
84
|
+
durationMinutes?: number;
|
85
|
+
icon: React.ReactNode;
|
86
|
+
description: string;
|
87
|
+
prerequisites?: string[];
|
88
|
+
introduction?: string;
|
89
|
+
tasks?: QuickStartTask[];
|
90
|
+
conclusion?: string;
|
91
|
+
nextQuickStart?: string[];
|
92
|
+
accessReviewResources?: AccessReviewResourceAttributes[];
|
93
|
+
link?: QuickStartExternal;
|
94
|
+
type?: QuickStartType;
|
95
|
+
}
|
96
|
+
export interface QuickStartTask {
|
97
|
+
title?: string;
|
98
|
+
description?: string;
|
99
|
+
review?: QuickStartTaskReview;
|
100
|
+
summary?: QuickStartTaskSummary;
|
101
|
+
proc?: string;
|
102
|
+
}
|
103
|
+
export interface QuickStartTaskReview {
|
104
|
+
instructions?: string;
|
105
|
+
failedTaskHelp?: string;
|
106
|
+
}
|
107
|
+
export interface QuickStartTaskSummary {
|
108
|
+
success?: string;
|
109
|
+
failed?: string;
|
110
|
+
}
|
111
|
+
export type AllQuickStartStates = Record<string, QuickStartState>;
|
112
|
+
export type QuickStartState = Record<string, string | number | QuickStartStatus>;
|
113
|
+
export declare enum QuickStartStatus {
|
114
|
+
COMPLETE = "Complete",
|
115
|
+
IN_PROGRESS = "In Progress",
|
116
|
+
NOT_STARTED = "Not started"
|
117
|
+
}
|
118
|
+
export declare enum QuickStartTaskStatus {
|
119
|
+
INIT = "Initial",
|
120
|
+
VISITED = "Visited",
|
121
|
+
REVIEW = "Review",
|
122
|
+
SUCCESS = "Success",
|
123
|
+
FAILED = "Failed"
|
124
|
+
}
|
125
|
+
export interface QuickStartExternal {
|
126
|
+
href: string;
|
127
|
+
text?: string;
|
128
|
+
}
|
129
|
+
export interface QuickStartType {
|
130
|
+
text: string;
|
131
|
+
color?: 'green' | 'purple' | 'grey' | 'blue' | 'orange' | 'red' | 'teal' | 'orangered' | 'yellow';
|
132
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export var QuickStartStatus;
|
2
|
+
(function (QuickStartStatus) {
|
3
|
+
QuickStartStatus["COMPLETE"] = "Complete";
|
4
|
+
QuickStartStatus["IN_PROGRESS"] = "In Progress";
|
5
|
+
QuickStartStatus["NOT_STARTED"] = "Not started";
|
6
|
+
})(QuickStartStatus || (QuickStartStatus = {}));
|
7
|
+
export var QuickStartTaskStatus;
|
8
|
+
(function (QuickStartTaskStatus) {
|
9
|
+
QuickStartTaskStatus["INIT"] = "Initial";
|
10
|
+
QuickStartTaskStatus["VISITED"] = "Visited";
|
11
|
+
QuickStartTaskStatus["REVIEW"] = "Review";
|
12
|
+
QuickStartTaskStatus["SUCCESS"] = "Success";
|
13
|
+
QuickStartTaskStatus["FAILED"] = "Failed";
|
14
|
+
})(QuickStartTaskStatus || (QuickStartTaskStatus = {}));
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ExtraProps } from 'react-markdown';
|
3
|
+
import { TableProps } from '@patternfly/react-table';
|
4
|
+
interface Properties {
|
5
|
+
line: number;
|
6
|
+
column: number;
|
7
|
+
offset: number;
|
8
|
+
}
|
9
|
+
export interface TableNode {
|
10
|
+
children?: TableNode[];
|
11
|
+
value?: string;
|
12
|
+
position: {
|
13
|
+
start: Properties;
|
14
|
+
end: Properties;
|
15
|
+
};
|
16
|
+
tagName: string;
|
17
|
+
type: string;
|
18
|
+
}
|
19
|
+
declare const TableMessage: ({ children, ...props }: TableProps & ExtraProps) => React.JSX.Element;
|
20
|
+
export default TableMessage;
|