@rh-support/troubleshoot 2.4.5-beta.14 → 2.4.5-beta.15

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":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAsKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1 +1 @@
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,EAAa,MAAM,kBAAkB,CAAC;AAelE,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,qBAgXpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAclE,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,qBA2VpD"}
@@ -3,7 +3,6 @@ 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 { useGlobalStateContext } from '@rh-support/react-context';
7
6
  import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEventCaseStartStopped, formatDate, } from '@rh-support/utils';
8
7
  import differenceBy from 'lodash/differenceBy';
9
8
  import isEmpty from 'lodash/isEmpty';
@@ -18,7 +17,7 @@ import { RouteContext } from '../../context/RouteContext';
18
17
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
19
18
  import { getRecommendationObject } from '../../reducers/CaseHelpers';
20
19
  import { setCaseRecommendations } from '../../reducers/CaseReducer';
21
- import { fetchRecommendations, fetchWatsonXRecommendations, RecommendationsConstants, setCurrentPage, setVisibleDocs, } from '../../reducers/RecommendationsReducer';
20
+ import { fetchWatsonXRecommendations, RecommendationsConstants, setCurrentPage, setVisibleDocs, } from '../../reducers/RecommendationsReducer';
22
21
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
23
22
  import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
24
23
  import RouteUtils from '../../utils/routeUtils';
@@ -37,10 +36,7 @@ export default function Recommendations(props) {
37
36
  ABTestVarioation: state.ABTestVarioation,
38
37
  }), isEqual);
39
38
  const caseDispatch = useCaseDispatch();
40
- // Use Case Number
41
39
  const { caseNumber } = useParams();
42
- const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
43
- const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
44
40
  const { routeState: { activeSection }, } = useContext(RouteContext);
45
41
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
46
42
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
@@ -95,9 +91,7 @@ export default function Recommendations(props) {
95
91
  let controller = new AbortController();
96
92
  abortControllerRef.current = controller;
97
93
  if (!isEmpty(issue) || !isEmpty(summary)) {
98
- !loggedInUsersAccount.data.secureSupport
99
- ? fetchWatsonXRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, queryFilters, controller.signal)
100
- : fetchRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, caseNumber, isSecureSupportAccount, queryFilters, controller.signal);
94
+ fetchWatsonXRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, queryFilters, controller.signal);
101
95
  recommendationDispatch({
102
96
  type: RecommendationsConstants.userViewedDocs,
103
97
  payload: { userViewedDocs: true },
@@ -177,7 +171,7 @@ export default function Recommendations(props) {
177
171
  "% Match")));
178
172
  };
