@rh-support/troubleshoot 2.2.68 → 2.2.70

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/README.md CHANGED
@@ -6,7 +6,6 @@ Pluggable troubleshoot module.
6
6
 
7
7
  ```
8
8
  import {
9
- RootTroubleshootProvider,
10
9
  Troubleshoot
11
10
  } from '@rh-support/troubleshoot';
12
11
  <!-- import '@rh-support/troubleshoot/lib/troubleshoot.css'; -->
@@ -14,9 +13,7 @@ import React from 'react';
14
13
  import { RouteComponentProps } from 'react-router-dom';
15
14
 
16
15
  export function TroubleshootApp(routeProps: RouteComponentProps<{}>) {
17
- return (<RootTroubleshootProvider>
18
- <Troubleshoot routeProps={routeProps} basePath="/troubleshoot"/>
19
- </RootTroubleshootProvider>);
16
+ return (<Troubleshoot routeProps={routeProps} basePath="/troubleshoot"/>);
20
17
  }
21
18
 
22
19
  ```
@@ -43,6 +43,7 @@ export function EARuleInfoInline({ eaRules = [] }) {
43
43
  const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
44
44
  const validEARulesLength = eaRules.length;
45
45
  const isAnyRuleResolved = some(eaRules, (item) => item.resolved);
46
+ const visibleRule = eaRules[currentPage > validEARulesLength ? validEARulesLength - 1 : currentPage - 1];
46
47
  // if user ignores a rule on last page, we need to handle the scenario
47
48
  useEffect(() => {
48
49
  if (currentPage > validEARulesLength) {
@@ -52,7 +53,7 @@ export function EARuleInfoInline({ eaRules = [] }) {
52
53
  }, [validEARulesLength]);
53
54
  const onPaginationChange = (currentPage) => {
54
55
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [
55
- getSessResFromRules(null, SessionResourceVisibility.PRESENTED, eaRules[currentPage - 1].rule_id, currentPage),
56
+ getSessResFromRules(visibleRule.cta, SessionResourceVisibility.PRESENTED, eaRules[currentPage - 1].rule_id, currentPage),
56
57
  ], JSON.stringify({ product, version }));
57
58
  setCurrentPage(currentPage);
58
59
  };
@@ -89,7 +90,6 @@ export function EARuleInfoInline({ eaRules = [] }) {
89
90
  React.createElement(Trans, null, "Resolved"))) : isAnyRuleResolved ? null : (React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, className: "se-recommended ts-known-vuln", variant: ButtonVariant.link, isInline: true, "data-tracking-id": "se-recommended-asa-resolve", type: "button", onClick: onResolveClick }, isFetching ? null : React.createElement(Trans, null, "This resolved my issue")));
90
91
  if (validEARulesLength < 1)
91
92
  return null;
92
- const visibleRule = eaRules[currentPage > validEARulesLength ? validEARulesLength - 1 : currentPage - 1];
93
93
  return (React.createElement(React.Fragment, null,
94
94
  React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
95
95
  React.createElement(EARule, { rule: visibleRule },
@@ -1 +1 @@
1
- {"version":3,"file":"EARuleWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAWrD,wBAAgB,YAAY,sBA2C3B"}
1
+ {"version":3,"file":"EARuleWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAWrD,wBAAgB,YAAY,sBAkD3B"}
@@ -26,7 +26,9 @@ export function EARuleWidget() {
26
26
  if (visibleValidEARules &&
27
27
  differenceBy([visibleValidEARules === null || visibleValidEARules === void 0 ? void 0 : visibleValidEARules.rule_id], presentedIds).length > 0 &&
28
28
  !isEmpty(activeSessionId)) {
29
- createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [getSessResFromRules(null, SessionResourceVisibility.PRESENTED, visibleValidEARules.rule_id, 1)], JSON.stringify({ product, version }));
29
+ createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [
30
+ getSessResFromRules(visibleValidEARules.cta, SessionResourceVisibility.PRESENTED, visibleValidEARules.rule_id, 1),
31
+ ], JSON.stringify({ product, version }));
30
32
  }
31
33
  // eslint-disable-next-line react-hooks/exhaustive-deps
32
34
  }, [validEARules, activeSessionId]);
