@rh-support/troubleshoot 2.4.5-beta.10 → 2.4.5-beta.12

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.
Files changed (52) hide show
  1. package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
  2. package/lib/esm/components/CaseInformation/Description.js +2 -3
  3. package/lib/esm/components/Cve/CveItem.d.ts +2 -0
  4. package/lib/esm/components/Cve/CveItem.d.ts.map +1 -1
  5. package/lib/esm/components/Cve/CveItem.js +70 -17
  6. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  7. package/lib/esm/components/Cve/CveModal.js +5 -3
  8. package/lib/esm/components/Cve/CvePanel.js +1 -1
  9. package/lib/esm/components/Cve/CveSidebar.d.ts.map +1 -1
  10. package/lib/esm/components/Cve/CveSidebar.js +1 -2
  11. package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
  12. package/lib/esm/components/OpenCase/OpenCase.js +4 -3
  13. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  14. package/lib/esm/components/ProductSelector/AllProductsSelector.js +41 -28
  15. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  16. package/lib/esm/components/ProductSelector/ProductSelector.js +25 -21
  17. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  18. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +6 -1
  19. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  20. package/lib/esm/components/Recommendations/Recommendations.js +26 -21
  21. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  22. package/lib/esm/components/Review/Review.js +4 -2
  23. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  24. package/lib/esm/components/SessionRestore/SessionRestore.js +4 -2
  25. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  26. package/lib/esm/components/shared/useIsSectionValid.js +52 -14
  27. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  28. package/lib/esm/components/wizardLayout/WizardAside.js +9 -4
  29. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  30. package/lib/esm/components/wizardLayout/WizardLayout.js +19 -3
  31. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  32. package/lib/esm/components/wizardLayout/WizardNavigation.js +23 -7
  33. package/lib/esm/hooks/useFetchCVEData.d.ts.map +1 -1
  34. package/lib/esm/hooks/useFetchCVEData.js +14 -7
  35. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  36. package/lib/esm/hooks/useWizard.js +23 -5
  37. package/lib/esm/models/caseCreationWorkflows.d.ts +2 -0
  38. package/lib/esm/models/caseCreationWorkflows.d.ts.map +1 -1
  39. package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -1
  40. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  41. package/lib/esm/reducers/CaseConstNTypes.js +2 -0
  42. package/lib/esm/reducers/CaseReducer.d.ts +1 -0
  43. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  44. package/lib/esm/reducers/CaseReducer.js +9 -0
  45. package/lib/esm/reducers/SessionRestoreReducer.d.ts +7 -4
  46. package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
  47. package/lib/esm/reducers/SessionRestoreReducer.js +25 -12
  48. package/lib/esm/scss/_main.scss +49 -0
  49. package/lib/esm/utils/caseUtils.d.ts +13 -1
  50. package/lib/esm/utils/caseUtils.d.ts.map +1 -1
  51. package/lib/esm/utils/caseUtils.js +32 -5
  52. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAoKhD"}