179
173
  return (React.createElement(React.Fragment, null,
180
- isBTestvariation && (React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) && !isEmpty(issue) })),
174
+ isBTestvariation && (React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) })),
181
175
  React.createElement("div", { className: "recommendation-list pf-v5-u-pt-md", ref: props.resultsRowRef },
182
176
  isATestvariation
183
177
  ? (recommendationState.visibleDocs.length !== 0 ||
@@ -198,8 +192,7 @@ export default function Recommendations(props) {
198
192
  : recommendationState.visibleDocs.length !== 0 && (React.createElement(Label, { color: "purple", className: "pf-v5-u-mb-md" },
199
193
  React.createElement(WatsonxAiIcon, { fillColor: "#6753ac", className: "pf-v5-u-mr-xs" }),
200
194
  React.createElement(Trans, null, "Live search results powered by OpenShift AI"))),
201
- isATestvariation && recommendationState.isLoadingRecommendations ? ( // as much as it pains me to add these <br /> the pf docs has it this way
202
- React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
195
+ isATestvariation && recommendationState.isLoadingRecommendations ? (React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
203
196
  var _a, _b;
204
197
  return (React.createElement("li", { className: "result", key: doc.id },
205
198
  React.createElement("header", { className: "result-header" },
@@ -216,11 +209,10 @@ export default function Recommendations(props) {
216
209
  }))),
217
210
  recommendationState.numFound !== 0 && recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
218
211
  React.createElement(Pagination, { className: "push-top", itemCount: (_c = (_b = recommendationState.allDocs) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, perPage: recPageSize, page: recommendationState.currentPage, variant: PaginationVariant.bottom, onSetPage: pageChanged, dropDirection: "up", onPerPageSelect: onPageSizeChanged })))),
219
- recommendationState.visibleDocs.length === 0 &&
212
+ recommendationState.numFound === 0 &&
220
213
  !recommendationState.isLoadingRecommendations &&
221
214
  !recommendationState.isLoadingRecommendationsError &&
222
215
  !isEmpty(issue) &&
223
- !isEmpty(summary) &&
224
216
  isEmpty(prevMainRecommendations) && (React.createElement("p", null,
225
217
  React.createElement(Trans, null, "We couldn't find any matches. Revise your search for better results.")))));
226
218
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAwGhD"}
1
+ {"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAqHhD"}
@@ -1,4 +1,6 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
+ import { Tooltip } from '@patternfly/react-core';
3
+ import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
2
4
  import { TopContentSearch } from '@rh-support/components';
3
5
  import { FeatureFlagKey, useIsFeatureAvailable } from '@rh-support/react-context';
4
6
  import isEqual from 'lodash/isEqual';
@@ -44,10 +46,13 @@ export default function Suggestions(props) {
44
46
  };
45
47
  return (React.createElement("div", { className: "top-content-suggestion-accordion" },
46
48
  showTitleDescription && (React.createElement("div", { className: "card card-support" },
47
- !isTCSearchEnabled && (React.createElement(Trans, null,
48
- React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" }, props.title
49
+ !isTCSearchEnabled && (React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" },
50
+ props.title
49
51
  ? props.title
50
- : t('i18nKeyPopularSolutions', 'Red Hat recommended results')))),
52
+ : t('i18nKeyPopularSolutions', 'Red Hat hand picked support articles'),
53
+ React.createElement(Tooltip, { content: React.createElement("div", null,
54
+ React.createElement(Trans, null, "Support articles are matched to the product and version details you selected, not the problem details you entered.")) },
55
+ React.createElement(InfoCircleIcon, { className: "pf-v5-u-ml-sm", "aria-label": t('More info about how support articles are matched') })))),
51
56
  isTCSearchEnabled && (React.createElement("div", { className: "card-body" },
52
57
  React.createElement(TopContentSearch, { topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true }))))),
53
58
  React.createElement("pfe-accordion", { ref: accordionRef }, map(filteredTC.slice(0, maxTC), (sug, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAuEzC;kBAvEQ,mBAAmB;;;AA0E5B,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAyFzC;kBAzFQ,mBAAmB;;;AA4F5B,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,5 @@
1
- import { Card, CardBody, CardHeader, CardTitle } from '@patternfly/react-core';
1
+ import { Card, CardBody, CardHeader, CardTitle, Tooltip } from '@patternfly/react-core';
2
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
2
3
  import { ErrorBoundary, LoadingDots } from '@rh-support/components';
3
4
  import { PreviousCaseTypes } from '@rh-support/utils';
4
5
  import isEmpty from 'lodash/isEmpty';
@@ -46,9 +47,12 @@ function TroubleshootSection(props) {
46
47
  !isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
47
48
  React.createElement(LoadingDots, { show: topContent.isFetching }),
48
49
  topContent.data.length === 0 && (React.createElement(Card, { id: "card", className: "card-support top-recommendations pf-v5-u-mb-md", isCompact: true },
49
- React.createElement(CardHeader, { "aria-label": t('Red Hat recommended results'), className: "popular-solutions" },
50
+ React.createElement(CardHeader, { "aria-label": t('Red Hat hand picked support articles'), className: "popular-solutions" },
50
51
  React.createElement(CardTitle, { id: "card-title", className: "card-title" },
51
- React.createElement(Trans, { i18nKey: 'i18nKeyPopularSolutions' }, "Red Hat recommended results"))),
52
+ React.createElement(Trans, { i18nKey: 'i18nKeyPopularSolutions' }, "Red Hat hand picked support articles"),
53
+ React.createElement(Tooltip, { content: React.createElement("div", null,
54
+ React.createElement(Trans, null, "Support articles are matched to the product and version details you selected, not the problem details you entered.")) },
55
+ React.createElement(InfoCircleIcon, { className: "pf-v5-u-ml-sm", "aria-label": "More info about how support articles are matched" })))),
52
56
  React.createElement(CardBody, { "aria-label": t('No recommendations for this product'), className: "file-recs-no-recommendation pf-v5-u-mt-md" },
53
57
  React.createElement(Trans, null, "No recommendations for this product")))),
54
58
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } }, canShowTopContent && !isEmpty(version) && React.createElement(Suggestions, null)),
@@ -1 +1 @@
1
- {"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAGH,eAAe,EAIlB,MAAM,iCAAiC,CAAC;AASzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;CACxC;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,qBA8DjC;kBA9DQ,WAAW;;;AAgEpB,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAGH,eAAe,EAKlB,MAAM,iCAAiC,CAAC;AAQzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;CACxC;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,qBAsDjC;kBAtDQ,WAAW;;;AAwDpB,eAAe,WAAW,CAAC"}
@@ -5,7 +5,7 @@ import isUndefined from 'lodash/isUndefined';
5
5
  import React, { useContext } from 'react';
6
6
  import { useCaseSelector } from '../../context/CaseContext';
7
7
  import { RouteContext } from '../../context/RouteContext';
8
- import { AppRouteSections, hideFileUploadSidebarWidgetSections, showSideBarClusterIdRuleWidgetSections, showSideBarEARuleWidgetSections, showSideBarFileRecommendationSections, } from '../../reducers/RouteConstNTypes';
8
+ import { AppRouteSections, hideFileUploadSidebarWidgetSections, showSideBarClusterIdRuleWidgetSections, showSideBarEARuleWidgetSections, showSideBarEARuleWidgetSectionsExperienceA, showSideBarFileRecommendationSections, } from '../../reducers/RouteConstNTypes';
9
9
  import { FileDiag } from '../CaseInformation/FileDiag';
10
10
  import { CveSidebar } from '../Cve/CveSidebar';
11
11
  import { AsideResults } from '../Recommendations/AsideResults';
@@ -23,18 +23,16 @@ function WizardAside(props) {
23
23
  isCveModalOpened: state.isCveModalOpened,
24
24
  ABTestVarioation: state.ABTestVarioation,
25
25
  }), isEqual);
