@rh-support/troubleshoot 2.6.48 → 2.6.55
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 +2 -3
- 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/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +18 -14
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -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/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +102 -53
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +21 -23
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +4 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +9 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +1 -1
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -6
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -3
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +24 -16
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +7 -5
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +18 -20
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +9 -6
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +15 -22
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +3 -2
- package/lib/esm/components/Cve/CveSidebar.js +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +9 -6
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +10 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +2 -2
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -4
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +3 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +9 -2
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
- package/lib/esm/components/Recommendations/Recommendations.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +7 -4
- package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -3
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +17 -12
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +13 -13
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +62 -27
- package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/ResponseActions.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +1 -0
- package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedback.js +2 -2
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
- 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/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +7 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -2
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +3 -0
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +34 -56
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -2
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -10
- package/lib/esm/css/AskRedHat.css +50 -8
- package/lib/esm/css/app.css +5 -4
- package/lib/esm/css/case.css +44 -7
- package/lib/esm/css/results.css +2 -2
- package/lib/esm/hooks/useARHResponse.d.ts +15 -0
- package/lib/esm/hooks/useARHResponse.d.ts.map +1 -0
- package/lib/esm/hooks/useARHResponse.js +50 -0
- package/lib/esm/scss/_main.scss +74 -13
- package/lib/esm/scss/_pf-overrides.scss +53 -10
- package/package.json +6 -6
|
@@ -161,6 +161,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
161
161
|
!isEmpty(version) &&
|
|
162
162
|
!isEmpty(summary) &&
|
|
163
163
|
!isEmpty(issue) &&
|
|
164
|
+
isEntitlement === true &&
|
|
164
165
|
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
|
|
165
166
|
return isValid;
|
|
166
167
|
}
|
|
@@ -252,7 +253,12 @@ export function useIsSectionValid(sectionName) {
|
|
|
252
253
|
return '';
|
|
253
254
|
switch (sectionNameLocal) {
|
|
254
255
|
case AppRouteSections.RESOURCES:
|
|
255
|
-
|
|
256
|
+
if (isCaseCreate === false) {
|
|
257
|
+
return getSupportSectionError();
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
return recommendationSectionError();
|
|
261
|
+
}
|
|
256
262
|
case AppRouteSections.GET_SUPPORT:
|
|
257
263
|
return getSupportSectionError();
|
|
258
264
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,
|
|
1
|
+
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAuTtD"}
|
|
@@ -24,7 +24,8 @@ import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
|
|
|
24
24
|
import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
25
25
|
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
26
26
|
import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
|
|
27
|
-
import {
|
|
27
|
+
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
28
|
+
import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
|
|
28
29
|
import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
29
30
|
import { fetchTopContent } from '../../reducers/TopContentReducer';
|
|
30
31
|
import RouteUtils from '../../utils/routeUtils';
|
|
@@ -117,6 +118,8 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
117
118
|
}, [allProducts.data.productsResult, caseDispatch, props.routeProps]);
|
|
118
119
|
// if you want to hide any section on page load then the logic will go here..
|
|
119
120
|
useEffect(() => {
|
|
121
|
+
// Reset validation error state when the troubleshoot app loads freshly
|
|
122
|
+
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
|
|
120
123
|
if (!isFirstMount.current && loggedInUser.data && managedAccounts.data)
|
|
121
124
|
return;
|
|
122
125
|
if (isFirstMount.current) {
|
|
@@ -143,11 +146,14 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
143
146
|
*/
|
|
144
147
|
useEffect(() => {
|
|
145
148
|
if (props.routeProps.location.pathname === RouteUtils.seBasePath) {
|
|
149
|
+
// Set the active section to the default section when navigating to base path
|
|
150
|
+
const defaultSection = isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT;
|
|
151
|
+
setActiveSectionChanged(dispatchToRouteReducer, defaultSection, '');
|
|
146
152
|
RouteUtils.navigateToDefaltSection(props.routeProps, isCaseCreate, isSearchIntent, false);
|
|
147
153
|
!isSearchIntent && resetCaseCreateState();
|
|
148
154
|
}
|
|
149
155
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
150
|
-
}, [dispatchToRouteReducer, props.routeProps, isCaseCreate, isSearchIntent]);
|
|
156
|
+
}, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
|
|
151
157
|
/**
|
|
152
158
|
* Setting Default AccountNumber and ContactSsoUsername from loggedInUsersAccount
|
|
153
159
|
* Disabling exhaustive-deps rule as we don't want to reset default values if user manually clears these from UI.
|
|
@@ -39,14 +39,14 @@ function WizardAside(props) {
|
|
|
39
39
|
React.createElement("section", { className: "grid-aside-content" },
|
|
40
40
|
canUseSessionManagement && !isCreatingCase && activeSection !== AppRouteSections.SUBMIT_CASE && (React.createElement(SessionRestore, { routeProps: props.routeProps })),
|
|
41
41
|
canShowFileUploadWidget() && React.createElement(InsightsResults, null),
|
|
42
|
-
canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v6-u-mb-
|
|
42
|
+
canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v6-u-mb-lg" }),
|
|
43
43
|
activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
|
|
44
44
|
!isCveModalOpened && React.createElement(CveSidebar, null),
|
|
45
45
|
activeSection === AppRouteSections.RESOURCES && React.createElement(CveSidebar, null),
|
|
46
46
|
canShowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
47
|
-
!(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-
|
|
47
|
+
!(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-lg pf-v6-u-mt-0" })),
|
|
48
48
|
canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
|
|
49
|
-
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-
|
|
49
|
+
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-lg pf-v6-u-mt-0" }))));
|
|
50
50
|
}
|
|
51
51
|
WizardAside.defaultProps = defaultProps;
|
|
52
52
|
export default WizardAside;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
|
+
export declare const getCaseTypeAIText: (caseType: string) => string;
|
|
5
|
+
export declare const generateCaseTypePrefix: (activeSection: string, caseType: string, lang: string) => string;
|
|
6
|
+
export declare const generateAIQuestion: (activeSection: string, product: string | undefined, version: string | undefined, summary: string | undefined, issue: string | undefined, caseType: string, lang: string) => string;
|
|
4
7
|
interface IProps {
|
|
5
8
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
6
9
|
submitCaseAndNavigate: (isReSubmitting: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE3G,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE3G,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAS9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,eAAO,MAAM,iBAAiB,aAAc,MAAM,KAAG,MAEpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,kBAAmB,MAAM,YAAY,MAAM,QAAQ,MAAM,KAAG,MAqB9F,CAAC;AAGF,eAAO,MAAM,kBAAkB,kBACZ,MAAM,WACZ,MAAM,GAAG,SAAS,WAClB,MAAM,GAAG,SAAS,WAClB,MAAM,GAAG,SAAS,SACpB,MAAM,GAAG,SAAS,YACf,MAAM,QACV,MAAM,KACb,MAwCF,CAAC;AACF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAyVhC;AACD,eAAe,UAAU,CAAC"}
|
|
@@ -19,19 +19,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import { Env } from '@cee-eng/hydrajs';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { getRHDirectStatusCheck } from '@ifd-ui/ask-redhat-core';
|
|
23
|
+
import { Wizard, WizardNav, WizardNavItem, WizardStep, } from '@patternfly/react-core';
|
|
24
24
|
import { LoadingIndicator } from '@rh-support/components';
|
|
25
25
|
import isEqual from 'lodash/isEqual';
|
|
26
26
|
import React, { Suspense, useContext, useEffect, useRef, useState } from 'react';
|
|
27
27
|
import { useTranslation } from 'react-i18next';
|
|
28
28
|
import { Route } from 'react-router-dom';
|
|
29
|
-
import { useAIResponseDispatch, useAIResponseState } from '../../context/AIResponseContext';
|
|
30
29
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
31
30
|
import { RecommendationDispatchContext } from '../../context/RecommendationContext';
|
|
32
31
|
import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
|
|
32
|
+
import { useARHResponse } from '../../hooks/useARHResponse';
|
|
33
33
|
import { useWizard } from '../../hooks/useWizard';
|
|
34
|
-
import { streamingChunkReceived, streamingCompleted, streamingError, streamingStarted, } from '../../reducers/AIResponseReducer';
|
|
35
34
|
import { appSourceId_ARH, excludedCaseTypesforARH } from '../../reducers/CaseConstNTypes';
|
|
36
35
|
import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
|
|
37
36
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
@@ -45,10 +44,10 @@ import WizardNavigation from './WizardNavigation';
|
|
|
45
44
|
const CASE_TYPE_AI_TEXT_MAP = {
|
|
46
45
|
Other: 'Something',
|
|
47
46
|
};
|
|
48
|
-
const getCaseTypeAIText = (caseType) => {
|
|
47
|
+
export const getCaseTypeAIText = (caseType) => {
|
|
49
48
|
return CASE_TYPE_AI_TEXT_MAP[caseType] || caseType;
|
|
50
49
|
};
|
|
51
|
-
const generateCaseTypePrefix = (activeSection, caseType, lang) => {
|
|
50
|
+
export const generateCaseTypePrefix = (activeSection, caseType, lang) => {
|
|
52
51
|
if (activeSection === AppRouteSections.TROUBLESHOOT) {
|
|
53
52
|
return '';
|
|
54
53
|
}
|
|
@@ -68,7 +67,7 @@ const generateCaseTypePrefix = (activeSection, caseType, lang) => {
|
|
|
68
67
|
return helpWithMap[lang] || helpWithMap.en;
|
|
69
68
|
};
|
|
70
69
|
// Generate AI question based on case details
|
|
71
|
-
const generateAIQuestion = (activeSection, product, version, summary, issue, caseType, lang) => {
|
|
70
|
+
export const generateAIQuestion = (activeSection, product, version, summary, issue, caseType, lang) => {
|
|
72
71
|
const baseMessageMap = {
|
|
73
72
|
en: `My issue is primarily related to ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. I would title my problem: ${summary !== null && summary !== void 0 ? summary : ''}. More details are as follows: ${issue !== null && issue !== void 0 ? issue : ''}.`,
|
|
74
73
|
de: `Mein Problem hängt hauptsächlich mit ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''} zusammen. Ich würde mein Problem so betiteln: ${summary !== null && summary !== void 0 ? summary : ''}. Weitere Details sind wie folgt: ${issue !== null && issue !== void 0 ? issue : ''}.`,
|
|
@@ -85,20 +84,34 @@ const generateAIQuestion = (activeSection, product, version, summary, issue, cas
|
|
|
85
84
|
return `${prefix} ${baseMessageMap[lang] || baseMessageMap.en}`;
|
|
86
85
|
};
|
|
87
86
|
function WizardMain(props) {
|
|
87
|
+
var _a, _b, _c;
|
|
88
88
|
const [showRestFlag, setShowRestFlag] = useState(false);
|
|
89
89
|
const [aiServicesAvailable, setAIServicesAvailable] = useState(false); // default to false until services are confirmed available
|
|
90
90
|
const recommendationDispatch = useContext(RecommendationDispatchContext);
|
|
91
|
-
const { isCreatingCase, product, version, summary, issue, caseType
|
|
91
|
+
const { isCreatingCase, product, version, summary, issue, caseType } = useCaseSelector((state) => ({
|
|
92
92
|
isCreatingCase: state.isCreatingCase,
|
|
93
93
|
product: state.caseDetails.product,
|
|
94
94
|
version: state.caseDetails.version,
|
|
95
95
|
summary: state.caseDetails.summary,
|
|
96
96
|
issue: state.caseDetails.issue,
|
|
97
97
|
caseType: state.caseDetails.caseType,
|
|
98
|
-
caseLanguage: state.caseDetails.caseLanguage,
|
|
99
98
|
}), isEqual);
|
|
100
99
|
const { routeState: { isCaseCreate, activeSection }, } = useContext(RouteContext);
|
|
101
|
-
const
|
|
100
|
+
const config = {
|
|
101
|
+
appSourceId: appSourceId_ARH,
|
|
102
|
+
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 : '',
|
|
103
|
+
packageVersion: (_c = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _c === void 0 ? void 0 : _c.packageVersion,
|
|
104
|
+
appEnv: Env.getEnvName(),
|
|
105
|
+
};
|
|
106
|
+
const { fetchARHResponse } = useARHResponse({
|
|
107
|
+
activeSection,
|
|
108
|
+
product,
|
|
109
|
+
version,
|
|
110
|
+
summary,
|
|
111
|
+
issue,
|
|
112
|
+
caseType,
|
|
113
|
+
config,
|
|
114
|
+
});
|
|
102
115
|
const isTroubleshootSection = activeSection === AppRouteSections.TROUBLESHOOT;
|
|
103
116
|
const isResourcesSection = activeSection === AppRouteSections.RESOURCES;
|
|
104
117
|
const isSummarizeSection = activeSection === AppRouteSections.SUMMARIZE;
|
|
@@ -146,7 +159,7 @@ function WizardMain(props) {
|
|
|
146
159
|
// Check if user is not a secure support or confirmed stateside support user
|
|
147
160
|
const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
|
|
148
161
|
// Check if the ARH fields have changed
|
|
149
|
-
const isARHFieldsChanged = haveARHFieldsChanged
|
|
162
|
+
const isARHFieldsChanged = haveARHFieldsChanged;
|
|
150
163
|
// Check if user is external and has invalid entitlements
|
|
151
164
|
const isNotUnentitledExternalUser = !(props.isUserExternal && props.hasInvalidEntitlements);
|
|
152
165
|
return (isRelevantSection &&
|
|
@@ -156,7 +169,7 @@ function WizardMain(props) {
|
|
|
156
169
|
isNotUnentitledExternalUser);
|
|
157
170
|
};
|
|
158
171
|
// Check if any of the ARH-relevant fields have changed
|
|
159
|
-
const haveARHFieldsChanged = () => {
|
|
172
|
+
const haveARHFieldsChanged = React.useMemo(() => {
|
|
160
173
|
const hasChanged = previousARHFieldsRef.current.product !== product ||
|
|
161
174
|
previousARHFieldsRef.current.version !== version ||
|
|
162
175
|
previousARHFieldsRef.current.summary !== summary ||
|
|
@@ -170,7 +183,7 @@ function WizardMain(props) {
|
|
|
170
183
|
};
|
|
171
184
|
}
|
|
172
185
|
return hasChanged;
|
|
173
|
-
};
|
|
186
|
+
}, [product, version, summary, issue]);
|
|
174
187
|
useEffect(() => {
|
|
175
188
|
if (!activeSection) {
|
|
176
189
|
return;
|
|
@@ -261,53 +274,18 @@ function WizardMain(props) {
|
|
|
261
274
|
const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
|
|
262
275
|
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) }));
|
|
263
276
|
})));
|
|
264
|
-
const CustomFooter = () => {
|
|
265
|
-
var _a, _b, _c;
|
|
266
|
-
const { activeStep, goToNextStep, goToPrevStep, steps, goToStepByIndex } = useWizardContext(); // Correctly using the context
|
|
267
|
-
const aiResponseState = useAIResponseState();
|
|
268
|
-
const config = {
|
|
269
|
-
appSourceId: appSourceId_ARH,
|
|
270
|
-
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 : '',
|
|
271
|
-
packageVersion: (_c = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _c === void 0 ? void 0 : _c.packageVersion,
|
|
272
|
-
appEnv: Env.getEnvName(),
|
|
273
|
-
};
|
|
277
|
+
const CustomFooter = (activeStep, goToNextStep, goToPrevStep) => {
|
|
274
278
|
useEffect(() => {
|
|
275
|
-
if (steps.length > 2 && activeStep.index === 2 && isNextButtonClicked) {
|
|
276
|
-
|
|
279
|
+
if (steps.length > 2 && (activeStep === null || activeStep === void 0 ? void 0 : activeStep.index) === 2 && isNextButtonClicked) {
|
|
280
|
+
goToNextStep({});
|
|
277
281
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
var _a;
|
|
281
|
-
const detailedQuestion = generateAIQuestion(activeSection || '', product, version, summary, issue, caseType || '', caseLanguage || 'en');
|
|
282
|
-
//streaming callbacks
|
|
283
|
-
const streamingCallbacks = {
|
|
284
|
-
onChunk: (chunk, accumulatedResponse) => {
|
|
285
|
-
aiResponseDispatch(streamingChunkReceived(chunk, accumulatedResponse));
|
|
286
|
-
},
|
|
287
|
-
onComplete: (finalResponse) => {
|
|
288
|
-
aiResponseDispatch(streamingCompleted(finalResponse));
|
|
289
|
-
},
|
|
290
|
-
onError: (error) => {
|
|
291
|
-
aiResponseDispatch(streamingError(error));
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
aiResponseDispatch(streamingStarted());
|
|
295
|
-
try {
|
|
296
|
-
// Get existing conversation ID from state if available (need to map it with session data)
|
|
297
|
-
const existingConversationId = (_a = aiResponseState === null || aiResponseState === void 0 ? void 0 : aiResponseState.aiResponse) === null || _a === void 0 ? void 0 : _a.conversationId;
|
|
298
|
-
yield askRHDirectAIResponse(detailedQuestion, config, true, // response to be streamed or not
|
|
299
|
-
existingConversationId, streamingCallbacks);
|
|
300
|
-
}
|
|
301
|
-
catch (error) {
|
|
302
|
-
const errorMessage = error instanceof Error ? error.message : 'Failed to get AI response';
|
|
303
|
-
aiResponseDispatch(streamingError(errorMessage));
|
|
304
|
-
}
|
|
305
|
-
});
|
|
282
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
283
|
+
}, [activeStep, steps.length, isNextButtonClicked, goToNextStep]);
|
|
306
284
|
const handleContinueClick = () => __awaiter(this, void 0, void 0, function* () {
|
|
307
285
|
// Navigate to next step first
|
|
308
286
|
isNextButtonClickedRef.current = true;
|
|
309
287
|
setIsNextButtonClicked(true);
|
|
310
|
-
goToNextStep();
|
|
288
|
+
goToNextStep({});
|
|
311
289
|
focusWizardMainPanel();
|
|
312
290
|
// Fetch ARH response if conditions are met
|
|
313
291
|
if (shouldEnableARHServices() && aiServicesAvailable) {
|
|
@@ -316,7 +294,7 @@ function WizardMain(props) {
|
|
|
316
294
|
});
|
|
317
295
|
return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: handleContinueClick, onBack: () => {
|
|
318
296
|
isBackButtonClickedRef.current = true;
|
|
319
|
-
goToPrevStep();
|
|
297
|
+
goToPrevStep({});
|
|
320
298
|
focusWizardMainPanel();
|
|
321
299
|
}, 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, isAIChatMode: props.isAIChatMode, onReturnToCaseCreation: handleReturnToCaseCreation }));
|
|
322
300
|
};
|
|
@@ -329,7 +307,7 @@ function WizardMain(props) {
|
|
|
329
307
|
// in useWizard file then add it to step squences in RouteConstNTypes
|
|
330
308
|
return (React.createElement(React.Fragment, null,
|
|
331
309
|
React.createElement(NewFeatureModal, null),
|
|
332
|
-
steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { isVisitRequired: true, nav: customNav, navAriaLabel: ` navAriaLabel steps `, footer:
|
|
310
|
+
steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { isVisitRequired: true, nav: customNav, navAriaLabel: ` navAriaLabel steps `, footer: CustomFooter, onStepChange: onCurrentStepChanged }, wizardSteps)) })),
|
|
333
311
|
React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
|
|
334
312
|
}
|
|
335
313
|
export default WizardMain;
|
|
@@ -3,8 +3,8 @@ import { RouteComponentProps } from 'react-router-dom';
|
|
|
3
3
|
import { IRouteUrlParams, ISectionConfiguration } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
6
|
-
onNext: () => void;
|
|
7
|
-
onBack: () => void;
|
|
6
|
+
onNext: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
onBack: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
8
|
activeStep: Partial<ISectionConfiguration>;
|
|
9
9
|
onSubmit: () => void;
|
|
10
10
|
confirmSupportModal: (hasPreferredSecureSupportAccount: boolean) => void;
|
|
@@ -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,
|
|
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,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,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,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAsVtC;kBAtVQ,gBAAgB;;;AAwVzB,eAAe,gBAAgB,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-core';
|
|
12
|
-
import { useFetch } from '@rh-support/components';
|
|
12
|
+
import { useFetch, usePrevious } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
|
|
14
14
|
import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
|
|
15
15
|
import find from 'lodash/find';
|
|
@@ -51,6 +51,7 @@ function WizardNavigation(props) {
|
|
|
51
51
|
const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
|
|
52
52
|
const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
|
|
53
53
|
const previousRecommendationTop = useRef(0);
|
|
54
|
+
const previousStep = usePrevious(props.activeStep);
|
|
54
55
|
const { request: resolveSessionRequest } = useFetch(pcm.preCase.session.resolveSession);
|
|
55
56
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
56
57
|
const { SessionResourceSource } = pcm.preCase.session;
|
|
@@ -59,12 +60,15 @@ function WizardNavigation(props) {
|
|
|
59
60
|
}), isEqual);
|
|
60
61
|
const caseDispatch = useCaseDispatch();
|
|
61
62
|
useEffect(() => {
|
|
62
|
-
var _a;
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if ((previousStep === null || previousStep === void 0 ? void 0 : previousStep.id) === ((_a = props.activeStep) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
63
67
|
const isCreatingCase = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
|
|
64
68
|
dtmTrackEventCaseCreationStepEncountered(isCreatingCase,
|
|
65
69
|
// @ts-ignore
|
|
66
70
|
props.activeStep.name, props.activeStep.id === AppRouteSections.GET_SUPPORT ||
|
|
67
|
-
props.activeStep.id === AppRouteSections.TROUBLESHOOT, (
|
|
71
|
+
props.activeStep.id === AppRouteSections.TROUBLESHOOT, (_b = caseState.caseDetails) === null || _b === void 0 ? void 0 : _b.caseNumber, PreviousToNewCaseTypeMap[caseState.caseDetails.caseType], caseState.caseDetails.summary, caseState.caseDetails.product, caseState.caseDetails.version);
|
|
68
72
|
if (props.activeStep.id === AppRouteSections.RESOURCES) {
|
|
69
73
|
window.scrollTo({
|
|
70
74
|
top: 0,
|
|
@@ -72,7 +76,7 @@ function WizardNavigation(props) {
|
|
|
72
76
|
});
|
|
73
77
|
}
|
|
74
78
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
-
}, [props.activeStep.id]);
|
|
79
|
+
}, [previousStep === null || previousStep === void 0 ? void 0 : previousStep.id, props.activeStep.id]);
|
|
76
80
|
const [hasUserScrolled, setHasUserScrolled] = useState(false);
|
|
77
81
|
useEffect(() => {
|
|
78
82
|
if (props.activeStep.id !== (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) ||
|
|
@@ -135,7 +139,7 @@ function WizardNavigation(props) {
|
|
|
135
139
|
}
|
|
136
140
|
};
|
|
137
141
|
}, [recommendationState.numFound, hasUserScrolled, props, isCaseCreate]);
|
|
138
|
-
const onNext = () => {
|
|
142
|
+
const onNext = (e) => {
|
|
139
143
|
var _a;
|
|
140
144
|
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, true);
|
|
141
145
|
//handle the new changes for 13406:
|
|
@@ -171,19 +175,19 @@ function WizardNavigation(props) {
|
|
|
171
175
|
// to show all steps, a delay needed in order to steps array
|
|
172
176
|
// to be updated
|
|
173
177
|
window.setTimeout(() => {
|
|
174
|
-
props.onNext && props.onNext();
|
|
178
|
+
props.onNext && props.onNext(e);
|
|
175
179
|
}, 10);
|
|
176
180
|
}
|
|
177
181
|
else {
|
|
178
|
-
props.onNext && props.onNext();
|
|
182
|
+
props.onNext && props.onNext(e);
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
185
|
return;
|
|
182
186
|
};
|
|
183
|
-
const onBack = () => {
|
|
187
|
+
const onBack = (e) => {
|
|
184
188
|
if (props.activeStep.hidRestOnBack)
|
|
185
189
|
props.onShowRestUpdate(false);
|
|
186
|
-
props.onBack();
|
|
190
|
+
props.onBack(e);
|
|
187
191
|
};
|
|
188
192
|
const onRecsFeedbackModalToggle = () => {
|
|
189
193
|
setIsRecsModalVisible((visible) => !visible);
|
|
@@ -250,7 +254,7 @@ function WizardNavigation(props) {
|
|
|
250
254
|
return (React.createElement(React.Fragment, null,
|
|
251
255
|
React.createElement(WizardFooterWrapper, null,
|
|
252
256
|
props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (React.createElement(Button, { onClick: props.onReturnToCaseCreation, variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Return to resources'))) : (React.createElement(React.Fragment, null,
|
|
253
|
-
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'))),
|
|
257
|
+
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'))),
|
|
254
258
|
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)),
|
|
255
259
|
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'))))),
|
|
256
260
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isRecsModalVisible, handleModalToggle: onRecsFeedbackModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.ask-redhat {
|
|
2
|
-
padding:
|
|
2
|
+
padding-bottom: 2rem;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.ask-redhat-title {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.ask-redhat-content {
|
|
26
|
-
max-height:
|
|
26
|
+
max-height: 242px;
|
|
27
27
|
color: #000;
|
|
28
28
|
font-family: 'Red Hat Text';
|
|
29
29
|
font-size: 16px;
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.ask-redhat-content--expanded {
|
|
39
|
-
max-height: calc(100vh -
|
|
39
|
+
max-height: calc(100vh - 382px);
|
|
40
40
|
transition: max-height 0.8s ease !important;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.ask-redhat-content--expanded-scrollable {
|
|
44
|
-
max-height: calc(100vh -
|
|
44
|
+
max-height: calc(100vh - 453px);
|
|
45
45
|
overflow-y: auto;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -65,21 +65,26 @@
|
|
|
65
65
|
|
|
66
66
|
.ask-redhat-footer-wrapper {
|
|
67
67
|
position: relative;
|
|
68
|
-
margin-top:
|
|
69
|
-
padding-bottom:
|
|
68
|
+
margin-top: 24px;
|
|
69
|
+
padding-bottom: 16px;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.ask-redhat-footer {
|
|
73
73
|
display: flex;
|
|
74
74
|
justify-content: space-between;
|
|
75
75
|
align-items: center;
|
|
76
|
-
margin: 1.5rem 0 2rem;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
.ask-redhat-footer-text {
|
|
80
79
|
margin: 0;
|
|
81
80
|
}
|
|
82
81
|
|
|
82
|
+
.ask-redhat-error {
|
|
83
|
+
border: 1px solid #c7c7c7;
|
|
84
|
+
border-radius: 6px;
|
|
85
|
+
padding: 12px 24px;
|
|
86
|
+
}
|
|
87
|
+
|
|
83
88
|
:root {
|
|
84
89
|
--color-red: var(--Core-color-palette-Red-red-40, #f56e6e);
|
|
85
90
|
--color-purple: var(--Secondary-color-palette-Purple-purple-50, #5e40be);
|
|
@@ -235,7 +240,6 @@
|
|
|
235
240
|
border-radius: 40px;
|
|
236
241
|
background: var(--gradient-red-purple) !important;
|
|
237
242
|
color: #000;
|
|
238
|
-
position: absolute;
|
|
239
243
|
left: 50%;
|
|
240
244
|
transform: translateX(-50%);
|
|
241
245
|
z-index: 3;
|
|
@@ -357,3 +361,41 @@ body:has(.pf-chatbot--embedded) .pf-v6-c-wizard__main-body:last-child {
|
|
|
357
361
|
.response-actions-wrapper {
|
|
358
362
|
margin-top: 24px;
|
|
359
363
|
}
|
|
364
|
+
|
|
365
|
+
.pf-chatbot__header {
|
|
366
|
+
color: #151515 !important;
|
|
367
|
+
background-color: #f2f2f2 !important;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.ask-redhat-core .pf-chatbot__header .pf-v6-c-title {
|
|
371
|
+
font-size: 16px !important;
|
|
372
|
+
font-weight: 600 !important;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.ask-redhat-core .pf-chatbot__beta-label .pf-v6-c-label__content {
|
|
376
|
+
color: #707070 !important;
|
|
377
|
+
line-height: var(--global-font-line-height-figma-only-body-small, 18px) !important;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.ask-redhat-core .pf-chatbot__header-container:after {
|
|
381
|
+
display: none !important;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.ask-redhat-core .pf-chatbot__expand-collapse-button {
|
|
385
|
+
color: #151515 !important;
|
|
386
|
+
font-size: var(--global-font-size-body-sm, 12px) !important;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.pf-v6-c-button__icon.pf-m-end {
|
|
390
|
+
margin-left: 0 !important;
|
|
391
|
+
display: flex !important;
|
|
392
|
+
padding: 8px !important;
|
|
393
|
+
align-items: center !important;
|
|
394
|
+
gap: 5px !important;
|
|
395
|
+
border-radius: var(--global-border-radius-small, 6px) !important;
|
|
396
|
+
background: #fff !important;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.ask-redhat-core .pf-chatbot__message-bar {
|
|
400
|
+
background: #fff !important;
|
|
401
|
+
}
|
package/lib/esm/css/app.css
CHANGED
|
@@ -91,10 +91,6 @@ form textarea.form-control:focus {
|
|
|
91
91
|
border-bottom-color: #06c;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
form textarea {
|
|
95
|
-
resize: vertical !important;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
94
|
.pf-v6-c-form-control.pf-m-warning {
|
|
99
95
|
border-bottom-color: var(--pf-v5-c-form-control--m-warning--BorderBottomColor);
|
|
100
96
|
border-bottom-width: 2px;
|
|
@@ -345,6 +341,7 @@ input[type='checkbox'] {
|
|
|
345
341
|
|
|
346
342
|
.list-flushleft li {
|
|
347
343
|
margin-bottom: 0.5em;
|
|
344
|
+
list-style-type: none;
|
|
348
345
|
}
|
|
349
346
|
|
|
350
347
|
.list-flushleft li:last-child {
|
|
@@ -448,3 +445,7 @@ input[type='checkbox'] {
|
|
|
448
445
|
row-gap: 9px;
|
|
449
446
|
line-height: 2px;
|
|
450
447
|
}
|
|
448
|
+
|
|
449
|
+
#additional-information-section textarea {
|
|
450
|
+
resize: none !important;
|
|
451
|
+
}
|
package/lib/esm/css/case.css
CHANGED
|
@@ -47,11 +47,15 @@ button,
|
|
|
47
47
|
padding-left: 1.8rem;
|
|
48
48
|
margin-right: -1.8rem;
|
|
49
49
|
padding-right: 1.8rem;
|
|
50
|
-
margin-bottom: -
|
|
50
|
+
margin-bottom: -1rem;
|
|
51
51
|
padding-bottom: 8rem;
|
|
52
52
|
min-height: 300px;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
.case-details-tabs-content {
|
|
56
|
+
border-radius: 0 0 0 16px !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
55
59
|
.support-comment {
|
|
56
60
|
display: block;
|
|
57
61
|
margin-bottom: 1rem;
|
|
@@ -177,15 +181,36 @@ button,
|
|
|
177
181
|
}
|
|
178
182
|
|
|
179
183
|
.clipboard-wrapper {
|
|
184
|
+
display: flex;
|
|
180
185
|
position: relative;
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
.clipboard-wrapper svg {
|
|
189
|
+
color: var(--pf-t--global--text--color--link--default);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.clipboard-wrapper :first-child {
|
|
193
|
+
white-space: nowrap;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
text-overflow: ellipsis;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.helper-text-size {
|
|
199
|
+
font-size: var(--pf-t--global--font--size--100);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.label-text-size {
|
|
203
|
+
font-size: var(--pf-t--global--font--size--300);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.request-collaboration-input {
|
|
207
|
+
background-color: var(--pf-t--global--background--color--200);
|
|
208
|
+
border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--100);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.copy-button {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
189
214
|
}
|
|
190
215
|
|
|
191
216
|
.clip-code-raw-btn {
|
|
@@ -363,3 +388,15 @@ input[aria-invalid='true'].pf-v6-c-form-control {
|
|
|
363
388
|
min-width: 552px;
|
|
364
389
|
}
|
|
365
390
|
}
|
|
391
|
+
|
|
392
|
+
#reopen-case-description {
|
|
393
|
+
resize: none !important;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.add-watcher-button {
|
|
397
|
+
max-width: 15rem;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.remove-watcher-button {
|
|
401
|
+
max-width: 15rem;
|
|
402
|
+
}
|
package/lib/esm/css/results.css
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook to prompt from the Ask Red Hat
|
|
3
|
+
*/
|
|
4
|
+
export declare const useARHResponse: ({ activeSection, product, version, summary, issue, caseType, config, }: {
|
|
5
|
+
activeSection: string;
|
|
6
|
+
product: string;
|
|
7
|
+
version: string;
|
|
8
|
+
summary: string;
|
|
9
|
+
issue: string;
|
|
10
|
+
caseType: string;
|
|
11
|
+
config: any;
|
|
12
|
+
}) => {
|
|
13
|
+
fetchARHResponse: () => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useARHResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useARHResponse.d.ts","sourceRoot":"","sources":["../../../src/hooks/useARHResponse.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,eAAO,MAAM,cAAc,2EAQxB;IACC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC;CACf;;CAgDA,CAAC"}
|