@rh-support/troubleshoot 2.6.103 → 2.6.118
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/AccountInfo/AccountSelector.js +1 -1
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +3 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +1 -1
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +3 -1
- package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/OpenCase.js +2 -8
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +6 -18
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +5 -12
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +38 -38
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +1 -5
- package/lib/esm/components/Suggestions/TopContentSidebar.d.ts +3 -0
- package/lib/esm/components/Suggestions/TopContentSidebar.d.ts.map +1 -0
- package/lib/esm/components/Suggestions/TopContentSidebar.js +26 -0
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +9 -0
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +150 -44
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +26 -65
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +18 -9
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +110 -64
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +59 -53
- package/lib/esm/css/AskRedHat.css +9 -2
- package/lib/esm/hooks/useAB.d.ts +22 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -0
- package/lib/esm/hooks/useAB.js +37 -0
- package/lib/esm/hooks/useWizard.d.ts +4 -0
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +20 -6
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts +17 -2
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/AIResponseConstNTypes.js +3 -0
- package/lib/esm/reducers/AIResponseReducer.d.ts +2 -0
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/AIResponseReducer.js +17 -0
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +1 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +0 -1
- package/package.json +7 -7
|
@@ -79,7 +79,7 @@ function AccountSelector(props) {
|
|
|
79
79
|
// When internal user wants to open a case for a customer but customer account doesn't have entitlement, we show an error
|
|
80
80
|
useEffect(() => {
|
|
81
81
|
const getAccountEntitlement = () => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
// internal user doesn't open case for customer. No need to check account
|
|
82
|
+
// internal user doesn't open case for customer. No need to check account entitlements
|
|
83
83
|
if (selectedAccountDetails.data.accountNumber === loggedInUsersAccount.data.accountNumber) {
|
|
84
84
|
setNoValidEntitlement(routeDispatch, false);
|
|
85
85
|
setShowNotEntitledMessage(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,qBAgPzC"}
|
|
@@ -33,7 +33,7 @@ export default function Case(props) {
|
|
|
33
33
|
const { t } = useTranslation();
|
|
34
34
|
// The `path` lets us build <Route> paths that are
|
|
35
35
|
// relative to the parent route, while the `url` lets
|
|
36
|
-
//us build relative links.
|
|
36
|
+
// us build relative links.
|
|
37
37
|
const { path, url } = useRouteMatch();
|
|
38
38
|
const { caseNumber } = useParams();
|
|
39
39
|
const queryParams = getUrlParsedParams(useLocation().search);
|
|
@@ -29,9 +29,9 @@ export const CaseSummary = (props) => {
|
|
|
29
29
|
const [caseSummaryData, setCaseSummaryData] = useState(getApiResourceObject(null, true));
|
|
30
30
|
const [caseSummaryState, setCaseSummaryState] = useState();
|
|
31
31
|
const [errorMessage, setErrorMessage] = useState('');
|
|
32
|
-
const {
|
|
33
|
-
caseComments: state.caseDetails.comments,
|
|
32
|
+
const { caseLanguage, caseComments } = useCaseSelector((state) => ({
|
|
34
33
|
caseLanguage: state.caseDetails.caseLanguage,
|
|
34
|
+
caseComments: state.caseDetails.comments,
|
|
35
35
|
}), isEqual);
|
|
36
36
|
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
37
37
|
const isInternal = (_b = (_a = loggedInUserRights === null || loggedInUserRights === void 0 ? void 0 : loggedInUserRights.data) === null || _a === void 0 ? void 0 : _a.isInternal) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
@@ -43,7 +43,7 @@ export const CaseSummary = (props) => {
|
|
|
43
43
|
setIsFeedbackModalOpen(true);
|
|
44
44
|
};
|
|
45
45
|
useEffect(() => {
|
|
46
|
-
if (caseLanguage
|
|
46
|
+
if (caseLanguage !== 'en') {
|
|
47
47
|
setCaseSummaryState(CaseSummaryStates.CASE_LANGUAGE_NOT_SUPPORTED);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
@@ -25,7 +25,7 @@ export function CaseSummaryErrorMessage(props) {
|
|
|
25
25
|
'The AI is either currently unavailable or is processing case details or try reloading the page.';
|
|
26
26
|
break;
|
|
27
27
|
case 'case_language_not_supported':
|
|
28
|
-
message = `The AI case summary is
|
|
28
|
+
message = `The AI case summary is available in English. We're working on adding more languages soon.`;
|
|
29
29
|
break;
|
|
30
30
|
case 'input_comments_too_large':
|
|
31
31
|
message = `${shared} overall input comments text is too large.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAS3D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAsKhD"}
|
|
@@ -7,11 +7,13 @@ import isEqual from 'lodash/isEqual';
|
|
|
7
7
|
import React, { useEffect, useRef, useState } from 'react';
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
9
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
10
|
+
import { useAB } from '../../hooks/useAB';
|
|
10
11
|
import { CASE_DETAILS_ISSUE_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
11
12
|
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
12
13
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
13
14
|
export default function Description(props) {
|
|
14
15
|
const { t } = useTranslation();
|
|
16
|
+
const { isVariationA } = useAB();
|
|
15
17
|
const { issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, version, product, summary } = useCaseSelector((state) => ({
|
|
16
18
|
description: state.caseDetails.description,
|
|
17
19
|
issue: state.caseDetails.issue,
|
|
@@ -78,7 +80,7 @@ export default function Description(props) {
|
|
|
78
80
|
isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
79
81
|
React.createElement(Popover, { isVisible: isOpen, shouldClose: handleClose, headerContent: headerPopoverContent, bodyContent: PopoverContent },
|
|
80
82
|
React.createElement(OutlinedQuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size", onClick: handleToggle }))))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
|
|
81
|
-
React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) || isEmpty(summary) || isEmpty(product) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) || isEmpty(summary) || isEmpty(product), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t('i18nKeyPlaceHolderDetail', `The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ?
|
|
83
|
+
React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) || isEmpty(summary) || isEmpty(product) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) || isEmpty(summary) || isEmpty(product), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t('i18nKeyPlaceHolderDetail', `The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isVariationA ? (isLgScreenHeight ? 20 : 12) : isLgScreenHeight ? 15 : 10, ref: textAreaRef, onClick: handleTextAreaClick }),
|
|
82
84
|
React.createElement("p", { className: "form-instructions pf-v6-u-danger-color-100", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT
|
|
83
85
|
? `This description exceeds ${CASE_DETAILS_ISSUE_LIMIT} characters. Try shortening it.`
|
|
84
86
|
: ''}`)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,EAAE,OAAO,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,MAAM,qBA4B7C"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
2
|
-
import isEqual from 'lodash/isEqual';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { useCaseSelector } from '../../context/CaseContext';
|
|
5
3
|
import { AccountSelector } from '../AccountInfo/AccountSelector';
|
|
6
4
|
import { OwnerSelector } from '../AccountInfo/OwnerSelector';
|
|
7
5
|
import ProductSelector from '../ProductSelector/ProductSelector';
|
|
8
6
|
import SupportTypeSelectorPage from './SupportTypeSelectorPage';
|
|
9
7
|
export default function OpenCase(props) {
|
|
10
8
|
const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
|
|
11
|
-
const { ABTestVariation } = useCaseSelector((state) => ({
|
|
12
|
-
ABTestVariation: state.ABTestVariation,
|
|
13
|
-
}), isEqual);
|
|
14
|
-
const isATestvariation = ABTestVariation === 'A';
|
|
15
9
|
return (React.createElement("form", null,
|
|
16
10
|
canChangeAccountInfo && (React.createElement(React.Fragment, null,
|
|
17
11
|
React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
|
|
18
12
|
React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
|
|
19
|
-
|
|
20
|
-
React.createElement(ProductSelector, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendations: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: true }))
|
|
13
|
+
React.createElement("div", { className: "form-group" },
|
|
14
|
+
React.createElement(ProductSelector, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendations: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: true })),
|
|
21
15
|
React.createElement(SupportTypeSelectorPage, null)));
|
|
22
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAsKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -33,11 +33,10 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
33
33
|
var _a, _b;
|
|
34
34
|
const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
35
35
|
const caseDispatch = useCaseDispatch();
|
|
36
|
-
const { product, version, contactSSOName
|
|
36
|
+
const { product, version, contactSSOName } = useCaseSelector((state) => ({
|
|
37
37
|
product: state.caseDetails.product,
|
|
38
38
|
version: state.caseDetails.version,
|
|
39
39
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
40
|
-
ABTestVariation: state.ABTestVariation,
|
|
41
40
|
}), isEqual);
|
|
42
41
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
43
42
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
@@ -80,25 +79,14 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
80
79
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
81
80
|
}
|
|
82
81
|
const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
|
|
83
|
-
const isATestvariation = ABTestVariation === 'A';
|
|
84
|
-
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
85
|
-
// Determine whether to render the ProductVersionDropdownSelector
|
|
86
82
|
const renderProductVersionDropdownSelector = (activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
|
|
87
83
|
!props.caseCreateExperience) ||
|
|
88
84
|
activeSection === AppRouteSections.GET_SUPPORT ||
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
activeSection === AppRouteSections.REVIEW ||
|
|
95
|
-
activeSection === AppRouteSections.SUBMIT_CASE)) ||
|
|
96
|
-
(isATestvariation &&
|
|
97
|
-
(activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) ||
|
|
98
|
-
activeSection === AppRouteSections.REVIEW ||
|
|
99
|
-
activeSection === AppRouteSections.SUBMIT_CASE)) ||
|
|
100
|
-
(!props.caseCreateExperience &&
|
|
101
|
-
activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT));
|
|
85
|
+
props.isOnGetSupportPage ||
|
|
86
|
+
props.isOnReviewPage;
|
|
87
|
+
const renderOpenCaseIssue = activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) ||
|
|
88
|
+
activeSection === AppRouteSections.REVIEW ||
|
|
89
|
+
activeSection === AppRouteSections.SUBMIT_CASE;
|
|
102
90
|
return (React.createElement(React.Fragment, null,
|
|
103
91
|
renderProductVersionDropdownSelector && (React.createElement("div", { className: "form-group product-selector-wrapper" },
|
|
104
92
|
React.createElement("div", { className: "all-product-selector-dropdown" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAKlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAqGpD"}
|
|
@@ -8,13 +8,12 @@ import React, { useContext, useEffect, useRef } from 'react';
|
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
9
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
10
10
|
import { RouteContext } from '../../context/RouteContext';
|
|
11
|
+
import { useAB } from '../../hooks/useAB';
|
|
11
12
|
import { useFetchCVEData } from '../../hooks/useFetchCVEData';
|
|
12
13
|
import { setCaseState } from '../../reducers/CaseReducer';
|
|
13
14
|
import { CveModal } from '../Cve/CveModal';
|
|
14
|
-
import { EARuleWidget } from '../Recommendations/EARules/EARuleWidget';
|
|
15
15
|
import Recommendations from '../Recommendations/Recommendations';
|
|
16
16
|
import { AllProductsSelector } from './AllProductsSelector';
|
|
17
|
-
import { ProductSelectorLoader } from './ProductSelectorLoader';
|
|
18
17
|
/**
|
|
19
18
|
* Responsible for:
|
|
20
19
|
* # Setting case state with product version from url.
|
|
@@ -26,18 +25,16 @@ import { ProductSelectorLoader } from './ProductSelectorLoader';
|
|
|
26
25
|
export default function ProductSelector(props) {
|
|
27
26
|
const { cveRecommendation } = useFetchCVEData();
|
|
28
27
|
const { t } = useTranslation();
|
|
28
|
+
const { isVariationA } = useAB();
|
|
29
29
|
const { globalMetadataState: { allProducts, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
30
|
-
const { product, version
|
|
30
|
+
const { product, version } = useCaseSelector((state) => ({
|
|
31
31
|
product: state.caseDetails.product,
|
|
32
32
|
version: state.caseDetails.version,
|
|
33
|
-
ABTestVariation: state.ABTestVariation,
|
|
34
33
|
}), isEqual);
|
|
35
34
|
const { routeState: { isCaseCreate }, } = useContext(RouteContext);
|
|
36
35
|
const caseDispatch = useCaseDispatch();
|
|
37
36
|
const cveModalEnabledConfig = getConfigField(pcmConfig.data, 'isCVEModalEnabled', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
38
37
|
const isCVEModalEnabled = cveModalEnabledConfig === '1';
|
|
39
|
-
const isATestvariation = ABTestVariation === 'A';
|
|
40
|
-
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
41
38
|
useEffect(() => {
|
|
42
39
|
if (!isCVEModalEnabled) {
|
|
43
40
|
setCaseState(caseDispatch, {
|
|
@@ -56,11 +53,8 @@ export default function ProductSelector(props) {
|
|
|
56
53
|
(cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && isCVEModalEnabled && React.createElement(CveModal, null),
|
|
57
54
|
React.createElement(AllProductsSelector, { routeProps: props.routeProps, checkEntitledProduct: isCaseCreate ? true : false, ref: productSelectorRef, isOnSummaryPage: true, isOnGetSupportPage: props === null || props === void 0 ? void 0 : props.isOnGetSupportPage, caseCreateExperience: props.caseCreateExperience })));
|
|
58
55
|
return (React.createElement(React.Fragment, null,
|
|
59
|
-
isBTestvariation && allProducts.isFetching && React.createElement(ProductSelectorLoader, null),
|
|
60
56
|
React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", title: t('There was an error loading products.'), show: allProducts.isError }),
|
|
61
|
-
|
|
62
|
-
? !allProducts.isFetching && !allProducts.isError && rederProductSelect
|
|
63
|
-
: isATestvariation && rederProductSelect,
|
|
57
|
+
rederProductSelect,
|
|
64
58
|
product === 'Subscription Watch' && (React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
|
|
65
59
|
' ',
|
|
66
60
|
"If you're having a subscription issue that doesn't relate to",
|
|
@@ -71,8 +65,7 @@ export default function ProductSelector(props) {
|
|
|
71
65
|
React.createElement("a", { href: "/support/contact", "data-tracking-id": "contact-customer-service" }, "customer service"),
|
|
72
66
|
' ',
|
|
73
67
|
"for help.") })),
|
|
74
|
-
|
|
75
|
-
!(props === null || props === void 0 ? void 0 : props.isOnGetSupportPage) && (React.createElement("div", { className: "suggestions-result-section" },
|
|
68
|
+
!isVariationA && !(props === null || props === void 0 ? void 0 : props.isOnGetSupportPage) && (React.createElement("div", { className: "suggestions-result-section" },
|
|
76
69
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading recommendations') } }, !isEmpty(version) && (React.createElement("div", { className: "common-suggestions" },
|
|
77
70
|
React.createElement(Recommendations, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendationsValue: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef }))))))));
|
|
78
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAgBvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBA0XpD"}
|
|
@@ -2,7 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { Label, Pagination, PaginationVariant, Popover, Spinner } from '@patternfly/react-core';
|
|
3
3
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
4
4
|
import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
|
|
5
|
-
import {
|
|
5
|
+
import { useDebounce, usePrevious } from '@rh-support/components';
|
|
6
6
|
import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEventContentListingItemClicked, formatDate, getRecommendationTitle, } from '@rh-support/utils';
|
|
7
7
|
import differenceBy from 'lodash/differenceBy';
|
|
8
8
|
import find from 'lodash/find';
|
|
@@ -15,6 +15,7 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
|
15
15
|
import { RecommendationDispatchContext, RecommendationStateContext } from '../../context/RecommendationContext';
|
|
16
16
|
import { RouteContext } from '../../context/RouteContext';
|
|
17
17
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
18
|
+
import { useAB } from '../../hooks/useAB';
|
|
18
19
|
import { getRecommendationObject } from '../../reducers/CaseHelpers';
|
|
19
20
|
import { setCaseRecommendations } from '../../reducers/CaseReducer';
|
|
20
21
|
import { fetchWatsonXRecommendations, RecommendationsConstants, setCurrentPage, setVisibleDocs, } from '../../reducers/RecommendationsReducer';
|
|
@@ -27,14 +28,14 @@ import { WatsonxAiIcon } from './WatsonxAiIcon';
|
|
|
27
28
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
28
29
|
export default function Recommendations(props) {
|
|
29
30
|
var _a, _b, _c;
|
|
30
|
-
const {
|
|
31
|
+
const { isVariationA } = useAB();
|
|
32
|
+
const { product, version, environment, summary, caseResourceLinks, issue, cveWorkflowRecommendation } = useCaseSelector((state) => ({
|
|
31
33
|
product: state.caseDetails.product,
|
|
32
34
|
version: state.caseDetails.version,
|
|
33
35
|
environment: state.caseDetails.environment,
|
|
34
36
|
summary: state.caseDetails.summary,
|
|
35
37
|
issue: state.caseDetails.issue,
|
|
36
38
|
caseResourceLinks: state.caseDetails.caseResourceLinks,
|
|
37
|
-
ABTestVariation: state.ABTestVariation,
|
|
38
39
|
cveWorkflowRecommendation: state.cveWorkflowRecommendation,
|
|
39
40
|
}), isEqual);
|
|
40
41
|
const caseDispatch = useCaseDispatch();
|
|
@@ -46,7 +47,7 @@ export default function Recommendations(props) {
|
|
|
46
47
|
const { recommendationState } = useContext(RecommendationStateContext);
|
|
47
48
|
const prevMainRecommendations = usePrevious((_a = recommendationState === null || recommendationState === void 0 ? void 0 : recommendationState.visibleDocs) !== null && _a !== void 0 ? _a : []);
|
|
48
49
|
const recommendationDispatch = useContext(RecommendationDispatchContext);
|
|
49
|
-
const DEFAULTPAGESIZE =
|
|
50
|
+
const DEFAULTPAGESIZE = 10;
|
|
50
51
|
const MAXROW = 24;
|
|
51
52
|
const recPageSize = pageSize !== null && pageSize !== void 0 ? pageSize : DEFAULTPAGESIZE;
|
|
52
53
|
const abortControllerRef = useRef(undefined);
|
|
@@ -56,16 +57,17 @@ export default function Recommendations(props) {
|
|
|
56
57
|
summary: summary,
|
|
57
58
|
description: issue, // we don't need to truncate to 20k as Watsonx max recs is 4000 done for us already
|
|
58
59
|
};
|
|
59
|
-
const isATestvariation = ABTestVariation === 'A';
|
|
60
|
-
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
61
60
|
const isRecSearchPayloadSame = isEqual(payload, recommendationState.prevRecommendationsBody);
|
|
62
61
|
useEffect(() => {
|
|
63
62
|
// currently due to the debounce we use after the page load leads to some delay in the disbaling of next button
|
|
64
63
|
// since the state of the next button depends on the loading rec flag so we force the flag to be true every time the
|
|
65
64
|
// rec section is rendered for the first time except the case when we won't make a new search since there was no change in the rec payload.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
const validSections = isVariationA
|
|
66
|
+
? [AppRouteSections.RESOURCES]
|
|
67
|
+
: isCaseCreate
|
|
68
|
+
? [AppRouteSections.SUMMARIZE]
|
|
69
|
+
: [AppRouteSections.TROUBLESHOOT];
|
|
70
|
+
if (!validSections.includes(activeSection) || !summary || isRecSearchPayloadSame) {
|
|
69
71
|
return;
|
|
70
72
|
}
|
|
71
73
|
!isRecSearchPayloadSame &&
|
|
@@ -80,8 +82,12 @@ export default function Recommendations(props) {
|
|
|
80
82
|
* Also, log the newly presented resources on the session
|
|
81
83
|
*/
|
|
82
84
|
useDebounce(() => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
const validSections = isVariationA
|
|
86
|
+
? [AppRouteSections.RESOURCES]
|
|
87
|
+
: isCaseCreate
|
|
88
|
+
? [AppRouteSections.SUMMARIZE]
|
|
89
|
+
: [AppRouteSections.TROUBLESHOOT];
|
|
90
|
+
if (!validSections.includes(activeSection) || isRecSearchPayloadSame) {
|
|
85
91
|
return;
|
|
86
92
|
}
|
|
87
93
|
setCurrentPage(recommendationDispatch, 1);
|
|
@@ -181,39 +187,33 @@ export default function Recommendations(props) {
|
|
|
181
187
|
t('Match')))));
|
|
182
188
|
};
|
|
183
189
|
return (React.createElement(React.Fragment, null,
|
|
184
|
-
isBTestvariation && (React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) })),
|
|
185
190
|
React.createElement("div", { className: "recommendation-list", ref: props.resultsRowRef },
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
recommendationState.isLoadingRecommendations
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
' '
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
' ')))
|
|
207
|
-
: recommendationState.visibleDocs.length !== 0 && (React.createElement(Label, { color: "purple", className: "pf-v6-u-mb-md" },
|
|
208
|
-
React.createElement(WatsonxAiIcon, { fillColor: "#6753ac", className: "pf-v6-u-mr-xs" }),
|
|
209
|
-
React.createElement(Trans, null, "Live search results powered by OpenShift AI"))),
|
|
210
|
-
isATestvariation && recommendationState.isLoadingRecommendations ? (React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
|
|
191
|
+
(recommendationState.visibleDocs.length !== 0 || recommendationState.isLoadingRecommendations) && (React.createElement("div", { className: `${recommendationState.isLoadingRecommendations ? 'gradient' : ''} label-container-icon` },
|
|
192
|
+
React.createElement("div", { id: "DeepPurpleColorAILabel" },
|
|
193
|
+
recommendationState.isLoadingRecommendations ? (React.createElement(React.Fragment, null,
|
|
194
|
+
React.createElement("span", { className: "loading-text" },
|
|
195
|
+
React.createElement(Spinner, { size: "sm", className: "pf-v6-u-mr-xs" }),
|
|
196
|
+
' ',
|
|
197
|
+
React.createElement(Trans, null, recommendationState.visibleDocs.length
|
|
198
|
+
? 'Updating recommendations '
|
|
199
|
+
: 'Recommending articles '),
|
|
200
|
+
' ',
|
|
201
|
+
React.createElement(InfoCircleIcon, { color: "#5E40BE" })))) : (React.createElement(React.Fragment, null,
|
|
202
|
+
React.createElement("span", { className: "ai-label-text" },
|
|
203
|
+
React.createElement(WatsonxAiIcon, { fillColor: "#FFFFFF", className: "pf-v6-u-mr-xs" }),
|
|
204
|
+
' ',
|
|
205
|
+
React.createElement("span", { className: "ai-label-text1" },
|
|
206
|
+
React.createElement(Trans, null, "Recommended search results"),
|
|
207
|
+
" ",
|
|
208
|
+
infoPopover)))),
|
|
209
|
+
' '))),
|
|
210
|
+
recommendationState.isLoadingRecommendations ? (React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
|
|
211
211
|
var _a, _b;
|
|
212
212
|
return (React.createElement("li", { className: "result", key: doc.id },
|
|
213
213
|
React.createElement("header", { className: "result-header" },
|
|
214
214
|
React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS)}`, className: "se-recommended ts-result", "data-tracking-id": `se-recommended-main-recommendations-${i}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, i), dangerouslySetInnerHTML: computeRecommendationTitle(doc) }),
|
|
215
215
|
React.createElement("div", { className: "header-meta pf-v6-u-mt-xs" },
|
|
216
|
-
|
|
216
|
+
doc.rerank_score && computeLabel(doc),
|
|
217
217
|
doc.kcsState === 'verified' && (React.createElement(React.Fragment, null,
|
|
218
218
|
React.createElement("span", { className: "status-verified pf-v6-u-font-weight-bold pf-v6-u-success-color-100" }, "verified"),
|
|
219
219
|
React.createElement("span", { className: "list-separator" }, "\u2013"))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBAuD/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAuE3C"}
|
|
@@ -24,12 +24,10 @@ import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContact
|
|
|
24
24
|
import { Hostname } from '../ImproveCase/Hostname';
|
|
25
25
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
26
26
|
import { AllProductsSelector } from '../ProductSelector/AllProductsSelector';
|
|
27
|
-
import { EARuleWidget } from '../Recommendations/EARules/EARuleWidget';
|
|
28
27
|
export default function Review(props) {
|
|
29
28
|
const caseDispatch = useCaseDispatch();
|
|
30
|
-
const { contactInfo24x7,
|
|
29
|
+
const { contactInfo24x7, caseType } = useCaseSelector((state) => ({
|
|
31
30
|
contactInfo24x7: state.caseDetails.contactInfo24x7,
|
|
32
|
-
ABTestVariation: state.ABTestVariation,
|
|
33
31
|
caseType: state.caseDetails.caseType,
|
|
34
32
|
}), isEqual);
|
|
35
33
|
const ability = useContext(AbilityContext);
|
|
@@ -37,9 +35,7 @@ export default function Review(props) {
|
|
|
37
35
|
const onSeverityChange = (payload) => {
|
|
38
36
|
setCaseDetails(caseDispatch, payload);
|
|
39
37
|
};
|
|
40
|
-
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
41
38
|
return (React.createElement(React.Fragment, null,
|
|
42
|
-
isBTestvariation && React.createElement(EARuleWidget, null),
|
|
43
39
|
React.createElement("form", { className: "review-form card card-light push-bottom" },
|
|
44
40
|
React.createElement(AccountSelector, null),
|
|
45
41
|
React.createElement(OwnerSelector, null),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopContentSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContentSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,MAAM,CAAC,OAAO,UAAU,iBAAiB,sBA2CxC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Card, CardBody, CardHeader, Tooltip } from '@patternfly/react-core';
|
|
2
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
+
import isEqual from 'lodash/isEqual';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
6
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
7
|
+
import { TCStateContext } from '../../context/TopContentContext';
|
|
8
|
+
export default function TopContentSidebar() {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
11
|
+
const { version } = useCaseSelector((state) => ({
|
|
12
|
+
version: state.caseDetails.version,
|
|
13
|
+
}), isEqual);
|
|
14
|
+
// Only show if there's a version but no topContent data
|
|
15
|
+
if (!version || topContent.data.length > 0) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return (React.createElement(Card, { id: "card", className: "pf-v6-u-mt-md" },
|
|
19
|
+
React.createElement(CardHeader, { id: "card-title" },
|
|
20
|
+
React.createElement(Trans, { i18nKey: 'i18nKeyPopularSolutions' }, "Red Hat hand picked support articles"),
|
|
21
|
+
React.createElement(Tooltip, { content: React.createElement("div", null,
|
|
22
|
+
React.createElement(Trans, null, "Support articles are matched to the product and version details you selected, not the problem details you entered.")) },
|
|
23
|
+
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm", "aria-label": "More info about how support articles are matched" }))),
|
|
24
|
+
React.createElement(CardBody, { "aria-label": t('No recommendations for this product'), className: "file-recs-no-recommendation" },
|
|
25
|
+
React.createElement(Trans, null, "No recommendations for this product"))));
|
|
26
|
+
}
|
|
@@ -140,7 +140,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
140
140
|
// Use accumulated response if streaming, otherwise use the final response
|
|
141
141
|
const answer = aiResponseState.isStreaming && aiResponseState.accumulatedResponse
|
|
142
142
|
? aiResponseState.accumulatedResponse
|
|
143
|
-
: (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.answer) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.content)
|
|
143
|
+
: (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.answer) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.content);
|
|
144
144
|
const sources = React.useMemo(() => (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.sources) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.references) || [], [aiResponse]);
|
|
145
145
|
const sourcesCount = sources.length || 0;
|
|
146
146
|
// Show loading only when streaming has started but no content received yet
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import '@ifd-ui/ask-redhat-core/ask-redhat-core.css';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
4
|
+
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
3
5
|
interface IProps {
|
|
6
|
+
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
7
|
+
userSeenRecommendations?: (value: React.SetStateAction<boolean>) => void;
|
|
8
|
+
userClickedNextonRecommendations?: boolean;
|
|
9
|
+
resultsRowRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
4
10
|
inlineEditable: boolean;
|
|
5
11
|
initialIsEditing?: boolean;
|
|
6
12
|
required?: boolean;
|
|
@@ -13,6 +19,9 @@ interface IProps {
|
|
|
13
19
|
aiServicesAvailable: boolean;
|
|
14
20
|
isSecureSupport?: boolean;
|
|
15
21
|
hasConfirmedStatesideSupport?: boolean;
|
|
22
|
+
onBack?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
23
|
+
haveARHFieldsChanged?: boolean;
|
|
24
|
+
resetARHFieldsChanged?: () => void;
|
|
16
25
|
}
|
|
17
26
|
declare function TroubleshootSection(props: IProps): React.JSX.Element;
|
|
18
27
|
declare namespace TroubleshootSection {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAkBrD,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAyBpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,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;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACtC;AAWD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmZzC;kBAnZQ,mBAAmB;;;AAsZ5B,eAAe,mBAAmB,CAAC"}
|