@rh-support/troubleshoot 2.5.33 → 2.5.36

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":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EA4HnC,CAAC"}
1
+ {"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EAqInC,CAAC"}
@@ -2,18 +2,24 @@ import { Button, ButtonVariant, List, ListItem, Popover } from '@patternfly/reac
2
2
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
3
  import { useCanEditCase } from '@rh-support/react-context';
4
4
  import { Can, resourceActions, resources } from '@rh-support/user-permissions';
5
+ import isEqual from 'lodash/isEqual';
5
6
  import React, { forwardRef, useState } from 'react';
6
7
  import { Trans, useTranslation } from 'react-i18next';
8
+ import { useCaseSelector } from '../../../context/CaseContext';
7
9
  import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
8
10
  import { RequestEscalationModal } from './RequestEscalationModal';
9
11
  export const ActiveCustomerEscalation = forwardRef((props, ref) => {
10
12
  const { t } = useTranslation();
11
13
  const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
14
+ const { customerEscalation } = useCaseSelector((state) => ({
15
+ customerEscalation: state.customerEscalation,
16
+ }), isEqual);
12
17
  const canEditCase = useCanEditCase();
13
18
  const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
14
19
  const commonElements = (React.createElement(React.Fragment, null,
15
20
  React.createElement("p", null,
16
21
  React.createElement(Trans, null, "After submitting, your case will be reviewed by a support manager."))));
22
+ const onAceBtnClick = () => window.open(`/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, '_blank', 'noopener noreferrer');
17
23
  const isInternalElements = (React.createElement("div", { className: "card card-white card-support escalations", ref: ref },
18
24
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading card-header-bg" },
19
25
  React.createElement(Trans, null, "Active Customer Escalation (ACE)"),
@@ -28,7 +34,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
28
34
  React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
29
35
  React.createElement(ListItem, null, t('The customer wants a new resource')),
30
36
  React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
31
- React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, className: "pf-v5-c-button pf-m-tertiary", target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))));
37
+ React.createElement(Button, { className: "pf-v5-c-button pf-m-tertiary", onClick: onAceBtnClick, "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation'), isDisabled: customerEscalation }, t('Request an escalation')))));
32
38
  const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
33
39
  const toggleModal = () => {
34
40
  if (canEditCase.alert())
@@ -1 +1 @@
1
- {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAgBA,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,qBAsMzC"}
1
+ {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAiBA,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,qBAsMzC"}
@@ -9,7 +9,7 @@ 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 { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, dtmTrackEventRecommendationListingItemClicked, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
12
+ import { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, dtmTrackEventContentListingItemClicked, getRecommendationTitle, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import isEqual from 'lodash/isEqual';
15
15
  import React, { useContext, useEffect, useRef } from 'react';
@@ -44,7 +44,7 @@ export function AsideResults(props) {
44
44
  const { recommendationState } = useContext(RecommendationStateContext);
45
45
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
46
46
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
47
- const { routeState: { activeSection }, } = useContext(RouteContext);
47
+ const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
48
48
  const PAGE_SIZE = 5;
49
49
  const payload = JSON.stringify({
50
50
  product: product,
@@ -119,7 +119,7 @@ export function AsideResults(props) {
119
119
  return;
120
120
  const rank = index + 1 + PAGE_SIZE * ((recommendationState.currentPage || 1) - 1);
121
121
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS_ASIDE, [getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1)], payload);
122
- dtmTrackEventRecommendationListingItemClicked(window.location.href, activeSection, 'middle', doc.id, rank, doc.allTitle, doc.view_uri, 'Recommendation Aside', 'Live troubleshooting powered by OpenShift AI');
122
+ dtmTrackEventContentListingItemClicked(window.location.href, doc.id, rank, doc.allTitle, doc.view_uri, getRecommendationTitle(doc), 'Recommendation Aside', 'Articles recommended by OpenShift AI', isCaseCreate);
123
123
  };
124
124
  useEffect(() => {
125
125
  if (isSelectedAccounntSecureSupport)
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYpF,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,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAuZpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYpF,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,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAyYpD"}
@@ -3,7 +3,7 @@ import { Label, Pagination, PaginationVariant, Popover, Spinner } from '@pattern
3
3
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
4
4
  import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
5
5
  import { LoadingDots, useDebounce, usePrevious } from '@rh-support/components';
6
- import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEventRecommendationListingDisplayed, dtmTrackEventRecommendationListingItemClicked, formatDate, getRecommendationTitle, } from '@rh-support/utils';
6
+ import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEventContentListingItemClicked, formatDate, getRecommendationTitle, } from '@rh-support/utils';
7
7
  import differenceBy from 'lodash/differenceBy';
8
8
  import find from 'lodash/find';
9
9
  import isEmpty from 'lodash/isEmpty';
@@ -128,18 +128,6 @@ export default function Recommendations(props) {
128
128
  setCaseRecommendations(caseDispatch, recommendationState.visibleDocs, caseResourceLinks);
129
129
  }
130
130
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, getSessResFromRecs(recommendationState.visibleDocs, SessionResourceVisibility.PRESENTED, pageSize || DEFAULTPAGESIZE, recommendationState.currentPage || 1), typeof payload === 'string' ? payload : JSON.stringify(payload));
131
- const listing = recommendationState.visibleDocs.map((doc, i) => ({
132
- content: {
133
- contentID: doc.id,
134
- contentPosition: i + 1,
135
- contentTitle: doc.publishedTitle,
136
- contentUrl: doc.view_uri,
137
- displayFeature: 'Troubleshooting',
138
- displayFeatureTitle: '',
139
- },
140
- isDisplayed: true,
141
- }));
142
- dtmTrackEventRecommendationListingDisplayed('middle', activeSection, listing, recommendationState.numFound);
143
131
  // eslint-disable-next-line react-hooks/exhaustive-deps
144
132
  }, [caseDispatch, recommendationState.visibleDocs, activeSessionId]);
145
133
  useEffect(() => {
@@ -168,7 +156,7 @@ export default function Recommendations(props) {
168
156
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [
169
157
  getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1)),
170
158
  ], typeof payload === 'string' ? payload : JSON.stringify(payload));
171
- dtmTrackEventRecommendationListingItemClicked(window.location.href, activeSection, 'middle', doc.id, rank, doc.allTitle, doc.view_uri, 'Main Recommendation', 'Live search results powered by OpenShift AI');
159
+ dtmTrackEventContentListingItemClicked(window.location.href, doc.id, rank, doc.allTitle, doc.view_uri, getRecommendationTitle(doc), 'Main Recommendation', 'Live troubleshooting powered by OpenShift AI', isCaseCreate);
172
160
  };
173
161
  const infoPopover = (React.createElement(Popover, { triggerAction: "hover", "aria-label": "Hoverable popover", headerContent: React.createElement("div", null,
174
162
  React.createElement(Trans, null, "Powered by Openshift AI")), bodyContent: React.createElement("div", null,
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAsIhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgJhC;AACD,eAAe,UAAU,CAAC"}
@@ -5,8 +5,10 @@ import React, { Suspense, useContext, useRef, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Route } from 'react-router-dom';
7
7
  import { useCaseSelector } from '../../context/CaseContext';
8
+ import { RecommendationDispatchContext } from '../../context/RecommendationContext';
8
9
  import { RouteDispatchContext } from '../../context/RouteContext';
9
10
  import { useWizard } from '../../hooks/useWizard';
11
+ import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
10
12
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
11
13
  import { setActiveSectionChanged, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
12
14
  import RouteUtils from '../../utils/routeUtils';
@@ -16,6 +18,7 @@ import NewFeatureModal from './NewFeatureModal';
16
18
  import WizardNavigation from './WizardNavigation';
17
19
  function WizardMain(props) {
18
20
  const [showRestFlag, setShowRestFlag] = useState(false);
21
+ const recommendationDispatch = useContext(RecommendationDispatchContext);
19
22
  const { isCreatingCase } = useCaseSelector((state) => ({
20
23
  isCreatingCase: state.isCreatingCase,
21
24
  }), isEqual);
@@ -48,6 +51,15 @@ function WizardMain(props) {
48
51
  RouteUtils.navigateToSection(props.routeProps, `${props.routeProps.location.pathname}/${step.id}`, false);
49
52
  };
50
53
  const onBack = (step, prevStep) => {
54
+ // isLoadingRecommendations needs to be set to false on back when the previous step is the summary
55
+ // step because it can cause the next button to be permanently disabled if the debounce is not called
56
+ // before going back a step. This can be caused if navigating quickly to then away from the recommendations page.
57
+ if (prevStep.prevId === AppRouteSections.SUMMARIZE) {
58
+ recommendationDispatch({
59
+ type: RecommendationsConstants.setIsLoadingRecommendations,
60
+ payload: { isLoadingRecommendations: false },
61
+ });
62
+ }
51
63
  var regex = new RegExp('/' + prevStep.prevId + '$');
52
64
  RouteUtils.navigateToSection(props.routeProps, props.routeProps.location.pathname.replace(regex, ''), false);
53
65
  };
@@ -113,10 +113,20 @@ button,
113
113
  word-break: break-word;
114
114
  }
115
115
 
116
+ .support-comment .comment-body ul {
117
+ list-style: '-';
118
+ }
119
+
116
120
  .support-comment .comment-body blockquote {
117
121
  border-left: 5px solid #c0c0c0 !important;
118
122
  }
119
123
 
124
+ #case-description ul {
125
+ list-style: '-';
126
+ padding-left: 1rem;
127
+ line-height: 1rem;
128
+ }
129
+
120
130
  .support-comment footer {
121
131
  display: -ms-flexbox;
122
132
  display: flex;
@@ -308,6 +318,7 @@ input[aria-invalid='true'].pf-v5-c-form-control {
308
318
  .comment-body ul,
309
319
  .markdown-preview ul {
310
320
  list-style: '- ';
321
+ padding-left: 1.5em;
311
322
  }
312
323
 
313
324
  /* Improves the sidebar loading */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.5.33",
3
+ "version": "2.5.36",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -58,11 +58,11 @@
58
58
  "@progress/kendo-licensing": "1.3.5",
59
59
  "@progress/kendo-react-pdf": "^5.16.0",
60
60
  "@redux-devtools/extension": "^3.3.0",
61
- "@rh-support/components": "2.5.15",
62
- "@rh-support/react-context": "2.5.17",
61
+ "@rh-support/components": "2.5.17",
62
+ "@rh-support/react-context": "2.5.19",
63
63
  "@rh-support/types": "2.0.5",
64
- "@rh-support/user-permissions": "2.5.9",
65
- "@rh-support/utils": "2.5.8",
64
+ "@rh-support/user-permissions": "2.5.11",
65
+ "@rh-support/utils": "2.5.10",
66
66
  "@types/react-redux": "^7.1.33",
67
67
  "@types/redux": "^3.6.0",
68
68
  "date-fns": "3.6.0",
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "25dc755c973c1fd3169c76df597839acb07dde64"
137
+ "gitHead": "269e160216d2acd58357f6875a9855b4e11b262b"
138
138
  }