@rh-support/troubleshoot 2.6.47 → 2.6.49

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 (67) hide show
  1. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  2. package/lib/esm/components/Recommendations/AsideResults.js +1 -1
  3. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  4. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +7 -0
  5. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -0
  6. package/lib/esm/components/TroubleshootSection/AskRedHat.js +184 -0
  7. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts +9 -0
  8. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts.map +1 -0
  9. package/lib/esm/components/TroubleshootSection/CloseButton.js +5 -0
  10. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts +15 -0
  11. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts.map +1 -0
  12. package/lib/esm/components/TroubleshootSection/QuickResponse.js +26 -0
  13. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts +18 -0
  14. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts.map +1 -0
  15. package/lib/esm/components/TroubleshootSection/ResponseActionButton.js +28 -0
  16. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts +20 -0
  17. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -0
  18. package/lib/esm/components/TroubleshootSection/ResponseActions.js +52 -0
  19. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +7 -0
  20. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  21. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +99 -13
  22. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +13 -0
  23. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -0
  24. package/lib/esm/components/TroubleshootSection/UserFeedback.js +44 -0
  25. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts +10 -0
  26. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts.map +1 -0
  27. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.js +46 -0
  28. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +9 -0
  29. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +1 -0
  30. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +9 -0
  31. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +9 -0
  32. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +1 -0
  33. package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +17 -0
  34. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  35. package/lib/esm/components/wizardLayout/WizardLayout.js +9 -6
  36. package/lib/esm/components/wizardLayout/WizardMain.d.ts +7 -1
  37. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  38. package/lib/esm/components/wizardLayout/WizardMain.js +210 -11
  39. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -0
  40. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  41. package/lib/esm/components/wizardLayout/WizardNavigation.js +4 -3
  42. package/lib/esm/components/wizardLayout/index.d.ts +1 -0
  43. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  44. package/lib/esm/components/wizardLayout/index.js +1 -0
  45. package/lib/esm/constants/askRedHatMessages.d.ts +35 -0
  46. package/lib/esm/constants/askRedHatMessages.d.ts.map +1 -0
  47. package/lib/esm/constants/askRedHatMessages.js +36 -0
  48. package/lib/esm/context/AIResponseContext.d.ts +10 -0
  49. package/lib/esm/context/AIResponseContext.d.ts.map +1 -0
  50. package/lib/esm/context/AIResponseContext.js +26 -0
  51. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  52. package/lib/esm/context/RootTroubleshootProvider.js +8 -6
  53. package/lib/esm/css/AskRedHat.css +392 -0
  54. package/lib/esm/hooks/useWizard.d.ts +6 -0
  55. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  56. package/lib/esm/hooks/useWizard.js +1 -1
  57. package/lib/esm/reducers/AIResponseConstNTypes.d.ts +48 -0
  58. package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -0
  59. package/lib/esm/reducers/AIResponseConstNTypes.js +18 -0
  60. package/lib/esm/reducers/AIResponseReducer.d.ts +9 -0
  61. package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -0
  62. package/lib/esm/reducers/AIResponseReducer.js +42 -0
  63. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -0
  64. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  65. package/lib/esm/reducers/CaseConstNTypes.js +2 -0
  66. package/lib/esm/scss/_main.scss +15 -14
  67. package/package.json +3 -2
@@ -2,6 +2,7 @@ import 'react-bootstrap-typeahead/css/Typeahead.css';
2
2
  import '../../css/app.css';
3
3
  import '../../css/pagination.css';
4
4
  import '../../css/productSelector.css';
5
+ import '../../css/AskRedHat.css';
5
6
  import '../../css/results.css';
6
7
  import '../shared/fileUpload/css/fileSelector.css';
7
8
  import { useDocumentTitle } from '@rh-support/components';