@@ -1,6 +1,6 @@
1
1
  import { CaseDiagnosticsStatus } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
2
2
  import { ISlowUploadDetectionConfig } from '@cee-eng/hydrajs/@types/models/attachment';
3
- import { AttachmentReducerDispatchType, IAnalysisResults, ICaseFiles, IFileLocal, IUploadMetadata } from './AttachmentReducer';
3
+ import { AttachmentReducerDispatchType, IAnalysisResults, ICaseFiles, IFileLocal, IUploadMetadata, UploadStatusConstants } from './AttachmentReducer';
4
4
  export declare const onDrop: (dispatchToAttachmentReducer: AttachmentReducerDispatchType, isSessionId: boolean, isPrivate?: boolean) => (acceptedFiles: File[]) => void;
5
5
  export declare const isUploadingOnSession: (status: string) => boolean;
6
6
  export declare const isUploadingOnCase: (status: string) => boolean;
@@ -58,7 +58,7 @@ export declare const uploadFile: ({ dispatch, idToUploadTo, localFile, originalF
58
58
  slowUploadConfig?: ISlowUploadDetectionConfig;
59
59
  }) => Promise<void>;
60
60
  export declare function doSosReportAnalysisForAllFiles(dispatch: any, idToUploadTo: string, localFiles: IFileLocal[], isSessionId: boolean): Promise<void>;
61
- export declare function doSosReportAnalysisForFile(dispatch: any, idToUploadTo: string, attachmentId: string, localFile: IFileLocal, isSessionId: boolean, fileIndex: number): Promise<void>;
61
+ export declare function doSosReportAnalysisForFile(dispatch: any, idToUploadTo: string, attachmentId: string, localFile: IFileLocal, isSessionId: boolean, fileIndex: number, fileUploadStatus?: UploadStatusConstants): Promise<void>;
62
62
  export declare function computeAnalysisResults(idToUploadTo: string, attachmentId: string, fileSize: number, isSessionId: boolean, listener: (status: CaseDiagnosticsStatus) => void): Promise<IAnalysisResults>;
63
63
  export declare function moveSessionAttachmentToCase(dispatch: any, caseNumber: string, sessionId: string, localFile: IFileLocal, fileIndex: number): Promise<void>;