1
+ {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAgKhD"}
@@ -12,8 +12,7 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
12
12
  import { setCaseDetails } from '../../reducers/CaseReducer';
13
13
  export default function Description(props) {
14
14
  const { t } = useTranslation();
15
- const { issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, summary, version } = useCaseSelector((state) => ({
16
- summary: state.caseDetails.summary,
15
+ const { issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, version } = useCaseSelector((state) => ({
17
16
  description: state.caseDetails.description,
18
17
  issue: state.caseDetails.issue,
19
18
  environment: state.caseDetails.environment,
@@ -77,7 +76,7 @@ export default function Description(props) {
77
76
  isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
78
77
  React.createElement(Popover, { isVisible: isOpen, shouldClose: handleClose, headerContent: headerPopoverContent, bodyContent: PopoverContent },
79
78
  React.createElement(OutlinedQuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", onClick: handleToggle }))))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
80
- React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${(isEmpty(summary) || isEmpty(version)) && isEmpty(issue) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: (isEmpty(summary) || isEmpty(version)) && isEmpty(issue), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t(`The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ? 10 : 4, ref: textAreaRef, onClick: handleTextAreaClick }),
79
+ React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) && isEmpty(issue) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) && isEmpty(issue), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t(`The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ? 10 : 4, ref: textAreaRef, onClick: handleTextAreaClick }),
81
80
  React.createElement("p", { className: "form-instructions pf-v5-u-danger-color-100", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT
82
81
  ? `This description exceeds ${CASE_DETAILS_ISSUE_LIMIT} characters. Try shortening it.`
83
82
  : ''}`)));
@@ -2,6 +2,8 @@ import React from 'react';
2
2
  import { ICVEWorkflowRecommendation } from '../../models/caseCreationWorkflows';
3
3
  interface IProp {
4
4
  cve: ICVEWorkflowRecommendation;
5
+ isExpanded: boolean;
6
+ index: number;
5
7
  }
6
8
  export declare const CveItem: (props: IProp) => React.JSX.Element;
7
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"CveItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveItem.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,UAAU,KAAK;IACX,GAAG,EAAE,0BAA0B,CAAC;CACnC;AAID,eAAO,MAAM,OAAO,UAAW,KAAK,sBA2InC,CAAC"}
1
+ {"version":3,"file":"CveItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveItem.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,oCAAoC,CAAC;AAShG,UAAU,KAAK;IACX,GAAG,EAAE,0BAA0B,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,OAAO,UAAW,KAAK,sBA2NnC,CAAC"}
@@ -1,45 +1,94 @@
1
+ import { pcm } from '@cee-eng/hydrajs';
1
2
  import { Button, Flex, FlexItem, Label, LabelGroup, Text, TextVariants } from '@patternfly/react-core';
2
3
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
3
4
  import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon';
4
5
  import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
5
- import { format } from 'date-fns';
6
+ import { format, isValid, parseISO } from 'date-fns';
6
7
  import DOMPurify from 'dompurify';
7
8
  import isEmpty from 'lodash/isEmpty';
8
9
  import isEqual from 'lodash/isEqual';
9
10
  import map from 'lodash/map';
10
11
  import slice from 'lodash/slice';
11
- import React from 'react';
12
+ import React, { useContext, useEffect } from 'react';
12
13
  import { Trans } from 'react-i18next';
13
14
  import { useCaseSelector } from '../../context/CaseContext';
15
+ import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
16
+ import { createOrUpdateSessionResources, getSessResFromCve, getSessResFromErrata, } from '../../reducers/SessionRestoreReducer';
17
+ import RouteUtils from '../../utils/routeUtils';
18
+ const { SessionResourceVisibility, SessionResourceWorkflowComponent, SessionResourceSource } = pcm.preCase.session;
14
19
  const sanitize = (html) => ({ __html: DOMPurify.sanitize(html) });
20
+ function formatDate(dateString) {
21
+ const date = parseISO(dateString);
22
+ if (isValid(date)) {
23
+ return format(date, 'MMM dd, yyyy');
24
+ }
25
+ else {
26
+ return dateString;
27
+ }
28
+ }
15
29
  export const CveItem = (props) => {
16
- const { cve } = props;
17
- const { isCveModalOpened } = useCaseSelector((state) => ({
30
+ var _a, _b;
31
+ const { cve, isExpanded, index } = props;
32
+ const { product, version, summary, issue, isCveModalOpened } = useCaseSelector((state) => ({
33
+ product: state.caseDetails.product,
34
+ version: state.caseDetails.version,
35
+ summary: state.caseDetails.summary,
36
+ issue: state.caseDetails.issue,
18
37
  isCveModalOpened: state.isCveModalOpened,
19
38
  }), isEqual);
20
- const renderDate = () => (React.createElement("div", { className: "pf-v5-u-disabled-color-100" },
39
+ const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
40
+ const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
41
+ const workflowSource = `${cve.title}-${isCveModalOpened ? 'model' : 'aside'}`;
42
+ useEffect(() => {
43
+ if (isExpanded) {
44
+ onPresentOrVisitedCveErrataData();
45
+ }
46
+ // eslint-disable-next-line react-hooks/exhaustive-deps
47
+ }, [isExpanded]);
48
+ const updateSessionDb = (resources) => {
49
+ const payload = {
50
+ product: product,
51
+ version: version,
52
+ summary: summary,
53
+ description: issue,
54
+ };
55
+ createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.DRUPAL, resources, JSON.stringify(payload), workflowSource);
56
+ };
57
+ const onClickErrataLink = (errataDetails, index = 0) => {
58
+ updateSessionDb([
59
+ getSessResFromErrata(errataDetails, SessionResourceVisibility.VISITED, index + 1, isCveModalOpened
60
+ ? SessionResourceWorkflowComponent.CVE_MODEl
61
+ : SessionResourceWorkflowComponent.CVE_ASIDE),
62
+ ]);
63
+ };
64
+ const onPresentOrVisitedCveErrataData = (isVisited = false) => {
65
+ updateSessionDb(getSessResFromCve(cve, isVisited ? SessionResourceVisibility.VISITED : SessionResourceVisibility.PRESENTED, index + 1, isCveModalOpened
66
+ ? SessionResourceWorkflowComponent.CVE_MODEl
67
+ : SessionResourceWorkflowComponent.CVE_ASIDE, isVisited ? true : false, isCveModalOpened ? 3 : 2));
68
+ };
69
+ const renderDate = () => (cve === null || cve === void 0 ? void 0 : cve.publicDate) && (React.createElement("div", { className: "pf-v5-u-disabled-color-100" },
21
70
  React.createElement(Trans, null, "Public on"),
22
71
  " - ",
23
- format(cve === null || cve === void 0 ? void 0 : cve.publicDate, 'MMM dd, yyyy')));
72
+ formatDate(cve.publicDate)));
24
73
  const renderLabels = () => (React.createElement(LabelGroup, { defaultIsOpen: true, numLabels: 10 },
25
74
  React.createElement(Label, { color: "green", isCompact: true, icon: React.createElement(StarIcon, null) },
26
75
  React.createElement(Trans, null, "Exact match")),
27
- React.createElement(Label, { color: cve.severity === 'Critical'
76
+ !isEmpty(cve === null || cve === void 0 ? void 0 : cve.severity) && (React.createElement(Label, { color: cve.severity === 'Critical'
28
77
  ? 'red'
29
78
  : cve.severity === 'Important'
30
- ? 'orange'
79
+ ? 'blue'
31
80
  : cve.severity === 'Moderate'
32
- ? 'gold'
33
- : undefined, isCompact: true }, cve.severity),
81
+ ? 'orange'
82
+ : undefined, isCompact: true }, cve.severity)),
34
83
  !isEmpty(cve.errataData) && (React.createElement(Label, { color: "blue", isCompact: true },
35
84
  React.createElement(Trans, null, "Fixed"))),
36
85
  !isEmpty(cve.mitigation) && (React.createElement(Label, { isCompact: true },
37
- React.createElement(Trans, null, "Mitigation available")))));
86
+ React.createElement(Trans, { color: "blue" }, "Mitigation available")))));
38
87
  const displayErrataTable = () => {
39
88
  if (isEmpty(cve === null || cve === void 0 ? void 0 : cve.errataData)) {
40
89
  return null;
41
90
  }
42
- return (React.createElement(Table, { "aria-label": "Errata table", variant: 'compact' },
91
+ return (React.createElement(Table, { "aria-label": "Errata table", variant: 'compact', className: "pf-v5-u-mt-md", style: { borderTop: 'var(--pf-v5-global--BorderColor--light-100) solid 1px' } },
43
92
  React.createElement(Thead, null,
44
93
  React.createElement(Tr, null,
45
94
  React.createElement(Th, null,
@@ -52,7 +101,7 @@ export const CveItem = (props) => {
52
101
  var _a, _b, _c;
53
102
  return (React.createElement(Tr, Object.assign({ key: (_a = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _a === void 0 ? void 0 : _a.name }, (index % 2 === 0 && { isStriped: true })),
54
103
  React.createElement(Td, null,
55
- React.createElement(Text, { component: TextVariants.a, href: (_b = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _b === void 0 ? void 0 : _b.url, target: "_blank", ouiaSafe: true, "data-tracking-id": "errata-link" }, (_c = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _c === void 0 ? void 0 :
104
+ React.createElement(Text, { component: TextVariants.a, href: (_b = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _b === void 0 ? void 0 : _b.url, target: "_blank", ouiaSafe: true, "data-tracking-id": "errata-link", onClick: () => onClickErrataLink(errata, index) }, (_c = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _c === void 0 ? void 0 :
56
105
  _c.name,
57
106
  React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" }))),
58
107
  React.createElement(Td, { modifier: "truncate" }, errata === null || errata === void 0 ? void 0 : errata.package),
@@ -63,7 +112,8 @@ export const CveItem = (props) => {
63
112
  const displayDescription = () => {
64
113
  var _a;
65
114
  if (isEmpty(cve === null || cve === void 0 ? void 0 : cve.mitigation) && ((_a = cve === null || cve === void 0 ? void 0 : cve.errataData) === null || _a === void 0 ? void 0 : _a.length) === 0) {
66
- return (React.createElement("p", { className: "pf-v5-u-mt-md" }, "for this CVE mitigation and fix is not available, for more details, go to CVE page."));
115
+ return (React.createElement("p", { className: "pf-v5-u-mt-md" },
116
+ React.createElement(Trans, null, "for this CVE, mitigation and fix is not available, for more details, go to the CVE page.")));
67
117
  }
68
118
  const MAX_DESCRIPTION_LENGTH = isCveModalOpened ? 300 : 120;
69
119
  const description = !isEmpty(cve === null || cve === void 0 ? void 0 : cve.mitigation) ? cve === null || cve === void 0 ? void 0 : cve.mitigation : cve === null || cve === void 0 ? void 0 : cve.details;
@@ -72,15 +122,18 @@ export const CveItem = (props) => {
72
122
  const trimmedDescription = description.length <= MAX_DESCRIPTION_LENGTH
73
123
  ? description
74
124
  : description.slice(0, MAX_DESCRIPTION_LENGTH).trim() + '...';
75
- return React.createElement("p", { className: "pf-v5-u-mt-md", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
125
+ return React.createElement("p", { className: "pf-v5-u-mt-md pf-v5-u-color-300", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
126
+ };
127
+ const onClickGoToCveButtonPage = () => {
128
+ onPresentOrVisitedCveErrataData(true);
76
129
  };
77
- return (React.createElement("p", null,
130
+ return (React.createElement("div", null,
78
131
  React.createElement(Flex, null,
79
132
  React.createElement(FlexItem, { spacer: { default: 'spacerXs' } }, renderLabels()),
80
133
  React.createElement(FlexItem, null, renderDate())),
81
134
  displayErrataTable(),
82
135
  displayDescription(),
83
- (cve === null || cve === void 0 ? void 0 : cve.cveLink) && (React.createElement(Button, { variant: "primary", className: isCveModalOpened ? 'pf-v5-u-my-md' : '', "data-tracking-id": "go-to-CVE-button", component: "a", href: cve.cveLink, target: "_blank", rel: "noopener noreferrer" },
136
+ (cve === null || cve === void 0 ? void 0 : cve.cveLink) && (React.createElement(Button, { variant: "primary", className: isCveModalOpened ? 'pf-v5-u-my-md' : '', "data-tracking-id": "go-to-CVE-button", component: "a", href: `${cve.cveLink}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[workflowSource]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.DRUPAL)}`, target: "_blank", rel: "noopener noreferrer", onClick: onClickGoToCveButtonPage },
84
137
  React.createElement(Trans, null, "Go to CVE"),
85
138
  React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" })))));
86
139
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,eAAO,MAAM,QAAQ,yBA2DpB,CAAC"}
1
+ {"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,eAAO,MAAM,QAAQ,yBAmEpB,CAAC"}
@@ -8,8 +8,10 @@ import size from 'lodash/size';
8
8
  import React, { useContext } from 'react';
9
9
  import { Trans } from 'react-i18next';
10
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
+ import { RouteContext } from '../../context/RouteContext';
11
12
  import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
12
13
  import { setCaseState } from '../../reducers/CaseReducer';
14
+ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
13
15
  import { CvePanel } from './CvePanel';
14
16
  export const CveModal = () => {
15
17
  const caseDispatch = useCaseDispatch();
@@ -18,6 +20,7 @@ export const CveModal = () => {
18
20
  isCveModalOpened: state.isCveModalOpened,
19
21
  }), isEqual);
20
22
  const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
23
+ const { routeState: { activeSection }, } = useContext(RouteContext);
21
24
  const handleModalToggle = () => {
22
25
  setCaseState(caseDispatch, { isCveModalOpened: !isCveModalOpened });
23
26
  };
@@ -30,9 +33,8 @@ export const CveModal = () => {
30
33
  return `https://${getAccessHostname()}/labs/cvechecker/?source=pcm&session=${activeSessionId}&id=${cveTitles}`;
31
34
  };
32
35
  return (React.createElement(Modal, { variant: ModalVariant.medium, title: React.createElement(Flex, { alignItems: { default: 'alignItemsCenter' } },
33
- React.createElement(FlexItem, { spacer: { default: 'spacerSm' } },
34
- React.createElement(Trans, null, "Handpicked for this CVEs")),
35
- React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))), isOpen: isCveModalOpened, onClose: handleModalToggle, titleIconVariant: "info", disableFocusTrap: true, onEscapePress: handleEscapePress, actions: [
36
+ React.createElement(FlexItem, { spacer: { default: 'spacerSm' } }, cveWorkflowRecommendation.length > 1 ? (React.createElement(Trans, null, "Handpicked for these CVEs")) : (React.createElement(Trans, null, "Handpicked for this CVE"))),
37
+ React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))), isOpen: isCveModalOpened && activeSection === AppRouteSections.SUMMARIZE, onClose: handleModalToggle, titleIconVariant: "info", disableFocusTrap: true, onEscapePress: handleEscapePress, actions: [
36
38
  React.createElement(Button, { key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl() },
37
39
  React.createElement(Trans, null, "Red Hat CVE Checker"),
38
40
  " ",
@@ -17,7 +17,7 @@ export const CvePanel = (props) => {
17
17
  return (React.createElement(AccordionItem, { key: `cve-item-${index}` },
18
18
  React.createElement(AccordionToggle, { onClick: () => handleToggle(cve.title), isExpanded: isExpanded, id: `cve-toggle-${index}`, "data-tracking-id": "cve-accordion-toggle" }, cve.title),
19
19
  React.createElement(AccordionContent, { id: `cve-content-${index}`, isHidden: !isExpanded },
20
- React.createElement(CveItem, { cve: cve }))));
20
+ React.createElement(CveItem, { cve: cve, isExpanded: isExpanded, index: index }))));
21
21
  };
22
22
  return (React.createElement(Accordion, { isBordered: true, displaySize: 'default', asDefinitionList: false, className: `${props.className ? props.className : ''}` }, map(slice(cveWorkflowRecommendation, 0, 4), renderAccordionItem)));
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CveSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveSidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,UAAU,yBAyBtB,CAAC"}
1
+ {"version":3,"file":"CveSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveSidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,UAAU,yBA6BtB,CAAC"}
@@ -16,8 +16,7 @@ export const CveSidebar = () => {
16
16
  return (React.createElement(React.Fragment, null,
17
17
  React.createElement("div", { className: "card card-white card-support file-diag pf-v5-u-mb-md" },
18
18
  React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" },
19
- React.createElement("span", { className: "pf-v5-u-mr-sm" },
20
- React.createElement(Trans, null, "Handpicked for this CVEs")),
19
+ React.createElement("span", { className: "pf-v5-u-mr-sm" }, cveWorkflowRecommendation.length > 1 ? (React.createElement(Trans, null, "Handpicked for these CVEs")) : (React.createElement(Trans, null, "Handpicked for this CVE"))),
21
20
  React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))),
22
21
  React.createElement("div", { className: "card-body" },
23
22
  React.createElement(CvePanel, null)))));
@@ -1 +1 @@
1
- {"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,EAAE,OAAO,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAqC7C"}
1
+ {"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,EAAE,OAAO,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAuC7C"}
@@ -8,14 +8,15 @@ import ProductSelector from '../ProductSelector/ProductSelector';
8
8
  import SupportTypeSelectorPage from './SupportTypeSelectorPage';
9
9
  export default function OpenCase(props) {
10
10
  const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
11
- const { enableGetSupportProductVersion } = useCaseSelector((state) => ({
12
- enableGetSupportProductVersion: state.enableGetSupportProductVersion,
11
+ const { ABTestVarioation } = useCaseSelector((state) => ({
12
+ ABTestVarioation: state.ABTestVarioation,
13
13
  }), isEqual);
14
+ const isBTestvariation = ABTestVarioation === 'B';
14
15
  return (React.createElement("form", null,
15
16
  canChangeAccountInfo && (React.createElement(React.Fragment, null,
16
17
  React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
17
18
  React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
18
- enableGetSupportProductVersion && (React.createElement("div", { className: "form-group" },
19
+ isBTestvariation && (React.createElement("div", { className: "form-group" },
19
20
  React.createElement(ProductSelector, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendations: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: true }))),
20
21
  React.createElement(SupportTypeSelectorPage, null)));
21
22
  }
@@ -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,4EA0JvB,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;AAOvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOvG,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,4EAwKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -10,10 +10,12 @@ import { Trans, useTranslation } from 'react-i18next';
10
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
11
  import { RouteContext } from '../../context/RouteContext';
12
12
  import { TCStateContext } from '../../context/TopContentContext';
13
+ import { useFetchCVEData } from '../../hooks/useFetchCVEData';
13
14
  import { setCaseDetails } from '../../reducers/CaseReducer';
14
15
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
15
16
  import RouteUtils from '../../utils/routeUtils';
16
17
  import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
18
+ import { CveModal } from '../Cve/CveModal';
17
19
  import Suggestions from '../Suggestions/Suggestions';
18
20
  import { ProductVersionDropdownSelector } from './ProductVersionDropdownSelector';
19
21
  const defaultProps = {
@@ -33,12 +35,15 @@ const AllProductsSelector = forwardRef((props, ref) => {
33
35
  var _a, _b;
34
36
  const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
35
37
  const caseDispatch = useCaseDispatch();
36
- const { product, version, contactSSOName } = useCaseSelector((state) => ({
38
+ const { product, version, contactSSOName, ABTestVarioation } = useCaseSelector((state) => ({
37
39
  product: state.caseDetails.product,
38
40
  version: state.caseDetails.version,
39
41
  contactSSOName: state.caseDetails.contactSSOName,
42
+ ABTestVarioation: state.ABTestVarioation,
40
43
  }), isEqual);
44
+ const { cveRecommendation } = useFetchCVEData();
41
45
  const { topContentState: { topContent }, } = useContext(TCStateContext);
46
+ const { routeState: { activeSection }, } = useContext(RouteContext);
42
47
  const [isModalOpen, setIsModalOpen] = useState(false);
43
48
  const [showModal, setShowModal] = useState(false);
44
49
  const [showModalButton, setShowModalButton] = useState(false);
@@ -78,34 +83,42 @@ const AllProductsSelector = forwardRef((props, ref) => {
78
83
  RouteUtils.updateQueryParams(props.routeProps, newParams);
79
84
  }
80
85
  const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
81
- const { routeState: { activeSection }, } = useContext(RouteContext);
82
- if ((activeSection === AppRouteSections.SUMMARIZE && !props.caseCreateExperience) ||
83
- activeSection === AppRouteSections.GET_SUPPORT) {
84
- return (React.createElement("div", { className: "form-group product-selector-wrapper" },
86
+ const isATestvariation = ABTestVarioation === 'A';
87
+ const isBTestvariation = ABTestVarioation === 'B';
88
+ // Determine whether to render the ProductVersionDropdownSelector
89
+ const renderProductVersionDropdownSelector = (activeSection === AppRouteSections.SUMMARIZE && !props.caseCreateExperience) ||
90
+ activeSection === AppRouteSections.GET_SUPPORT ||
91
+ isATestvariation ||
92
+ (isBTestvariation && (props.isOnGetSupportPage || props.isOnReviewPage));
93
+ // Determine whether to render the OpenCaseIssue component
94
+ const renderOpenCaseIssue = (isATestvariation &&
95
+ (activeSection === AppRouteSections.SUMMARIZE || activeSection === AppRouteSections.REVIEW)) ||
96
+ (isBTestvariation &&
97
+ (activeSection === AppRouteSections.SUMMARIZE || activeSection === AppRouteSections.REVIEW)) ||
98
+ (!props.caseCreateExperience && activeSection === AppRouteSections.SUMMARIZE);
99
+ return (React.createElement(React.Fragment, null,
100
+ renderProductVersionDropdownSelector && (React.createElement("div", { className: "form-group product-selector-wrapper" },
85
101
  React.createElement("div", { className: "all-product-selector-dropdown" },
86
- React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching }))));
87
- // } else if (activeSection === AppRouteSections.SUMMARIZE && props.caseCreateExperience)
88
- }
89
- else
90
- return (React.createElement(React.Fragment, null,
91
- React.createElement("div", { className: "case-details-summary" },
92
- React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage })),
93
- React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
94
- ? 'You are'
95
- : 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
96
- showModalButton &&
97
- !isEmpty(product) &&
98
- !isEmpty(version) &&
99
- !topContent.isFetching &&
100
- topContent.data.length !== 0 && (React.createElement("button", { className: "btn btn-bordered-blue btn-slim pull-top-narrow push-bottom-narrow", "data-tracking-id": "suggested-fixes-trigger", onClick: toggleTCModal, type: "button" },
101
- React.createElement(Trans, null, "Suggested fixes"))),
102
- props.loadTCOnChange && !topContent.isFetching && topContent.data.length !== 0 && (React.createElement(Modal, { className: "feedback-modal", title: t('Suggested fixes'), description: t('There are new updates to suggested fixes after changing your product.'), "aria-describedby": "Feedback Form", isOpen: isModalOpen, variant: ModalVariant.large, onClose: toggleTCModal, actions: [
103
- React.createElement("button", { key: "cancel", onClick: toggleTCModal, className: "btn btn-app btn-primary", type: "button" },
104
- React.createElement(Trans, null, "Cancel")),
105
- ] },
106
- React.createElement("span", null,
107
- React.createElement(Trans, null, "Here are some common suggestions:")),
108
- React.createElement(Suggestions, { showTitleDescription: false, showMax: 6 })))));
102
+ React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
103
+ renderOpenCaseIssue && (React.createElement("div", { className: "case-details-summary" },
104
+ React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage }))),
105
+ (cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && React.createElement(CveModal, null),
106
+ React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
107
+ ? 'You are'
108
+ : 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
109
+ showModalButton &&
110
+ !isEmpty(product) &&
111
+ !isEmpty(version) &&
112
+ !topContent.isFetching &&
113
+ topContent.data.length !== 0 && (React.createElement("button", { className: "btn btn-bordered-blue btn-slim pull-top-narrow push-bottom-narrow", "data-tracking-id": "suggested-fixes-trigger", onClick: toggleTCModal, type: "button" },
114
+ React.createElement(Trans, null, "Suggested fixes"))),
115
+ props.loadTCOnChange && !topContent.isFetching && topContent.data.length !== 0 && (React.createElement(Modal, { className: "feedback-modal", title: t('Suggested fixes'), description: t('There are new updates to suggested fixes after changing your product.'), "aria-describedby": "Feedback Form", isOpen: isModalOpen, variant: ModalVariant.large, onClose: toggleTCModal, actions: [
116
+ React.createElement("button", { key: "cancel", onClick: toggleTCModal, className: "btn btn-app btn-primary", type: "button" },
117
+ React.createElement(Trans, null, "Cancel")),
118
+ ] },
119
+ React.createElement("span", null,
120
+ React.createElement(Trans, null, "Here are some common suggestions:")),
121
+ React.createElement(Suggestions, { showTitleDescription: false, showMax: 6 })))));
109
122
  });
110
123
  AllProductsSelector.defaultProps = defaultProps;
111
124
  export { AllProductsSelector };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOlE,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,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAqGpD"}
1
+ {"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOlE,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,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBA8FpD"}
@@ -25,37 +25,41 @@ export default function ProductSelector(props) {
25
25
  const { cveRecommendation } = useFetchCVEData();
26
26
  const { t } = useTranslation();
27
27
  const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
28
- const { product, version, enableGetSupportProductVersion } = useCaseSelector((state) => ({
28
+ const { product, version, ABTestVarioation } = useCaseSelector((state) => ({
29
29
  product: state.caseDetails.product,
30
30
  version: state.caseDetails.version,
31
- enableGetSupportProductVersion: state.enableGetSupportProductVersion,
31
+ ABTestVarioation: state.ABTestVarioation,
32
32
  }), isEqual);
33
33
  const { routeState: { isCaseCreate }, } = useContext(RouteContext);
34
+ const isATestvariation = ABTestVarioation === 'A';
35
+ const isBTestvariation = ABTestVarioation === 'B';
34
36
  /**
35
37
  * The all product selector and top product selector should always be "selected" because
36
38
  * the all product selector needs to show the selection from the top products selector and the top product selector
37
39
  * doesn't matter becasue it will be hidden whenever a product is selected.
38
40
  */
39
41
  const productSelectorRef = useRef(null);
42
+ const rederProductSelect = (React.createElement("form", null,
43
+ (cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && React.createElement(CveModal, null),
44
+ React.createElement(AllProductsSelector, { routeProps: props.routeProps, checkEntitledProduct: isCaseCreate ? true : false, ref: productSelectorRef, isOnSummaryPage: true, isOnGetSupportPage: props === null || props === void 0 ? void 0 : props.isOnGetSupportPage, caseCreateExperience: props.caseCreateExperience })));
40
45
  return (React.createElement(React.Fragment, null,
41
- !enableGetSupportProductVersion && allProducts.isFetching && React.createElement(ProductSelectorLoader, null),
46
+ isATestvariation && allProducts.isFetching && React.createElement(ProductSelectorLoader, null),
42
47
  React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t('There was an error loading products.'), show: allProducts.isError }),
43
- allProducts.isFetching ? (React.createElement(ProductSelectorLoader, null)) : (!allProducts.isError && (React.createElement(React.Fragment, null,
44
- React.createElement("form", null,
45
- (cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && React.createElement(CveModal, null),
46
- React.createElement(AllProductsSelector, { routeProps: props.routeProps, checkEntitledProduct: isCaseCreate ? true : false, ref: productSelectorRef, isOnSummaryPage: true, isOnGetSupportPage: props === null || props === void 0 ? void 0 : props.isOnGetSupportPage, caseCreateExperience: props.caseCreateExperience }),
47
- product === 'Subscription Watch' && (React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
48
- ' ',
49
- "If you're having a subscription issue that doesn't relate to",
50
- ' ',
51
- React.createElement("a", { href: "/products/subscription-central", rel: "noopener noreferrer", target: "_blank" }, "Subscription Watch"),
52
- "product, then please contact",
53
- ' ',
54
- React.createElement("a", { href: "/support/contact", "data-tracking-id": "contact-customer-service" }, "customer service"),
55
- ' ',
56
- "for help.") })),
57
- !enableGetSupportProductVersion && React.createElement(EARuleWidget, null)),
58
- !(props === null || props === void 0 ? void 0 : props.isOnGetSupportPage) && (React.createElement("div", { className: "suggestions-result-section" },
59
- React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading recommendations') } }, !isEmpty(version) && (React.createElement("div", { className: "common-suggestions" },
60
- React.createElement(Recommendations, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendationsValue: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef })))))))))));
48
+ isATestvariation
49
+ ? !allProducts.isFetching && !allProducts.isError && rederProductSelect
50
+ : isBTestvariation && rederProductSelect,
51
+ product === 'Subscription Watch' && (React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
52
+ ' ',
53
+ "If you're having a subscription issue that doesn't relate to",
54
+ ' ',
55
+ React.createElement("a", { href: "/products/subscription-central", rel: "noopener noreferrer", target: "_blank" }, "Subscription Watch"),
56
+ "product, then please contact",
57
+ ' ',
58
+ React.createElement("a", { href: "/support/contact", "data-tracking-id": "contact-customer-service" }, "customer service"),
59
+ ' ',
60
+ "for help.") })),
61
+ isATestvariation && React.createElement(EARuleWidget, null),
62
+ !(props === null || props === void 0 ? void 0 : props.isOnGetSupportPage) && (React.createElement("div", { className: "suggestions-result-section" },
63
+ React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading recommendations') } }, !isEmpty(version) && (React.createElement("div", { className: "common-suggestions" },
64
+ React.createElement(Recommendations, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendationsValue: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef }))))))));
61
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAOD,QAAA,MAAM,8BAA8B,wEAwClC,CAAC;AAEH,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAOD,QAAA,MAAM,8BAA8B,wEAuDlC,CAAC;AAEH,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
@@ -16,7 +16,12 @@ const ProductVersionDropdownSelector = forwardRef((props, ref) => {
16
16
  React.createElement(Trans, null, "Product"),
17
17
  ' ',
18
18
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
19
- React.createElement(NewProductDropdownSelector, { products: props.products, onProductChange: props.onProductChange, isNextBtnClickedToShowValidationError: isNextBtnClickedToShowValidationError, isCaseCreate: isCaseCreate, isOnSummaryPage: props.isOnSummaryPage, isLoading: props.isLoading })),
19
+ React.createElement("div", { className: "pf-v5-u-display-flex pf-v5-u-align-items-center" },
20
+ React.createElement("div", { className: "pf-v5-u-flex-1" },
21
+ React.createElement(NewProductDropdownSelector, { products: props.products, onProductChange: props.onProductChange, isNextBtnClickedToShowValidationError: isNextBtnClickedToShowValidationError, isCaseCreate: isCaseCreate, isOnSummaryPage: props.isOnSummaryPage, isLoading: props.isLoading })),
22
+ props.isLoading && (React.createElement("div", { className: "pf-v5-u-flex-basis-auto" },
23
+ React.createElement(LoadingIndicator, { className: "pf-v5-u-ml-sm", isInline: true, show: props.isLoading, size: "sm" })))),
24
+ React.createElement(React.Fragment, null)),
20
25
  React.createElement("div", { className: "version-selector-wrapper" },
21
26
  React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
22
27
  React.createElement(Trans, null, "Version"),
@@ -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,qBA0WpD"}
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"}