@patternfly/chatbot 2.2.0-prerelease.8 → 2.2.0-prerelease.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/Message/Message.d.ts +14 -0
  2. package/dist/cjs/Message/Message.js +3 -1
  3. package/dist/cjs/Message/Message.test.js +30 -0
  4. package/dist/cjs/Message/QuickStarts/FallbackImg.d.ts +13 -0
  5. package/dist/cjs/Message/QuickStarts/FallbackImg.js +34 -0
  6. package/dist/cjs/Message/QuickStarts/QuickStartTile.d.ts +27 -0
  7. package/dist/cjs/Message/QuickStarts/QuickStartTile.js +82 -0
  8. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.d.ts +23 -0
  9. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.js +64 -0
  10. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.d.ts +1 -0
  11. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.js +76 -0
  12. package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.d.ts +11 -0
  13. package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.js +30 -0
  14. package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.d.ts +30 -0
  15. package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.js +77 -0
  16. package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart.d.ts +30 -0
  17. package/dist/cjs/Message/QuickStarts/monitor-sampleapp-quickstart.js +77 -0
  18. package/dist/cjs/Message/QuickStarts/types.d.ts +132 -0
  19. package/dist/cjs/Message/QuickStarts/types.js +17 -0
  20. package/dist/css/main.css +19 -0
  21. package/dist/css/main.css.map +1 -1
  22. package/dist/esm/Message/Message.d.ts +14 -0
  23. package/dist/esm/Message/Message.js +3 -1
  24. package/dist/esm/Message/Message.test.js +30 -0
  25. package/dist/esm/Message/QuickStarts/FallbackImg.d.ts +13 -0
  26. package/dist/esm/Message/QuickStarts/FallbackImg.js +9 -0
  27. package/dist/esm/Message/QuickStarts/QuickStartTile.d.ts +27 -0
  28. package/dist/esm/Message/QuickStarts/QuickStartTile.js +52 -0
  29. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.d.ts +23 -0
  30. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.js +35 -0
  31. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.d.ts +1 -0
  32. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.js +48 -0
  33. package/dist/esm/Message/QuickStarts/QuickStartTileHeader.d.ts +11 -0
  34. package/dist/esm/Message/QuickStarts/QuickStartTileHeader.js +5 -0
  35. package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.d.ts +30 -0
  36. package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.js +74 -0
  37. package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart.d.ts +30 -0
  38. package/dist/esm/Message/QuickStarts/monitor-sampleapp-quickstart.js +74 -0
  39. package/dist/esm/Message/QuickStarts/types.d.ts +132 -0
  40. package/dist/esm/Message/QuickStarts/types.js +14 -0
  41. package/dist/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +1 -7
  43. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +31 -0
  44. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +12 -1
  45. package/patternfly-docs/content/extensions/chatbot/examples/Messages/explore-pipeline-quickstart.ts +65 -0
  46. package/patternfly-docs/content/extensions/chatbot/examples/UI/SquareChatbotToggle.tsx +1 -1
  47. package/src/Message/Message.test.tsx +54 -0
  48. package/src/Message/Message.tsx +27 -0
  49. package/src/Message/QuickStarts/FallbackImg.tsx +24 -0
  50. package/src/Message/QuickStarts/QuickStartTile.scss +25 -0
  51. package/src/Message/QuickStarts/QuickStartTile.tsx +147 -0
  52. package/src/Message/QuickStarts/QuickStartTileDescription.test.tsx +57 -0
  53. package/src/Message/QuickStarts/QuickStartTileDescription.tsx +81 -0
  54. package/src/Message/QuickStarts/QuickStartTileHeader.tsx +21 -0
  55. package/src/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.ts +75 -0
  56. package/src/Message/QuickStarts/monitor-sampleapp-quickstart.ts +75 -0
  57. package/src/Message/QuickStarts/types.ts +154 -0
  58. package/src/main.scss +1 -0
