@rh-support/troubleshoot 2.2.172 → 2.2.173
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/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +1 -0
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +0 -2
- package/lib/esm/components/CaseEditView/ShareCase/PartnerCaseHelper.d.ts +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/PartnerCaseHelper.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/PartnerCaseHelper.js +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +17 -11
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -0
- package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +2 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +2 -3
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts +2 -0
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +4 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +7 -9
- package/lib/esm/components/Recommendations/EARules/EARuleWidget.js +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +1 -1
- package/lib/esm/components/Recommendations/RecommendationInfoBox.js +1 -1
- package/lib/esm/components/Review/Review.d.ts +1 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +27 -25
- package/lib/esm/components/wizardLayout/WizardAside.d.ts +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/css/app.css +0 -5
- package/lib/esm/css/productSelector.css +5 -0
- package/lib/esm/hooks/useParseRuleMarkdown.js +1 -1
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +5 -7
- package/lib/esm/scss/_main.scss +13 -2
- package/lib/esm/scss/index.scss +0 -5
- package/lib/esm/utils/insightRuleInfoUtils.d.ts +4 -0
- package/lib/esm/utils/insightRuleInfoUtils.d.ts.map +1 -0
- package/lib/esm/utils/insightRuleInfoUtils.js +23 -0
- package/lib/esm/utils/routeUtils.d.ts +1 -1
- package/lib/esm/utils/routeUtils.d.ts.map +1 -1
- package/package.json +15 -13
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts +0 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.js +0 -75
- package/lib/esm/hooks/useUserPreference.d.ts +0 -7
- package/lib/esm/hooks/useUserPreference.d.ts.map +0 -1
- package/lib/esm/hooks/useUserPreference.js +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAmX7C"}
|
|
@@ -135,6 +135,7 @@ export function CaseDetailsAside(props) {
|
|
|
135
135
|
const onDefaultCheckboxChange = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
136
136
|
try {
|
|
137
137
|
if (viewAsInternalPref !== undefined) {
|
|
138
|
+
// @ts-ignore
|
|
138
139
|
yield updateOriginalCaseView(+!viewAsInternalPref);
|
|
139
140
|
setIsDefaultBoxChecked(!isDefaultBoxChecked);
|
|
140
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBA6fjD"}
|
|
@@ -28,7 +28,6 @@ import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
|
|
|
28
28
|
import { PDFContext } from '../PDFContainer';
|
|
29
29
|
import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
|
|
30
30
|
import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
|
|
31
|
-
import { CasePhoneNumberSev1ConfirmAlert } from '../Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert';
|
|
32
31
|
import Summary from '../Tabs/CaseDetails/Summary';
|
|
33
32
|
import CaseOwnerInfo from './CaseOwnerInfo';
|
|
34
33
|
import CaseStatus from './CaseStatus';
|
|
@@ -240,7 +239,6 @@ export default function CaseOverview(props) {
|
|
|
240
239
|
React.createElement("p", { className: "pf-v5-u-mb-sm" },
|
|
241
240
|
React.createElement(Trans, null, "The customer has received two warnings regarding inactivity. This case will be closed soon if we don't receive any input."))) })))),
|
|
242
241
|
React.createElement(CaseContactPhoneNumberAlert, { isReview: true, tabRef: props.tabsRef }),
|
|
243
|
-
React.createElement(CasePhoneNumberSev1ConfirmAlert, { isReview: true, tabRef: props.tabsRef }),
|
|
244
242
|
React.createElement("header", null,
|
|
245
243
|
React.createElement("h2", { className: "case-ID" },
|
|
246
244
|
React.createElement(Trans, null, "Case"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartnerCaseHelper.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ShareCase/PartnerCaseHelper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"PartnerCaseHelper.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ShareCase/PartnerCaseHelper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAIpE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACxE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBAsB9C"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { getTnCHost, getUrlParsedParams } from '@rh-support/utils';
|
|
11
11
|
import React, { useEffect, useState } from 'react';
|
|
12
|
-
import { useLocation } from 'react-router';
|
|
12
|
+
import { useLocation } from 'react-router-dom';
|
|
13
13
|
import { handleTnCQueryParams } from './TnC';
|
|
14
14
|
export function PartnerCaseHelper(props) {
|
|
15
15
|
var _a, _b;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RouteComponentProps } from 'react-router';
|
|
1
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
2
2
|
export declare function getTnCUrl(accountNumber: any): string;
|
|
3
3
|
export declare const handleTnCQueryParams: (caseNumber: string, routeProps: RouteComponentProps) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=TnC.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TnC.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ShareCase/TnC.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TnC.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ShareCase/TnC.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,SAAS,CAAC,aAAa,KAAA,UAQtC;AAMD,eAAO,MAAM,oBAAoB,eAAsB,MAAM,cAAc,mBAAmB,kBAc7F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDClassNameProps } from '@rh-support/types/shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { RouteComponentProps } from 'react-router';
|
|
3
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
4
4
|
interface IProps extends IDClassNameProps {
|
|
5
5
|
caseNumber: string;
|
|
6
6
|
routeProps: RouteComponentProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAkBvD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAgE1D"}
|
|
@@ -14,7 +14,6 @@ import { ShareWithPartner } from '../../ShareCase/PartnerShare';
|
|
|
14
14
|
import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
|
|
15
15
|
import CaseInternalStatus from './CaseInternalStatus';
|
|
16
16
|
import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
|
|
17
|
-
import { CasePhoneNumberSev1ConfirmAlert } from './CasePhoneNumberSev1ConfirmAlert';
|
|
18
17
|
import CaseReferenceNumber from './CaseReferenceNumber';
|
|
19
18
|
import CaseSbrGroups from './CaseSbrGroups';
|
|
20
19
|
import SFDCUrl from './SFDCUrl';
|
|
@@ -40,7 +39,6 @@ export default function CaseDetailsManagement(props) {
|
|
|
40
39
|
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
41
40
|
React.createElement(CaseContactPhoneNumber, null))),
|
|
42
41
|
React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
|
|
43
|
-
React.createElement(CasePhoneNumberSev1ConfirmAlert, { isConfirm: true }),
|
|
44
42
|
canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
|
|
45
43
|
canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
|
|
46
44
|
React.createElement(CaseGroup, null),
|
package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA+B,MAAM,OAAO,CAAC;AASpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAsIxD"}
|
|
@@ -23,12 +23,14 @@ import { PDFContext } from '../../PDFContainer';
|
|
|
23
23
|
export function CaseContactPhoneNumberAlert(props) {
|
|
24
24
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
25
25
|
const [isCaseUpdating, setCasUpdating] = useState(false);
|
|
26
|
-
const
|
|
26
|
+
const [closeConfirmAlert, setCloseConfirmAlert] = useState(false);
|
|
27
|
+
const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, isCaseOwnerUpdating, phoneCountryCode, phoneAreaCodePrefixLineNumber, } = useCaseSelector((state) => ({
|
|
27
28
|
caseNumber: state.caseDetails.caseNumber,
|
|
28
29
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
29
30
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
30
31
|
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
31
|
-
|
|
32
|
+
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
33
|
+
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
32
34
|
}), isEqual);
|
|
33
35
|
const { t } = useTranslation();
|
|
34
36
|
const caseDispatch = useCaseDispatch();
|
|
@@ -51,21 +53,25 @@ export function CaseContactPhoneNumberAlert(props) {
|
|
|
51
53
|
};
|
|
52
54
|
const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
|
|
53
55
|
contactSSOName === loggedInUser.data.ssoUsername &&
|
|
54
|
-
suppliedPhoneNumberVerified
|
|
55
|
-
!isCaseOwnerUpdating
|
|
56
|
-
|
|
57
|
-
const
|
|
56
|
+
suppliedPhoneNumberVerified !== 'True' &&
|
|
57
|
+
!isCaseOwnerUpdating;
|
|
58
|
+
const phone = phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
|
|
59
|
+
const confirmationMessage = `${t('Is this phone number correct,')} ${phone} ?`;
|
|
58
60
|
if (!isPhoneNeedsReview)
|
|
59
61
|
return React.createElement(React.Fragment, null);
|
|
60
|
-
return (React.createElement(React.Fragment, null, props.isReview && !isExportingPDF ? (React.createElement(Alert, { className: "pf-v5-u-mb-md phone-review-banner", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
|
|
61
|
-
React.createElement(
|
|
62
|
+
return (React.createElement(React.Fragment, null, props.isReview && !closeConfirmAlert && !isExportingPDF ? (React.createElement(Alert, { className: "pf-v5-u-mb-md phone-review-banner", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
|
|
63
|
+
React.createElement(Button, { key: "case-contact-phone-number-review-confirm", variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-review-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
|
|
64
|
+
React.createElement(Trans, null, "Yes, confirm phone number")),
|
|
65
|
+
React.createElement(Link, { key: "case-contact-phone-number-review", replace: true, to: {
|
|
62
66
|
pathname: `/case/${caseNumber}/management`,
|
|
63
67
|
}, onClick: () => goToPhoneField(), "data-tracking-id": "case-contact-phone-number-review" },
|
|
64
|
-
React.createElement(Trans, null, "
|
|
68
|
+
React.createElement(Trans, null, "No, update phone number")),
|
|
69
|
+
React.createElement(Button, { key: "case-contact-phone-number-alert-close", variant: ButtonVariant.link, onClick: () => setCloseConfirmAlert(!closeConfirmAlert), "data-tracking-id": "case-contact-phone-number-alert-close", isDisabled: isCaseUpdating },
|
|
70
|
+
React.createElement(Trans, null, "Close")),
|
|
65
71
|
] },
|
|
66
|
-
React.createElement(Trans, null,
|
|
72
|
+
React.createElement(Trans, null, confirmationMessage))) : props.isConfirm && !isExportingPDF ? (React.createElement(Alert, { isInline: true, className: "pf-v5-u-mb-md phone-review-banner", variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
|
|
67
73
|
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
|
|
68
74
|
React.createElement(Trans, null, "Confirm phone number")),
|
|
69
75
|
] },
|
|
70
|
-
React.createElement(Trans, null,
|
|
76
|
+
React.createElement(Trans, null, confirmationMessage))) : (React.createElement(React.Fragment, null))));
|
|
71
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA8BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA8BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAkVhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -137,7 +137,9 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
137
137
|
return { __html: DOMPurify.sanitize(text) };
|
|
138
138
|
};
|
|
139
139
|
const commentMarkdown = (markdown) => {
|
|
140
|
-
const htmlString = parseCommentMarkdown(markdown, { showButtonForAttachmentLink: true, disableImagePreview: isExportingPDF },
|
|
140
|
+
const htmlString = parseCommentMarkdown(markdown, { showButtonForAttachmentLink: true, disableImagePreview: isExportingPDF },
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
{ openLinksInNewTab: true, gfm: true, breaks: true });
|
|
141
143
|
return { __html: DOMPurify.sanitize(htmlString) };
|
|
142
144
|
};
|
|
143
145
|
const onCommentAreaClick = (e) => {
|
|
@@ -21,7 +21,7 @@ import isEqual from 'lodash/isEqual';
|
|
|
21
21
|
import Mark from 'mark.js';
|
|
22
22
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
23
23
|
import { Trans, useTranslation } from 'react-i18next';
|
|
24
|
-
import { useLocation } from 'react-router';
|
|
24
|
+
import { useLocation } from 'react-router-dom';
|
|
25
25
|
import { AutoSizer, CellMeasurer, CellMeasurerCache, List, WindowScroller } from 'react-virtualized';
|
|
26
26
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
27
27
|
import { useCaseDetailsPageStateContext } from '../../../../context/CaseDetailsPageContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAyiBxC"}
|
|
@@ -62,6 +62,7 @@ export function PostComment(props) {
|
|
|
62
62
|
const retrievedComment = yield getCommentTypeFromPreference();
|
|
63
63
|
const retrievedCommentSignature = yield getCommentSignature();
|
|
64
64
|
const defaultCommentType = retrievedComment ? retrievedComment : EditorMode.PLAIN;
|
|
65
|
+
// @ts-ignore
|
|
65
66
|
setCommentType(defaultCommentType);
|
|
66
67
|
const defaultCommentSignature = retrievedCommentSignature || '';
|
|
67
68
|
setCommentSignature(defaultCommentSignature);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,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,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,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,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBA6InC;kBA7IQ,aAAa;;;AAgJtB,eAAe,aAAa,CAAC"}
|
|
@@ -82,7 +82,7 @@ function OpenCaseIssue(props) {
|
|
|
82
82
|
" "), allowInlineEdit: props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: !!props.initialIsEditing, saveOnBlur: true, collapseOnBlur: !!props.collapseOnBlur && !isSummaryEmpty, content: summary },
|
|
83
83
|
React.createElement(TextInput, { id: isIdea() ? 'get-support-title' : 'get-support-summary', className: `form-control ${getTitleSummaryInvalid() ? ' form-invalid' : ''} ${isEmpty(version) ? 'issue-title-disabled' : ''}`, validated: summary && (summary === null || summary === void 0 ? void 0 : summary.length) > TITLE_SUMMARY_LENGTH_LIMIT ? 'error' : 'default', "aria-invalid": getTitleSummaryInvalid(), "aria-required": !!props.required, required: !!props.required, name: isIdea() ? 'get-support-title' : 'get-support-summary', placeholder: isIdea()
|
|
84
84
|
? t('i18nkeySummarizeIdea', "Summarize what you're experiencing today")
|
|
85
|
-
: t('i18nkeySummarizeExperience', 'Create a heading that summarizes your issue'), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": isIdea() ? 'get-support-title' : 'get-support-summary',
|
|
85
|
+
: t('i18nkeySummarizeExperience', 'Create a heading that summarizes your issue'), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": isIdea() ? 'get-support-title' : 'get-support-summary', "aria-disabled": isEmpty(version), isDisabled: isEmpty(version) }),
|
|
86
86
|
React.createElement(React.Fragment, null, hasLargeTitleSummary && (React.createElement("div", null,
|
|
87
87
|
React.createElement("p", { className: "form-instructions form-invalid pf-v5-u-danger-color-100 title-summary-error" }, t(`This title exceeds ${TITLE_SUMMARY_LENGTH_LIMIT} characters. Try shortening it.`))))),
|
|
88
88
|
React.createElement(Description, { isSummarizeInvalid: getIssueSummaryInvalid() }),
|
|
@@ -14,7 +14,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
14
14
|
import isEqual from 'lodash/isEqual';
|
|
15
15
|
import React, { useContext, useEffect, useState } from 'react';
|
|
16
16
|
import { Trans } from 'react-i18next';
|
|
17
|
-
import { useLocation } from 'react-router';
|
|
17
|
+
import { useLocation } from 'react-router-dom';
|
|
18
18
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
19
19
|
import { ClusterRecommendationsContext, ClusterRecommendationsDispatchContext, } from '../../context/ClusterRecommendationsContext';
|
|
20
20
|
import { RouteContext } from '../../context/RouteContext';
|
|
@@ -161,7 +161,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
161
161
|
return {};
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
|
-
const fetchAccountClusters = (search = '', page =
|
|
164
|
+
const fetchAccountClusters = (search = '', page = 1) => __awaiter(this, void 0, void 0, function* () {
|
|
165
165
|
search = search.trim();
|
|
166
166
|
setIsFetchingClusters(true);
|
|
167
167
|
try {
|
|
@@ -213,7 +213,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
213
213
|
catch (e) {
|
|
214
214
|
// silently fails
|
|
215
215
|
setIsFetchingClusters(false);
|
|
216
|
-
return { items: [], totalResult: 0, page:
|
|
216
|
+
return { items: [], totalResult: 0, page: 1, total: 0 };
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
// when user visits case detail or clusterId comes from url,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
setIsDropdownSelected?: (flag: boolean) => void;
|
|
@@ -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,
|
|
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;AAKvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMrF,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;CAC7B;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuIvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Modal, ModalVariant } from '@patternfly/react-core';
|
|
2
|
-
import { AlertMessage, AlertType
|
|
2
|
+
import { AlertMessage, AlertType } from '@rh-support/components';
|
|
3
3
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
4
|
import filter from 'lodash/filter';
|
|
5
5
|
import find from 'lodash/find';
|
|
@@ -79,13 +79,12 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
79
79
|
return (React.createElement(React.Fragment, null,
|
|
80
80
|
React.createElement("div", { className: "form-group product-selector-wrapper" },
|
|
81
81
|
React.createElement("div", { className: "all-product-selector-dropdown" },
|
|
82
|
-
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage }))),
|
|
82
|
+
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching }))),
|
|
83
83
|
React.createElement("div", { className: "case-details-summary" },
|
|
84
84
|
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage })),
|
|
85
85
|
React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
86
86
|
? 'You are'
|
|
87
87
|
: 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
|
|
88
|
-
React.createElement(LoadingIndicator, { show: topContent.isFetching && props.loadTCOnChange }),
|
|
89
88
|
showModalButton &&
|
|
90
89
|
!isEmpty(product) &&
|
|
91
90
|
!isEmpty(version) &&
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,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,EAAE,OAAO,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChE;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAsFpD"}
|
|
@@ -9,6 +9,8 @@ interface IProps extends IDClassNameProps {
|
|
|
9
9
|
htmlForId?: string;
|
|
10
10
|
isLoading?: boolean;
|
|
11
11
|
isOnSummaryPage?: boolean;
|
|
12
|
+
loadTCOnChange?: boolean;
|
|
13
|
+
isFetching?: boolean;
|
|
12
14
|
}
|
|
13
15
|
declare const ProductVersionDropdownSelector: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
14
16
|
export { ProductVersionDropdownSelector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAOD,QAAA,MAAM,8BAA8B,wEAuClC,CAAC;AAEH,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LoadingIndicator } from '@rh-support/components';
|
|
1
2
|
import React, { forwardRef, useContext } from 'react';
|
|
2
3
|
import { Trans } from 'react-i18next';
|
|
3
4
|
import { RouteContext } from '../../context/RouteContext';
|
|
@@ -21,7 +22,9 @@ const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
|
21
22
|
React.createElement(Trans, null, "Version"),
|
|
22
23
|
' ',
|
|
23
24
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
24
|
-
React.createElement(
|
|
25
|
+
React.createElement("div", { className: "version-dropdown-wrapper" },
|
|
26
|
+
React.createElement(NewProductVersionSelector, { onVersionChange: props.onVersionChange, isNextBtnClickedToShowValidationError: isNextBtnClickedToShowValidationError }),
|
|
27
|
+
React.createElement(LoadingIndicator, { show: props.isFetching && props.loadTCOnChange })))));
|
|
25
28
|
});
|
|
26
29
|
ProductVersionDropdownSelector.defaultProps = defaultProps;
|
|
27
30
|
export { ProductVersionDropdownSelector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA6LzC"}
|
|
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { pcm, search } from '@cee-eng/hydrajs';
|
|
11
11
|
import { useDebounce } from '@rh-support/components';
|
|
12
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
12
|
import { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
|
|
14
13
|
import isEmpty from 'lodash/isEmpty';
|
|
15
14
|
import isEqual from 'lodash/isEqual';
|
|
@@ -30,7 +29,6 @@ export function AsideResults(props) {
|
|
|
30
29
|
/*
|
|
31
30
|
* Sidebar recommendation logic
|
|
32
31
|
*/
|
|
33
|
-
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
34
32
|
const { isSelectedAccounntSecureSupport, product, version, caseResourceLinks, summary, issue, caseType } = useCaseSelector((state) => ({
|
|
35
33
|
isSelectedAccounntSecureSupport: state.selectedAccountDetails.data.secureSupport,
|
|
36
34
|
product: state.caseDetails.product,
|
|
@@ -74,13 +72,13 @@ export function AsideResults(props) {
|
|
|
74
72
|
const queryFilters = {
|
|
75
73
|
id: { values: recommendationState.insightsKcsIds, exclude: true },
|
|
76
74
|
};
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
const payloadData = {
|
|
76
|
+
product: product,
|
|
77
|
+
version: version,
|
|
78
|
+
summary: getTrimmedCharacters(payload.summary, WATSONX_SUMMARY_LIMIT),
|
|
79
|
+
description: getTrimmedCharacters(payload.description, WATSONX_DESCRIPTION_LIMIT),
|
|
80
|
+
};
|
|
81
|
+
const response = yield search.getWatsonXRecommendationsForCase2(convertObjToEncodedQueryParams(Object.assign({ rerank: true }, getSolrParams(PAGE_SIZE, 129, queryFilters))), payloadData, controllerRef.current.signal);
|
|
84
82
|
const sideDocs = replaceHighlightingData(response.response.docs, response.highlighting);
|
|
85
83
|
recommendationDispatch({
|
|
86
84
|
type: RecommendationsConstants.receiveSidebarRecommendation,
|
|
@@ -37,5 +37,5 @@ export function EARuleWidget() {
|
|
|
37
37
|
}, [validEARules, activeSessionId]);
|
|
38
38
|
if (!isEARuleWidgetVisible || validEARules.length < 1)
|
|
39
39
|
return null;
|
|
40
|
-
return
|
|
40
|
+
return React.createElement(EARuleInfoInline, { eaRules: validEARules });
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAOD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,qBA6KhF"}
|
|
@@ -2,7 +2,6 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Label, LabelGroup } from '@patternfly/react-core';
|
|
3
3
|
import BullseyeIcon from '@patternfly/react-icons/dist/js/icons/bullseye-icon';
|
|
4
4
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
5
|
-
import { getRuleReasonHtml } from '@rh-support/utils';
|
|
6
5
|
import DOMPurify from 'dompurify';
|
|
7
6
|
import isEmpty from 'lodash/isEmpty';
|
|
8
7
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -10,6 +9,7 @@ import { Trans } from 'react-i18next';
|
|
|
10
9
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
11
10
|
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
12
11
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRules, } from '../../reducers/SessionRestoreReducer';
|
|
12
|
+
import { getRuleReasonHtml } from '../../utils/insightRuleInfoUtils';
|
|
13
13
|
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
14
14
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
15
15
|
export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
@@ -11,7 +11,7 @@ export const RecommendationInfoBox = () => {
|
|
|
11
11
|
React.createElement(AccordionContent, { isHidden: !isExpanded },
|
|
12
12
|
React.createElement("span", { className: "pf-v5-u-color-100" },
|
|
13
13
|
React.createElement(Trans, null, "To expedite your case, include these details: ")),
|
|
14
|
-
React.createElement(List, { className: "pf-v5-u-ml-lg", style: { listStyleType: 'disc' } },
|
|
14
|
+
React.createElement(List, { className: "pf-v5-u-ml-lg recommendation-box-tips", style: { listStyleType: 'disc' } },
|
|
15
15
|
React.createElement(ListItem, null,
|
|
16
16
|
React.createElement(Trans, null, "Problem")),
|
|
17
17
|
React.createElement(ListItem, null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAsBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAsE3C"}
|
|
@@ -168,7 +168,7 @@ export default function SubmitCase(props) {
|
|
|
168
168
|
React.createElement("div", { className: "submit-case-header-container" },
|
|
169
169
|
React.createElement("p", { className: "kicker kicker-sm pf-v5-u-mb-sm" }, !isEmpty(RouteUtils.seBasePath) &&
|
|
170
170
|
!isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles) ? (React.createElement(React.Fragment, null,
|
|
171
|
-
React.createElement("div", { className: "submit-page-title pf-v5-u-mb-lg" },
|
|
171
|
+
React.createElement("div", { role: "alert", className: "submit-page-title pf-v5-u-mb-lg" },
|
|
172
172
|
React.createElement(Icon, { className: "submit-case-check-icon pf-v5-u-mt-sm", size: "lg" },
|
|
173
173
|
React.createElement(CheckCircleIcon, null)),
|
|
174
174
|
' ',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAgBxF,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAqkBxD"}
|
|
@@ -8,10 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Modal, TextArea } from '@patternfly/react-core';
|
|
12
|
-
import {
|
|
11
|
+
import { Button, Dropdown, DropdownItem, DropdownList, Flex, FlexItem, MenuToggle, Modal, Spinner, TextArea, } from '@patternfly/react-core';
|
|
12
|
+
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
14
|
-
import { autoEnableFtsOnCaseViewEditPage, isFtsEditableOnEditPage, isSev1, PreviousCaseTypes, severitySort, showFtsOnCreateCasePage,
|
|
14
|
+
import { autoEnableFtsOnCaseViewEditPage, isFtsEditableOnEditPage, isSev1, PreviousCaseTypes, severitySort, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
15
15
|
import { isUndefined } from 'lodash';
|
|
16
16
|
import find from 'lodash/find';
|
|
17
17
|
import includes from 'lodash/includes';
|
|
@@ -74,6 +74,10 @@ export default function UpdateSeverityModal(props) {
|
|
|
74
74
|
const [localFts, setLocalFts] = useState(isUndefined(fts) ? true : fts);
|
|
75
75
|
const initialContactSameAsOwnerRef = useRef(ftsContactSameAsOwner !== null && ftsContactSameAsOwner !== void 0 ? ftsContactSameAsOwner : false);
|
|
76
76
|
const isFtsEditable = isFtsEditableOnEditPage(entitlementSla, currentSeverity);
|
|
77
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
78
|
+
const onToggleClick = () => {
|
|
79
|
+
setIsOpen(!isOpen);
|
|
80
|
+
};
|
|
77
81
|
// To set the filtered severities from data
|
|
78
82
|
const filteredSeverities = map(allCaseSeverities.data, (s) => {
|
|
79
83
|
const sevItem = {
|
|
@@ -302,20 +306,21 @@ export default function UpdateSeverityModal(props) {
|
|
|
302
306
|
React.createElement(Button, { key: "back", variant: "link", onClick: onCancel, "data-tracking-id": "update-severity-cancel", isDisabled: isCaseUpdating || isPostingComment }, t('Cancel')),
|
|
303
307
|
];
|
|
304
308
|
// To handle the severity change
|
|
305
|
-
const onSeverityChange = (option) => {
|
|
309
|
+
const onSeverityChange = (event, option) => {
|
|
306
310
|
if (canEditCase.alert())
|
|
307
311
|
return;
|
|
308
|
-
if (isSev1(option.
|
|
312
|
+
if (isSev1(option.name) && isFtsEditableOnEditPage(entitlementSla, option.name)) {
|
|
309
313
|
setLocalFts(true);
|
|
310
314
|
setLocalFtsContact('');
|
|
311
|
-
setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { severity: option.
|
|
315
|
+
setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { severity: option.name, fts: !isIdea })));
|
|
312
316
|
}
|
|
313
317
|
else {
|
|
314
|
-
setUpdatedCaseDetails({ severity: option.
|
|
318
|
+
setUpdatedCaseDetails({ severity: option.name, fts: false });
|
|
315
319
|
}
|
|
316
|
-
setCurrentSeverity(option.
|
|
317
|
-
updateState(option.
|
|
320
|
+
setCurrentSeverity(option.name);
|
|
321
|
+
updateState(option.name);
|
|
318
322
|
setIsSeverityInValidLocal(option);
|
|
323
|
+
setIsOpen(false);
|
|
319
324
|
};
|
|
320
325
|
// To set severity options
|
|
321
326
|
useEffect(() => {
|
|
@@ -366,22 +371,19 @@ export default function UpdateSeverityModal(props) {
|
|
|
366
371
|
return (React.createElement(React.Fragment, null,
|
|
367
372
|
React.createElement("form", { "aria-label": t('form') },
|
|
368
373
|
React.createElement("div", { className: "form-group pf-v5-u-mt-xs" },
|
|
369
|
-
React.createElement("div",
|
|
370
|
-
React.createElement(Dropdown, {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
allCaseSeverities.isFetching ||
|
|
383
|
-
ownersEntitlements.isFetching ||
|
|
384
|
-
versionsDetails.isFetching, isLoadingList: isFetching || versionsDetails.isFetching, isInValid: allCaseSeverities.isError || isSeverityInValid, required: true, onChange: onSeverityChange, onOuterClick: setIsSeverityInValidLocal, "data-tracking-id": "get-support-severity-modal" })),
|
|
374
|
+
React.createElement("div", { className: "get-support-severity-modal" },
|
|
375
|
+
React.createElement(Dropdown, { id: "get-support-severity-modal", "data-tracking-id": "get-support-severity-modal", isOpen: isOpen, onSelect: onSeverityChange, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: (toggleRef) => (React.createElement(MenuToggle, { className: "get-support-severity-modal-text", ref: toggleRef, isFullWidth: true, onClick: onToggleClick, isExpanded: isOpen, status: allCaseSeverities.isError || isSeverityInValid ? 'danger' : undefined, isDisabled: allCaseSeverities.isError ||
|
|
376
|
+
isDisabled ||
|
|
377
|
+
allCaseSeverities.isFetching ||
|
|
378
|
+
ownersEntitlements.isFetching ||
|
|
379
|
+
versionsDetails.isFetching ||
|
|
380
|
+
isCaseUpdating },
|
|
381
|
+
React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
382
|
+
React.createElement(FlexItem, null, selectedSeverity.label || t(`Select a severity`)),
|
|
383
|
+
React.createElement(FlexItem, null, isFetching || versionsDetails.isFetching ? React.createElement(Spinner, { size: "md" }) : '')))), shouldFocusToggleOnSelect: true, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
384
|
+
React.createElement(DropdownList, null, allCaseSeverities.data
|
|
385
|
+
? filteredSeverities.map((option) => (React.createElement(DropdownItem, { value: option, key: option.name, description: option.additionalInfo }, option.label)))
|
|
386
|
+
: []))),
|
|
385
387
|
React.createElement("div", null,
|
|
386
388
|
React.createElement("label", { htmlFor: "date-input", className: "pf-v5-u-mt-md" },
|
|
387
389
|
React.createElement(Trans, null, "Describe update"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAGH,eAAe,EAKlB,MAAM,iCAAiC,CAAC;AASzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;CACxC;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,qBAsDjC;kBAtDQ,WAAW;;;AAwDpB,eAAe,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { IRouteUrlParams, ISectionConfiguration } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAK3G,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,CAAC,EAAE,OAAO,CAAC;IAChD,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,qBAwOtC;kBAxOQ,gBAAgB;;;AA0OzB,eAAe,gBAAgB,CAAC"}
|
package/lib/esm/css/app.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { markdownToHTML } from '@cee-eng/ui-toolkit';
|
|
2
|
-
import { parseDotTemplate } from '@rh-support/utils';
|
|
3
2
|
import { useContext } from 'react';
|
|
4
3
|
import { SessionRestoreStateContext } from '../context/SessionRestoreContext';
|
|
4
|
+
import { parseDotTemplate } from '../utils/insightRuleInfoUtils';
|
|
5
5
|
import RouteUtils from '../utils/routeUtils';
|
|
6
6
|
export const useParseRuleMarkdown = () => {
|
|
7
7
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAiB,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAIH,gCAAgC,EAEnC,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG,OAAO,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAC5E,MAAM,MAAM,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,MAAM,WAAW,qBAAqB;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,6BAA6B,EAAE,OAAO,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,2BAA2B,EAAE,qBAazC,CAAC;AAEF,oBAAY,wBAAwB;IAChC,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,4BAA4B,iCAAiC;IAC7D,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,sBAAsB,2BAA2B;IACjD,2BAA2B,gCAAgC;IAC3D,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;CACpC;AAGD,eAAO,MAAM,sBAAsB,UAAW,qBAAqB,0BAAwB,qBAmD1F,CAAC;AAGF,eAAO,MAAM,oBAAoB,aACnB,kCAAkC,QACtC,uBAAuB,YACnB,MAAM,aACL,MAAM,6BACU,MAAM,sCAErB,MAAM,0BACM,OAAO,sBACX,gCAAgC,gBACtC,WAAW,kBAsC5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,aAC1B,kCAAkC,SACrC,mBAAmB,YAChB,MAAM,aACL,MAAM,6BACU,MAAM,+CAEb,gCAAgC,gBACtC,WAAW,
|
|
1
|
+
{"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAiB,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAIH,gCAAgC,EAEnC,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG,OAAO,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAC5E,MAAM,MAAM,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,MAAM,WAAW,qBAAqB;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,6BAA6B,EAAE,OAAO,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,2BAA2B,EAAE,qBAazC,CAAC;AAEF,oBAAY,wBAAwB;IAChC,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,4BAA4B,iCAAiC;IAC7D,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,sBAAsB,2BAA2B;IACjD,2BAA2B,gCAAgC;IAC3D,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;CACpC;AAGD,eAAO,MAAM,sBAAsB,UAAW,qBAAqB,0BAAwB,qBAmD1F,CAAC;AAGF,eAAO,MAAM,oBAAoB,aACnB,kCAAkC,QACtC,uBAAuB,YACnB,MAAM,aACL,MAAM,6BACU,MAAM,sCAErB,MAAM,0BACM,OAAO,sBACX,gCAAgC,gBACtC,WAAW,kBAsC5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,aAC1B,kCAAkC,SACrC,mBAAmB,YAChB,MAAM,aACL,MAAM,6BACU,MAAM,+CAEb,gCAAgC,gBACtC,WAAW,kBAqC5B,CAAC;AAEF,eAAO,MAAM,cAAc,aAAc,kCAAkC,WAAW,mBAAmB,EAAE,SAE1G,CAAC;AAEF,eAAO,MAAM,cAAc,aAAc,kCAAkC,WAAW,MAAM,SAE3F,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,kCAAkC,kBAAkB,MAAM,EAAE,SAE5G,CAAC;AAEF,eAAO,MAAM,oBAAoB,aAAc,kCAAkC,SAEhF,CAAC"}
|
|
@@ -111,15 +111,13 @@ export const fetchWatsonXRecommendations = (dispatch, query, max_rows, page_size
|
|
|
111
111
|
payload: { prevRecommendationsBody: Object.assign({}, query) },
|
|
112
112
|
});
|
|
113
113
|
try {
|
|
114
|
-
const
|
|
114
|
+
const bodyPayload = {
|
|
115
|
+
product: query === null || query === void 0 ? void 0 : query.product,
|
|
116
|
+
version: query === null || query === void 0 ? void 0 : query.version,
|
|
115
117
|
summary: getTrimmedCharacters(query.summary, WATSONX_SUMMARY_LIMIT),
|
|
116
|
-
})), ((query === null || query === void 0 ? void 0 : query.description) && {
|
|
117
118
|
description: getTrimmedCharacters(query.description, WATSONX_DESCRIPTION_LIMIT),
|
|
118
|
-
}
|
|
119
|
-
const
|
|
120
|
-
const response = yield search.getWatsonXRecommendationsForCase2(
|
|
121
|
-
//@ts-ignore
|
|
122
|
-
convertObjToEncodedQueryParams(paramsObj), abortSignal);
|
|
119
|
+
};
|
|
120
|
+
const response = yield search.getWatsonXRecommendationsForCase2(convertObjToEncodedQueryParams(Object.assign({ rerank: true }, getSolrParams(max_rows, highlighted_fragment_size, additionalFilters, seQueryFields))), bodyPayload, abortSignal);
|
|
123
121
|
const docs = replaceHighlightingData(response.response.docs, response.highlighting);
|
|
124
122
|
dispatch({
|
|
125
123
|
type: RecommendationsConstants.receivedRecommendations,
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -416,7 +416,7 @@ div.support-grid-case-details.support-case {
|
|
|
416
416
|
|
|
417
417
|
&:hover,
|
|
418
418
|
&:focus {
|
|
419
|
-
background-color:
|
|
419
|
+
background-color: --pf-v5-global--palette--black-300;
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
}
|
|
@@ -1008,7 +1008,8 @@ svg.pf-v5-u-ml-xs.icon-size {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
-
.case-internal-status-selector-text
|
|
1011
|
+
.case-internal-status-selector-text,
|
|
1012
|
+
.get-support-severity-modal-text {
|
|
1012
1013
|
.pf-v5-c-menu-toggle__text {
|
|
1013
1014
|
width: 100%;
|
|
1014
1015
|
}
|
|
@@ -1042,3 +1043,13 @@ svg.pf-v5-u-ml-xs.icon-size {
|
|
|
1042
1043
|
.kt-question-help-icon {
|
|
1043
1044
|
font-size: var(--pf-v5-global--icon--FontSize--md);
|
|
1044
1045
|
}
|
|
1046
|
+
|
|
1047
|
+
.recommendation-box-tips {
|
|
1048
|
+
li {
|
|
1049
|
+
margin-top: 0px !important;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
#get-support-severity-modal {
|
|
1054
|
+
max-width: min-content;
|
|
1055
|
+
}
|
package/lib/esm/scss/index.scss
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Details } from '@cee-eng/hydrajs/@types/models/insights';
|
|
2
|
+
export declare function getRuleReasonHtml(ruleReason: string, reportDetails: Details): string;
|
|
3
|
+
export declare function parseDotTemplate(dotString: string, reportDetails: Details): string;
|
|
4
|
+
//# sourceMappingURL=insightRuleInfoUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightRuleInfoUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/insightRuleInfoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AASlE,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,UAI3E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,UASzE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { markdownToHTML } from '@cee-eng/ui-toolkit';
|
|
2
|
+
import doT from 'dot/doT';
|
|
3
|
+
import assign from 'lodash/assign';
|
|
4
|
+
doT.templateSettings = assign({}, doT.templateSettings, {
|
|
5
|
+
varname: 'pydata',
|
|
6
|
+
strip: false,
|
|
7
|
+
});
|
|
8
|
+
export function getRuleReasonHtml(ruleReason, reportDetails) {
|
|
9
|
+
const resultText = parseDotTemplate(ruleReason, reportDetails);
|
|
10
|
+
const html = markdownToHTML(resultText);
|
|
11
|
+
return html;
|
|
12
|
+
}
|
|
13
|
+
export function parseDotTemplate(dotString, reportDetails) {
|
|
14
|
+
let parsedDotString = '';
|
|
15
|
+
try {
|
|
16
|
+
const tempFn = doT.template(dotString);
|
|
17
|
+
parsedDotString = tempFn(reportDetails);
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
parsedDotString = '';
|
|
21
|
+
}
|
|
22
|
+
return parsedDotString;
|
|
23
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SessionResourceSource } from '@cee-eng/hydrajs/@types/api/pcm/troubleshootSession';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { AppRouteSections, IRouteQueryParams, IRouteUrlParams } from '../reducers/RouteConstNTypes';
|
|
4
4
|
export default class RouteUtils {
|
|
5
5
|
static seBasePath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/routeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAG5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"routeUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/routeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAG5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpG,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,MAAM,CAAC,UAAU,SAAM;IAEvB;;;;;;;OAOG;IACH,MAAM,CAAC,cAAc,CACjB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,kBAAkB,GAAE,iBAAsB;IAe9C,MAAM,CAAC,cAAc,CACjB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,iBAAiB,UAAQ,EACzB,UAAU,GAAE,eAAoB,GACjC,MAAM;IAKT,MAAM,CAAC,iBAAiB,CAAC,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,GAAG,gBAAgB;IAU1F,MAAM,CAAC,uBAAuB,CAC1B,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,EACvB,iBAAiB,EAAE,OAAO,EAC1B,cAAc,GAAE,iBAAsB;IAS1C,MAAM,CAAC,iBAAiB,CACpB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,OAAO,EAC1B,cAAc,GAAE,iBAAsB;IAS1C,MAAM,CAAC,iBAAiB,CACpB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,SAAS,EAAE,iBAAiB,EAC5B,cAAc,UAAQ;IAY1B,MAAM,CAAC,wBAAwB,CAC3B,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,qBAAqB,EAC/B,IAAI,SAAO;CAMlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.173",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"lib/**/*"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@cee-eng/hydrajs": "4.17.
|
|
28
|
+
"@cee-eng/hydrajs": "4.17.25",
|
|
29
29
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
30
30
|
"@patternfly/patternfly": "5.4.0",
|
|
31
31
|
"@patternfly/react-core": "5.4.0",
|
|
32
32
|
"dompurify": "^2.2.6",
|
|
33
33
|
"downshift": "^6.0.5",
|
|
34
|
-
"i18next": "^
|
|
34
|
+
"i18next": "^23.15.0",
|
|
35
35
|
"js-markdown-extra": "^1.2.4",
|
|
36
36
|
"js-worker-search": "^1.4.1",
|
|
37
37
|
"lazysizes": "^5.3.2",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"react-bootstrap-typeahead": "^5.1.4",
|
|
45
45
|
"react-dom": "18.2.0",
|
|
46
46
|
"react-dropzone": "^10.2.1",
|
|
47
|
-
"react-i18next": "^
|
|
47
|
+
"react-i18next": "^15.0.1",
|
|
48
48
|
"react-redux": "^7.2.2",
|
|
49
49
|
"react-router-dom": "^5.1.2",
|
|
50
50
|
"react-test-renderer": "18.2.0",
|
|
51
51
|
"react-virtualized": "^9.22.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@cee-eng/hydrajs": "4.17.
|
|
54
|
+
"@cee-eng/hydrajs": "4.17.25",
|
|
55
55
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
56
56
|
"@patternfly/patternfly": "5.4.0",
|
|
57
57
|
"@patternfly/react-core": "5.4.0",
|
|
@@ -60,16 +60,18 @@
|
|
|
60
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
61
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
62
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
63
|
-
"@rh-support/components": "2.1.
|
|
64
|
-
"@rh-support/react-context": "2.1.
|
|
65
|
-
"@rh-support/types": "2.0.
|
|
66
|
-
"@rh-support/user-permissions": "2.1.
|
|
67
|
-
"@rh-support/utils": "2.1.
|
|
63
|
+
"@rh-support/components": "2.1.83",
|
|
64
|
+
"@rh-support/react-context": "2.1.92",
|
|
65
|
+
"@rh-support/types": "2.0.5",
|
|
66
|
+
"@rh-support/user-permissions": "2.1.51",
|
|
67
|
+
"@rh-support/utils": "2.1.40",
|
|
68
68
|
"@types/react-redux": "^7.1.33",
|
|
69
69
|
"@types/redux": "^3.6.0",
|
|
70
70
|
"dompurify": "^2.2.6",
|
|
71
|
+
"dot": "^1.1.3",
|
|
71
72
|
"downshift": "^6.0.5",
|
|
72
|
-
"
|
|
73
|
+
"history": "4.10.1",
|
|
74
|
+
"i18next": "^23.15.0",
|
|
73
75
|
"js-markdown-extra": "^1.2.4",
|
|
74
76
|
"js-worker-search": "^1.4.1",
|
|
75
77
|
"lazysizes": "^5.3.2",
|
|
@@ -82,7 +84,7 @@
|
|
|
82
84
|
"react-bootstrap-typeahead": "^5.1.4",
|
|
83
85
|
"react-dom": "18.2.0",
|
|
84
86
|
"react-dropzone": "^10.2.1",
|
|
85
|
-
"react-i18next": "^
|
|
87
|
+
"react-i18next": "^15.0.1",
|
|
86
88
|
"react-redux": "^7.2.2",
|
|
87
89
|
"react-router-dom": "^5.1.2",
|
|
88
90
|
"react-test-renderer": "18.2.0",
|
|
@@ -131,5 +133,5 @@
|
|
|
131
133
|
"defaults and supports es6-module",
|
|
132
134
|
"maintained node versions"
|
|
133
135
|
],
|
|
134
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "0e8e72a89ed859d57ceb68dbbb94caa13a6f3569"
|
|
135
137
|
}
|
package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
isReview?: boolean;
|
|
4
|
-
isConfirm?: boolean;
|
|
5
|
-
tabRef?: React.MutableRefObject<HTMLDivElement>;
|
|
6
|
-
}
|
|
7
|
-
export declare function CasePhoneNumberSev1ConfirmAlert(props: IProps): React.JSX.Element;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=CasePhoneNumberSev1ConfirmAlert.d.ts.map
|
package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CasePhoneNumberSev1ConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAUpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAMD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,qBAuG5D"}
|
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-core';
|
|
11
|
-
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
|
-
import { scrollIntoView } from '@rh-support/utils';
|
|
14
|
-
import isEmpty from 'lodash/isEmpty';
|
|
15
|
-
import isEqual from 'lodash/isEqual';
|
|
16
|
-
import React, { useContext, useState } from 'react';
|
|
17
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
18
|
-
import { Link } from 'react-router-dom';
|
|
19
|
-
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
20
|
-
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
21
|
-
import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
22
|
-
import { PDFContext } from '../../PDFContainer';
|
|
23
|
-
/*
|
|
24
|
-
On case detail page when case owner changes the sevirity to sev1, this alert will be displayed
|
|
25
|
-
// what happens when partner changes ???
|
|
26
|
-
*/
|
|
27
|
-
export function CasePhoneNumberSev1ConfirmAlert(props) {
|
|
28
|
-
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
29
|
-
const [isCaseUpdating, setCasUpdating] = useState(false);
|
|
30
|
-
const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity, isCaseOwnerUpdating } = useCaseSelector((state) => ({
|
|
31
|
-
caseNumber: state.caseDetails.caseNumber,
|
|
32
|
-
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
33
|
-
contactSSOName: state.caseDetails.contactSSOName,
|
|
34
|
-
severity: state.caseDetails.severity,
|
|
35
|
-
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
36
|
-
}), isEqual);
|
|
37
|
-
const { t } = useTranslation();
|
|
38
|
-
const caseDispatch = useCaseDispatch();
|
|
39
|
-
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
40
|
-
const { isExportingPDF } = useContext(PDFContext);
|
|
41
|
-
const onCaseDetailsChange = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
setCasUpdating(true);
|
|
43
|
-
try {
|
|
44
|
-
yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
|
|
45
|
-
setCasUpdating(false);
|
|
46
|
-
ToastNotification.addSuccessMessage(t(`Phone number has been successfully confirmed`));
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
setCasUpdating(false);
|
|
50
|
-
caseUpdateError.showError(e, t(`Phone number failed to be confirmed`));
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const goToPhoneField = () => {
|
|
54
|
-
scrollIntoView(props.tabRef);
|
|
55
|
-
};
|
|
56
|
-
const isPhoneNeedsConfirm = !isEmpty(contactSSOName) &&
|
|
57
|
-
contactSSOName === loggedInUser.data.ssoUsername &&
|
|
58
|
-
severity === "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ &&
|
|
59
|
-
suppliedPhoneNumberVerified !== 'True' &&
|
|
60
|
-
!isCaseOwnerUpdating;
|
|
61
|
-
const SEV1_MSG = 'This case severity is urgent. Please confirm the phone number we have on file is correct.';
|
|
62
|
-
if (!isPhoneNeedsConfirm)
|
|
63
|
-
return React.createElement(React.Fragment, null);
|
|
64
|
-
return (React.createElement(React.Fragment, null, props.isReview && !isExportingPDF ? (React.createElement(Alert, { className: "pf-v5-u-mb-md phone-review-banner", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
|
|
65
|
-
React.createElement(Link, { replace: true, to: {
|
|
66
|
-
pathname: `/case/${caseNumber}/management`,
|
|
67
|
-
}, onClick: () => goToPhoneField(), "data-tracking-id": "case-contact-phone-number-review" },
|
|
68
|
-
React.createElement(Trans, null, "Review phone number")),
|
|
69
|
-
] },
|
|
70
|
-
React.createElement(Trans, null, SEV1_MSG))) : props.isConfirm && !isExportingPDF ? (React.createElement(Alert, { isInline: true, className: "pf-v5-u-mb-md phone-review-banner", variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
|
|
71
|
-
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
|
|
72
|
-
React.createElement(Trans, null, "Confirm phone number")),
|
|
73
|
-
] },
|
|
74
|
-
React.createElement(Trans, null, SEV1_MSG))) : (React.createElement(React.Fragment, null))));
|
|
75
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EditorMode } from '@rh-support/components';
|
|
2
|
-
export declare function useUserPreference(): {
|
|
3
|
-
updateCommentType: (value: EditorMode) => Promise<void>;
|
|
4
|
-
getCommentTypeFromPreference: () => any;
|
|
5
|
-
hydraUserPreferences: import("@rh-support/types/shared").IApiResponseDetails<import("@cee-eng/hydrajs/@types/models/general").IPreference[]>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=useUserPreference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUserPreference.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUserPreference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AASpD,wBAAgB,iBAAiB;+BAgBW,UAAU;;;EAmBrD"}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
import { GlobalMetadataDispatchContext, GlobalMetadataStateContext, updateUserPreferences, UserPreferencesKeys, } from '@rh-support/react-context';
|
|
11
|
-
import { useContext } from 'react';
|
|
12
|
-
export function useUserPreference() {
|
|
13
|
-
const { globalMetadataState: { loggedInUser, hydraUserPreferences }, } = useContext(GlobalMetadataStateContext);
|
|
14
|
-
const globalMetadataDispatch = useContext(GlobalMetadataDispatchContext);
|
|
15
|
-
const doesKeyExistWithSameValue = (key, value) => {
|
|
16
|
-
const item = getKeyValue(key);
|
|
17
|
-
return item && item.value === value;
|
|
18
|
-
};
|
|
19
|
-
const getKeyValue = (key) => {
|
|
20
|
-
const item = hydraUserPreferences.data.find((pref) => pref.key === key);
|
|
21
|
-
return item ? item.value : null;
|
|
22
|
-
};
|
|
23
|
-
const updateCommentType = (value) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
if (doesKeyExistWithSameValue(UserPreferencesKeys.commentType, value))
|
|
25
|
-
return;
|
|
26
|
-
yield updateUserPreferences(globalMetadataDispatch, loggedInUser.data.ssoUsername, [{ key: UserPreferencesKeys.commentType, value }], 'add', true);
|
|
27
|
-
});
|
|
28
|
-
const getCommentTypeFromPreference = () => {
|
|
29
|
-
return getKeyValue(UserPreferencesKeys.commentType);
|
|
30
|
-
};
|
|
31
|
-
return {
|
|
32
|
-
updateCommentType,
|
|
33
|
-
getCommentTypeFromPreference,
|
|
34
|
-
hydraUserPreferences,
|
|
35
|
-
};
|
|
36
|
-
}
|