@rh-support/troubleshoot 2.5.18 → 2.5.19

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAmDnD"}
1
+ {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAkCnD"}
@@ -1,9 +1,6 @@
1
1
  import { Grid, GridItem } from '@patternfly/react-core';
2
- import { useGlobalStateContext } from '@rh-support/react-context';
3
- import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
4
- import isEqual from 'lodash/isEqual';
5
2
  import React from 'react';
6
- import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
3
+ import { useCaseDispatch } from '../../context/CaseContext';
7
4
  import { setCaseDetails } from '../../reducers/CaseReducer';
8
5
  import CaseGroup from '../CaseInformation/CaseGroup';
9
6
  import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
@@ -13,23 +10,14 @@ import Severity from '../CaseInformation/Severity';
13
10
  import SupportLevel from '../CaseInformation/SupportLevel';
14
11
  import CaseLanguageSelector from './CaseLanguageSelector';
15
12
  import { Cep } from './Cep';
16
- import ESSRemoteSessionCheckBox from './ESSRemoteSessionCheckBox';
17
13
  import OpenReferenceNumber from './OpenReferenceNumber';
18
14
  import { RHAssociatesSelector } from './RHAssociatesSelector';
19
15
  import CaseContactSelector from './SendNotifications/CaseContactSelector';
20
16
  export default function CaseManagement(props) {
21
- var _a;
22
17
  const caseDispatch = useCaseDispatch();
23
18
  const onSeverityChange = (payload) => {
24
19
  setCaseDetails(caseDispatch, payload);
25
20
  };
26
- const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
27
- const { product } = useCaseSelector((state) => ({
28
- product: state.caseDetails.product,
29
- }), isEqual);
30
- const selectedProduct = product;
31
- // To check if the user is ESS Customer and Product has ESS Support
32
- const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
33
21
  return (React.createElement("form", null,
34
22
  React.createElement(SupportLevel, null),
35
23
  React.createElement(Grid, { hasGutter: true },
@@ -47,6 +35,5 @@ export default function CaseManagement(props) {
47
35
  React.createElement(CaseContactSelector, null),
48
36
  React.createElement(RHAssociatesSelector, null),
49
37
  React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
50
- React.createElement(Cep, null),
51
- isESSCustomer && React.createElement(ESSRemoteSessionCheckBox, null)));
38
+ React.createElement(Cep, null)));
52
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAkBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBAoJtC"}
1
+ {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBA6ItC"}
@@ -1,7 +1,7 @@
1
1
  import { Grid, GridItem } from '@patternfly/react-core';
2
2
  import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
3
- import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useGlobalStateContext, } from '@rh-support/react-context';
4
- import { canManageCase, haventLoadedMetadata, isSpecialSupportOfferingEnabled } from '@rh-support/utils';
3
+ import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
4
+ import { canManageCase, haventLoadedMetadata } from '@rh-support/utils';
5
5
  import isEmpty from 'lodash/isEmpty';
6
6
  import isEqual from 'lodash/isEqual';
7
7
  import React, { useContext, useEffect } from 'react';
@@ -15,23 +15,19 @@ import Severity from '../CaseInformation/Severity';
15
15
  import SupportLevel from '../CaseInformation/SupportLevel';
16
16
  import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
17
17
  import { Cep } from '../CaseManagement/Cep';
18
- import ESSRemoteSessionCheckBox from '../CaseManagement/ESSRemoteSessionCheckBox';
19
18
  import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
20
19
  import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
21
20
  import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
22
21
  import KtQuestions from '../ImproveCase/KtQuestions';
23
22
  export default function IdeaInformation() {
24
- var _a;
25
23
  const { t } = useTranslation();
26
24
  const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
27
25
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
28
- const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
29
- const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements, product } = useCaseSelector((state) => ({
26
+ const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
30
27
  contactSSOName: state.caseDetails.contactSSOName,
31
28
  ownersCaseGroups: state.ownersCaseGroups,
32
29
  selectedAccountDetails: state.selectedAccountDetails,
33
30
  hasInvalidEntitlements: state.hasInvalidEntitlements,
34
- product: state.caseDetails.product,
35
31
  }), isEqual);
36
32
  const caseDispatch = useCaseDispatch();
37
33
  const isMetadataLoading = () => {
@@ -74,8 +70,6 @@ export default function IdeaInformation() {
74
70
  const onSeverityChange = (payload) => {
75
71
  setCaseDetails(caseDispatch, payload);
76
72
  };
77
- // To check if the user is ESS Customer and Product has ESS Support
78
- const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, product);
79
73
  return (React.createElement(React.Fragment, null,
80
74
  React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
81
75
  React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v5-u-mb-md", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError(), isInline: true }),
@@ -112,6 +106,5 @@ export default function IdeaInformation() {
112
106
  React.createElement(CaseContactSelector, null),
113
107
  React.createElement(RHAssociatesSelector, null),
114
108
  React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
115
- isESSCustomer && React.createElement(ESSRemoteSessionCheckBox, null),
116
109
  React.createElement(Cep, null))))));
117
110
  }