64
64
  export declare function restoreFilesFromSession(dispatch: any, sessionId: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAQvF,OAAO,EAGH,6BAA6B,EAK7B,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,eAAe,EAOlB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,MAAM,gCACe,6BAA6B,eAAe,OAAO,0CACjE,IAAI,EAAE,SA+BrB,CAAC;AAiBN,eAAO,MAAM,oBAAoB,WAAY,MAAM,YAAwD,CAAC;AAC5G,eAAO,MAAM,iBAAiB,WAAY,MAAM,YAAqD,CAAC;AACtG,eAAO,MAAM,wBAAwB,WAAY,MAAM,YAA4D,CAAC;AACpH,eAAO,MAAM,qBAAqB,WAAY,MAAM,YAAyD,CAAC;AAC9G,eAAO,MAAM,qBAAqB,WAAY,MAAM,YAAyD,CAAC;AAC9G,eAAO,MAAM,uBAAuB,WAAY,MAAM,YACiC,CAAC;AACxF,eAAO,MAAM,oBAAoB,WAAY,MAAM,YAAoD,CAAC;AACxG,eAAO,MAAM,qBAAqB,WAAY,MAAM,YAA2D,CAAC;AAChH,eAAO,MAAM,kBAAkB,WAAY,MAAM,YAAwD,CAAC;AAC1G,eAAO,MAAM,cAAc,WAAY,MAAM,YAAkD,CAAC;AAEhG,eAAO,MAAM,oBAAoB,WAAY,MAAM,YAA0D,CAAC;AAC9G,eAAO,MAAM,eAAe,WAAY,MAAM,YAAyD,CAAC;AACxG,eAAO,MAAM,kBAAk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MAAM,2BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,uBAAwB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,yBAU3B,CAAC"}
1
+ {"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AASvF,OAAO,EAGH,6BAA6B,EAK7B,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,eAAe,EAMf,qBAAqB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,MAAM,gCACe,6BAA6B,eAAe,OAAO,0CACjE,IAAI,EAAE,SA+BrB,CAAC;AAiBN,eAAO,MAAM,oBAAoB,WAAY,MAAM,YAAwD,CAAC;AAC5G,eAAO,MAAM,iBAAiB,WAAY,MAAM,YAAqD,CAAC;AACtG,eAAO,MAAM,wBAAwB,WAAY,MAAM,YAA4D,CAAC;AACpH,eAAO,MAAM,qBAAqB,WAAY,MAAM,YAAyD,CAAC;AAC9G,eAAO,MAAM,qBAAqB,WAAY,MAAM,YAAyD,CAAC;AAC9G,eAAO,MAAM,uBAAuB,WAAY,MAAM,YACiC,CAAC;AACxF,eAAO,MAAM,oBAAoB,WAAY,MAAM,YAAoD,CAAC;AACxG,eAAO,MAAM,qBAAqB,WAAY,MAAM,YAA2D,CAAC;AAChH,eAAO,MAAM,kBAAkB,WAAY,MAAM,YAAwD,CAAC;AAC1G,eAAO,MAAM,cAAc,WAAY,MAAM,YAAkD,CAAC;AAEhG,eAAO,MAAM,oBAAoB,WAAY,MAAM,YAA0D,CAAC;AAC9G,eAAO,MAAM,eAAe,WAAY,MAAM,YAAyD,CAAC;AACxG,eAAO,MAAM,kBAAkB,WAAY,MAAM,YAAwD,CAAC;AAC1G,eAAO,M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BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,uBAAwB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,yBAU3B,CAAC"}
@@ -14,6 +14,7 @@ import find from 'lodash/find';
14
14
  import forEach from 'lodash/forEach';
15
15
  import includes from 'lodash/includes';
16
16
  import isEmpty from 'lodash/isEmpty';
17
+ import isUndefined from 'lodash/isUndefined';
17
18
  import { AnalysisStatusConstants, AttachmentReducerConstants, defaultAnalysisMetadata, defaultUploadMetadata, onFilesSelect, resetAttachment, udpateFileUploadMetadata, updateAnalysisMetadata, updateAttachmentIdForFile, UploadStatusConstants, } from './AttachmentReducer';
18
19
  import { FileStatusHelper } from './FileStatusHelper';
19
20
  export const onDrop = (dispatchToAttachmentReducer, isSessionId, isPrivate = false) => (acceptedFiles) => {
@@ -217,8 +218,9 @@ export const uploadFile = ({ dispatch, idToUploadTo, localFile, originalFile, in
217
218
  onAbort: undefined,
218
219
  };
219
220
  updateUploadMetadata(dispatch, index, uploadPayload);
221
+ const localFileUploadStatus = uploadPayload.uploadStatus;
220
222
  if (isSessionId && needsAnalyzing) {
221
- doSosReportAnalysisForFile(dispatch, idToUploadTo, attachmentId, localFile, isSessionId, index);
223
+ doSosReportAnalysisForFile(dispatch, idToUploadTo, attachmentId, localFile, isSessionId, index, localFileUploadStatus);
222
224
  }
223
225
  }
224
226
  catch (error) {
@@ -249,12 +251,15 @@ export function doSosReportAnalysisForAllFiles(dispatch, idToUploadTo, localFile
249
251
  }));
250
252
  });
