@rh-support/troubleshoot 2.2.16 → 2.2.18-beta.0
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/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +18 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseBugzilla/CaseBugzilla.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseBugzilla/CaseBugzilla.js +11 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +1 -1
- package/lib/esm/components/CaseEditView/index.d.ts +0 -5
- package/lib/esm/components/CaseEditView/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/index.js +0 -7
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +3 -3
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -1
- package/lib/esm/components/Recommendations/Recommendations.d.ts +0 -1
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +0 -4
- package/lib/esm/components/Suggestions/TopContent.d.ts +0 -1
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +0 -1
- package/package.json +6 -13
- package/lib/esm/components/Issue/Issue.d.ts +0 -2
- package/lib/esm/components/Issue/Issue.d.ts.map +0 -1
- package/lib/esm/components/Issue/Issue.js +0 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAwBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAwBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eA+M5C"}
|
|
@@ -105,14 +105,23 @@ export function CaseDetailsTabs(props) {
|
|
|
105
105
|
};
|
|
106
106
|
const isTabVisibleInPdfExport = (tab) => tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced' ? false : true;
|
|
107
107
|
return (React.createElement("div", { className: "case-details-tabs", ref: props.tabdRef },
|
|
108
|
-
React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: tab.key, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, null,
|
|
108
|
+
React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick, role: "region", "aria-label": t('Case details tabs') }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: tab.key, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, null,
|
|
109
109
|
React.createElement(Trans, null, tab.title)) })))),
|
|
110
|
-
React.createElement("div", { className: "case-details-tabs-content pf-u-pt-xl" }, tabsToRender.map((tab, index) =>
|
|
111
|
-
React.createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
React.createElement(
|
|
116
|
-
React.createElement(
|
|
117
|
-
|
|
110
|
+
React.createElement("div", { className: "case-details-tabs-content pf-u-pt-xl" }, tabsToRender.map((tab, index) => {
|
|
111
|
+
return index === getActiveTabKey() && !isExportingPDF ? (React.createElement(TabContent, { eventKey: index, key: tab.key, id: tab.key, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
|
|
112
|
+
React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
113
|
+
message: t(`There was an error loading case ${tab.key}`),
|
|
114
|
+
} },
|
|
115
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
116
|
+
React.createElement(TextContent, { className: "show-in-pdf pf-u-mt-md" },
|
|
117
|
+
React.createElement(Text, { component: TextVariants.h2 }, tab.title)),
|
|
118
|
+
tab.component)))) : isExportingPDF ? (React.createElement(TabContent, { eventKey: index, key: tab.key, id: tab.key, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
|
|
119
|
+
React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
120
|
+
message: t(`There was an error loading case ${tab.key}`),
|
|
121
|
+
} },
|
|
122
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
123
|
+
React.createElement(TextContent, { className: "show-in-pdf pf-u-mt-md" },
|
|
124
|
+
React.createElement(Text, { component: TextVariants.h2 }, tab.title)),
|
|
125
|
+
tab.component)))) : (React.createElement(React.Fragment, null));
|
|
126
|
+
}))));
|
|
118
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseBugzilla.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseBugzilla/CaseBugzilla.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseBugzilla.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseBugzilla/CaseBugzilla.tsx"],"names":[],"mappings":"AAQA,UAAU,MAAM;CAAG;AAEnB,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eAmDjD"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import isEqual from 'lodash/isEqual';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
import { useCaseSelector } from '../../../../context/CaseContext';
|
|
5
|
+
import { PDFContext } from '../../PDFContainer';
|
|
5
6
|
export default function CaseBugzilla(props) {
|
|
6
7
|
const bugzillas = useCaseSelector((state) => state.caseDetails.bugzillas, isEqual);
|
|
8
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
7
9
|
const bugzillaRow = (bugzilla) => (React.createElement("tr", { key: bugzilla.bugzillaNumber },
|
|
8
|
-
React.createElement("
|
|
10
|
+
React.createElement("td", { id: `th-bug${bugzilla.bugzillaNumber}`, headers: "th-bug-number" },
|
|
9
11
|
React.createElement("a", { href: bugzilla.bugzillaLink, target: "_blank", rel: "noopener noreferrer" }, bugzilla.bugzillaNumber)),
|
|
10
12
|
React.createElement("td", { headers: `th-bug${bugzilla.bugzillaNumber} th-bug-summary` }, bugzilla.summary)));
|
|
11
13
|
const bugzillasList = (bugzillas) => {
|
|
12
|
-
return (React.createElement("table", { className: "table table-naked table-hover table-respond" },
|
|
14
|
+
return (React.createElement("table", { className: "table table-naked table-hover table-respond", style: { fontFamily: isExportingPDF ? 'DejaVu Sans' : '' } },
|
|
13
15
|
React.createElement("thead", null,
|
|
14
16
|
React.createElement("tr", null,
|
|
15
|
-
React.createElement("
|
|
16
|
-
React.createElement(
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
React.createElement("td", { id: "th-bug-number" },
|
|
18
|
+
React.createElement("strong", null,
|
|
19
|
+
React.createElement(Trans, null, "Request number"))),
|
|
20
|
+
React.createElement("td", { id: "th-bug-summary" },
|
|
21
|
+
React.createElement("strong", null,
|
|
22
|
+
React.createElement(Trans, null, "Summary"))))),
|
|
19
23
|
React.createElement("tbody", null, bugzillas.map((item) => bugzillaRow(item)))));
|
|
20
24
|
};
|
|
21
25
|
return (React.createElement(React.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAoRrC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -221,6 +221,6 @@ function ProductNVersion(props) {
|
|
|
221
221
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
222
222
|
React.createElement("label", { htmlFor: "version-dropdown" },
|
|
223
223
|
React.createElement(Trans, null, "Version")),
|
|
224
|
-
React.createElement(Dropdown, { className: "open-case-version", id: "version-dropdown", selectedItem: toOption(selectedVersionLocal), list: versionsList, title: t(`Select a version`), isInValid: checkIfVersionIsInvalid, disabled: isVersionUpdating || (allProducts.isFetching && !allProducts.isError), onChange: onVersionChange, isLoadingList: isVersionUpdating, "data-tracking-id": "case-details-version-selector" }))))));
|
|
224
|
+
React.createElement(Dropdown, { className: "open-case-version", id: "version-dropdown", placeholder: t(`Select a version`), selectedItem: toOption(selectedVersionLocal), list: versionsList, title: t(`Select a version`), isInValid: checkIfVersionIsInvalid, disabled: isVersionUpdating || (allProducts.isFetching && !allProducts.isError), onChange: onVersionChange, isLoadingList: isVersionUpdating, "data-tracking-id": "case-details-version-selector" }))))));
|
|
225
225
|
}
|
|
226
226
|
export default ProductNVersion;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '../../css/app.css';
|
|
2
2
|
import '../../css/case.css';
|
|
3
|
-
import { IPfeCollapse } from '@rh-support/types/pfe/pfe-collapse';
|
|
4
3
|
import { RouteComponentProps } from 'react-router-dom';
|
|
5
4
|
declare global {
|
|
6
5
|
interface Window {
|
|
@@ -15,10 +14,6 @@ declare global {
|
|
|
15
14
|
hydrajs: string;
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
|
-
namespace JSX {
|
|
19
|
-
interface IntrinsicElements extends IPfeCollapse {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
17
|
interface Document {
|
|
23
18
|
documentMode: any;
|
|
24
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,OAAA,KAAK,GAAG,KAAK,GAAG,CAAC;QAC9E,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,eAAe,EAAE,GAAG,CAAC;QACrB,aAAa,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC;SACnB,CAAC;KACL;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AAED,UAAU,MAAM;CAAG;AAEnB,wBAAgB,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,MAAM,CAAC,eAkB9D"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import '../../css/app.css';
|
|
2
2
|
import '../../css/case.css';
|
|
3
3
|
import { ConfirmationServiceProvider, ErrorBoundary } from '@rh-support/components';
|
|
4
|
-
import { CustomElements, requireCustomElement } from '@rh-support/utils';
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { CaseContextProvider } from '../../context/CaseContext';
|
|
7
6
|
import { CaseDetailsPageContextProvider } from '../../context/CaseDetailsPageContext';
|
|
@@ -9,12 +8,6 @@ import { CaseDiscussionTabContextProvider } from '../../context/CaseDiscussionTa
|
|
|
9
8
|
import { RecommendationContextProvider } from '../../context/RecommendationContext';
|
|
10
9
|
import Case from './Case';
|
|
11
10
|
import { PDFContainer } from './PDFContainer';
|
|
12
|
-
requireCustomElement([
|
|
13
|
-
{
|
|
14
|
-
element: CustomElements.pfeCollapse,
|
|
15
|
-
requireCb: () => require('@patternfly/pfe-collapse'),
|
|
16
|
-
},
|
|
17
|
-
]);
|
|
18
11
|
export function CaseApp(routeProps) {
|
|
19
12
|
return (React.createElement(ErrorBoundary, { isPageLevelError: true },
|
|
20
13
|
React.createElement(CaseContextProvider, null,
|
|
@@ -60,7 +60,7 @@ export function ContactPhoneNumber() {
|
|
|
60
60
|
useEffect(() => {
|
|
61
61
|
// when canChangeAccountInfo is false OwnerSelector is hidden
|
|
62
62
|
// need to set phone on load here instead of OwnerSelector
|
|
63
|
-
if (!canChangeAccountInfo) {
|
|
63
|
+
if (!canChangeAccountInfo && (isEmpty(phoneCountryCode) || isEmpty(phoneAreaCodePrefixLineNumber))) {
|
|
64
64
|
if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
|
|
65
65
|
setCaseDetails(caseDispatch, {
|
|
66
66
|
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
@@ -70,7 +70,7 @@ export function ContactPhoneNumber() {
|
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
72
|
const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
|
|
73
|
-
const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
|
|
73
|
+
const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode || '';
|
|
74
74
|
setCaseDetails(caseDispatch, {
|
|
75
75
|
phoneAreaCodePrefixLineNumber: phoneLine,
|
|
76
76
|
phoneCountryCode: countryCode,
|
|
@@ -80,7 +80,7 @@ export function ContactPhoneNumber() {
|
|
|
80
80
|
}
|
|
81
81
|
setLocalFullPhone(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
82
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
|
-
}, [
|
|
83
|
+
}, []);
|
|
84
84
|
useEffect(() => {
|
|
85
85
|
if (isEqual(localFullPhone.trim(), '+')) {
|
|
86
86
|
setLocalFullPhone('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAyGhD"}
|
|
@@ -47,7 +47,7 @@ export default function Description(props) {
|
|
|
47
47
|
isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
|
|
48
48
|
React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `form-control${isDescriptionInvalid(issue) || (isNextBtnClickedToShowValidationError && isEmpty(issue))
|
|
49
49
|
? ' form-invalid'
|
|
50
|
-
: ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "get-support-ktQ1-issue", placeholder: t('Please enter an elaborate description') }),
|
|
50
|
+
: ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "get-support-ktQ1-issue", placeholder: t('Please enter an elaborate description'), rows: 5 }),
|
|
51
51
|
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT
|
|
52
52
|
? `Description cannot be more than ${CASE_DEATILS_ISSUE_LIMIT} characters`
|
|
53
53
|
: ''}`),
|
|
@@ -52,5 +52,5 @@ export default function ProductSelector(props) {
|
|
|
52
52
|
React.createElement(EARuleWidget, null)),
|
|
53
53
|
React.createElement("div", { className: "suggestions-result-section" },
|
|
54
54
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading recommendations') } }, !isEmpty(version) && (React.createElement("div", { className: "common-suggestions" },
|
|
55
|
-
React.createElement(Recommendations,
|
|
55
|
+
React.createElement(Recommendations, null)))))))));
|
|
56
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AA4CA,UAAU,MAAM;CAAG;AACnB,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eAkOpD"}
|
|
@@ -20,8 +20,6 @@ import { fetchRecommendations, RecommendationsConstants, setCurrentPage, setVisi
|
|
|
20
20
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
21
21
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
|
|
22
22
|
import RouteUtils from '../../utils/routeUtils';
|
|
23
|
-
import Issue from '../Issue/Issue';
|
|
24
|
-
import { EARuleWidget } from './EARules/EARuleWidget';
|
|
25
23
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
26
24
|
export default function Recommendations(props) {
|
|
27
25
|
var _a, _b, _c;
|
|
@@ -130,9 +128,7 @@ export default function Recommendations(props) {
|
|
|
130
128
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [getSessResFromRec(doc, SessionResourceVisibility.VISITED, index)], JSON.stringify(payload));
|
|
131
129
|
};
|
|
132
130
|
return (React.createElement(React.Fragment, null,
|
|
133
|
-
(!props.renderOnlyRecommendations || !props.renderOnlyRecommendations) && React.createElement(Issue, null),
|
|
134
131
|
React.createElement(LoadingDots, { show: recommendationState.isLoadingRecommendations && !isEmpty(summary) }),
|
|
135
|
-
(!props.renderOnlyRecommendations || !props.renderOnlyRecommendations) && React.createElement(EARuleWidget, null),
|
|
136
132
|
React.createElement("div", { className: "recommendation-list pf-u-mt-lg", ref: resultRowRef },
|
|
137
133
|
React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
|
|
138
134
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAQxF,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eA6C/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.18-beta.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -29,9 +29,6 @@
|
|
|
29
29
|
"@cee-eng/hydrajs": "4.15.87",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.196.7",
|
|
32
|
-
"@patternfly/pfe-accordion": "1.12.3",
|
|
33
|
-
"@patternfly/pfe-collapse": "1.12.3",
|
|
34
|
-
"@patternfly/pfe-tabs": "1.12.3",
|
|
35
32
|
"@patternfly/react-core": "4.264.0",
|
|
36
33
|
"dompurify": "^2.2.6",
|
|
37
34
|
"downshift": "^6.0.5",
|
|
@@ -59,18 +56,14 @@
|
|
|
59
56
|
"@cee-eng/hydrajs": "4.15.87",
|
|
60
57
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
61
58
|
"@patternfly/patternfly": "4.196.7",
|
|
62
|
-
"@patternfly/pfe-accordion": "1.12.3",
|
|
63
|
-
"@patternfly/pfe-collapse": "1.12.3",
|
|
64
|
-
"@patternfly/pfe-icon": "^1.12.3",
|
|
65
|
-
"@patternfly/pfe-tabs": "1.12.3",
|
|
66
59
|
"@patternfly/react-core": "4.264.0",
|
|
67
60
|
"@progress/kendo-drawing": "^1.6.0",
|
|
68
61
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
69
|
-
"@rh-support/components": "2.1.8",
|
|
70
|
-
"@rh-support/react-context": "2.1.8",
|
|
62
|
+
"@rh-support/components": "2.1.8-beta.0",
|
|
63
|
+
"@rh-support/react-context": "2.1.8-beta.0",
|
|
71
64
|
"@rh-support/types": "2.0.2",
|
|
72
|
-
"@rh-support/user-permissions": "2.1.3",
|
|
73
|
-
"@rh-support/utils": "2.1.1",
|
|
65
|
+
"@rh-support/user-permissions": "2.1.3-beta.0",
|
|
66
|
+
"@rh-support/utils": "2.1.1-beta.0",
|
|
74
67
|
"@types/react-redux": "^7.1.12",
|
|
75
68
|
"@types/redux": "^3.6.0",
|
|
76
69
|
"dompurify": "^2.4.1",
|
|
@@ -133,5 +126,5 @@
|
|
|
133
126
|
"defaults and supports es6-module",
|
|
134
127
|
"maintained node versions"
|
|
135
128
|
],
|
|
136
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "26b230a88e7957f7162cbd51622a640abaa328f8"
|
|
137
130
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,KAAK,gBA2F5B"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { TextArea } from '@patternfly/react-core';
|
|
2
|
-
import { InlineEdit, MoreOrLess } from '@rh-support/components';
|
|
3
|
-
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
4
|
-
import isEmpty from 'lodash/isEmpty';
|
|
5
|
-
import isEqual from 'lodash/isEqual';
|
|
6
|
-
import React, { useState } from 'react';
|
|
7
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
8
|
-
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
9
|
-
import { CASE_DEATILS_ISSUE_LIMIT, DESCRIPTION_LENGTH_LIMIT, MODIFIED_DESCRIPTION_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
|
|
10
|
-
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
11
|
-
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
12
|
-
import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
|
|
13
|
-
export default function Issue() {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
-
const { t } = useTranslation();
|
|
16
|
-
const { summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
|
|
17
|
-
summary: state.caseDetails.summary,
|
|
18
|
-
issue: state.caseDetails.issue,
|
|
19
|
-
environment: state.caseDetails.environment,
|
|
20
|
-
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
21
|
-
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
22
|
-
v3ClusterName: state.v3ClusterName,
|
|
23
|
-
}), isEqual);
|
|
24
|
-
const caseDispatch = useCaseDispatch();
|
|
25
|
-
const { globalMetadataState: { navBarRef }, } = useGlobalStateContext();
|
|
26
|
-
const [hasLargeDescription, setHasLargeDescription] = useState(false);
|
|
27
|
-
const onCaseDetailsChange = (caseDetails) => {
|
|
28
|
-
setCaseDetails(caseDispatch, caseDetails);
|
|
29
|
-
};
|
|
30
|
-
// To handle change of KTQ1
|
|
31
|
-
const onKTQ1IssueChange = (value, e) => {
|
|
32
|
-
const ktQ1Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
|
|
33
|
-
const description = getUpdatedDescription(ktQ1Local, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
|
|
34
|
-
setHasLargeDescription(description.length > DESCRIPTION_LENGTH_LIMIT);
|
|
35
|
-
onCaseDetailsChange({ issue: ktQ1Local, description });
|
|
36
|
-
};
|
|
37
|
-
const maxLengtMessage = t('Case description cannot be more than {{limit}} characters', {
|
|
38
|
-
limit: MODIFIED_DESCRIPTION_LENGTH_LIMIT,
|
|
39
|
-
});
|
|
40
|
-
return (React.createElement(React.Fragment, null,
|
|
41
|
-
React.createElement("form", { className: "push-bottom" },
|
|
42
|
-
React.createElement(OpenCaseIssue, { inlineEditable: false, hideSaveCancel: true, initialIsEditing: isEmpty(summary), required: true }),
|
|
43
|
-
React.createElement(MoreOrLess, { maxHeight: 600, appStickyHeaderRef: navBarRef },
|
|
44
|
-
React.createElement(InlineEdit, { labelProps: { htmlFor: 'issue-section-ktQ1-issue' }, labelContent: React.createElement(React.Fragment, null,
|
|
45
|
-
React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?")), allowInlineEdit: false, hideSaveCancel: true, initialIsEditing: isEmpty(issue), usePreformattedTag: true, content: issue },
|
|
46
|
-
React.createElement(TextArea, { id: "issue-section-ktQ1-issue", name: "issue-section-ktQ1-issue", className: `form-control${hasLargeDescription ? ' form-invalid' : ''}`, "aria-invalid": ((_a = issue) === null || _a === void 0 ? void 0 : _a.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', value: issue, onChange: onKTQ1IssueChange, "data-tracking-id": "get-support-describe-ktQ1-issue", "aria-describedby": "describeIssueDesc", placeholder: t('Elaborate more on your issue') }),
|
|
47
|
-
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${((_b = issue) === null || _b === void 0 ? void 0 : _b.length) > CASE_DEATILS_ISSUE_LIMIT
|
|
48
|
-
? `Description cannot be more than ${CASE_DEATILS_ISSUE_LIMIT} characters`
|
|
49
|
-
: ''}`))),
|
|
50
|
-
((_c = getUpdatedDescription(issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName)) === null || _c === void 0 ? void 0 : _c.length) > DESCRIPTION_LENGTH_LIMIT && (React.createElement("div", { className: "pull-top" },
|
|
51
|
-
React.createElement("p", { className: "form-instructions form-invalid" }, maxLengtMessage))))));
|
|
52
|
-
}
|