@@ -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,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,qBAiF3C"}
1
+ {"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAqBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAsE3C"}
@@ -1,7 +1,5 @@
1
1
  import { Grid, GridItem } from '@patternfly/react-core';
2
- import { useGlobalStateContext } from '@rh-support/react-context';
3
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
4
- import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
5
3
  import isEmpty from 'lodash/isEmpty';
6
4
  import isEqual from 'lodash/isEqual';
7
5
  import React, { useContext } from 'react';
@@ -18,7 +16,6 @@ import Severity from '../CaseInformation/Severity';
18
16
  import SupportLevel from '../CaseInformation/SupportLevel';
19
17
  import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
20
18
  import { Cep } from '../CaseManagement/Cep';
21
- import ESSRemoteSessionCheck from '../CaseManagement/ESSRemoteSessionCheckBox';
22
19
  import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
23
20
  import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
24
21
  import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
@@ -28,23 +25,17 @@ import KtQuestions from '../ImproveCase/KtQuestions';
28
25
  import { AllProductsSelector } from '../ProductSelector/AllProductsSelector';
29
26
  import { EARuleWidget } from '../Recommendations/EARules/EARuleWidget';
30
27
  export default function Review(props) {
31
- var _a;
32
28
  const caseDispatch = useCaseDispatch();
33
- const { contactInfo24x7, product, ABTestVariation } = useCaseSelector((state) => ({
29
+ const { contactInfo24x7, ABTestVariation } = useCaseSelector((state) => ({
34
30
  contactInfo24x7: state.caseDetails.contactInfo24x7,
35
- product: state.caseDetails.product,
36
31
  ABTestVariation: state.ABTestVariation,
37
32
  }), isEqual);
38
33
  const ability = useContext(AbilityContext);
39
34
  const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
40
- const selectedProduct = product;
41
- const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
42
35
  const onSeverityChange = (payload) => {
43
36
  setCaseDetails(caseDispatch, payload);
44
37
  };
45
38
  const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
46
- // To check if the user is ESS Customer and Product has ESS Support
47
- const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
48
39
  return (React.createElement(React.Fragment, null,
49
40
  isBTestvariation && React.createElement(EARuleWidget, null),
50
41
  React.createElement("form", { className: "review-form card card-light push-bottom" },
@@ -71,6 +62,5 @@ export default function Review(props) {
71
62
  canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
72
63
  React.createElement(RHAssociatesSelector, null),
73
64
  React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
74
- React.createElement(Cep, null),
75
- isESSCustomer && React.createElement(ESSRemoteSessionCheck, null))));
65
+ React.createElement(Cep, null))));
76
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAQ,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAQ1E,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAwZ/C"}
1
+ {"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAQ,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAQ1E,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAUrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAsX/C"}
@@ -2,12 +2,12 @@ import { Env, publicApi } from '@cee-eng/hydrajs';
2
2
  import { ActionList, ActionListItem, Button, Icon, Text, TextVariants, Tooltip } from '@patternfly/react-core';
3
3
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
4
4
  import { AlertMessage, AlertType, formattedApiErrorMessage, SupportFeedbackForm, useFetch, } from '@rh-support/components';
5
- import { GlobalMetadataStateContext, useGlobalStateContext } from '@rh-support/react-context';
6
- import { getConfigField, getRedhatDotComHost, getUrlParsedParams, isSpecialSupportOfferingEnabled, PCM_CONFIG_FIELD_TYPE, PreviousCaseTypes, } from '@rh-support/utils';
5
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
6
+ import { getRedhatDotComHost, getUrlParsedParams, PreviousCaseTypes } from '@rh-support/utils';
7
7
  import find from 'lodash/find';
8
8
  import isEmpty from 'lodash/isEmpty';
9
9
  import isEqual from 'lodash/isEqual';
10
- import React, { useContext, useEffect, useState } from 'react';
10
+ import React, { useContext, useEffect } from 'react';
11
11
  import { Trans, useTranslation } from 'react-i18next';
12
12
  import { Link, useLocation } from 'react-router-dom';
13
13
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
@@ -20,14 +20,12 @@ import RouteUtils from '../../utils/routeUtils';
20
20
  import { AsideResults } from '../Recommendations/AsideResults';
21
21
  import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
22
22
  import InsightsResults from '../Recommendations/InsightsResults';
23
- import { RemoteRiderBanner } from '../RemoteRider/RemoteRiderBanner';
24
23
  import FileUploader from '../shared/fileUpload/FileUploader';
25
24
  import { isUploadingAttachment } from '../shared/fileUpload/reducer/AttachmentHelper';
26
25
  import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
27
26
  import Suggestions from '../Suggestions/Suggestions';
28
27
  export default function SubmitCase(props) {
29
- var _a;
30
- const { entitlementSla, severity, caseType, version, versionsDetails, addNotifiedUserError, isCreatingCase, caseCreationError, caseCreationErrorMessage, caseCreationErrorCode, caseCreation500ErrorStatus, selectedAccountDetails, caseNoOfCreatedCase, product, screenSessionRequested, phoneCountryCode, phoneAreaCodePrefixLineNumber, } = useCaseSelector((state) => ({
28
+ const { entitlementSla, severity, caseType, version, versionsDetails, addNotifiedUserError, isCreatingCase, caseCreationError, caseCreationErrorMessage, caseCreationErrorCode, caseCreation500ErrorStatus, caseNoOfCreatedCase, phoneCountryCode, phoneAreaCodePrefixLineNumber, } = useCaseSelector((state) => ({
31
29
  entitlementSla: state.caseDetails.entitlementSla,
32
30
  severity: state.caseDetails.severity,
33
31
  caseType: state.caseDetails.caseType,
@@ -39,10 +37,7 @@ export default function SubmitCase(props) {
39
37
  caseCreationErrorMessage: state.caseCreationErrorMessage,
40
38
  caseCreationErrorCode: state.caseCreationErrorCode,
41
39
  caseCreation500ErrorStatus: state.caseCreation500ErrorStatus,
42
- selectedAccountDetails: state.selectedAccountDetails,
43
40
  caseNoOfCreatedCase: state.caseNoOfCreatedCase,
44
- product: state.caseDetails.product,
45
- screenSessionRequested: state.caseDetails.screenSessionRequested,
46
41
  phoneCountryCode: state.caseDetails.phoneCountryCode,
47
42
  phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
48
43
  }), isEqual);
@@ -52,12 +47,9 @@ export default function SubmitCase(props) {
52
47
  const { rulesState } = useContext(RulesStateContext);
53
48
  const { clusterRecommendationsState: { clusterRecommendations }, } = useContext(ClusterRecommendationsContext);
54
49
  const { attachmentState } = useContext(AttachmentStateContext);
55
- const [isRemoteRiderBannerVisible, setIsRemoteRiderBannerVisible] = useState(true);
56
- const { globalMetadataState: { loggedInUser, loggedInUsersAccount, pcmConfig, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
50
+ const { globalMetadataState: { loggedInUser, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
57
51
  const getBusinessHours = useFetch(publicApi.businessHours.getBusinessHours);
58
52
  const { t } = useTranslation();
59
- const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
60
- const showRemoteRiderTermsInline = getConfigField(pcmConfig.data, 'showInlineRemoteRiderTerms', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
61
53
  const getCaseURL = () => {
62
54
  return `/support/cases/#/case/${caseNoOfCreatedCase}`;
63
55
  };
@@ -76,20 +68,8 @@ export default function SubmitCase(props) {
76
68
  getBusinessHours.request(loggedInUser.data.normalizedTZ);
77
69
  // eslint-disable-next-line react-hooks/exhaustive-deps
78
70
  }, []);
79
- const onRemoteRiderConfirm = () => { };
80
71
  const userEmail = loggedInUser.data.email;
81
- // To set the visibility of remote rider banner
82
- const onRemoteRiderClose = () => {
83
- setIsRemoteRiderBannerVisible(false);
84
- };
85
- // conditions to show Remote Rider banner
86
- const showRemoteRiderBanner = isRemoteRiderBannerVisible &&
87
- !loggedInUser.data.isInternal &&
88
- showRemoteRiderTermsInline &&
89
- !selectedAccountDetails.data.remoteSessionTermsAcked;
90
72
  const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
91
- // To check if the user is ESS Customer and Product has ESS Support
92
- const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, product);
93
73
  const queryParams = getUrlParsedParams(useLocation().search);
94
74
  const errorCode = queryParams === null || queryParams === void 0 ? void 0 : queryParams.caseCreationErrorCode; // to get errorCode from URL param
95
75
  //adding the caseNumber in url to access it after refresh
@@ -164,7 +144,6 @@ export default function SubmitCase(props) {
164
144
  React.createElement(AlertMessage, { className: "pf-v5-u-mt-lg", variant: AlertType.DANGER, show: caseCreationError || (!isCreatingCase && !caseCreationError && isEmpty(caseNoOfCreatedCase)), title: t("Sorry, we're experiencing an error"), isInline: true },
165
145
  React.createElement(React.Fragment, null, caseCreationErrorMessage)),
166
146
  !isCreatingCase && !caseCreationError && !isEmpty(caseNoOfCreatedCase) && (React.createElement(React.Fragment, null,
167
- !isESSCustomer && !screenSessionRequested && showRemoteRiderBanner && (React.createElement(RemoteRiderBanner, { onConfirm: onRemoteRiderConfirm, onClose: onRemoteRiderClose, caseNumber: caseNoOfCreatedCase, isSecureSupport: loggedInUsersAccount.data.secureSupport, loggedInUserRights: loggedInUserRights })),
168
147
  React.createElement("div", { className: "submit-case-header-container" },
169
148
  React.createElement("p", { className: "kicker kicker-sm pf-v5-u-mb-sm" }, !isEmpty(RouteUtils.seBasePath) &&
170
149
  !isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles) ? (React.createElement(React.Fragment, null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.5.18",
3
+ "version": "2.5.19",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "5e0ddc860b3afccd14a452087802d321b814f269"
137
+ "gitHead": "79d115a0feb8a565f0ddc66bda89b7735ffc3647"
138
138
  }