251
253
  }
252
- export function doSosReportAnalysisForFile(dispatch, idToUploadTo, attachmentId, localFile, isSessionId, fileIndex) {
254
+ export function doSosReportAnalysisForFile(dispatch, idToUploadTo, attachmentId, localFile, isSessionId, fileIndex, fileUploadStatus) {
253
255
  return __awaiter(this, void 0, void 0, function* () {
256
+ const localFileUploadStatus = !isUndefined(fileUploadStatus)
257
+ ? fileUploadStatus
258
+ : localFile.uploadProgress.uploadStatus;
254
259
  if (isAnalysisComplete(localFile.analysisMetadata.analysisStatus) ||
255
260
  !attachmentId ||
256
261
  !idToUploadTo ||
257
- !isUploadComplete(localFile.uploadProgress.uploadStatus))
262
+ !isUploadComplete(localFileUploadStatus))
258
263
  return;
259
264
  if (!isDiagnosticsAttachment(localFile)) {
260
265
  updateAnalysisMetadata(dispatch, {
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAgJzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAoKzC"}
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { Grid, GridItem } from '@patternfly/react-core';
11
11
  import { SupportFeedbackForm } from '@rh-support/components';
12
- import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
+ import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
14
  import { getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
15
15
  import findIndex from 'lodash/findIndex';
16
16
  import isEqual from 'lodash/isEqual';
17
- import React, { useContext, useRef, useState } from 'react';
17
+ import React, { useContext, useEffect, useRef, useState } from 'react';
18
18
  import { Trans } from 'react-i18next';
19
19
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
20
20
  import { RouteContext } from '../../context/RouteContext';
@@ -32,11 +32,18 @@ import WizardAside from './WizardAside';
32
32
  import WizardMain from './WizardMain';
33
33
  export function WizardLayout(props) {
34
34
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
35
- const caseState = useCaseSelector((state) => state, isEqual);
35
+ const { caseCreationError, contactSSOName, caseType, product, caseState } = useCaseSelector((state) => ({
36
+ caseState: state,
37
+ caseCreationError: state.caseCreationError,
38
+ contactSSOName: state.caseDetails.contactSSOName,
39
+ caseType: state.caseDetails.caseType,
40
+ product: state.caseDetails.product,
41
+ }), isEqual);
36
42
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
37
43
  const caseDispatch = useCaseDispatch();
38
44
  const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
39
45
  const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
46
+ const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
40
47
  const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
41
48
  const { attachmentState } = useContext(AttachmentStateContext);
42
49
  const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
@@ -54,11 +61,10 @@ export function WizardLayout(props) {
54
61
  RouteUtils.updateQueryParams(props.routeProps, newParams);
55
62
  };
56
63
  const checkForConfirmationModalsOnReview = () => {
57
- var _a, _b;
58
- if (((_a = caseState === null || caseState === void 0 ? void 0 : caseState.caseDetails) === null || _a === void 0 ? void 0 : _a.caseType) === PreviousCaseTypes.FEATURE_ENHANCEMENT)
64
+ if (caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT)
59
65
  return false;
60
66
  let isModalPresent = false;
61
- if (((_b = caseState === null || caseState === void 0 ? void 0 : caseState.caseDetails) === null || _b === void 0 ? void 0 : _b.product) === 'Red Hat OpenShift Cluster Manager' &&
67
+ if (product === 'Red Hat OpenShift Cluster Manager' &&
62
68
  !viewedConfirmationModalsList.current.includes(PreCaseConfirmationModalsEnum.ROCM_MODAL)) {
63
69
  setConfirmationModalType(PreCaseConfirmationModalsEnum.ROCM_MODAL);
64
70
  viewedConfirmationModalsList.current.push(PreCaseConfirmationModalsEnum.ROCM_MODAL);
@@ -108,9 +114,14 @@ export function WizardLayout(props) {
108
114
  }
109
115
  setConfirmationModalType(null);
110
116
  };
117
+ // Loading app metadata
118
+ useEffect(() => {
119
+ fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
120
+ // eslint-disable-next-line react-hooks/exhaustive-deps
121
+ }, [contactSSOName, dispatchToGlobalMetadataReducer]);
111
122
  return (React.createElement(React.Fragment, null,
112
123
  React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
113
- activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseState.caseCreationError) })),
124
+ activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseCreationError) })),
114
125
  React.createElement(Grid, { style: { height: '100%' } },
115
126
  React.createElement(GridItem, { sm: 12, md: 12, lg: 8, xl2: 8 },
116
127
  React.createElement(WizardMain, { routeProps: props.routeProps, submitCaseAndNavigate: submitCaseAndNavigate, confirmSupportModal: confirmSupportModal })),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2CAA2C,CAAC;AAInD,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAIlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,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,eAAO,MAAM,YAAY,UAAW,MAAM,sBAgBzC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2CAA2C,CAAC;AAGnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,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,eAAO,MAAM,YAAY,UAAW,MAAM,sBAYzC,CAAC"}
@@ -5,23 +5,16 @@ import '../../css/productSelector.css';
5
5
  import '../../css/results.css';
6
6
  import '../shared/fileUpload/css/fileSelector.css';
7
7
  import { useDocumentTitle } from '@rh-support/components';
8
- import { fetchProducts, GlobalMetadataDispatchContext } from '@rh-support/react-context';
9
- import React, { useContext, useEffect } from 'react';
10
- import { useCaseSelector } from '../../context/CaseContext';
8
+ import React from 'react';
9
+ import { RootTroubleshootProvider } from '../../context/RootTroubleshootProvider';
11
10
  import { PageTitle } from '../../enums/pageTitle';
12
11
  import RouteUtils from '../../utils/routeUtils';
13
12
  import { WizardLayout } from './WizardLayout';
14
13
  export const Troubleshoot = (props) => {
15
14
  const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
16
15
  useDocumentTitle(isCaseCreate ? PageTitle.NEW_CASE : PageTitle.TROUBLESHOOT);
17
- const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
18
- const contactSSOName = useCaseSelector((state) => state.caseDetails.contactSSOName);
19
16
  RouteUtils.seBasePath = props.basePath || '';
20
- // Loading app metadata
21
- useEffect(() => {
22
- fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
23
- // eslint-disable-next-line react-hooks/exhaustive-deps
24
- }, [contactSSOName, dispatchToGlobalMetadataReducer]);
25
17
  return (React.createElement("div", { id: "se-solution-engine" },
26
- React.createElement(WizardLayout, { routeProps: props.routeProps })));
18
+ React.createElement(RootTroubleshootProvider, null,
19
+ React.createElement(WizardLayout, { routeProps: props.routeProps }))));
27
20
  };
@@ -2,7 +2,6 @@ export declare const CASE_DETAILS_ACTIVE_TAB_SEARCH_PARAM = "activeCaseDetailsTa
2
2
  export declare enum CaseDetailsTabsEnum {
3
3
  DISCUSSION = "Discussion",
4
4
  MANAGEMENT = "Management",
5
- BUGZILLA = "Bugzilla",
6
5
  ACTION_PLAN = "Action plan",
7
6
  PRIVATE_NOTES = "Private Notes",
8
7
  ESCALATION = "Escalations",
@@ -1 +1 @@
1
- {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;IAC1B,aAAa,kBAAkB;CAClC;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,oBAAY,0BAA0B;IAClC,OAAO,MAAM;IACb,WAAW,OAAO;IAClB,OAAO,MAAM;CAChB;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAE7D,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
1
+ {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;IAC1B,aAAa,kBAAkB;CAClC;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,oBAAY,0BAA0B;IAClC,OAAO,MAAM;IACb,WAAW,OAAO;IAClB,OAAO,MAAM;CAChB;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAE7D,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
@@ -3,7 +3,6 @@ export var CaseDetailsTabsEnum;
3
3
  (function (CaseDetailsTabsEnum) {
4
4
  CaseDetailsTabsEnum["DISCUSSION"] = "Discussion";
5
5
  CaseDetailsTabsEnum["MANAGEMENT"] = "Management";
6
- CaseDetailsTabsEnum["BUGZILLA"] = "Bugzilla";
7
6
  CaseDetailsTabsEnum["ACTION_PLAN"] = "Action plan";
8
7
  CaseDetailsTabsEnum["PRIVATE_NOTES"] = "Private Notes";
9
8
  CaseDetailsTabsEnum["ESCALATION"] = "Escalations";
@@ -1,5 +1,4 @@
1
1
  import './scss/index.scss';
2
- export { RootTroubleshootProvider } from './context/RootTroubleshootProvider';
3
2
  export { Troubleshoot } from './components/wizardLayout';
4
3
  export { CaseApp } from './components/CaseEditView';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC"}
package/lib/esm/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  import './scss/index.scss';
2
- export { RootTroubleshootProvider } from './context/RootTroubleshootProvider';
3
2
  export { Troubleshoot } from './components/wizardLayout';
4
3
  export { CaseApp } from './components/CaseEditView';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.68",
3
+ "version": "2.2.70",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -132,5 +132,5 @@
132
132
  "defaults and supports es6-module",
133
133
  "maintained node versions"
134
134
  ],
135
- "gitHead": "f95bf012016d8a689c69d518b98266a3ac0292d9"
135
+ "gitHead": "b0b96a5d63695109976f5743e2e1eb33e041c8ab"
136
136
  }
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- }
4
- export default function CaseBugzilla(props: IProps): React.JSX.Element;
5
- export {};
6
- //# sourceMappingURL=CaseBugzilla.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CaseBugzilla.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseBugzilla/CaseBugzilla.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,UAAU,MAAM;CAAG;AAEnB,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBAmDjD"}
@@ -1,29 +0,0 @@
1
- import isEqual from 'lodash/isEqual';
2
- import React, { useContext } from 'react';
3
- import { Trans } from 'react-i18next';
4
- import { useCaseSelector } from '../../../../context/CaseContext';
5
- import { PDFContext } from '../../PDFContainer';
6
- export default function CaseBugzilla(props) {
7
- const bugzillas = useCaseSelector((state) => state.caseDetails.bugzillas, isEqual);
8
- const { isExportingPDF } = useContext(PDFContext);
9
- const bugzillaRow = (bugzilla) => (React.createElement("tr", { key: bugzilla.bugzillaNumber },
10
- React.createElement("td", { id: `th-bug${bugzilla.bugzillaNumber}`, headers: "th-bug-number" },
11
- React.createElement("a", { href: bugzilla.bugzillaLink, target: "_blank", rel: "noopener noreferrer" }, bugzilla.bugzillaNumber)),
12
- React.createElement("td", { headers: `th-bug${bugzilla.bugzillaNumber} th-bug-summary` }, bugzilla.summary)));
13
- const bugzillasList = (bugzillas) => {
14
- return (React.createElement("table", { className: "table table-naked table-hover table-respond", style: { fontFamily: isExportingPDF ? 'DejaVu Sans' : '' } },
15
- React.createElement("thead", null,
16
- React.createElement("tr", null,
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"))))),
23
- React.createElement("tbody", null, bugzillas.map((item) => bugzillaRow(item)))));
24
- };
25
- return (React.createElement(React.Fragment, null,
26
- (bugzillas || []).length < 1 && (React.createElement("p", null,
27
- React.createElement(Trans, null, "There aren't any linked Bugzilla tickets."))),
28
- bugzillas && bugzillas.length > 0 && bugzillasList(bugzillas)));
29
- }