@rh-support/troubleshoot 1.1.0 → 1.1.1
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/Recommendations/AlertToastWrapper.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AlertToastWrapper.js +7 -4
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +1 -1
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts +1 -0
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.js +5 -3
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -5
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +4 -6
- package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts +0 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +0 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,EAAwB,MAAM,OAAO,CAAC;AAOxD,UAAU,MAAM;IACZ,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,MAAM,CAmBjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* We need to wrap Critical solution toast notification and Cluster recommendation toast notification so they don't get overlapped.
|
|
3
3
|
*/
|
|
4
4
|
import { AlertGroup } from '@patternfly/react-core';
|
|
5
|
-
import React, { useContext } from 'react';
|
|
5
|
+
import React, { useContext, useState } from 'react';
|
|
6
6
|
import { RouteContext } from '../../context/RouteContext';
|
|
7
|
-
import { hideSideBarClusterIdRuleToast
|
|
7
|
+
import { hideSideBarClusterIdRuleToast } from '../../reducers/RouteConstNTypes';
|
|
8
8
|
import { ResubmitToast } from '../SubmitCase/ResubmitToast';
|
|
9
9
|
import ClusterRecommendationToast from './ClusterRecommendationToast';
|
|
10
10
|
import CriticalSolutionsToast from './CriticalSolutionsToast';
|
|
11
11
|
const AlertToastWrapper = ({ submitCaseAndNavigate }) => {
|
|
12
12
|
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
13
13
|
const hideClusterIdReportModal = hideSideBarClusterIdRuleToast.includes(activeSection);
|
|
14
|
-
const
|
|
14
|
+
const [isCriticalSolutionsVisible, setIsCriticalSolutionsVisible] = useState(true);
|
|
15
|
+
const userClosed = () => {
|
|
16
|
+
setIsCriticalSolutionsVisible(false);
|
|
17
|
+
};
|
|
15
18
|
return (React.createElement(AlertGroup, { isToast: true },
|
|
16
|
-
|
|
19
|
+
isCriticalSolutionsVisible && React.createElement(CriticalSolutionsToast, { userClosed: userClosed }),
|
|
17
20
|
!hideClusterIdReportModal && React.createElement(ClusterRecommendationToast, null),
|
|
18
21
|
React.createElement(ResubmitToast, { submitCaseAndNavigate: submitCaseAndNavigate })));
|
|
19
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,YAAY,gBAkM3B"}
|
|
@@ -124,7 +124,7 @@ export function AsideResults() {
|
|
|
124
124
|
return;
|
|
125
125
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS_ASIDE, getSessResFromRecs(recommendationState.sideRecommendation, SessionResourceVisibility.PRESENTED), JSON.stringify(payload));
|
|
126
126
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
|
-
}, [recommendationState.sideRecommendation, activeSessionId]);
|
|
127
|
+
}, [recommendationState.sideRecommendation, activeSessionId, activeSection]);
|
|
128
128
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
129
129
|
if (!canShowSideRecommendations())
|
|
130
130
|
return React.createElement(React.Fragment, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAKnE,UAAU,MAAM;
|
|
1
|
+
{"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAKnE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,MAAM,CAiDtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
3
3
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
import { RulesDispatchContext, RulesStateContext } from '../../context/RulesContext';
|
|
5
5
|
import { RulesReducerConstants } from '../../reducers/RulesReducer';
|
|
6
|
-
const CriticalSolutionsToast = () => {
|
|
6
|
+
const CriticalSolutionsToast = (props) => {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
const [showNotification, setShowNotification] = useState(false);
|
|
9
9
|
const { rulesState } = useContext(RulesStateContext);
|
|
@@ -20,6 +20,7 @@ const CriticalSolutionsToast = () => {
|
|
|
20
20
|
payload: { triggerRuleNotification: false },
|
|
21
21
|
});
|
|
22
22
|
setShowNotification(false);
|
|
23
|
+
props.userClosed();
|
|
23
24
|
};
|
|
24
25
|
const setEAModalVisibility = (isVisible) => {
|
|
25
26
|
rulesDispatch({
|
|
@@ -30,10 +31,11 @@ const CriticalSolutionsToast = () => {
|
|
|
30
31
|
const viewCriticalSolution = () => {
|
|
31
32
|
onClose();
|
|
32
33
|
setEAModalVisibility(true);
|
|
34
|
+
props.userClosed();
|
|
33
35
|
};
|
|
34
36
|
if (!showNotification && !rulesState.triggerRuleNotification)
|
|
35
37
|
return null;
|
|
36
|
-
return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('
|
|
37
|
-
React.createElement(Trans, null, "
|
|
38
|
+
return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('File recommendations are ready to view'), "data-tracking-id": "toast-view-crit-sol", actionLinks: React.createElement(Button, { isInline: true, variant: "link", onClick: viewCriticalSolution },
|
|
39
|
+
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), actionClose: React.createElement(AlertActionCloseButton, { variantLabel: "success alert", onClose: onClose }) }));
|
|
38
40
|
};
|
|
39
41
|
export default CriticalSolutionsToast;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAuPrC;kBAvPQ,eAAe;;;AA0PxB,eAAe,eAAe,CAAC"}
|
|
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import { search } from '@cee-eng/hydrajs';
|
|
22
|
-
import { Alert
|
|
22
|
+
import { Alert } from '@patternfly/react-core';
|
|
23
23
|
import { usePrevious } from '@rh-support/components';
|
|
24
24
|
import { getSolrParams } from '@rh-support/utils';
|
|
25
25
|
import difference from 'lodash/difference';
|
|
@@ -238,10 +238,8 @@ function InsightsResults(props) {
|
|
|
238
238
|
return (React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults, isRenderedMain: true }));
|
|
239
239
|
}
|
|
240
240
|
return (React.createElement(React.Fragment, null,
|
|
241
|
-
!rulesState.triggerRuleNotification && (React.createElement(Alert, { isInline: true, title: t('
|
|
242
|
-
|
|
243
|
-
} },
|
|
244
|
-
React.createElement(Trans, null, "View recommendations")) })),
|
|
241
|
+
!rulesState.triggerRuleNotification && (React.createElement(Alert, { isInline: true, title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-crit-sol", children: React.createElement("p", null,
|
|
242
|
+
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")) })),
|
|
245
243
|
React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
|
|
246
244
|
}
|
|
247
245
|
InsightsResults.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AA4BA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAqRjC"}
|
|
@@ -16,6 +16,7 @@ import { RulesStateContext } from '../../context/RulesContext';
|
|
|
16
16
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
17
17
|
import { getIrtForSLAAndSeverity, getOrtForSLAAndSeverity } from '../../reducers/CaseHelpers';
|
|
18
18
|
import RouteUtils from '../../utils/routeUtils';
|
|
19
|
+
import { AsideResults } from '../Recommendations/AsideResults';
|
|
19
20
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
20
21
|
import InsightsResults from '../Recommendations/InsightsResults';
|
|
21
22
|
import { RemoteRiderBanner } from '../RemoteRider/RemoteRiderBanner';
|
|
@@ -135,14 +136,11 @@ export default function SubmitCase() {
|
|
|
135
136
|
React.createElement(Button, { className: "pf-u-ml-md", component: (props) => React.createElement(Link, Object.assign({}, props, { to: `/case/${caseNumber}` })), href: getCaseURL(), variant: "primary", "data-tracking-id": "get-support-view-case", isDisabled: viewDisabled }, "View case"))))),
|
|
136
137
|
!isEmpty(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(FileUploader, { idToUploadTo: caseNumber, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport })),
|
|
137
138
|
React.createElement("div", null,
|
|
138
|
-
(!isEmpty(topContent.data) ||
|
|
139
|
-
!
|
|
140
|
-
!clusterRecommendations ||
|
|
141
|
-
isIdea) && (React.createElement(Text, { className: "pf-u-mt-2xl pf-u-font-weight-light", component: TextVariants.h2 },
|
|
139
|
+
(!isEmpty(topContent.data) || !rulesState.EARules.rules || !clusterRecommendations) &&
|
|
140
|
+
!isIdea && (React.createElement(Text, { className: "pf-u-mt-2xl pf-u-font-weight-light", component: TextVariants.h2 },
|
|
142
141
|
React.createElement(Trans, null, "Troubleshoot this case"))),
|
|
143
142
|
React.createElement("div", { className: isIdea ? 'pf-u-mt-lg' : '' },
|
|
144
143
|
React.createElement(InsightsResults, { isDisplayOnMain: true })),
|
|
145
144
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsModal: false }),
|
|
146
|
-
|
|
147
|
-
React.createElement(Suggestions, { title: isIdea ? t('Search recommendations') : t('Product recommendations'), showTitleDescription: true, showMax: 6 }))))))));
|
|
145
|
+
React.createElement("div", { className: "pf-u-mt-lg" }, isIdea ? (React.createElement(AsideResults, null)) : (!isEmpty(topContent.data) && (React.createElement(Suggestions, { title: isIdea ? t('Search recommendations') : t('Product recommendations'), showTitleDescription: true, showMax: 6 })))))))));
|
|
148
146
|
}
|
|
@@ -39,7 +39,7 @@ function WizardAside(props) {
|
|
|
39
39
|
canshowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
40
40
|
React.createElement(InsightsResults, null),
|
|
41
41
|
" ",
|
|
42
|
-
React.createElement(AsideResults, null),
|
|
42
|
+
!(isIdea && activeSection === 'submit-case') && React.createElement(AsideResults, null),
|
|
43
43
|
canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
|
|
44
44
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget }),
|
|
45
45
|
canUseSessionManagement && !isCreatingCase && React.createElement(SessionRestore, { routeProps: props.routeProps }),
|
|
@@ -25,6 +25,5 @@ export declare const showSideBarEARuleWidgetSections: AppRouteSections[];
|
|
|
25
25
|
export declare const showSideBarClusterIdRuleWidgetSections: AppRouteSections[];
|
|
26
26
|
export declare const showSideBarFileRecommendationSections: AppRouteSections[];
|
|
27
27
|
export declare const hideSideBarClusterIdRuleToast: AppRouteSections[];
|
|
28
|
-
export declare const showSideBarCriticalSolutionsToast: AppRouteSections[];
|
|
29
28
|
export declare const hiddengetSupportSections: AppRouteSections[];
|
|
30
29
|
//# sourceMappingURL=RouteConstNTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,eAAe;CAAG;AACnC,oBAAY,gBAAgB;IACxB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,UAA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gB,EAKtD,CAAC"}
|
|
@@ -37,7 +37,6 @@ export const showSideBarClusterIdRuleWidgetSections = [
|
|
|
37
37
|
];
|
|
38
38
|
export const showSideBarFileRecommendationSections = [AppRouteSections.DESCRIBE_MORE, AppRouteSections.MANAGEMENT];
|
|
39
39
|
export const hideSideBarClusterIdRuleToast = [AppRouteSections.REVIEW, AppRouteSections.SUBMIT_CASE];
|
|
40
|
-
export const showSideBarCriticalSolutionsToast = [AppRouteSections.SUMMARIZE];
|
|
41
40
|
export const hiddengetSupportSections = [
|
|
42
41
|
AppRouteSections.TROUBLESHOOT,
|
|
43
42
|
AppRouteSections.DESCRIBE_MORE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"not ie <= 11",
|
|
146
146
|
"not op_mini all"
|
|
147
147
|
],
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "e1515d822febb9822e84bfb533fd9bc1355b9751"
|
|
149
149
|
}
|