@@ -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 = {}));
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/AttachMenu/AttachMenu.tsx","../src/AttachMenu/index.ts","../src/AttachmentEdit/AttachmentEdit.tsx","../src/AttachmentEdit/index.ts","../src/Chatbot/Chatbot.tsx","../src/Chatbot/index.ts","../src/ChatbotAlert/ChatbotAlert.tsx","../src/ChatbotAlert/index.ts","../src/ChatbotContent/ChatbotContent.tsx","../src/ChatbotContent/index.ts","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx","../src/ChatbotConversationHistoryNav/index.ts","../src/ChatbotFooter/ChatbotFooter.tsx","../src/ChatbotFooter/ChatbotFootnote.tsx","../src/ChatbotFooter/index.ts","../src/ChatbotHeader/ChatbotHeader.tsx","../src/ChatbotHeader/ChatbotHeaderActions.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.tsx","../src/ChatbotHeader/ChatbotHeaderMain.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.tsx","../src/ChatbotHeader/index.ts","../src/ChatbotModal/ChatbotModal.tsx","../src/ChatbotModal/index.ts","../src/ChatbotPopover/ChatbotPopover.tsx","../src/ChatbotPopover/index.ts","../src/ChatbotToggle/ChatbotToggle.test.tsx","../src/ChatbotToggle/ChatbotToggle.tsx","../src/ChatbotToggle/index.ts","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx","../src/ChatbotWelcomePrompt/index.ts","../src/CodeModal/CodeModal.tsx","../src/CodeModal/index.ts","../src/FileDetails/FileDetails.test.tsx","../src/FileDetails/FileDetails.tsx","../src/FileDetails/index.ts","../src/FileDetailsLabel/FileDetailsLabel.test.tsx","../src/FileDetailsLabel/FileDetailsLabel.tsx","../src/FileDetailsLabel/index.ts","../src/FileDropZone/FileDropZone.test.tsx","../src/FileDropZone/FileDropZone.tsx","../src/FileDropZone/index.ts","../src/LoadingMessage/LoadingMessage.test.tsx","../src/LoadingMessage/LoadingMessage.tsx","../src/LoadingMessage/index.ts","../src/Message/Message.test.tsx","../src/Message/Message.tsx","../src/Message/MessageLoading.tsx","../src/Message/index.ts","../src/Message/CodeBlockMessage/CodeBlockMessage.tsx","../src/Message/ListMessage/ListItemMessage.tsx","../src/Message/ListMessage/OrderedListMessage.tsx","../src/Message/ListMessage/UnorderedListMessage.tsx","../src/Message/TextMessage/TextMessage.tsx","../src/MessageBar/AttachButton.test.tsx","../src/MessageBar/AttachButton.tsx","../src/MessageBar/MessageBar.test.tsx","../src/MessageBar/MessageBar.tsx","../src/MessageBar/MicrophoneButton.tsx","../src/MessageBar/SendButton.test.tsx","../src/MessageBar/SendButton.tsx","../src/MessageBar/StopButton.test.tsx","../src/MessageBar/StopButton.tsx","../src/MessageBar/index.ts","../src/MessageBox/JumpButton.test.tsx","../src/MessageBox/JumpButton.tsx","../src/MessageBox/MessageBox.tsx","../src/MessageBox/index.ts","../src/PreviewAttachment/PreviewAttachment.tsx","../src/PreviewAttachment/index.ts","../src/ResponseActions/ResponseActionButton.test.tsx","../src/ResponseActions/ResponseActionButton.tsx","../src/ResponseActions/ResponseActions.test.tsx","../src/ResponseActions/ResponseActions.tsx","../src/ResponseActions/index.ts","../src/Settings/SettingsForm.tsx","../src/Settings/index.ts","../src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx","../src/SourceDetailsMenuItem/index.ts","../src/SourcesCard/SourcesCard.test.tsx","../src/SourcesCard/SourcesCard.tsx","../src/SourcesCard/index.ts","../src/TermsOfUse/TermsOfUse.test.tsx","../src/TermsOfUse/TermsOfUse.tsx","../src/TermsOfUse/index.ts"],"version":"5.6.3"}
1
+ {"root":["../src/index.ts","../src/AttachMenu/AttachMenu.tsx","../src/AttachMenu/index.ts","../src/AttachmentEdit/AttachmentEdit.tsx","../src/AttachmentEdit/index.ts","../src/Chatbot/Chatbot.tsx","../src/Chatbot/index.ts","../src/ChatbotAlert/ChatbotAlert.tsx","../src/ChatbotAlert/index.ts","../src/ChatbotContent/ChatbotContent.tsx","../src/ChatbotContent/index.ts","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx","../src/ChatbotConversationHistoryNav/index.ts","../src/ChatbotFooter/ChatbotFooter.tsx","../src/ChatbotFooter/ChatbotFootnote.tsx","../src/ChatbotFooter/index.ts","../src/ChatbotHeader/ChatbotHeader.tsx","../src/ChatbotHeader/ChatbotHeaderActions.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.tsx","../src/ChatbotHeader/ChatbotHeaderMain.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.tsx","../src/ChatbotHeader/index.ts","../src/ChatbotModal/ChatbotModal.tsx","../src/ChatbotModal/index.ts","../src/ChatbotPopover/ChatbotPopover.tsx","../src/ChatbotPopover/index.ts","../src/ChatbotToggle/ChatbotToggle.test.tsx","../src/ChatbotToggle/ChatbotToggle.tsx","../src/ChatbotToggle/index.ts","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx","../src/ChatbotWelcomePrompt/index.ts","../src/CodeModal/CodeModal.tsx","../src/CodeModal/index.ts","../src/FileDetails/FileDetails.test.tsx","../src/FileDetails/FileDetails.tsx","../src/FileDetails/index.ts","../src/FileDetailsLabel/FileDetailsLabel.test.tsx","../src/FileDetailsLabel/FileDetailsLabel.tsx","../src/FileDetailsLabel/index.ts","../src/FileDropZone/FileDropZone.test.tsx","../src/FileDropZone/FileDropZone.tsx","../src/FileDropZone/index.ts","../src/LoadingMessage/LoadingMessage.test.tsx","../src/LoadingMessage/LoadingMessage.tsx","../src/LoadingMessage/index.ts","../src/Message/Message.test.tsx","../src/Message/Message.tsx","../src/Message/MessageLoading.tsx","../src/Message/index.ts","../src/Message/CodeBlockMessage/CodeBlockMessage.tsx","../src/Message/ListMessage/ListItemMessage.tsx","../src/Message/ListMessage/OrderedListMessage.tsx","../src/Message/ListMessage/UnorderedListMessage.tsx","../src/Message/QuickStarts/FallbackImg.tsx","../src/Message/QuickStarts/QuickStartTile.tsx","../src/Message/QuickStarts/QuickStartTileDescription.test.tsx","../src/Message/QuickStarts/QuickStartTileDescription.tsx","../src/Message/QuickStarts/QuickStartTileHeader.tsx","../src/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.ts","../src/Message/QuickStarts/monitor-sampleapp-quickstart.ts","../src/Message/QuickStarts/types.ts","../src/Message/TextMessage/TextMessage.tsx","../src/MessageBar/AttachButton.test.tsx","../src/MessageBar/AttachButton.tsx","../src/MessageBar/MessageBar.test.tsx","../src/MessageBar/MessageBar.tsx","../src/MessageBar/MicrophoneButton.tsx","../src/MessageBar/SendButton.test.tsx","../src/MessageBar/SendButton.tsx","../src/MessageBar/StopButton.test.tsx","../src/MessageBar/StopButton.tsx","../src/MessageBar/index.ts","../src/MessageBox/JumpButton.test.tsx","../src/MessageBox/JumpButton.tsx","../src/MessageBox/MessageBox.tsx","../src/MessageBox/index.ts","../src/PreviewAttachment/PreviewAttachment.tsx","../src/PreviewAttachment/index.ts","../src/ResponseActions/ResponseActionButton.test.tsx","../src/ResponseActions/ResponseActionButton.tsx","../src/ResponseActions/ResponseActions.test.tsx","../src/ResponseActions/ResponseActions.tsx","../src/ResponseActions/index.ts","../src/Settings/SettingsForm.tsx","../src/Settings/index.ts","../src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx","../src/SourceDetailsMenuItem/index.ts","../src/SourcesCard/SourcesCard.test.tsx","../src/SourcesCard/SourcesCard.tsx","../src/SourcesCard/index.ts","../src/TermsOfUse/TermsOfUse.test.tsx","../src/TermsOfUse/TermsOfUse.tsx","../src/TermsOfUse/index.ts"],"version":"5.6.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/chatbot",
3
- "version": "2.2.0-prerelease.8",
3
+ "version": "2.2.0-prerelease.9",
4
4
  "description": "This library provides React components based on PatternFly 6 that can be used to build chatbots.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -36,10 +36,8 @@
36
36
  "@patternfly/react-icons": "^6.1.0",
37
37
  "clsx": "^2.1.0",
38
38
  "framer-motion": "^11.3.28",
39
- "react-jss": "^10.10.0",
40
39
  "react-markdown": "^9.0.1",
41
40
  "react-syntax-highlighter": "^15.5.0",
42
- "react-textarea-auto-witdth-height": "^1.0.3",
43
41
  "remark-gfm": "^4.0.0",
44
42
  "path-browserify": "^1.0.1"
45
43
  },