26
- const isBTestvariation = ABTestVarioation === 'B';
26
+ const isATestvariation = ABTestVarioation === 'A';
27
27
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
28
28
  const canUseSessionManagement = ability.can(resourceActions.CREATE, resources.SESSION_TRACKING);
29
29
  const canShowFileUploadWidget = () => canAddAttachments &&
30
30
  !props.isAttachmentUploadModalOpen &&
31
31
  !isUndefined(activeSection) &&
32
32
  !hideFileUploadSidebarWidgetSections.includes(activeSection);
33
- const canShowEARuleWidget = isBTestvariation
34
- ? showSideBarEARuleWidgetSections.includes(activeSection)
35
- : showSideBarEARuleWidgetSections.includes(activeSection) ||
36
- activeSection === AppRouteSections.SUMMARIZE ||
37
- activeSection === AppRouteSections.REVIEW;
33
+ const canShowEARuleWidget = isATestvariation
34
+ ? showSideBarEARuleWidgetSectionsExperienceA.includes(activeSection)
35
+ : showSideBarEARuleWidgetSections.includes(activeSection);
38
36
  const canShowClusterIdReportWidget = showSideBarClusterIdRuleWidgetSections.includes(activeSection);
39
37
  const canShowFileRecommendationSectionsWidget = showSideBarFileRecommendationSections.includes(activeSection);
