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

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 (110) hide show
  1. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +2 -2
  2. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +4 -18
  4. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -2
  6. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +2 -4
  8. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +1 -2
  10. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +4 -6
  12. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +2 -3
  14. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -4
  16. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +21 -95
  17. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +137 -269
  19. package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
  20. package/lib/esm/components/CaseInformation/Description.js +20 -16
  21. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  22. package/lib/esm/components/CaseInformation/Fts.js +5 -6
  23. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  24. package/lib/esm/components/CaseManagement/Cep.js +2 -3
  25. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  26. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +5 -11
  27. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  28. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +5 -11
  29. package/lib/esm/components/Cve/CveItem.d.ts +8 -0
  30. package/lib/esm/components/Cve/CveItem.d.ts.map +1 -0
  31. package/lib/esm/components/Cve/CveItem.js +86 -0
  32. package/lib/esm/components/Cve/CveModal.d.ts +3 -0
  33. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -0
  34. package/lib/esm/components/Cve/CveModal.js +42 -0
  35. package/lib/esm/components/Cve/CvePanel.d.ts +7 -0
  36. package/lib/esm/components/Cve/CvePanel.d.ts.map +1 -0
  37. package/lib/esm/components/Cve/CvePanel.js +23 -0
  38. package/lib/esm/components/Cve/CveSidebar.d.ts +3 -0
  39. package/lib/esm/components/Cve/CveSidebar.d.ts.map +1 -0
  40. package/lib/esm/components/Cve/CveSidebar.js +24 -0
  41. package/lib/esm/components/OpenCase/OpenCase.d.ts +3 -0
  42. package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
  43. package/lib/esm/components/OpenCase/OpenCase.js +8 -0
  44. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +3 -0
  45. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  46. package/lib/esm/components/ProductSelector/AllProductsSelector.js +29 -21
  47. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -0
  48. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  49. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +2 -2
  50. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +1 -1
  51. package/lib/esm/components/ProductSelector/ProductSelector.d.ts +4 -2
  52. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  53. package/lib/esm/components/ProductSelector/ProductSelector.js +12 -7
  54. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  55. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -1
  56. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  57. package/lib/esm/components/Recommendations/AsideResults.js +3 -5
  58. package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
  59. package/lib/esm/components/Recommendations/EARules/EARule.js +2 -0
  60. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.d.ts.map +1 -1
  61. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +2 -2
  62. package/lib/esm/components/Recommendations/EARules/EARuleWidget.d.ts.map +1 -1
  63. package/lib/esm/components/Recommendations/EARules/EARuleWidget.js +5 -6
  64. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  65. package/lib/esm/components/Recommendations/Recommendations.js +55 -27
  66. package/lib/esm/components/Recommendations/RecommendationsLoader.d.ts +3 -0
  67. package/lib/esm/components/Recommendations/RecommendationsLoader.d.ts.map +1 -0
  68. package/lib/esm/components/Recommendations/RecommendationsLoader.js +11 -0
  69. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  70. package/lib/esm/components/Review/Review.js +1 -1
  71. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  72. package/lib/esm/components/SubmitCase/SubmitCase.js +3 -3
  73. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  74. package/lib/esm/components/Suggestions/TopContent.js +4 -1
  75. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts +2 -2
  76. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
  77. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +1 -10
  78. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  79. package/lib/esm/components/shared/useIsSectionValid.js +14 -7
  80. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  81. package/lib/esm/components/wizardLayout/WizardAside.js +11 -9
  82. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  83. package/lib/esm/components/wizardLayout/WizardLayout.js +1 -4
  84. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  85. package/lib/esm/components/wizardLayout/WizardMain.js +0 -5
  86. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  87. package/lib/esm/components/wizardLayout/WizardNavigation.js +3 -7
  88. package/lib/esm/css/results.css +6 -0
  89. package/lib/esm/hooks/useFetchCVEData.d.ts +5 -0
  90. package/lib/esm/hooks/useFetchCVEData.d.ts.map +1 -0
  91. package/lib/esm/hooks/useFetchCVEData.js +133 -0
  92. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  93. package/lib/esm/hooks/useWizard.js +10 -2
  94. package/lib/esm/models/caseCreationWorkflows.d.ts +25 -0
  95. package/lib/esm/models/caseCreationWorkflows.d.ts.map +1 -0
  96. package/lib/esm/models/caseCreationWorkflows.js +1 -0
  97. package/lib/esm/reducers/CaseConstNTypes.d.ts +4 -0
  98. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  99. package/lib/esm/reducers/CaseConstNTypes.js +3 -0
  100. package/lib/esm/reducers/RouteConstNTypes.d.ts +0 -1
  101. package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
  102. package/lib/esm/reducers/RouteConstNTypes.js +0 -1
  103. package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
  104. package/lib/esm/reducers/SessionRestoreReducer.js +1 -1
  105. package/lib/esm/scss/_main.scss +20 -2
  106. package/lib/esm/scss/_pf-overrides.scss +0 -6
  107. package/lib/esm/utils/caseUtils.d.ts +6 -0
  108. package/lib/esm/utils/caseUtils.d.ts.map +1 -1
  109. package/lib/esm/utils/caseUtils.js +15 -0
  110. package/package.json +11 -11