@@ -54,12 +52,8 @@
54
52
  "@patternfly/react-table": "^6.1.0",
55
53
  "@types/dom-speech-recognition": "^0.0.4",
56
54
  "@types/react": "^18.2.61",
57
- "@types/react-dom": "^18.2.19",
58
- "@types/react-router-dom": "^5.3.3",
59
55
  "react": "^18.2.0",
60
56
  "react-dom": "^18.2.0",
61
- "react-router": "^6.22.2",
62
- "react-router-dom": "^6.22.2",
63
57
  "rimraf": "^2.7.1",
64
58
  "typescript": "^5.3.3",
65
59
  "@octokit/rest": "^18.0.0",
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import Message from '@patternfly/chatbot/dist/dynamic/Message';
3
+ import patternflyAvatar from './patternfly_avatar.jpg';
4
+ import { explorePipelinesQuickStart } from './explore-pipeline-quickstart.ts';
5
+ import { monitorSampleAppQuickStart } from '@patternfly/chatbot/src/Message/QuickStarts/monitor-sampleapp-quickstart.ts';
6
+ import { QuickStart } from '@patternfly/chatbot/dist/esm/Message/QuickStarts/types';
7
+
8
+ export const MessageWithQuickStartExample: React.FunctionComponent = () => (
9
+ <>
10
+ <Message
11
+ name="Bot"
12
+ role="bot"
13
+ avatar={patternflyAvatar}
14
+ content="Text-based bot message with a quick start tile."
15
+ quickStarts={{
16
+ quickStart: explorePipelinesQuickStart as QuickStart,
17
+ onSelectQuickStart: (id) => alert(id)
18
+ }}
19
+ />
20
+ <Message
21
+ name="Bot"
22
+ role="bot"
23
+ avatar={patternflyAvatar}
24
+ content="Text-based bot message with a quick start tile that includes prerequisites and a default icon."
25
+ quickStarts={{
26
+ quickStart: monitorSampleAppQuickStart,
27
+ onSelectQuickStart: (id) => alert(id)
28
+ }}
29
+ />
30
+ </>
31
+ );
@@ -39,7 +39,8 @@ import FileDetailsLabel from '@patternfly/chatbot/dist/dynamic/FileDetailsLabel'
39
39
  import FileDropZone from '@patternfly/chatbot/dist/dynamic/FileDropZone';