40
38
  return (React.createElement("aside", null,
@@ -187,7 +187,7 @@ function WizardNavigation(props) {
187
187
  return value;
188
188
  }
189
189
  else if (isATestvariation && !isCaseCreate) {
190
- let value = (!props.userSeenRecommendations && props.activeStep.id === AppRouteSections.TROUBLESHOOT) ||
190
+ let value = (!props.userSeenRecommendations && props.activeStep.id === AppRouteSections.SUMMARIZE) ||
191
191
  (!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
192
192
  (!isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
193
193
  noValidEntitlement;
@@ -1 +1 @@
1
- {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AAmCA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAsSb,OAAO;EAwC7C"}
1
+ {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAwQb,OAAO;EAwC7C"}
@@ -1,13 +1,9 @@
1
1
  import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
2
- import { ability } from '@rh-support/user-permissions/lib/esm/AuthFramework';
3
- import { CaseListFields, resourceActions, resources } from '@rh-support/user-permissions/lib/esm/enums';
4
2
  import { PreviousCaseTypes } from '@rh-support/utils';
5
3
  import isEmpty from 'lodash/isEmpty';
6
4
  import isEqual from 'lodash/isEqual';
7
5
  import React, { Suspense, useContext } from 'react';
8
6
  import { Trans, useTranslation } from 'react-i18next';
9
- import { AccountSelector } from '../components/AccountInfo/AccountSelector';
10
- import { OwnerSelector } from '../components/AccountInfo/OwnerSelector';
11
7
  import CaseInformation from '../components/CaseInformation/CaseInformation';
12
8
  import CaseManagement from '../components/CaseManagement/CaseManagement';
13
9
  import IdeaInformation from '../components/IdeaInformation/IdeaInformation';
@@ -56,59 +52,37 @@ export function useWizard(routeProps, props) {
56
52
  let summarizeNextButtonLabelLogic = () => {
57
53
  return props.userScrolledLabel;
58
54
  };
59
- const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
60
- const summarizeButtonLabel = () => {
61
- if (isCaseCreate) {
62
- const shouldContinue = (summarizeNextButtonLabelLogic() || ((props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) && numFound < 3)) &&
63
- !isEmpty(issue);
64
- return shouldContinue ? t('Continue') : t('See more options');
65
- }
66
- else {
67
- return t('Continue');
68
- }
69
- };
70
- const informationButtonLabel = () => {
71
- if (!isCaseCreate) {
72
- (summarizeNextButtonLabelLogic() || ((props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) && numFound < 3)) &&
73
- !isEmpty(issue) // do this so that when user refreshes tab and state persists we don't cause edge 'continue' render
74
- ? t('Continue')
75
- : t('See more options');
76
- }
77
- else {
78
- return t('Continue');
79
- }
80
- };
81
55
  // components that are used in wizard steps
82
56
  const appRouteConfugurations = {
83
57
  [AppRouteSections.GET_SUPPORT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.GET_SUPPORT, name: t('Get support'), component: (React.createElement(MainSection, { stepNumber: 1, totalSteps: 6, section: AppRouteSections.GET_SUPPORT, title: t('Why are you opening a case?'), description: t('Select the best category for your issue.') },
84
58
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
85
59
  alertMessage(),
86
60
  React.createElement(OpenCase, { routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef })))), canJumpTo: isSectionValidFn(AppRouteSections.GET_SUPPORT) || activeSection === AppRouteSections.GET_SUPPORT }),
87
- [AppRouteSections.SUMMARIZE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.SUMMARIZE, name: t('Summarize'), component: (React.createElement(MainSection, { stepNumber: 2, totalSteps: 6, section: AppRouteSections.SUMMARIZE, title: t('What are you having an issue with?') },
61
+ [AppRouteSections.SUMMARIZE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.SUMMARIZE, name: isCaseCreate ? t('Summarize') : t('Troubleshoot'), component: (React.createElement(MainSection, { stepNumber: 2, totalSteps: 6, section: AppRouteSections.SUMMARIZE, title: t('What are you having an issue with?') },
88
62
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
89
63
  alertMessage(),
90
- canChangeAccountInfo && !isCaseCreate && (React.createElement(React.Fragment, null,
91
- React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
92
- React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
93
- React.createElement(ProductSelector, { routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: false, caseCreateExperience: isCaseCreate })))), canJumpTo: isSectionValidFn(AppRouteSections.SUMMARIZE) || activeSection === AppRouteSections.SUMMARIZE, nextButtonLabel: summarizeButtonLabel() }),
94
- [AppRouteSections.TROUBLESHOOT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.TROUBLESHOOT, name: t('Troubleshoot'), component: (React.createElement(MainSection, { stepNumber: 3, totalSteps: 6, section: AppRouteSections.TROUBLESHOOT, title: t('Recommendations') },
64
+ React.createElement(ProductSelector, { routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: false, caseCreateExperience: isCaseCreate })))), canJumpTo: isSectionValidFn(AppRouteSections.SUMMARIZE) || activeSection === AppRouteSections.SUMMARIZE, nextButtonLabel: (summarizeNextButtonLabelLogic() || ((props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) && numFound < 3)) &&
65
+ !isEmpty(issue) // do this so that when user refreshes tab and state persists we don't cause edge 'continue' render
66
+ ? t('Continue')
67
+ : t('See more options') }),
68
+ [AppRouteSections.TROUBLESHOOT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.TROUBLESHOOT, name: isCaseCreate ? t('Resources') : t('Resources'), component: (React.createElement(MainSection, { stepNumber: 3, totalSteps: 6, section: AppRouteSections.TROUBLESHOOT, title: t('Recommendations') },
95
69
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
96
70
  alertMessage(),
97
71
  React.createElement(TroubleshootSection, null)))), canJumpTo: isSectionValidFn(AppRouteSections.TROUBLESHOOT || activeSection === AppRouteSections.TROUBLESHOOT) &&
98
72
  (props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) &&
99
- (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: informationButtonLabel() }),
100
- [AppRouteSections.DESCRIBE_MORE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_MORE, name: t('Describe more'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.DESCRIBE_MORE, title: React.createElement(React.Fragment, null,
73
+ (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isCaseCreate ? t('Continue') : t('Convert to Case') }),
74
+ [AppRouteSections.DESCRIBE_MORE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_MORE, name: t('Additional information'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.DESCRIBE_MORE, title: React.createElement(React.Fragment, null,
101
75
  t('Case information'),
102
76
  isEmpty(RouteUtils.seBasePath) && isSelectedAccounntSecureSupport && (React.createElement("span", { className: "secured-support" },
103
77
  React.createElement(Trans, null, "Secured Support")))), description: t('Provide the details of your issue.') },
104
78
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
105
79
  alertMessage(),
106
80
  React.createElement(CaseInformation, { routeProps: routeProps })))), canJumpTo: isSectionValidFn(AppRouteSections.DESCRIBE_MORE) || activeSection === AppRouteSections.DESCRIBE_MORE }),
107
- [AppRouteSections.DESCRIBE_IDEA]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_IDEA, name: t('Describe more'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.DESCRIBE_IDEA, title: t('Idea information'), description: t("We'll be in contact with you shortly. Look for updates on this case.") },
81
+ [AppRouteSections.DESCRIBE_IDEA]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_IDEA, name: t('Additional Information'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.DESCRIBE_IDEA, title: t('Idea information'), description: t("We'll be in contact with you shortly. Look for updates on this case.") },
108
82
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
109
83
  alertMessage(),
110
84
  React.createElement(IdeaInformation, null)))), canJumpTo: isSectionValidFn(AppRouteSections.DESCRIBE_IDEA) || activeSection === AppRouteSections.DESCRIBE_IDEA, nextButtonLabel: 'Submit', disableOtherSections: false }),