@@ -100,12 +100,10 @@ function Fts(props) {
100
100
  setCaseState(caseDispatch, { ftsContactSameAsOwner: e.target.checked });
101
101
  if (!e.target.checked) {
102
102
  setFtsContact('');
103
- setContactInfoIntoGlobalState('');
104
- }
105
- else {
106
- setFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
107
- setContactInfoIntoGlobalState(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
103
+ return;
108
104
  }
105
+ setFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
106
+ setContactInfoIntoGlobalState(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
109
107
  };
110
108
  const onSave = (e) => __awaiter(this, void 0, void 0, function* () {
111
109
  setContactInfoIntoGlobalState(contactInfo24X7State);
@@ -150,7 +148,8 @@ function Fts(props) {
150
148
  }
151
149
  // eslint-disable-next-line react-hooks/exhaustive-deps
152
150
  }, [phoneAreaCodePrefixLineNumber, phoneCountryCode]);
153
- const disableFtsNContact = !isEmpty(caseNumber) && (!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsUpdating);
151
+ const disableFtsNContact = !isEmpty(caseNumber) &&
152
+ (!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsContactUpdating || isFtsUpdating);
154
153
  const maxLengthErrorMessage = t('Contact information cannot be more than {{limit}} characters.', {
155
154
  limit: CONTACT_INFO_24X7_LIMIT,
156
155
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAoB/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,qBAuThC"}
1
+ {"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAoB/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,qBAsThC"}
@@ -66,9 +66,8 @@ export function Cep(props) {
66
66
  // edit mode - set cep to false
67
67
  yield confirm({
68
68
  catchOnCancel: true,
69
- title: t(`No consultant engaged?`),
70
- description: t("You're confirming that you don't have a consultant engaged on this ticket."),
71
- confirmText: t('Yes, confirm'),
69
+ title: t(`Updating Consultant Engagement in Progress`),
70
+ description: t('Are you sure?'),
72
71
  });
73
72
  cepUpdate({ cep: false });
74
73
  clearCepFormInputs();
@@ -1 +1 @@
1
- {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBA+M1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAqM1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -11,7 +11,6 @@ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
11
11
  import { ToastNotification } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { dtmTrackEventCaseStepEncountered } from '@rh-support/utils';
15
14
  import differenceBy from 'lodash/differenceBy';
16
15
  import filter from 'lodash/filter';
17
16
  import find from 'lodash/find';
@@ -32,13 +31,11 @@ function RHAssociatesSelector(props) {
32
31
  const [isRHAssociatesUpdating, setIsRHAssociatesUpdating] = useState(false);
33
32
  const ability = useContext(AbilityContext);
34
33
  const { isExportingPDF } = useContext(PDFContext);
35
- const { caseNumber, contactSsoUsername, product, selectedOwner, selectedNotificationContacts, version } = useCaseSelector((state) => ({
34
+ const { caseNumber, contactSsoUsername, selectedOwner, selectedNotificationContacts } = useCaseSelector((state) => ({
36
35
  caseNumber: state.caseDetails.caseNumber,
37
36
  contactSsoUsername: state.caseDetails.contactSSOName,
38
37
  selectedOwner: state.selectedOwner,
39
38
  selectedNotificationContacts: state.selectedNotificationContacts,
40
- product: state.caseDetails.product,
41
- version: state.caseDetails.version,
42
39
  }), isEqual);
43
40
  const caseDispatch = useCaseDispatch();
44
41
  const onRhAssociateAdded = (addedUsers) => __awaiter(this, void 0, void 0, function* () {
@@ -67,7 +64,7 @@ function RHAssociatesSelector(props) {
67
64
  ToastNotification.addDangerMessage(t(`Red Hat associate failed to get removed`));
68
65
  }
69
66
  });
70
- const onNotifiedUserChange = (selectedContacts_1, ...args_1) => __awaiter(this, [selectedContacts_1, ...args_1], void 0, function* (selectedContacts, throwTrackEventOnAdd = false) {
67
+ const onNotifiedUserChange = (selectedContacts) => __awaiter(this, void 0, void 0, function* () {
71
68
  const toAdd = filter(differenceBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => item.ssoUsername !== contactSsoUsername);
72
69
  const toRemove = filter(differenceBy(selectedNotificationContacts, selectedContacts, 'ssoUsername'), (item) => item.isInternal && item.ssoUsername !== contactSsoUsername);
73
70
  let newContacts = [];
@@ -75,9 +72,6 @@ function RHAssociatesSelector(props) {
75
72
  newContacts = [...selectedNotificationContacts, ...toAdd];
76
73
  if (!isEmpty(caseNumber)) {
77
74
  yield onRhAssociateAdded(toAdd);
78
- if (throwTrackEventOnAdd) {
79
- dtmTrackEventCaseStepEncountered('follow', caseNumber, product, version);
80
- }
81
75
  }
82
76
  }
83
77
  else if ((toRemove || []).length > 0) {
@@ -96,9 +90,9 @@ function RHAssociatesSelector(props) {
96
90
  !isCurrentUserSelectedInternalNotifiedUser();
97
91
  const showRemoveWatchButton = () => (loggedInUserRights.data.isInternal() && isCurrentUserSelectedInternalNotifiedUser()) ||
98
92
  contactSsoUsername === loggedInUser.data.ssoUsername;
99
- const addCurrentUser = () => __awaiter(this, void 0, void 0, function* () {
100
- onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })], true);
101
- });
93
+ const addCurrentUser = () => {
94
+ onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })]);
95
+ };
102
96
  const removeCurrentUser = () => {
103
97
  if (isCurrentUserSelectedInternalNotifiedUser()) {
104
98
  onNotifiedUserChange(filter(selectedNotificationContacts, (contact) => contact.ssoUsername !== loggedInUser.data.ssoUsername));
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA8bzC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmbzC;AAED,eAAe,mBAAmB,CAAC"}
@@ -11,7 +11,6 @@ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
11
11
  import { CaseContactsSelectorExternal, getHydraContactLabel, PromisifyModal, ToastNotification, usePrevious, } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { dtmTrackEventCaseStepEncountered } from '@rh-support/utils';
15
14
  import differenceBy from 'lodash/differenceBy';
16
15
  import filter from 'lodash/filter';
17
16
  import find from 'lodash/find';
@@ -35,7 +34,7 @@ function CaseContactSelector(props) {
35
34
  const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
36
35
  const [isAssociatesUpdating, setIsAssociatesUpdating] = useState(false);
37
36
  const { t } = useTranslation();
38
- const { accountNumber, caseNumber, contactSsoUsername, selectedNotificationContacts, selectedOwner, customEmailsList, product, selectedCaseGroupUsers, ownersCaseGroups, groupNumber, createdById, version, } = useCaseSelector((state) => ({
37
+ const { accountNumber, caseNumber, contactSsoUsername, selectedNotificationContacts, selectedOwner, customEmailsList, selectedCaseGroupUsers, ownersCaseGroups, groupNumber, createdById, } = useCaseSelector((state) => ({
39
38
  accountNumber: state.caseDetails.accountNumberRef,
40
39
  caseNumber: state.caseDetails.caseNumber,
41
40
  contactSsoUsername: state.caseDetails.contactSSOName,
@@ -46,8 +45,6 @@ function CaseContactSelector(props) {
46
45
  groupNumber: state.caseDetails.groupNumber,
47
46
  ownersCaseGroups: state.ownersCaseGroups,
48
47
  createdById: state.caseDetails.createdById,
49
- product: state.caseDetails.product,
50
- version: state.caseDetails.version,
51
48
  }), isEqual);
52
49
  const caseDispatch = useCaseDispatch();
53
50
  const { addCustomEmail, canAddCustomEmail, hideCustomEmails, deleteCustomEmail, isUpdatingCustomEmails, isEmailValid, showAddEmailToAccountModal, } = useCustomEmails({
@@ -188,7 +185,7 @@ function CaseContactSelector(props) {
188
185
  }
189
186
  return hasGroupAccess;
190
187
  });
191
- const onNotifiedUserChange = (...args_1) => __awaiter(this, [...args_1], void 0, function* (selectedContacts = [], throwTrackEvent = false) {
188
+ const onNotifiedUserChange = (...args_1) => __awaiter(this, [...args_1], void 0, function* (selectedContacts = []) {
192
189
  // check if selection changed
193
190
  const alreadySelected = [
194
191
  ...customEmailsList.data,
@@ -202,9 +199,6 @@ function CaseContactSelector(props) {
202
199
  const selectedCustomEmails = remove(allSelectedContacts, (item) => item.customOption || item.emailAddress).map((item) => item.label || item.emailAddress || item.ssoUsername);
203
200
  yield processCustomEmails(selectedCustomEmails);
204
201
  yield processCaseContacts(allSelectedContacts);
205
- if (throwTrackEvent) {
206
- dtmTrackEventCaseStepEncountered('follow', caseNumber, product, version);
207
- }
208
202
  });
209
203
  /** Reset all non-internal selectedNotificationContacts when selected account number changes */
210
204
  useEffect(() => {
@@ -220,9 +214,9 @@ function CaseContactSelector(props) {
220
214
  !isCurrentUserSelectedExternalNotifiedUser();
221
215
  const showRemoveWatchButton = () => loggedInUserRights.data.isExternal() &&
222
216
  (isCurrentUserSelectedExternalNotifiedUser() || isCurrentUserCaseContact);
223
- const addCurrentUser = () => __awaiter(this, void 0, void 0, function* () {
224
- onNotifiedUserChange([...selectedNotificationContacts, ...customEmailsList.data, loggedInUser.data], true);
225
- });
217
+ const addCurrentUser = () => {
218
+ onNotifiedUserChange([...selectedNotificationContacts, ...customEmailsList.data, loggedInUser.data]);
219
+ };
226
220
  const removeCurrentUser = () => {
227
221
  if (isCurrentUserSelectedExternalNotifiedUser()) {
228
222
  onNotifiedUserChange([
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ICVEWorkflowRecommendation } from '../../models/caseCreationWorkflows';
3
+ interface IProp {
4
+ cve: ICVEWorkflowRecommendation;
5
+ }
6
+ export declare const CveItem: (props: IProp) => React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=CveItem.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,86 @@
1
+ import { Button, Flex, FlexItem, Label, LabelGroup, Text, TextVariants } from '@patternfly/react-core';
2
+ import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
3
+ import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon';
4
+ import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
5
+ import { format } from 'date-fns';
6
+ import DOMPurify from 'dompurify';
7
+ import isEmpty from 'lodash/isEmpty';
8
+ import isEqual from 'lodash/isEqual';
9
+ import map from 'lodash/map';
10
+ import slice from 'lodash/slice';
11
+ import React from 'react';
12
+ import { Trans } from 'react-i18next';
13
+ import { useCaseSelector } from '../../context/CaseContext';
14
+ const sanitize = (html) => ({ __html: DOMPurify.sanitize(html) });
15
+ export const CveItem = (props) => {
16
+ const { cve } = props;
17
+ const { isCveModalOpened } = useCaseSelector((state) => ({
18
+ isCveModalOpened: state.isCveModalOpened,
19
+ }), isEqual);
20
+ const renderDate = () => (React.createElement("div", { className: "pf-v5-u-disabled-color-100" },
21
+ React.createElement(Trans, null, "Public on"),
22
+ " - ",
23
+ format(cve === null || cve === void 0 ? void 0 : cve.publicDate, 'MMM dd, yyyy')));
24
+ const renderLabels = () => (React.createElement(LabelGroup, { defaultIsOpen: true, numLabels: 10 },
25
+ React.createElement(Label, { color: "green", isCompact: true, icon: React.createElement(StarIcon, null) },
26
+ React.createElement(Trans, null, "Exact match")),
27
+ React.createElement(Label, { color: cve.severity === 'Critical'
28
+ ? 'red'
29
+ : cve.severity === 'Important'
30
+ ? 'orange'
31
+ : cve.severity === 'Moderate'
32
+ ? 'gold'
33
+ : undefined, isCompact: true }, cve.severity),
34
+ !isEmpty(cve.errataData) && (React.createElement(Label, { color: "blue", isCompact: true },
35
+ React.createElement(Trans, null, "Fixed"))),
36
+ !isEmpty(cve.mitigation) && (React.createElement(Label, { isCompact: true },
37
+ React.createElement(Trans, null, "Mitigation available")))));
38
+ const displayErrataTable = () => {
39
+ if (isEmpty(cve === null || cve === void 0 ? void 0 : cve.errataData)) {
40
+ return null;
41
+ }
42
+ return (React.createElement(Table, { "aria-label": "Errata table", variant: 'compact' },
43
+ React.createElement(Thead, null,
44
+ React.createElement(Tr, null,
45
+ React.createElement(Th, null,
46
+ React.createElement(Trans, null, "Errata link")),
47
+ React.createElement(Th, { width: 30 },
48
+ React.createElement(Trans, null, "Component")),
49
+ React.createElement(Th, null,
50
+ React.createElement(Trans, null, "Status")))),
51
+ React.createElement(Tbody, null, map(slice(cve.errataData, 0, isCveModalOpened ? 3 : 2), (errata, index) => {
52
+ var _a, _b, _c;
53
+ 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
+ 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 :
56
+ _c.name,
57
+ React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" }))),
58
+ React.createElement(Td, { modifier: "truncate" }, errata === null || errata === void 0 ? void 0 : errata.package),
59
+ React.createElement(Td, null,
60
+ React.createElement(Trans, null, errata === null || errata === void 0 ? void 0 : errata.state))));
61
+ }))));
62
+ };
63
+ const displayDescription = () => {
64
+ var _a;
65
+ 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."));
67
+ }
68
+ const MAX_DESCRIPTION_LENGTH = isCveModalOpened ? 300 : 120;
69
+ 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;
70
+ if (!description)
71
+ return '';
72
+ const trimmedDescription = description.length <= MAX_DESCRIPTION_LENGTH
73
+ ? description
74
+ : description.slice(0, MAX_DESCRIPTION_LENGTH).trim() + '...';
75
+ return React.createElement("p", { className: "pf-v5-u-mt-md", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
76
+ };
77
+ return (React.createElement("p", null,
78
+ React.createElement(Flex, null,
79
+ React.createElement(FlexItem, { spacer: { default: 'spacerXs' } }, renderLabels()),
80
+ React.createElement(FlexItem, null, renderDate())),
81
+ displayErrataTable(),
82
+ 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" },
84
+ React.createElement(Trans, null, "Go to CVE"),
85
+ React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" })))));
86
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const CveModal: () => React.JSX.Element;
3
+ //# sourceMappingURL=CveModal.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,42 @@
1
+ import { Badge, Button, Flex, FlexItem, Modal, ModalVariant } from '@patternfly/react-core';
2
+ import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
3
+ import { getAccessHostname } from '@rh-support/utils';
4
+ import isEqual from 'lodash/isEqual';
5
+ import join from 'lodash/join';
6
+ import map from 'lodash/map';
7
+ import size from 'lodash/size';
8
+ import React, { useContext } from 'react';
9
+ import { Trans } from 'react-i18next';
10
+ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
+ import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
12
+ import { setCaseState } from '../../reducers/CaseReducer';
13
+ import { CvePanel } from './CvePanel';
14
+ export const CveModal = () => {
15
+ const caseDispatch = useCaseDispatch();
16
+ const { cveWorkflowRecommendation, isCveModalOpened } = useCaseSelector((state) => ({
17
+ cveWorkflowRecommendation: state.cveWorkflowRecommendation,
18
+ isCveModalOpened: state.isCveModalOpened,
19
+ }), isEqual);
20
+ const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
21
+ const handleModalToggle = () => {
22
+ setCaseState(caseDispatch, { isCveModalOpened: !isCveModalOpened });
23
+ };
24
+ const handleEscapePress = (event) => {
25
+ // prevent the default escape key behavior
26
+ event.preventDefault();
27
+ };
28
+ const generateCveCheckerUrl = () => {
29
+ const cveTitles = join(map(cveWorkflowRecommendation, 'title'), ',');
30
+ return `https://${getAccessHostname()}/labs/cvechecker/?source=pcm&session=${activeSessionId}&id=${cveTitles}`;
31
+ };
32
+ 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(Button, { key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl() },
37
+ React.createElement(Trans, null, "Red Hat CVE Checker"),
38
+ " ",
39
+ React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" })),
40
+ ] },
41
+ React.createElement(CvePanel, null)));
42
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ className?: string;
4
+ }
5
+ export declare const CvePanel: (props: IProps) => React.JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=CvePanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CvePanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CvePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,UAAW,MAAM,sBAyCrC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Accordion, AccordionContent, AccordionItem, AccordionToggle } from '@patternfly/react-core';
2
+ import isEqual from 'lodash/isEqual';
3
+ import map from 'lodash/map';
4
+ import slice from 'lodash/slice';
5
+ import React, { useState } from 'react';
6
+ import { useCaseSelector } from '../../context/CaseContext';
7
+ import { CveItem } from './CveItem';
8
+ export const CvePanel = (props) => {
9
+ var _a;
10
+ const { cveWorkflowRecommendation } = useCaseSelector((state) => ({
11
+ cveWorkflowRecommendation: state.cveWorkflowRecommendation,
12
+ }), isEqual);
13
+ const [expanded, setExpanded] = useState(((_a = cveWorkflowRecommendation === null || cveWorkflowRecommendation === void 0 ? void 0 : cveWorkflowRecommendation[0]) === null || _a === void 0 ? void 0 : _a.title) || '');
14
+ const handleToggle = (id) => setExpanded(id === expanded ? '' : id);
15
+ const renderAccordionItem = (cve, index) => {
16
+ const isExpanded = expanded === (cve === null || cve === void 0 ? void 0 : cve.title);
17
+ return (React.createElement(AccordionItem, { key: `cve-item-${index}` },
18
+ React.createElement(AccordionToggle, { onClick: () => handleToggle(cve.title), isExpanded: isExpanded, id: `cve-toggle-${index}`, "data-tracking-id": "cve-accordion-toggle" }, cve.title),
19
+ React.createElement(AccordionContent, { id: `cve-content-${index}`, isHidden: !isExpanded },
20
+ React.createElement(CveItem, { cve: cve }))));
21
+ };
22
+ return (React.createElement(Accordion, { isBordered: true, displaySize: 'default', asDefinitionList: false, className: `${props.className ? props.className : ''}` }, map(slice(cveWorkflowRecommendation, 0, 4), renderAccordionItem)));
23
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const CveSidebar: () => React.JSX.Element;
3
+ //# sourceMappingURL=CveSidebar.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,24 @@
1
+ import { Badge } from '@patternfly/react-core';
2
+ import isEmpty from 'lodash/isEmpty';
3
+ import isEqual from 'lodash/isEqual';
4
+ import size from 'lodash/size';
5
+ import React from 'react';
6
+ import { Trans } from 'react-i18next';
7
+ import { useCaseSelector } from '../../context/CaseContext';
8
+ import { CvePanel } from './CvePanel';
9
+ export const CveSidebar = () => {
10
+ const { cveWorkflowRecommendation } = useCaseSelector((state) => ({
11
+ cveWorkflowRecommendation: state.cveWorkflowRecommendation,
12
+ }), isEqual);
13
+ if (isEmpty(cveWorkflowRecommendation)) {
14
+ return null;
15
+ }
16
+ return (React.createElement(React.Fragment, null,
17
+ React.createElement("div", { className: "card card-white card-support file-diag pf-v5-u-mb-md" },
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")),
21
+ React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))),
22
+ React.createElement("div", { className: "card-body" },
23
+ React.createElement(CvePanel, null)))));
24
+ };
@@ -3,6 +3,9 @@ import { RouteComponentProps } from 'react-router-dom';
3
3
  import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
4
4
  export interface IProps {
5
5
  routeProps: RouteComponentProps<IRouteUrlParams>;
6
+ userSeenRecommendations?: (value: React.SetStateAction<boolean>) => void;
7
+ userClickedNextonRecommendations: boolean;
8
+ resultsRowRef: React.MutableRefObject<HTMLDivElement | null>;
6
9
  }
7
10
  export default function OpenCase(props: IProps): React.JSX.Element;
8
11
  //# sourceMappingURL=OpenCase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAKlE,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAiB7C"}
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,13 +1,21 @@
1
1
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
2
+ import isEqual from 'lodash/isEqual';
2
3
  import React from 'react';
4
+ import { useCaseSelector } from '../../context/CaseContext';
3
5
  import { AccountSelector } from '../AccountInfo/AccountSelector';
4
6
  import { OwnerSelector } from '../AccountInfo/OwnerSelector';
7
+ import ProductSelector from '../ProductSelector/ProductSelector';
5
8
  import SupportTypeSelectorPage from './SupportTypeSelectorPage';
6
9
  export default function OpenCase(props) {
7
10
  const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
11
+ const { enableGetSupportProductVersion } = useCaseSelector((state) => ({
12
+ enableGetSupportProductVersion: state.enableGetSupportProductVersion,
13
+ }), isEqual);
8
14
  return (React.createElement("form", null,
9
15
  canChangeAccountInfo && (React.createElement(React.Fragment, null,
10
16
  React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
11
17
  React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
18
+ enableGetSupportProductVersion && (React.createElement("div", { className: "form-group" },
19
+ React.createElement(ProductSelector, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendations: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: true }))),
12
20
  React.createElement(SupportTypeSelectorPage, null)));
13
21
  }
@@ -8,6 +8,9 @@ interface IProps {
8
8
  showTCAfterButtonClicked?: boolean;
9
9
  checkEntitledProduct?: boolean;
10
10
  isOnSummaryPage?: boolean;
11
+ isOnGetSupportPage?: boolean;
12
+ isOnReviewPage?: boolean;
13
+ caseCreateExperience?: boolean;
11
14
  }
12
15
  /**
13
16
  * Renders a dropdown list to select all products.
@@ -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;AAKvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMrF,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;CAC7B;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuIvB,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,4EA0JvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -8,8 +8,10 @@ import isEqual from 'lodash/isEqual';
8
8
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
9
9
  import { Trans, useTranslation } from 'react-i18next';
10
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
+ import { RouteContext } from '../../context/RouteContext';
11
12
  import { TCStateContext } from '../../context/TopContentContext';
12
13
  import { setCaseDetails } from '../../reducers/CaseReducer';
14
+ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
13
15
  import RouteUtils from '../../utils/routeUtils';
14
16
  import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
15
17
  import Suggestions from '../Suggestions/Suggestions';
@@ -76,28 +78,34 @@ const AllProductsSelector = forwardRef((props, ref) => {
76
78
  RouteUtils.updateQueryParams(props.routeProps, newParams);
77
79
  }
78
80
  const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
79
- return (React.createElement(React.Fragment, null,
80
- React.createElement("div", { className: "form-group product-selector-wrapper" },
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" },
81
85
  React.createElement("div", { className: "all-product-selector-dropdown" },
82
- 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 }))),
83
- React.createElement("div", { className: "case-details-summary" },
84
- React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage })),
85
- React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
86
- ? 'You are'
87
- : 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
88
- showModalButton &&
89
- !isEmpty(product) &&
90
- !isEmpty(version) &&
91
- !topContent.isFetching &&
92
- 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" },
93
- React.createElement(Trans, null, "Suggested fixes"))),
94
- 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: [
95
- React.createElement("button", { key: "cancel", onClick: toggleTCModal, className: "btn btn-app btn-primary", type: "button" },
96
- React.createElement(Trans, null, "Cancel")),
97
- ] },
98
- React.createElement("span", null,
99
- React.createElement(Trans, null, "Here are some common suggestions:")),
100
- React.createElement(Suggestions, { showTitleDescription: false, showMax: 6 })))));
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 })))));
101
109
  });
102
110
  AllProductsSelector.defaultProps = defaultProps;
103
111
  export { AllProductsSelector };
@@ -6,6 +6,7 @@ interface IProps {
6
6
  isNextBtnClickedToShowValidationError: boolean;
7
7
  isCaseCreate: boolean;
8
8
  isOnSummaryPage?: boolean;
9
+ isLoading?: boolean;
9
10
  }
10
11
  export declare const NewProductDropdownSelector: (props: IProps) => React.JSX.Element;
11
12
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAOD,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBAwHvD,CAAC"}
1
+ {"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAOD,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBAyHvD,CAAC"}
@@ -73,8 +73,8 @@ export const NewProductDropdownSelector = (props) => {
73
73
  setIsSelectedProductSupportedForCustomer(isProductSupportedForCustomer(product, allProducts.data.productsResult));
74
74
  }, [allProducts.data.productsResult, product, props.isOnSummaryPage]);
75
75
  return (React.createElement("div", null,
76
- React.createElement(Select, { variant: SelectVariant.typeahead, typeAheadAriaLabel: t('Search for or select a product'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Search for or select a product'), "aria-labelledby": t('Product-selector'), onFilter: onFilter, selections: product, validated: isEmpty(product) && showValidationLocal ? 'error' : 'default', "data-tracking-id": "get-support-product-dropdown-selector" }, getOptions()),
77
- !isSelectedProductSupportedForCustomer && (React.createElement("div", { className: "pf-v5-u-ml-xs pf-v5-u-mt-sm form-instructions" },
76
+ React.createElement(Select, { variant: SelectVariant.typeahead, typeAheadAriaLabel: t('Search for or select a product'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Search for or select a product'), "aria-labelledby": t('Product-selector'), onFilter: onFilter, selections: product, validated: isEmpty(product) && showValidationLocal ? 'error' : 'default', "data-tracking-id": "get-support-product-dropdown-selector", isDisabled: props.isLoading }, getOptions()),
77
+ !props.isLoading && !isSelectedProductSupportedForCustomer && (React.createElement("div", { className: "pf-v5-u-ml-xs pf-v5-u-mt-sm form-instructions" },
78
78
  React.createElement(Trans, null, "Red Hat must confirm your subscription status before providing support."),
79
79
  React.createElement("br", null),
80
80
  React.createElement(Trans, null, "We'll contact you if we have any questions.")))));
@@ -91,5 +91,5 @@ export const NewProductVersionSelector = (props) => {
91
91
  setIsOpen(false);
92
92
  };
93
93
  const titleId = 'version-selector';
94
- return (React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Select a version'), toggleAriaLabel: t('Select a version'), "aria-labelledby": titleId, selections: version, validated: isEmpty(version) && showValidationLocal ? 'error' : 'default', isDisabled: isEmpty(product), "data-tracking-id": "get-support-version-dropdown-selector" }, (isSEProductApiIsDown && versionsDetails.isFetching && { loadingVariant: 'spinner' })), selectVersionOptions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })))));
94
+ return (React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Select a version'), toggleAriaLabel: t('Select a version'), "aria-labelledby": titleId, selections: version, validated: isEmpty(version) && showValidationLocal ? 'error' : 'default', isDisabled: isEmpty(product) || allProducts.isFetching, "data-tracking-id": "get-support-version-dropdown-selector" }, (isSEProductApiIsDown && versionsDetails.isFetching && { loadingVariant: 'spinner' })), selectVersionOptions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })))));
95
95
  };
@@ -4,8 +4,10 @@ import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
4
4
  interface IProps {
5
5
  routeProps: RouteComponentProps<IRouteUrlParams>;
6
6
  userSeenRecommendations?: (value: React.SetStateAction<boolean>) => void;
7
- userClickedNextonRecommendations: boolean;
8
- resultsRowRef: React.MutableRefObject<HTMLDivElement | null>;
7
+ userClickedNextonRecommendations?: boolean;
8
+ resultsRowRef?: React.MutableRefObject<HTMLDivElement | null>;
9
+ isOnGetSupportPage?: boolean;
10
+ caseCreateExperience?: boolean;
9
11
  }
10
12
  /**
11
13
  * Responsible for:
@@ -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;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,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,EAAE,OAAO,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChE;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAsFpD"}
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"}