40
40
  import { PreviewAttachment } from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
41
41
  import ChatbotAlert from '@patternfly/chatbot/dist/dynamic/ChatbotAlert';
42
-
42
+ import { explorePipelinesQuickStart } from './explore-pipeline-quickstart.ts';
43
+ import { monitorSampleAppQuickStart } from '@patternfly/chatbot/src/Message/QuickStarts/monitor-sampleapp-quickstart.ts';
43
44
  import userAvatar from './user_avatar.svg';
44
45
  import squareImg from './PF-social-color-square.svg';
45
46
 
@@ -116,6 +117,16 @@ The API for a source requires a link at minimum, but we strongly recommend provi
116
117
 
117
118
  ```
118
119
 
120
+ ### Messages with quick start tiles
121
+
122
+ [Quick start](/extensions/quick-starts/) tiles can be added to messages via the `quickStarts` prop. Users can initiate the quick start from a link within the message tile.
123
+
124
+ The quick start tile displayed below the message is based on the tile included in the [PatternFly quick starts extension](https://github.com/patternfly/patternfly-quickstarts), but with slightly more limited functionality. For example, it does not track the state of the extension. However, it supports an additional `onSelectQuickStart` prop, so that the name of the quick start can be captured on click. This can be used to trigger other behavior in your application, such as launching that quick start in your main UI.
125
+
126
+ ```js file="./MessageWithQuickStart.tsx"
127
+
128
+ ```
129
+
119
130
  ### User messages
120
131
 
121
132
  Messages from users have a different background color to differentiate them from bot messages. You can also display a custom avatar that is uploaded by the user. You can further customize the avatar by applying an additional class or passing [PatternFly avatar props](/components/avatar) to the `<Message>` component via `avatarProps`.
@@ -0,0 +1,65 @@
1
+ import userAvatar from './user_avatar.svg';
2
+
3
+ export const explorePipelinesQuickStart = {
4
+ apiVersion: 'console.openshift.io/v1',
5
+ kind: 'QuickStarts',
6
+ metadata: {
7
+ name: 'explore-pipelines'
8
+ },
9
+ spec: {
10
+ version: 4.7,
11
+ displayName: `Installing the Pipelines Operator`,
12
+ durationMinutes: 10,
13
+ icon: userAvatar,
14
+ description: `Install the OpenShift® Pipelines Operator to build Pipelines using Tekton.`,
15
+ prerequisites: [''],
16
+ introduction: `OpenShift® Pipelines is a cloud-native, continuous integration and continuous delivery (CI/CD) solution based on Kubernetes resources. It uses Tekton building blocks to automate deployments across multiple Kubernetes distributions by abstracting away the underlying implementation details.
17
+ * OpenShift Pipelines is a serverless CI/CD system that runs pipelines with all the required dependencies in isolated containers.
18
+ * They are designed for decentralized teams that work on a microservice-based architecture.
19
+ * They are defined using standard Custom Resource Definitions making them extensible and easy to integrate with the existing Kubernetes tools. This enables you to scale on-demand.
20
+ * You can use OpenShift Pipelines to build images with Kubernetes tools such as Source-to-Image (S2I), Buildah, Buildpacks, and Kaniko that are portable across any Kubernetes platform.
21
+ * You can use the Developer perspective to create and manage pipelines and view logs in your namespaces.
22
+
23
+ To start using Pipelines, install the OpenShift® Pipelines Operator on your cluster.`,
24
+ tasks: [
25
+ {
26
+ title: `Installing the OpenShift Pipelines Operator`,
27
+ description: `### To install the OpenShift Pipelines Operator:
28
+
29
+ 1. From the **Administrator** perspective in the console navigation panel, click **Operators > OperatorHub**.
30
+ 2. In the **Filter by keyword** field, type \`OpenShift Pipelines Operator\`.
31
+ 3. If the tile has an Installed label, the Operator is already installed. Proceed to the next quick start to create a Pipeline.
32
+ 4. Click the **tile** to open the Operator details.
33
+ 5. At the top of the OpenShift Pipelines Operator panel that opens, click **Install**.
34
+ 6. Fill out the Operator subscription form by selecting the channel that matches your OpenShift cluster, and then click **Install**.
35
+ 7. On the **Installed Operators** page, wait for the OpenShift Pipelines Operator's status to change from **Installing** to **Succeeded**. `,
36
+ review: {
37
+ instructions: `#### To verify that the OpenShift Pipelines Operator is installed:
38
+ 1. From the **Operators** section of the navigation, go to the **Installed Operators** page.
39
+ 2. Verify that the **OpenShift Pipelines Operator** appears in the list of Operators.
40
+
41
+ In the status column, is the status of the OpenShift Pipelines Operator **Succeeded**?`,
42
+ failedTaskHelp: `This task isn’t verified yet. Try the task again, or [read more](https://docs.openshift.com/container-platform/4.6/pipelines/installing-pipelines.html#op-installing-pipelines-operator-in-web-console_installing-pipelines) about this topic.`
43
+ },
44
+ summary: {
45
+ success: `You have installed the Pipelines Operator!`,
46
+ failed: `Try the steps again.`
47
+ }
48
+ }
49
+ ],
50
+ conclusion: `You successfully installed the OpenShift Pipelines Operator! If you want to learn how to deploy an application and associate a Pipeline with it, take the Creating a Pipeline quick start.`,
51
+ nextQuickStart: [`install-app-and-associate-pipeline`],
52
+ accessReviewResources: [
53
+ {
54
+ group: 'operators.coreos.com',
55
+ resource: 'operatorgroups',
56
+ verb: 'list'
57
+ },
58
+ {
59
+ group: 'packages.operators.coreos.com',
60
+ resource: 'packagemanifests',
61
+ verb: 'list'
62
+ }
63
+ ]
64
+ }
65
+ };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import ChatbotToggle from '@patternfly/virtual-assistant/dist/dynamic/ChatbotToggle';
2
+ import ChatbotToggle from '@patternfly/chatbot/dist/dynamic/ChatbotToggle';
3
3
 