111
- [AppRouteSections.MANAGEMENT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.MANAGEMENT, name: t('Management'), component: (React.createElement(MainSection, { stepNumber: 5, totalSteps: 6, section: AppRouteSections.MANAGEMENT, title: t('Case management'), descriptionClassName: "text-medium-grey" },
85
+ [AppRouteSections.MANAGEMENT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.MANAGEMENT, name: t('Configuration'), component: (React.createElement(MainSection, { stepNumber: 5, totalSteps: 6, section: AppRouteSections.MANAGEMENT, title: t('Case management'), descriptionClassName: "text-medium-grey" },
112
86
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
113
87
  alertMessage(),
114
88
  React.createElement(CaseManagement, null)))), canJumpTo: isSectionValidFn(AppRouteSections.MANAGEMENT) || activeSection === AppRouteSections.MANAGEMENT }),
@@ -46,6 +46,7 @@ export declare const sessionRestoreCardSections: AppRouteSections[];
46
46
  export declare const hideFileUploadSidebarWidgetSections: AppRouteSections[];
47
47
  export declare const showSidebarRecommendationsSections: AppRouteSections[];
48
48
  export declare const showSideBarEARuleWidgetSections: AppRouteSections[];
49
+ export declare const showSideBarEARuleWidgetSectionsExperienceA: AppRouteSections[];
49
50
  export declare const showSideBarClusterIdRuleWidgetSections: AppRouteSections[];
50
51
  export declare const showSideBarFileRecommendationSections: AppRouteSections[];
51
52
  export declare const hideSideBarClusterIdRuleToast: AppRouteSections[];
@@ -1 +1 @@
1
- {"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,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;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAIxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,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W;IACjB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;CAClB;AAKD,eAAO,MAAM,4BAA4B,EAAE,gBAAgB,EAI1D,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,gBAAgB,EAK9D,CAAC;AAEF,eAAO,MAAM,iCAAiC,oBAQ7C,CAAC;AAEF,eAAO,MAAM,gCAAgC,oBAQ5C,CAAC;AAEF,eAAO,MAAM,4BAA4B,oBAQxC,CAAC;AAGF,eAAO,MAAM,0BAA0B,oBAAiC,CAAC;AAEzE,eAAO,MAAM,mCAAmC,oBAA+D,CAAC;AAEhH,eAAO,MAAM,kCAAkC,oBAO9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAM3C,CAAC;AAEF,eAAO,MAAM,0CAA0C,oBAQtD,CAAC;AAEF,eAAO,MAAM,sCAAsC,oBAAyD,CAAC;AAE7G,eAAO,MAAM,qCAAqC,oBAAgE,CAAC;AAEnH,eAAO,MAAM,6BAA6B,oBAAiC,CAAC;AAE5E,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAKtD,CAAC"}
@@ -69,6 +69,15 @@ export const showSideBarEARuleWidgetSections = [
69
69
  AppRouteSections.MANAGEMENT,
70
70
  AppRouteSections.GET_SUPPORT,
71
71
  ];
72
+ export const showSideBarEARuleWidgetSectionsExperienceA = [
73
+ AppRouteSections.SUMMARIZE,
74
+ AppRouteSections.DESCRIBE_MORE,
75
+ AppRouteSections.DESCRIBE_IDEA,
76
+ AppRouteSections.TROUBLESHOOT,
77
+ AppRouteSections.MANAGEMENT,
78
+ AppRouteSections.GET_SUPPORT,
79
+ AppRouteSections.REVIEW,
80
+ ];
72
81
  export const showSideBarClusterIdRuleWidgetSections = [AppRouteSections.MANAGEMENT, AppRouteSections.REVIEW];
73
82
  export const showSideBarFileRecommendationSections = [AppRouteSections.DESCRIBE_MORE, AppRouteSections.MANAGEMENT];
74
83
  export const hideSideBarClusterIdRuleToast = [AppRouteSections.SUBMIT_CASE];
@@ -1111,7 +1111,7 @@ svg.pf-v5-u-ml-xs.icon-size {
1111
1111
  }
1112
1112
 
1113
1113
  #DeepPurpleColorAILabel {
1114
- background-color: #6600cc !important;
1114
+ background-color: #5e40be !important;
1115
1115
  position: relative;
1116
1116
  display: inline-block;
1117
1117
  z-index: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.4.5-beta.14",
3
+ "version": "2.4.5-beta.15",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -94,6 +94,7 @@
94
94
  "timers": "^0.1.1"
95
95
  },
96
96
  "devDependencies": {
97
+ "@testing-library/dom": "^10.4.0",
97
98
  "@testing-library/jest-dom": "^6.2.0",
98
99
  "@testing-library/react": "^14.1.2",
99
100
  "@testing-library/user-event": "^14.5.1",
@@ -134,5 +135,5 @@
134
135
  "defaults and supports es6-module",
135
136
  "maintained node versions"
136
137
  ],
137
- "gitHead": "3f3896032774c8fb5cd4fd01d4854b4594881c3c"
138
+ "gitHead": "246b3e514e1c0a504a285518810ca94f1b5690ce"
138
139
  }