@rh-support/troubleshoot 2.6.20 → 2.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -31
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +34 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +1 -2
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +0 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +22 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +95 -52
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +19 -15
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -6
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +8 -5
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -7
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +0 -5
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +12 -82
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.js +6 -1
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +4 -5
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +1 -3
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +9 -115
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +0 -2
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +3 -11
- package/lib/esm/components/wizardLayout/index.d.ts +0 -1
- package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/index.js +0 -1
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +6 -8
- package/lib/esm/css/case.css +12 -0
- package/lib/esm/hooks/useWizard.d.ts +0 -4
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -2
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +0 -2
- package/lib/esm/scss/_main.scss +13 -0
- package/lib/esm/scss/_pf-overrides.scss +5 -0
- package/package.json +6 -7
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +0 -7
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +0 -73
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +0 -9
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +0 -9
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +0 -9
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +0 -17
- package/lib/esm/context/AIResponseContext.d.ts +0 -10
- package/lib/esm/context/AIResponseContext.d.ts.map +0 -1
- package/lib/esm/context/AIResponseContext.js +0 -26
- package/lib/esm/css/AskRedHat.css +0 -283
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts +0 -48
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +0 -1
- package/lib/esm/reducers/AIResponseConstNTypes.js +0 -16
- package/lib/esm/reducers/AIResponseReducer.d.ts +0 -9
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +0 -1
- package/lib/esm/reducers/AIResponseReducer.js +0 -43
|
@@ -1,12 +1,3 @@
|
|
|
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
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
2
|
var t = {};
|
|
12
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -18,20 +9,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
18
9
|
}
|
|
19
10
|
return t;
|
|
20
11
|
};
|
|
21
|
-
import { askRHDirectAIResponse, getRHDirectStatusCheck, } from '@ifd-ui/ask-redhat-core';
|
|
22
12
|
import { useWizardContext, Wizard, WizardNav, WizardNavItem, WizardStep } from '@patternfly/react-core';
|
|
23
13
|
import { LoadingIndicator } from '@rh-support/components';
|
|
24
14
|
import isEqual from 'lodash/isEqual';
|
|
25
15
|
import React, { Suspense, useContext, useEffect, useRef, useState } from 'react';
|
|
26
16
|
import { useTranslation } from 'react-i18next';
|
|
27
17
|
import { Route } from 'react-router-dom';
|
|
28
|
-
import { useAIResponseDispatch } from '../../context/AIResponseContext';
|
|
29
18
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
30
19
|
import { RecommendationDispatchContext } from '../../context/RecommendationContext';
|
|
31
20
|
import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
|
|
32
21
|
import { useWizard } from '../../hooks/useWizard';
|
|
33
|
-
import { receivedAIResponse, receivedAIResponseError, requestAIResponse } from '../../reducers/AIResponseReducer';
|
|
34
|
-
import { appSourceId_ARH, excludedCaseTypesforARH } from '../../reducers/CaseConstNTypes';
|
|
35
22
|
import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
|
|
36
23
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
37
24
|
import { setActiveSectionChanged, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
|
|
@@ -40,42 +27,13 @@ import SubmitCase from '../SubmitCase/SubmitCase';
|
|
|
40
27
|
import MainSection from './MainSection';
|
|
41
28
|
import NewFeatureModal from './NewFeatureModal';
|
|
42
29
|
import WizardNavigation from './WizardNavigation';
|
|
43
|
-
// Mapping for case type display text in AI questions
|
|
44
|
-
const CASE_TYPE_AI_TEXT_MAP = {
|
|
45
|
-
Other: 'Something',
|
|
46
|
-
};
|
|
47
|
-
const getCaseTypeAIText = (caseType) => {
|
|
48
|
-
return CASE_TYPE_AI_TEXT_MAP[caseType] || caseType;
|
|
49
|
-
};
|
|
50
|
-
const generateCaseTypePrefix = (activeSection, caseType) => {
|
|
51
|
-
if (activeSection === AppRouteSections.TROUBLESHOOT) {
|
|
52
|
-
return '';
|
|
53
|
-
}
|
|
54
|
-
const helpWith = getCaseTypeAIText(caseType);
|
|
55
|
-
return `I want help with ${helpWith}. `;
|
|
56
|
-
};
|
|
57
|
-
//generate AI question based on case details
|
|
58
|
-
const generateAIQuestion = (activeSection, product, version, summary, issue, caseType) => {
|
|
59
|
-
const baseMessage = `My issue is primarily related to ${product} ${version}. I would title my problem: ${summary}. More details are as follows: ${issue}.`;
|
|
60
|
-
const prefix = generateCaseTypePrefix(activeSection, caseType);
|
|
61
|
-
return `${prefix}${baseMessage}`;
|
|
62
|
-
};
|
|
63
30
|
function WizardMain(props) {
|
|
64
31
|
const [showRestFlag, setShowRestFlag] = useState(false);
|
|
65
|
-
const [aiServicesAvailable, setAIServicesAvailable] = useState(false); // default to false until services are confirmed available
|
|
66
32
|
const recommendationDispatch = useContext(RecommendationDispatchContext);
|
|
67
|
-
const { isCreatingCase
|
|
33
|
+
const { isCreatingCase } = useCaseSelector((state) => ({
|
|
68
34
|
isCreatingCase: state.isCreatingCase,
|
|
69
|
-
product: state.caseDetails.product,
|
|
70
|
-
version: state.caseDetails.version,
|
|
71
|
-
summary: state.caseDetails.summary,
|
|
72
|
-
issue: state.caseDetails.issue,
|
|
73
|
-
caseType: state.caseDetails.caseType,
|
|
74
35
|
}), isEqual);
|
|
75
|
-
const { routeState: { isCaseCreate
|
|
76
|
-
const aiResponseDispatch = useAIResponseDispatch();
|
|
77
|
-
const isTroubleshootSection = activeSection === AppRouteSections.TROUBLESHOOT;
|
|
78
|
-
const isSummarizeSection = activeSection === AppRouteSections.SUMMARIZE;
|
|
36
|
+
const { routeState: { isCaseCreate }, } = useContext(RouteContext);
|
|
79
37
|
const [userSeenRecommendations, setUserSeenRecommendations] = useState(false);
|
|
80
38
|
const [userClickedNextonRecommendations, setUserClickedNextonRecommendations] = useState(false);
|
|
81
39
|
const [userScrolledLabel, setUserScrolledLabel] = useState(false);
|
|
@@ -84,9 +42,6 @@ function WizardMain(props) {
|
|
|
84
42
|
const isNextButtonClickedRef = useRef(false);
|
|
85
43
|
const isBackButtonClickedRef = useRef(false);
|
|
86
44
|
const resultsRowRef = useRef(null);
|
|
87
|
-
const handleChatWithAIClick = () => {
|
|
88
|
-
props.setIsAIChatMode(true);
|
|
89
|
-
};
|
|
90
45
|
const { getStepsSequece } = useWizard(props.routeProps, {
|
|
91
46
|
userSeenRecommendationsfn: setUserSeenRecommendations,
|
|
92
47
|
userSeenRecommendationsValue: userSeenRecommendations,
|
|
@@ -94,48 +49,12 @@ function WizardMain(props) {
|
|
|
94
49
|
userClickedNextonRecommendationsValue: userClickedNextonRecommendations,
|
|
95
50
|
resultsRowRef: resultsRowRef,
|
|
96
51
|
userScrolledLabel: userScrolledLabel,
|
|
97
|
-
isAIChatMode: props.isAIChatMode,
|
|
98
|
-
setIsAIChatMode: props.setIsAIChatMode,
|
|
99
|
-
onChatWithAIClick: handleChatWithAIClick,
|
|
100
|
-
aiServicesAvailable: aiServicesAvailable,
|
|
101
52
|
});
|
|
102
53
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
103
54
|
const { t } = useTranslation();
|
|
104
55
|
useEffect(() => {
|
|
105
56
|
setActiveSectionChanged(dispatchToRouteReducer, isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT, '');
|
|
106
57
|
}, [isCaseCreate, dispatchToRouteReducer]);
|
|
107
|
-
useEffect(() => {
|
|
108
|
-
if (!activeSection) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const isRelevantSection = isTroubleshootSection || isSummarizeSection;
|
|
112
|
-
const isAllowedCaseType = !excludedCaseTypesforARH.includes(caseType || '');
|
|
113
|
-
if (!isRelevantSection || !isAllowedCaseType) {
|
|
114
|
-
if (aiServicesAvailable) {
|
|
115
|
-
setAIServicesAvailable(false);
|
|
116
|
-
}
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
// check if ARH services are available
|
|
120
|
-
if (!aiServicesAvailable) {
|
|
121
|
-
const checkAIServices = () => __awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
var _a, _b;
|
|
123
|
-
const config = {
|
|
124
|
-
appSourceId: appSourceId_ARH,
|
|
125
|
-
authToken: (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.getEncodedToken()) !== null && _b !== void 0 ? _b : '',
|
|
126
|
-
};
|
|
127
|
-
try {
|
|
128
|
-
yield getRHDirectStatusCheck(config);
|
|
129
|
-
setAIServicesAvailable(true);
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
setAIServicesAvailable(false);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
checkAIServices();
|
|
136
|
-
}
|
|
137
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
|
-
}, [activeSection, caseType, isCaseCreate, aiServicesAvailable]);
|
|
139
58
|
const renderSubmitCasePage = () => (React.createElement(MainSection, { section: AppRouteSections.SUBMIT_CASE, title: t('Case has been submitted'), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case."), className: "case-submit-page" },
|
|
140
59
|
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
141
60
|
React.createElement(SubmitCase, { routeProps: props.routeProps }))));
|
|
@@ -180,51 +99,26 @@ function WizardMain(props) {
|
|
|
180
99
|
isBackButtonClickedRef.current = false;
|
|
181
100
|
setIsNextButtonClicked(false);
|
|
182
101
|
};
|
|
183
|
-
const handleReturnToCaseCreation = () => {
|
|
184
|
-
props.setIsAIChatMode(false);
|
|
185
|
-
};
|
|
186
102
|
const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
|
|
187
103
|
return (React.createElement(WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: activeStep.id === step.id, isDisabled: !step.canJumpTo, stepIndex: step.index, onClick: () => goToStepByIndex(step.index) }));
|
|
188
104
|
})));
|
|
189
105
|
const CustomFooter = () => {
|
|
190
|
-
var _a, _b;
|
|
191
106
|
const { activeStep, goToNextStep, goToPrevStep, steps, goToStepByIndex } = useWizardContext(); // Correctly using the context
|
|
192
|
-
const config = {
|
|
193
|
-
appSourceId: appSourceId_ARH,
|
|
194
|
-
authToken: (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.getEncodedToken()) !== null && _b !== void 0 ? _b : '',
|
|
195
|
-
};
|
|
196
107
|
useEffect(() => {
|
|
197
108
|
if (steps.length > 2 && activeStep.index === 2 && isNextButtonClicked) {
|
|
198
109
|
goToStepByIndex(3);
|
|
199
110
|
}
|
|
200
111
|
}, [activeStep, steps.length, goToStepByIndex]);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
focusWizardMainPanel();
|
|
208
|
-
if (shouldCallAPI) {
|
|
209
|
-
const detailedQuestion = generateAIQuestion(activeSection, product, version, summary, issue, caseType || '');
|
|
210
|
-
const useAIServices = aiServicesAvailable;
|
|
211
|
-
if (useAIServices) {
|
|
212
|
-
aiResponseDispatch(requestAIResponse(detailedQuestion));
|
|
213
|
-
try {
|
|
214
|
-
const response = yield askRHDirectAIResponse(detailedQuestion, config);
|
|
215
|
-
aiResponseDispatch(receivedAIResponse(response));
|
|
216
|
-
}
|
|
217
|
-
catch (error) {
|
|
218
|
-
aiResponseDispatch(receivedAIResponseError((error === null || error === void 0 ? void 0 : error.message) || 'Failed to get AI response'));
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: handleContinueClick, onBack: () => {
|
|
112
|
+
return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: () => {
|
|
113
|
+
isNextButtonClickedRef.current = true;
|
|
114
|
+
setIsNextButtonClicked(true);
|
|
115
|
+
goToNextStep();
|
|
116
|
+
focusWizardMainPanel();
|
|
117
|
+
}, onBack: () => {
|
|
224
118
|
isBackButtonClickedRef.current = true;
|
|
225
119
|
goToPrevStep();
|
|
226
120
|
focusWizardMainPanel();
|
|
227
|
-
}, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel
|
|
121
|
+
}, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel }));
|
|
228
122
|
};
|
|
229
123
|
const steps = getStepsSequece(showRestFlag);
|
|
230
124
|
const wizardSteps = steps.map((step) => {
|
|
@@ -16,8 +16,6 @@ interface IProps {
|
|
|
16
16
|
setUserCanNavigateToTroubleshoot: (value: React.SetStateAction<boolean>) => void;
|
|
17
17
|
resultsRowRef?: any;
|
|
18
18
|
setUserScrolledLabel: (value: React.SetStateAction<boolean>) => void;
|
|
19
|
-
isAIChatMode?: boolean;
|
|
20
|
-
onReturnToCaseCreation?: () => void;
|
|
21
19
|
}
|
|
22
20
|
declare function WizardNavigation(props: IProps): React.JSX.Element;
|
|
23
21
|
declare namespace WizardNavigation {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,C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C;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAyUtC;kBAzUQ,gBAAgB;;;AA2UzB,eAAe,gBAAgB,CAAC"}
|
|
@@ -249,17 +249,9 @@ function WizardNavigation(props) {
|
|
|
249
249
|
// To handle entitled products
|
|
250
250
|
return (React.createElement(React.Fragment, null,
|
|
251
251
|
React.createElement(WizardFooterWrapper, null,
|
|
252
|
-
props.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
color: '#0066cc',
|
|
256
|
-
padding: '0.5rem 1rem',
|
|
257
|
-
cursor: 'pointer',
|
|
258
|
-
fontSize: '1rem',
|
|
259
|
-
} }, t('Return to case creation'))) : (React.createElement(React.Fragment, null,
|
|
260
|
-
props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack(), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
|
|
261
|
-
React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
|
|
262
|
-
activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))))),
|
|
252
|
+
props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack(), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
|
|
253
|
+
React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
|
|
254
|
+
activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))),
|
|
263
255
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isRecsModalVisible, handleModalToggle: onRecsFeedbackModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
264
256
|
activeSectionError ? (React.createElement("small", { className: "pf-v6-u-align-self-center pf-v6-u-ml-md text-red" }, activeSectionError)) : null)));
|
|
265
257
|
}
|
|
@@ -2,7 +2,6 @@ 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';
|
|
6
5
|
import '../../css/results.css';
|
|
7
6
|
import '../shared/fileUpload/css/fileSelector.css';
|
|
8
7
|
import React from 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2CAA2C,CAAC;AAGnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,aAAa,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC;SACnB,CAAC;KACL;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AAED,eAAO,MAAM,YAAY,UAAW,MAAM,sBAYzC,CAAC"}
|
|
@@ -2,7 +2,6 @@ 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';
|
|
6
5
|
import '../../css/results.css';
|
|
7
6
|
import '../shared/fileUpload/css/fileSelector.css';
|
|
8
7
|
import { useDocumentTitle } from '@rh-support/components';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
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,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AttachmentContextProvider } from '../components/shared/fileUpload/reducer/AttachmentReducerContext';
|
|
3
|
-
import { AIResponseContextProvider } from './AIResponseContext';
|
|
4
3
|
import { CaseContextProvider } from './CaseContext';
|
|
5
4
|
import { ClusterRecommendationsContextProvider } from './ClusterRecommendationsContext';
|
|
6
5
|
import { RecommendationContextProvider } from './RecommendationContext';
|
|
@@ -11,11 +10,10 @@ import { TCContextProvider } from './TopContentContext';
|
|
|
11
10
|
export function RootTroubleshootProvider(props) {
|
|
12
11
|
return (React.createElement(RouteContextProvider, null,
|
|
13
12
|
React.createElement(CaseContextProvider, null,
|
|
14
|
-
React.createElement(
|
|
15
|
-
React.createElement(
|
|
16
|
-
React.createElement(
|
|
17
|
-
React.createElement(
|
|
18
|
-
React.createElement(
|
|
19
|
-
React.createElement(
|
|
20
|
-
React.createElement(SessionRestoreContextProvider, null, props.children))))))))));
|
|
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)))))))));
|
|
21
19
|
}
|
package/lib/esm/css/case.css
CHANGED
|
@@ -363,3 +363,15 @@ input[aria-invalid='true'].pf-v6-c-form-control {
|
|
|
363
363
|
min-width: 552px;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
+
|
|
367
|
+
#reopen-case-description {
|
|
368
|
+
resize: none !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.add-watcher-button {
|
|
372
|
+
max-width: 15rem;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.remove-watcher-button {
|
|
376
|
+
max-width: 15rem;
|
|
377
|
+
}
|
|
@@ -5,10 +5,6 @@ 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
8
|
}
|
|
13
9
|
export declare function useWizard(routeProps: any, props?: IProps): {
|
|
14
10
|
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;
|
|
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"}
|
|
@@ -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,
|
|
71
|
+
React.createElement(TroubleshootSection, null)))), 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,
|
|
@@ -242,6 +242,4 @@ export type ICaseActionType = IAction<CaseReducerConstants, ICreateCasePayloadTy
|
|
|
242
242
|
export type CaseReducerDispatchType = Dispatch<ICaseActionType>;
|
|
243
243
|
export declare const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = "https://access.redhat.com/articles/5967811";
|
|
244
244
|
export declare const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = "https://access.redhat.com/articles/5967831";
|
|
245
|
-
export declare const excludedCaseTypesforARH: string[];
|
|
246
|
-
export declare const appSourceId_ARH = "PCM-001";
|
|
247
245
|
//# sourceMappingURL=CaseConstNTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../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initialCaseState = {
|
|
|
234
234
|
};
|
|
235
235
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
236
236
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
237
|
-
export const excludedCaseTypesforARH = ['Feature / Enhancement Request', 'Certification']; //Feature / Enhancement Request casetype is alias for Idea on PCM UI
|
|
238
|
-
export const appSourceId_ARH = 'PCM-001';
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -994,6 +994,19 @@ svg.pf-v6-u-ml-xs.icon-size {
|
|
|
994
994
|
background: #fff;
|
|
995
995
|
}
|
|
996
996
|
|
|
997
|
+
.card-body-wrapper {
|
|
998
|
+
display: flex;
|
|
999
|
+
padding: 16px;
|
|
1000
|
+
flex-direction: column;
|
|
1001
|
+
align-items: flex-start;
|
|
1002
|
+
gap: 16px;
|
|
1003
|
+
border-radius: 0px 0px var(--global-border-radius-medium, 16px) var(--global-border-radius-medium, 16px);
|
|
1004
|
+
border-right: 1px solid var(--global-border-color-default, #c7c7c7);
|
|
1005
|
+
border-bottom: 1px solid var(--global-border-color-default, #c7c7c7);
|
|
1006
|
+
border-left: 1px solid var(--global-border-color-default, #c7c7c7);
|
|
1007
|
+
background: #fff;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
997
1010
|
.form-group {
|
|
998
1011
|
span.form-instructions-bold {
|
|
999
1012
|
font-weight: 600;
|
|
@@ -399,6 +399,10 @@ div#cep-details-modal.pf-v6-c-modal-box__body {
|
|
|
399
399
|
div#request-mgmt-escalation-modal.request-escalation-modal {
|
|
400
400
|
div.pf-v6-c-modal-box__body {
|
|
401
401
|
form.pf-v6-c-form.request-escalation-form {
|
|
402
|
+
.pf-m-textarea textarea {
|
|
403
|
+
resize: none !important;
|
|
404
|
+
}
|
|
405
|
+
|
|
402
406
|
div.pf-v6-l-grid.pf-m-all-12-col-on-md.pf-m-gutter {
|
|
403
407
|
div.pf-v6-l-grid__item.pf-m-6-col {
|
|
404
408
|
div.pf-v6-c-form__group {
|
|
@@ -739,6 +743,7 @@ a.case-resource-recommendation-link {
|
|
|
739
743
|
}
|
|
740
744
|
|
|
741
745
|
.description-textarea {
|
|
746
|
+
resize: none !important;
|
|
742
747
|
&.pf-v6-c-form-control {
|
|
743
748
|
&:disabled,
|
|
744
749
|
&.kt1-disabled {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@cee-eng/hydrajs": "4.18.57",
|
|
53
53
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
54
|
-
"@ifd-ui/ask-redhat-core": "^0.0.26",
|
|
55
54
|
"@patternfly/patternfly": "6.2.1",
|
|
56
55
|
"@patternfly/react-core": "6.2.1",
|
|
57
56
|
"@patternfly/react-table": "6.2.1",
|
|
@@ -59,11 +58,11 @@
|
|
|
59
58
|
"@progress/kendo-licensing": "1.3.5",
|
|
60
59
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
61
60
|
"@redux-devtools/extension": "^3.3.0",
|
|
62
|
-
"@rh-support/components": "2.5.
|
|
63
|
-
"@rh-support/react-context": "2.5.
|
|
61
|
+
"@rh-support/components": "2.5.30",
|
|
62
|
+
"@rh-support/react-context": "2.5.32",
|
|
64
63
|
"@rh-support/types": "2.0.5",
|
|
65
|
-
"@rh-support/user-permissions": "2.5.
|
|
66
|
-
"@rh-support/utils": "2.5.
|
|
64
|
+
"@rh-support/user-permissions": "2.5.20",
|
|
65
|
+
"@rh-support/utils": "2.5.19",
|
|
67
66
|
"@types/react-redux": "^7.1.33",
|
|
68
67
|
"@types/redux": "^3.6.0",
|
|
69
68
|
"date-fns": "3.6.0",
|
|
@@ -135,5 +134,5 @@
|
|
|
135
134
|
"defaults and supports es6-module",
|
|
136
135
|
"maintained node versions"
|
|
137
136
|
],
|
|
138
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "9b66078ef07566416643fd8f268a34735cc622fb"
|
|
139
138
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAOhD,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAqJtC,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Button, Card, CardBody, CardHeader, Spinner } from '@patternfly/react-core';
|
|
2
|
-
import React, { useRef, useState } from 'react';
|
|
3
|
-
import { useAIResponseState } from '../../context/AIResponseContext';
|
|
4
|
-
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
5
|
-
import { CollapseIcon } from './icons/CollapseIcon';
|
|
6
|
-
import { StarIcon } from './icons/StarIcon';
|
|
7
|
-
export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
8
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
9
|
-
const aiResponseState = useAIResponseState();
|
|
10
|
-
const contentRef = useRef(null);
|
|
11
|
-
const onToggle = () => {
|
|
12
|
-
if (isExpanded && contentRef.current) {
|
|
13
|
-
contentRef.current.scrollTop = 0;
|
|
14
|
-
}
|
|
15
|
-
setIsExpanded((prev) => !prev);
|
|
16
|
-
};
|
|
17
|
-
const handleChatWithAIClick = () => onChatWithAIClick === null || onChatWithAIClick === void 0 ? void 0 : onChatWithAIClick();
|
|
18
|
-
const aiResponse = aiResponseState.aiResponse;
|
|
19
|
-
const answer = (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.answer) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.content) || 'No AI response available yet.';
|
|
20
|
-
const sources = (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.sources) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.references) || [];
|
|
21
|
-
const sourcesCount = sources.length || 0;
|
|
22
|
-
const isLoading = aiResponseState.isLoading || !aiResponse;
|
|
23
|
-
const { parseMarkdown } = useParseRuleMarkdown();
|
|
24
|
-
if (isLoading) {
|
|
25
|
-
return (React.createElement("div", { className: "ask-redhat" },
|
|
26
|
-
React.createElement("p", { className: "ask-redhat-title" },
|
|
27
|
-
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
28
|
-
"AI Insights"),
|
|
29
|
-
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
30
|
-
React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
|
|
31
|
-
React.createElement(Spinner, { size: "lg" }),
|
|
32
|
-
React.createElement("p", { style: { marginTop: '1rem' } }, "Getting AI insights..."))),
|
|
33
|
-
!aiResponseState.isLoading && (React.createElement("div", { className: "ask-redhat-toggle-button" },
|
|
34
|
-
React.createElement(Button, { variant: "link", onClick: handleChatWithAIClick, className: "ask-redhat-chat-button" }, "Chat with AI to get started")))));
|
|
35
|
-
}
|
|
36
|
-
if (aiResponseState.error) {
|
|
37
|
-
return (React.createElement("div", { className: "ask-redhat" },
|
|
38
|
-
React.createElement("p", { className: "ask-redhat-title" },
|
|
39
|
-
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
40
|
-
"AI Insights"),
|
|
41
|
-
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
42
|
-
React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
|
|
43
|
-
React.createElement("p", { style: { color: '#d73502', marginBottom: '1rem' } }, "Unable to get AI insights. Please try again later."),
|
|
44
|
-
React.createElement(Button, { variant: "link", onClick: handleChatWithAIClick, className: "ask-redhat-chat-button", icon: React.createElement(StarIcon, null) }, "Try again with AI Chat")))));
|
|
45
|
-
}
|
|
46
|
-
return (React.createElement("div", { className: "ask-redhat" },
|
|
47
|
-
React.createElement("p", { className: "ask-redhat-title" },
|
|
48
|
-
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
49
|
-
"AI Insights"),
|
|
50
|
-
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
51
|
-
React.createElement("div", { ref: contentRef, className: `ask-redhat-content ${isExpanded ? 'ask-redhat-content--expanded' : ''}` },
|
|
52
|
-
React.createElement("div", { className: `ask-redhat-content-scrollable ${isExpanded ? 'ask-redhat-content--expanded-scrollable' : ''}` },
|
|
53
|
-
React.createElement("div", null,
|
|
54
|
-
React.createElement("div", { dangerouslySetInnerHTML: { __html: parseMarkdown(answer) } }),
|
|
55
|
-
sourcesCount > 0 && (React.createElement(React.Fragment, null,
|
|
56
|
-
React.createElement("p", null, "2 sources"),
|
|
57
|
-
React.createElement("div", { className: "ask-redhat-cards" }, sources.map((source, index) => (React.createElement(Card, { className: "ask-redhat-card", key: index },
|
|
58
|
-
React.createElement(CardHeader, null,
|
|
59
|
-
React.createElement("h3", { className: "ask-redhat-card-title" },
|
|
60
|
-
React.createElement("a", { href: source.link, target: "_blank", rel: "noopener noreferrer" }, source.title))),
|
|
61
|
-
React.createElement(CardBody, null,
|
|
62
|
-
React.createElement("p", null, source.snippet)))))))))),
|
|
63
|
-
React.createElement("div", { className: "ask-redhat-footer-wrapper" },
|
|
64
|
-
React.createElement("div", { className: "ask-redhat-footer" },
|
|
65
|
-
React.createElement("p", { className: "ask-redhat-footer-text" }, "Want to continue the conversation? Dive deeper with our AI assistant"),
|
|
66
|
-
React.createElement(Button, { onClick: handleChatWithAIClick, className: 'ask-redhat-chat-button', icon: React.createElement(StarIcon, null) }, "Chat with AI"))),
|
|
67
|
-
!isExpanded && React.createElement("div", { className: "ask-redhat-fade-overlay" }))),
|
|
68
|
-
React.createElement("div", { className: "ask-redhat-toggle-button-wrapper" },
|
|
69
|
-
React.createElement("div", { className: "ask-redhat-border-line" }),
|
|
70
|
-
React.createElement(Button, { onClick: onToggle, className: isExpanded ? 'ask-redhat-toggle-button-collapsed' : 'ask-redhat-toggle-button' },
|
|
71
|
-
isExpanded ? React.createElement(CollapseIcon, null) : React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
72
|
-
isExpanded ? '' : 'Read more'))));
|
|
73
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapseIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/TroubleshootSection/icons/CollapseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,sBAiB5C,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export const CollapseIcon = (props) => {
|
|
3
|
-
const { width = 18.118, height = 12 } = props;
|
|
4
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 19 11", fill: "none", style: {
|
|
5
|
-
flexShrink: 0,
|
|
6
|
-
} },
|
|
7
|
-
React.createElement("path", { d: "M9.05895 0L16.9042 7.07143H1.21367L9.05895 0Z", fill: "#9F549C" }),
|
|
8
|
-
React.createElement("path", { d: "M9.05895 1.57129L16.9042 8.64272H1.21367L9.05895 1.57129Z", fill: "white" })));
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StarIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/TroubleshootSection/icons/StarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,UAAW,SAAS,sBAgDxC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export const StarIcon = (props) => {
|
|
3
|
-
const { width = 16, height = 15.273 } = props;
|
|
4
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 16 15.273", fill: "none", style: {
|
|
5
|
-
flexShrink: 0,
|
|
6
|
-
aspectRatio: '16.00/15.27',
|
|
7
|
-
} },
|
|
8
|
-
React.createElement("path", { d: "M16.197 9.21581L11.3573 8.18825L10.3297 3.34854C10.2937 3.16868 10.1345 3.04541 9.95463 3.04541C9.77478 3.04541 9.61558 3.17385 9.57958 3.34854L8.55202 8.18825L3.71231 9.21581C3.53245 9.25181 3.40918 9.41101 3.40918 9.59087C3.40918 9.77072 3.53762 9.92992 3.71231 9.96592L8.55202 10.9935L9.57958 15.8332C9.61558 16.013 9.77478 16.1363 9.95463 16.1363C10.1345 16.1363 10.2937 16.0079 10.3297 15.8332L11.3573 10.9935L16.197 9.96592C16.3768 9.92992 16.5001 9.77072 16.5001 9.59087C16.5001 9.41101 16.3717 9.25181 16.197 9.21581Z", fill: "url(#paint0_linear_5146_16767)" }),
|
|
9
|
-
React.createElement("path", { d: "M3.40909 6.68195C3.58647 6.68195 3.74356 6.55526 3.77905 6.38297L4.16931 4.53308L6.0192 4.14282C6.19658 4.10733 6.31818 3.95024 6.31818 3.77286C6.31818 3.59548 6.19149 3.43839 6.0192 3.4029L4.16931 3.01264L3.77905 1.16275C3.74356 0.98537 3.58647 0.86377 3.40909 0.86377C3.23171 0.86377 3.07462 0.990461 3.03913 1.16275L2.64887 3.01264L0.798982 3.4029C0.6216 3.43839 0.5 3.59548 0.5 3.77286C0.5 3.95024 0.626691 4.10733 0.798982 4.14282L2.64887 4.53308L3.03913 6.38297C3.07462 6.56035 3.23171 6.68195 3.40909 6.68195Z", fill: "url(#paint1_linear_5146_16767)" }),
|
|
10
|
-
React.createElement("defs", null,
|
|
11
|
-
React.createElement("linearGradient", { id: "paint0_linear_5146_16767", x1: "9.95463", y1: "3.04541", x2: "9.95463", y2: "16.1363", gradientUnits: "userSpaceOnUse" },
|
|
12
|
-
React.createElement("stop", { stopColor: "#F56E6E" }),
|
|
13
|
-
React.createElement("stop", { offset: "1", stopColor: "#5E40BE" })),
|
|
14
|
-
React.createElement("linearGradient", { id: "paint1_linear_5146_16767", x1: "3.40909", y1: "0.86377", x2: "3.40909", y2: "6.68195", gradientUnits: "userSpaceOnUse" },
|
|
15
|
-
React.createElement("stop", { stopColor: "#F56E6E" }),
|
|
16
|
-
React.createElement("stop", { offset: "1", stopColor: "#5E40BE" })))));
|
|
17
|
-
};
|