4
4
  export const SquareChatbotToggle: React.FunctionComponent = () => {
5
5
  const [chatbotVisible, setChatbotVisible] = React.useState<boolean>(false);
@@ -3,6 +3,8 @@ import { render, screen } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom';
4
4
  import Message from './Message';
5
5
  import userEvent from '@testing-library/user-event';
6
+ import { monitorSampleAppQuickStart } from './QuickStarts/monitor-sampleapp-quickstart';
7
+ import { monitorSampleAppQuickStartWithImage } from './QuickStarts/monitor-sampleapp-quickstart-with-image';
6
8
 
7
9
  const ALL_ACTIONS = [
8
10
  { label: /Good response/i },
@@ -437,4 +439,56 @@ describe('Message', () => {
437
439
  expect(screen.getByRole('img')).toHaveClass('test');
438
440
  expect(screen.getByRole('img')).toHaveClass('pf-chatbot__message-avatar');
439
441
  });
442
+ it('should handle QuickStart tile correctly', () => {
443
+ render(
444
+ <Message
445
+ avatar="./img"
446
+ role="user"
447
+ name="User"
448
+ content="Hi"
449
+ quickStarts={{
450
+ quickStart: monitorSampleAppQuickStart,
451
+ onSelectQuickStart: (id) => alert(id)
452
+ }}
453
+ />
454
+ );
455
+ expect(screen.getByRole('button', { name: 'Monitoring your sample application' })).toBeTruthy();
456
+ expect(screen.getByRole('heading', { name: '1 Prerequisite' })).toBeTruthy();
457
+ expect(screen.getByRole('button', { name: 'Show prerequisites' })).toBeTruthy();
458
+ expect(screen.getByRole('button', { name: 'Start' })).toBeTruthy();
459
+ });
460
+ it('should handle click on QuickStart tile correctly', async () => {
461
+ const spy = jest.fn();
462
+ render(
463
+ <Message
464
+ avatar="./img"
465
+ role="user"
466
+ name="User"
467
+ content="Hi"
468
+ quickStarts={{
469
+ quickStart: monitorSampleAppQuickStart,
470
+ onSelectQuickStart: (id) => spy(id)
471
+ }}
472
+ />
473
+ );
474
+ await userEvent.click(screen.getByRole('button', { name: 'Monitoring your sample application' }));
475
+ expect(spy).toHaveBeenCalledTimes(1);
476
+ expect(spy).toHaveBeenCalledWith(monitorSampleAppQuickStart.metadata.name);
477
+ });
478
+ it('should handle QuickStart tile with image correctly', async () => {
479
+ const spy = jest.fn();
480
+ render(
481
+ <Message
482
+ avatar="./img"
483
+ role="user"
484
+ name="User"
485
+ content="Hi"
486
+ quickStarts={{
487
+ quickStart: monitorSampleAppQuickStartWithImage,
488
+ onSelectQuickStart: (id) => spy(id)
489
+ }}
490
+ />
491
+ );
492
+ expect(screen.getAllByRole('img')[1]).toHaveAttribute('src', 'test.png');
493
+ });
440
494
  });