@@ -0,0 +1,35 @@
1
+ export declare const QUICK_RESPONSES: {
2
+ positive: {
3
+ id: string;
4
+ content: string;
5
+ }[];
6
+ negative: {
7
+ id: string;
8
+ content: string;
9
+ }[];
10
+ };
11
+ export declare const TOOLTIP_MESSAGES: {
12
+ readonly positive: {
13
+ readonly tooltipContent: "Good response";
14
+ readonly clickedTooltipContent: "Response recorded as helpful";
15
+ };
16
+ readonly negative: {
17
+ readonly tooltipContent: "Bad response";
18
+ readonly clickedTooltipContent: "Response recorded as unhelpful";
19
+ };
20
+ readonly copy: {
21
+ readonly tooltipContent: "Copy";
22
+ readonly clickedTooltipContent: "Response copied";
23
+ };
24
+ };
25
+ export declare const MODAL_MESSAGES: {
26
+ readonly feedback: {
27
+ readonly positive: "Thank you. Any more feedback?";
28
+ readonly negative: "Thank you. How can we improve?";
29
+ };
30
+ readonly complete: {
31
+ readonly title: "We appreciate your input.";
32
+ readonly body: "It helps us improve this experience.";
33
+ };
34
+ };
35
+ //# sourceMappingURL=askRedHatMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"askRedHatMessages.d.ts","sourceRoot":"","sources":["../../../src/constants/askRedHatMessages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;CAW3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAanB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
@@ -0,0 +1,36 @@
1
+ export const QUICK_RESPONSES = {
2
+ positive: [
3
+ { id: '1', content: 'Solved my issue' },
4
+ { id: '2', content: 'Easy to understand' },
5
+ { id: '3', content: 'Accurate' },
6
+ ],
7
+ negative: [
8
+ { id: '1', content: "Didn't solve my issue" },
9
+ { id: '2', content: 'Confusing' },
10
+ { id: '3', content: 'Inaccurate' },
11
+ ],
12
+ };
13
+ export const TOOLTIP_MESSAGES = {
14
+ positive: {
15
+ tooltipContent: 'Good response',
16
+ clickedTooltipContent: 'Response recorded as helpful',
17
+ },
18
+ negative: {
19
+ tooltipContent: 'Bad response',
20
+ clickedTooltipContent: 'Response recorded as unhelpful',
21
+ },
22
+ copy: {
23
+ tooltipContent: 'Copy',
24
+ clickedTooltipContent: 'Response copied',
25
+ },
26
+ };
27
+ export const MODAL_MESSAGES = {
28
+ feedback: {
29
+ positive: 'Thank you. Any more feedback?',
30
+ negative: 'Thank you. How can we improve?',
31
+ },
32
+ complete: {
33
+ title: 'We appreciate your input.',
34
+ body: 'It helps us improve this experience.',
35
+ },
36
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { IAIResponseActionType, IAIResponseState } from '../reducers/AIResponseConstNTypes';
3
+ export declare const AIResponseStateContext: React.Context<IAIResponseState>;
4
+ export declare const AIResponseDispatchContext: React.Context<React.Dispatch<IAIResponseActionType>>;
5
+ export declare function AIResponseContextProvider({ children }: {
6
+ children: React.ReactNode;
7
+ }): React.JSX.Element;
8
+ export declare const useAIResponseState: () => IAIResponseState;
9
+ export declare const useAIResponseDispatch: () => React.Dispatch<IAIResponseActionType>;
10
+ //# sourceMappingURL=AIResponseContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIResponseContext.d.ts","sourceRoot":"","sources":["../../../src/context/AIResponseContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAA0B,MAAM,mCAAmC,CAAC;AAKpH,eAAO,MAAM,sBAAsB,iCAAgE,CAAC;AACpG,eAAO,MAAM,yBAAyB,sDACgD,CAAC;AAEvF,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAUpF;AAGD,eAAO,MAAM,kBAAkB,wBAM9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,6CAMjC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React, { useReducer } from 'react';
2
+ import { initialAIResponseState } from '../reducers/AIResponseConstNTypes';
3
+ import { aiResponseReducer } from '../reducers/AIResponseReducer';
4
+ const initialDispatchContext = () => { };
5
+ export const AIResponseStateContext = React.createContext(initialAIResponseState);
6
+ export const AIResponseDispatchContext = React.createContext(initialDispatchContext);
7
+ export function AIResponseContextProvider({ children }) {
8
+ const [aiResponseState, aiResponseDispatch] = useReducer(aiResponseReducer, initialAIResponseState);
9
+ return (React.createElement(AIResponseStateContext.Provider, { value: aiResponseState },
10
+ React.createElement(AIResponseDispatchContext.Provider, { value: aiResponseDispatch }, children)));
11
+ }
12
+ // Custom hooks for easy access
13
+ export const useAIResponseState = () => {
14
+ const context = React.useContext(AIResponseStateContext);
15
+ if (context === undefined) {
16
+ throw new Error('useAIResponseState must be used within a AIResponseContextProvider');
17
+ }
18
+ return context;
19
+ };
20
+ export const useAIResponseDispatch = () => {
21
+ const context = React.useContext(AIResponseDispatchContext);
22
+ if (context === undefined) {
23
+ throw new Error('useAIResponseDispatch must be used within a AIResponseContextProvider');
24
+ }
25
+ return context;
26
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,qBAkBrD"}
1
+ {"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,qBAoBrD"}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AttachmentContextProvider } from '../components/shared/fileUpload/reducer/AttachmentReducerContext';
3
+ import { AIResponseContextProvider } from './AIResponseContext';
3
4
  import { CaseContextProvider } from './CaseContext';
4
5
  import { ClusterRecommendationsContextProvider } from './ClusterRecommendationsContext';
5
6
  import { RecommendationContextProvider } from './RecommendationContext';
@@ -10,10 +11,11 @@ import { TCContextProvider } from './TopContentContext';
10
11
  export function RootTroubleshootProvider(props) {
11
12
  return (React.createElement(RouteContextProvider, null,
12
13
  React.createElement(CaseContextProvider, null,
13
- React.createElement(RecommendationContextProvider, null,
14
- React.createElement(AttachmentContextProvider, null,
15
- React.createElement(RulesContextProvider, null,
16
- React.createElement(ClusterRecommendationsContextProvider, null,
17
- React.createElement(TCContextProvider, null,
18
- React.createElement(SessionRestoreContextProvider, null, props.children)))))))));
14
+ React.createElement(AIResponseContextProvider, null,
15
+ React.createElement(RecommendationContextProvider, null,
16
+ React.createElement(AttachmentContextProvider, null,
17
+ React.createElement(RulesContextProvider, null,
18
+ React.createElement(ClusterRecommendationsContextProvider, null,
19
+ React.createElement(TCContextProvider, null,
20
+ React.createElement(SessionRestoreContextProvider, null, props.children))))))))));
19
21
  }
@@ -0,0 +1,392 @@
1
+ .ask-redhat {
2
+ padding-bottom: 2rem;
3
+ }
4
+
5
+ .ask-redhat-title {
6
+ display: flex;
7
+ flex-direction: row;
8
+ width: 387.666px;
9
+ height: 24px;
10
+ flex-shrink: 0;
11
+ color: #000;
12
+ font-family: 'Red Hat Display';
13
+ font-size: 16px;
14
+ font-style: normal;
15
+ font-weight: 600;
16
+ line-height: normal;
17
+ align-items: center;
18
+ gap: 0.5rem;
19
+ }
20
+
21
+ .ask-redhat-content-wrapper {
22
+ position: relative;
23
+ }
24
+
25
+ .ask-redhat-content {
26
+ max-height: 120px;
27
+ color: #000;
28
+ font-family: 'Red Hat Text';
29
+ font-size: 16px;
30
+ font-style: normal;
31
+ font-weight: 400;
32
+ line-height: 24px;
33
+ overflow: hidden;
34
+ position: relative;
35
+ transition: max-height 0.8s ease;
36
+ }
37
+
38
+ .ask-redhat-content--expanded {
39
+ max-height: calc(100vh - 382px);
40
+ transition: max-height 0.8s ease !important;
41
+ }
42
+
43
+ .ask-redhat-content--expanded-scrollable {
44
+ max-height: calc(100vh - 453px);
45
+ overflow-y: auto;
46
+ }
47
+
48
+ .ask-redhat-list {
49
+ margin-left: 1.5rem;
50
+ }
51
+
52
+ .ask-redhat-cards {
53
+ display: flex;
54
+ gap: 1rem;
55
+ margin-top: 1rem;
56
+ }
57
+
58
+ .ask-redhat-card {
59
+ flex: 1;
60
+ }
61
+
62
+ .ask-redhat-card-title {
63
+ margin: 0;
64
+ }
65
+
66
+ .ask-redhat-footer-wrapper {
67
+ position: relative;
68
+ margin-top: 24px;
69
+ padding-bottom: 16px;
70
+ }
71
+
72
+ .ask-redhat-footer {
73
+ display: flex;
74
+ justify-content: space-between;
75
+ align-items: center;
76
+ }
77
+
78
+ .ask-redhat-footer-text {
79
+ margin: 0;
80
+ }
81
+
82
+ :root {
83
+ --color-red: var(--Core-color-palette-Red-red-40, #f56e6e);
84
+ --color-purple: var(--Secondary-color-palette-Purple-purple-50, #5e40be);
85
+ --gradient-red-purple: linear-gradient(90deg, var(--color-red), var(--color-purple));
86
+ --gorgey: #f56e6e;
87
+ }
88
+
89
+ .ask-redhat-chat-button {
90
+ width: 129px;
91
+ height: 30px;
92
+ justify-content: center;
93
+ align-items: center !important;
94
+ gap: 8px;
95
+ flex-shrink: 0;
96
+ border-radius: 40px;
97
+ background: var(--gradient-red-purple) !important;
98
+ color: #000;
99
+ text-decoration: none;
100
+ transition: all 0.2s ease;
101
+ cursor: pointer;
102
+ position: relative;
103
+ display: flex;
104
+ padding: 1px;
105
+ }
106
+
107
+ .ask-redhat-chat-button svg {
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: center;
111
+ margin: 0;
112
+ padding: 0;
113
+ vertical-align: middle;
114
+ }
115
+
116
+ .ask-redhat-chat-button .pf-v6-c-button__text {
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ line-height: 1;
121
+ color: #000;
122
+ margin: 0;
123
+ padding: 0;
124
+ height: 100%;
125
+ }
126
+
127
+
128
+ .ask-redhat-chat-button .pf-v6-c-button__icon {
129
+ display: flex;
130
+ align-items: center;
131
+ justify-content: center;
132
+ margin: 0;
133
+ padding: 0;
134
+ height: 100%;
135
+ }
136
+
137
+ .ask-redhat-chat-button::before {
138
+ content: '';
139
+ position: absolute;
140
+ top: 1px;
141
+ left: 1px;
142
+ right: 1px;
143
+ bottom: 1px;
144
+ background: #fff;
145
+ border-radius: 39px;
146
+ z-index: 1;
147
+ }
148
+
149
+ .ask-redhat-chat-button > * {
150
+ position: relative;
151
+ z-index: 2;
152
+ }
153
+
154
+ .ask-redhat-chat-button:focus {
155
+ outline: none;
156
+ box-shadow: 0 0 0 2px rgba(94, 64, 190, 0.2);
157
+ }
158
+
159
+ .ask-redhat-fade-overlay {
160
+ position: absolute;
161
+ bottom: 0;
162
+ left: 0;
163
+ width: 1002px;
164
+ height: 147px;
165
+ flex-shrink: 0;
166
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 80%, #fff 100%);
167
+ pointer-events: none;
168
+ z-index: 1;
169
+ }
170
+
171
+ .ask-redhat-toggle-button {
172
+ display: flex;
173
+ justify-content: center;
174
+ align-items: center;
175
+ gap: 8px;
176
+ flex-shrink: 0;
177
+ left: 50%;
178
+ width: 211.839px;
179
+ height: 40px;
180
+ transform: translateX(-50%);
181
+ background-color: #fff;
182
+ z-index: 3;
183
+ background: var(--gradient-red-purple) !important;
184
+ padding: 2px;
185
+ color: #000;
186
+ border-radius: 40px;
187
+ }
188
+
189
+ .ask-redhat-toggle-button .pf-v6-c-button__text {
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ line-height: 1;
194
+ margin: 0;
195
+ padding: 0;
196
+ gap: 8px;
197
+ color: #000;
198
+ }
199
+
200
+ .ask-redhat-toggle-button svg {
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: center;
204
+ margin: 0;
205
+ padding: 0;
206
+ vertical-align: middle;
207
+ }
208
+
209
+ .ask-redhat-toggle-button::before {
210
+ content: '';
211
+ position: absolute;
212
+ top: 2px;
213
+ left: 2px;
214
+ right: 2px;
215
+ bottom: 2px;
216
+ background: #fff;
217
+ border-radius: 38px;
218
+ z-index: 1;
219
+ }
220
+
221
+ .ask-redhat-toggle-button > * {
222
+ position: relative;
223
+ z-index: 2;
224
+ }
225
+
226
+ .ask-redhat-toggle-button-collapsed {
227
+ display: flex;
228
+ width: 50px;
229
+ height: 24px;
230
+ padding: 6px 16px;
231
+ justify-content: center;
232
+ align-items: center;
233
+ gap: 8px;
234
+ flex-shrink: 0;
235
+ border-radius: 40px;
236
+ background: var(--gradient-red-purple) !important;
237
+ color: #000;
238
+ left: 50%;
239
+ transform: translateX(-50%);
240
+ z-index: 3;
241
+ }
242
+
243
+ .ask-redhat-toggle-button-collapsed::before {
244
+ content: '';
245
+ position: absolute;
246
+ top: 1px;
247
+ left: 1px;
248
+ right: 1px;
249
+ bottom: 1px;
250
+ background: #fff;
251
+ border-radius: 39px;
252
+ z-index: 1;
253
+ }
254
+
255
+ .ask-redhat-toggle-button-collapsed > * {
256
+ position: relative;
257
+ z-index: 2;
258
+ }
259
+
260
+ .ask-redhat-toggle-button-collapsed svg {
261
+ display: flex;
262
+ align-items: center;
263
+ justify-content: center;
264
+ margin: 0;
265
+ padding: 0;
266
+ vertical-align: middle;
267
+ line-height: 1;
268
+ }
269
+
270
+ .ask-redhat-toggle-button-wrapper {
271
+ position: relative;
272
+ }
273
+
274
+ .ask-redhat-border-line {
275
+ position: absolute;
276
+ top: 50%;
277
+ left: 0;
278
+ right: 0;
279
+ height: 1px;
280
+ background: #d2d2d2;
281
+ z-index: 1;
282
+ }
283
+
284
+ .return-to-case-btn {
285
+ border: none;
286
+ background-color: transparent;
287
+ color: #0066cc;
288
+ padding: 0.5rem 1rem;
289
+ cursor: pointer;
290
+ font-size: 1rem;
291
+ }
292
+
293
+ .pf-chatbot--fullscreen {
294
+ position: absolute !important;
295
+ }
296
+
297
+ .pf-chatbot--embedded {
298
+ height: calc(100vh - 276px) !important;
299
+ }
300
+
301
+ .pf-chatbot--fullscreen .pf-chatbot-container {
302
+ height: calc(100vh - 255px) !important;
303
+ }
304
+
305
+ .fullscreen-chat-footer {
306
+ position: absolute !important;
307
+ bottom: 0 !important;
308
+ left: 0 !important;
309
+ right: 0 !important;
310
+ height: 42px !important;
311
+ background: #f6f6f6 !important;
312
+ border-top: 1px solid #d1d1d1 !important;
313
+ align-items: center !important;
314
+ z-index: 10001 !important;
315
+ padding-left: 25px;
316
+ display: none !important;
317
+ }
318
+
319
+ body:has(.pf-chatbot--fullscreen) .pf-v6-c-wizard__footer {
320
+ z-index: 0 !important;
321
+ }
322
+
323
+ body:has(.pf-chatbot--fullscreen) .fullscreen-chat-footer {
324
+ display: flex !important;
325
+ }
326
+
327
+ body:has(.pf-chatbot--fullscreen) .main-section {
328
+ min-height: calc(100vh - 212px) !important;
329
+ }
330
+
331
+ body:has(.pf-chatbot--embedded) .main-section {
332
+ min-height: calc(100vh - 218px) !important;
333
+ }
334
+
335
+ body:has(.pf-chatbot--embedded) .pf-v6-c-wizard__main-body:last-child {
336
+ padding: 0 !important;
337
+ }
338
+
339
+ .pf-v6-c-modal-box__close + * {
340
+ margin-inline-end: 0 !important;
341
+ }
342
+
343
+ .pf-chatbot__feedback-card {
344
+ max-width: 100% !important;
345
+ }
346
+
347
+ .privacy-notice-container {
348
+ margin-top: calc(-0.9 * var(--pf-v6-c-form--GridGap)) !important;
349
+ padding: 0.5rem;
350
+ }
351
+
352
+ .privacy-notice-container + .pf-v6-c-form__group {
353
+ margin-top: calc(-1 * var(--pf-v6-c-form--GridGap)) !important;
354
+ }
355
+
356
+ .response-actions-wrapper {
357
+ margin-top: 24px;
358
+ }
359
+
360
+ .pf-chatbot__header {
361
+ color: #151515 !important;
362
+ background-color: #f2f2f2 !important;
363
+ }
364
+
365
+ .ask-redhat-core .pf-chatbot__header .pf-v6-c-title {
366
+ font-size: 16px !important;
367
+ font-weight: 600 !important;
368
+ }
369
+
370
+ .ask-redhat-core .pf-chatbot__beta-label .pf-v6-c-label__content {
371
+ color: #707070 !important;
372
+ line-height: var(--global-font-line-height-figma-only-body-small, 18px) !important;
373
+ }
374
+
375
+ .ask-redhat-core .pf-chatbot__header-container:after {
376
+ display: none !important;
377
+ }
378
+
379
+ .ask-redhat-core .pf-chatbot__expand-collapse-button {
380
+ color: #151515 !important;
381
+ font-size: var(--global-font-size-body-sm, 12px) !important;
382
+ }
383
+
384
+ .pf-v6-c-button__icon.pf-m-end {
385
+ margin-left: 0 !important;
386
+ display: flex !important;
387
+ padding: 8px !important;
388
+ align-items: center !important;
389
+ gap: 5px !important;
390
+ border-radius: var(--global-border-radius-small, 6px) !important;
391
+ background: #fff !important;
392
+ }
@@ -5,6 +5,12 @@ interface IProps {
5
5
  userClickedNextonRecommendationsValue: boolean;
6
6
  resultsRowRef: any;
7
7
  userScrolledLabel: boolean;
8
+ isAIChatMode: boolean;
9
+ setIsAIChatMode: (value: boolean) => void;
10
+ onChatWithAIClick?: () => void;
11
+ aiServicesAvailable: boolean;
12
+ isSecureSupport?: boolean;
13
+ hasConfirmedStatesideSupport?: boolean;
8
14
  }
9
15
  export declare function useWizard(routeProps: any, props?: IProps): {
10
16
  getStepsSequece: (showRest?: boolean) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCA2Qb,OAAO;EAwC7C"}
1
+ {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAkRb,OAAO;EAwC7C"}
@@ -68,7 +68,7 @@ export function useWizard(routeProps, props) {
68
68
  [AppRouteSections.RESOURCES]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.RESOURCES, name: isCaseCreate ? t('Resources') : t('Resources'), component: (React.createElement(MainSection, { stepNumber: 3, totalSteps: 6, section: AppRouteSections.RESOURCES, title: t('Recommendations') },
69
69
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
70
70
  alertMessage(),
71
- React.createElement(TroubleshootSection, null)))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
71
+ React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable, isSecureSupport: props.isSecureSupport, hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
72
72
  (props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) &&
73
73
  (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isCaseCreate ? t('Continue') : t('Convert to case') }),
74
74
  [AppRouteSections.ADDITIONAL_INFORMATION]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.ADDITIONAL_INFORMATION, name: t('Additional information'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.ADDITIONAL_INFORMATION, title: React.createElement(React.Fragment, null,
@@ -0,0 +1,48 @@
1
+ import { IARHDirectAPIResponse } from '@ifd-ui/ask-redhat-core';
2
+ export interface IActionType {
3
+ type: string;
4
+ payload?: any;
5
+ }
6
+ export interface IAIResponseState {
7
+ aiResponse: IARHDirectAPIResponse | null;
8
+ error: string | null;
9
+ lastUpdated: Date | null;
10
+ streamingChunk?: string;
11
+ accumulatedResponse?: string;
12
+ isStreaming?: boolean;
13
+ }
14
+ export declare const initialAIResponseState: IAIResponseState;
15
+ export declare enum AIResponseConstants {
16
+ clearAIResponse = "clearAIResponse",
17
+ streamingStarted = "streamingStarted",
18
+ streamingChunkReceived = "streamingChunkReceived",
19
+ streamingCompleted = "streamingCompleted",
20
+ streamingError = "streamingError"
21
+ }
22
+ export interface IClearAIResponseAction extends IActionType {
23
+ type: AIResponseConstants.clearAIResponse;
24
+ }
25
+ export interface IStreamingStartedAction extends IActionType {
26
+ type: AIResponseConstants.streamingStarted;
27
+ }
28
+ export interface IStreamingChunkReceivedAction extends IActionType {
29
+ type: AIResponseConstants.streamingChunkReceived;
30
+ payload: {
31
+ chunk: string;
32
+ accumulatedResponse: string;
33
+ };
34
+ }
35
+ export interface IStreamingCompletedAction extends IActionType {
36
+ type: AIResponseConstants.streamingCompleted;
37
+ payload: {
38
+ finalResponse: IARHDirectAPIResponse;
39
+ };
40
+ }
41
+ export interface IStreamingErrorAction extends IActionType {
42
+ type: AIResponseConstants.streamingError;
43
+ payload: {
44
+ error: string;
45
+ };
46
+ }
47
+ export type IAIResponseActionType = IClearAIResponseAction | IStreamingStartedAction | IStreamingChunkReceivedAction | IStreamingCompletedAction | IStreamingErrorAction;
48
+ //# sourceMappingURL=AIResponseConstNTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIResponseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAGD,eAAO,MAAM,sBAAsB,EAAE,gBAOpC,CAAC;AAGF,oBAAY,mBAAmB;IAC3B,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,sBAAsB,2BAA2B;IACjD,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;CACpC;AAGD,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACvD,IAAI,EAAE,mBAAmB,CAAC,eAAe,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IACxD,IAAI,EAAE,mBAAmB,CAAC,gBAAgB,CAAC;CAC9C;AAED,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAC9D,IAAI,EAAE,mBAAmB,CAAC,sBAAsB,CAAC;IACjD,OAAO,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,mBAAmB,EAAE,MAAM,CAAC;KAC/B,CAAC;CACL;AAED,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC1D,IAAI,EAAE,mBAAmB,CAAC,kBAAkB,CAAC;IAC7C,OAAO,EAAE;QACL,aAAa,EAAE,qBAAqB,CAAC;KACxC,CAAC;CACL;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACtD,IAAI,EAAE,mBAAmB,CAAC,cAAc,CAAC;IACzC,OAAO,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED,MAAM,MAAM,qBAAqB,GAC3B,sBAAsB,GACtB,uBAAuB,GACvB,6BAA6B,GAC7B,yBAAyB,GACzB,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ // Initial State
2
+ export const initialAIResponseState = {
3
+ aiResponse: null,
4
+ error: null,
5
+ lastUpdated: null,
6
+ streamingChunk: '',
7
+ accumulatedResponse: '',
8
+ isStreaming: false,
9
+ };
10
+ // Action Constants
11
+ export var AIResponseConstants;
12
+ (function (AIResponseConstants) {
13
+ AIResponseConstants["clearAIResponse"] = "clearAIResponse";
14
+ AIResponseConstants["streamingStarted"] = "streamingStarted";
15
+ AIResponseConstants["streamingChunkReceived"] = "streamingChunkReceived";
16
+ AIResponseConstants["streamingCompleted"] = "streamingCompleted";
17
+ AIResponseConstants["streamingError"] = "streamingError";
18
+ })(AIResponseConstants || (AIResponseConstants = {}));
@@ -0,0 +1,9 @@
1
+ import { IARHDirectAPIResponse } from '@ifd-ui/ask-redhat-core';
2
+ import { IAIResponseActionType, IAIResponseState } from './AIResponseConstNTypes';
3
+ export declare const aiResponseReducer: (state: IAIResponseState, action: IAIResponseActionType) => IAIResponseState;
4
+ export declare const clearAIResponse: () => IAIResponseActionType;
5
+ export declare const streamingStarted: () => IAIResponseActionType;
6
+ export declare const streamingChunkReceived: (chunk: string, accumulatedResponse: string) => IAIResponseActionType;
7
+ export declare const streamingCompleted: (finalResponse: IARHDirectAPIResponse) => IAIResponseActionType;
8
+ export declare const streamingError: (error: string) => IAIResponseActionType;
9
+ //# sourceMappingURL=AIResponseReducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,iBAAiB,UACnB,gBAAgB,UACf,qBAAqB,KAC9B,gBAgDF,CAAC;AAGF,eAAO,MAAM,eAAe,QAAO,qBAGJ,CAAC;AAEhC,eAAO,MAAM,gBAAgB,QAAO,qBAGL,CAAC;AAEhC,eAAO,MAAM,sBAAsB,UAAW,MAAM,uBAAuB,MAAM,KAAG,qBAIrD,CAAC;AAEhC,eAAO,MAAM,kBAAkB,kBAAmB,qBAAqB,KAAG,qBAI3C,CAAC;AAEhC,eAAO,MAAM,cAAc,UAAW,MAAM,KAAG,qBAIhB,CAAC"}