@rh-support/troubleshoot 2.6.14 → 2.6.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.js +4 -4
  2. package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +21 -18
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +45 -34
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +13 -19
  9. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +8 -8
  12. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +1 -1
  13. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +1 -1
  15. package/lib/esm/components/CaseEditView/CaseOverview/index.js +8 -8
  16. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +20 -19
  18. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  20. package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.js +3 -3
  21. package/lib/esm/components/CaseEditView/CaseSubscriptionAbuseAlert.js +1 -1
  22. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  23. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +33 -23
  24. package/lib/esm/components/CaseEditView/PDFContainer.js +19 -15
  25. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +9 -8
  27. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +13 -16
  29. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -94
  31. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +9 -8
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +36 -31
  35. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -3
  37. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +2 -2
  38. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +9 -7
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftV3Popover.js +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +1 -1
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +2 -2
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +3 -3
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +2 -2
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.js +3 -4
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +2 -2
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +2 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseChat.js +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +1 -1
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +2 -2
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseExternalTrackerUpdate.js +1 -1
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +2 -3
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +5 -5
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +23 -17
  61. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +19 -4
  62. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +5 -8
  64. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  65. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -4
  66. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  67. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +4 -6
  68. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +4 -6
  70. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +2 -3
  73. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  74. package/lib/esm/components/CaseInformation/CaseGroup.js +1 -2
  75. package/lib/esm/components/CaseInformation/CaseInformation.js +3 -3
  76. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
  77. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +1 -1
  78. package/lib/esm/components/CaseInformation/Description.js +4 -4
  79. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  80. package/lib/esm/components/CaseInformation/Fts.js +13 -9
  81. package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
  82. package/lib/esm/components/CaseInformation/Severity.js +1 -1
  83. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  84. package/lib/esm/components/CaseInformation/SupportLevel.js +16 -10
  85. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  86. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +14 -11
  87. package/lib/esm/components/CaseManagement/CaseManagement.js +4 -4
  88. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  89. package/lib/esm/components/CaseManagement/Cep.js +44 -41
  90. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +1 -1
  91. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +50 -42
  92. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  93. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +39 -63
  94. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
  95. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  96. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +62 -36
  97. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +1 -1
  98. package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.d.ts.map +1 -1
  99. package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.js +8 -8
  100. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
  101. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +10 -10
  102. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +2 -2
  103. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  104. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +57 -16
  105. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  106. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +12 -27
  107. package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.d.ts.map +1 -1
  108. package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.js +1 -1
  109. package/lib/esm/components/Cve/CveItem.d.ts.map +1 -1
  110. package/lib/esm/components/Cve/CveItem.js +10 -11
  111. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  112. package/lib/esm/components/Cve/CveModal.js +10 -11
  113. package/lib/esm/components/Cve/CvePanel.d.ts.map +1 -1
  114. package/lib/esm/components/Cve/CvePanel.js +3 -3
  115. package/lib/esm/components/Cve/CveSidebar.js +2 -2
  116. package/lib/esm/components/IdeaInformation/IdeaInformation.js +7 -7
  117. package/lib/esm/components/ImproveCase/KtQuestions.js +6 -6
  118. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  119. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +6 -13
  120. package/lib/esm/components/ProductSelector/AllProductsSelector.js +8 -7
  121. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
  122. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  123. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +80 -53
  124. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  125. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +14 -10
  126. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -1
  127. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +4 -4
  128. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  129. package/lib/esm/components/Recommendations/AsideResults.js +5 -3
  130. package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
  131. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
  132. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
  133. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -11
  134. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
  135. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +4 -4
  136. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +7 -7
  137. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  138. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  139. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +16 -16
  140. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +6 -6
  141. package/lib/esm/components/Recommendations/RecommendationInfoBox.d.ts.map +1 -1
  142. package/lib/esm/components/Recommendations/RecommendationInfoBox.js +7 -7
  143. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  144. package/lib/esm/components/Recommendations/Recommendations.js +23 -20
  145. package/lib/esm/components/Recommendations/RecommendationsLoader.js +1 -1
  146. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  147. package/lib/esm/components/Recommendations/RulesModal.js +7 -9
  148. package/lib/esm/components/Recommendations/WatsonxAiIcon.d.ts.map +1 -1
  149. package/lib/esm/components/Recommendations/WatsonxAiIcon.js +9 -10
  150. package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
  151. package/lib/esm/components/Review/Review.js +4 -4
  152. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -5
  153. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  154. package/lib/esm/components/SessionRestore/SessionRestoreCard.js +1 -1
  155. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  156. package/lib/esm/components/SubmitCase/SubmitCase.js +21 -21
  157. package/lib/esm/components/Suggestions/Suggestions.js +2 -2
  158. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  159. package/lib/esm/components/Suggestions/TopContent.js +8 -8
  160. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  161. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -14
  162. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  163. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +20 -16
  164. package/lib/esm/components/shared/Rule.js +6 -6
  165. package/lib/esm/components/shared/fileUpload/FileLister.js +6 -6
  166. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  167. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +7 -6
  168. package/lib/esm/components/shared/fileUpload/common/FileUploaderInfoIcon.js +1 -1
  169. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
  170. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
  171. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
  172. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +4 -4
  173. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +2 -2
  174. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +15 -6
  175. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  176. package/lib/esm/components/shared/input/ContactSelectorInternal.js +128 -23
  177. package/lib/esm/components/wizardLayout/MainSection.js +2 -2
  178. package/lib/esm/components/wizardLayout/NewFeatureModal.d.ts.map +1 -1
  179. package/lib/esm/components/wizardLayout/NewFeatureModal.js +6 -6
  180. package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
  181. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  182. package/lib/esm/components/wizardLayout/WizardMain.js +61 -19
  183. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  184. package/lib/esm/components/wizardLayout/WizardNavigation.js +7 -13
  185. package/lib/esm/css/app.css +13 -13
  186. package/lib/esm/css/case.css +23 -16
  187. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  188. package/lib/esm/hooks/useWizard.js +1 -3
  189. package/lib/esm/reducers/RouteConstNTypes.d.ts +1 -2
  190. package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
  191. package/lib/esm/reducers/RulesReducer.d.ts.map +1 -1
  192. package/lib/esm/scss/_main.scss +183 -88
  193. package/lib/esm/scss/_pf-overrides.scss +150 -140
  194. package/package.json +11 -11
@@ -8,9 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { cloud } from '@cee-eng/hydrajs';
11
- import { Checkbox, Divider } from '@patternfly/react-core';
12
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
13
- import { useLRUCache } from '@rh-support/components';
11
+ import { Button, Checkbox, Divider, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
+ import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
13
+ import { useLRUCache, useSelectKeyboardNavigator } from '@rh-support/components';
14
14
  import debounce from 'lodash/debounce';
15
15
  import groupBy from 'lodash/groupBy';
16
16
  import isEmpty from 'lodash/isEmpty';
@@ -45,12 +45,12 @@ function OpenshiftDropdownV4(props) {
45
45
  const abortControllerRef = useRef();
46
46
  const [clustersSelectOptions, setClustersSelectOptions] = useState([]);
47
47
  const [isOpen, setIsOpen] = useState(false);
48
- const [validated, setValidated] = useState('default');
49
48
  const [inputVal, setInputVal] = useState('');
50
49
  const [showArchivedClusters, setShowArchivedClusters] = useState(false);
51
50
  const [isFetchingClusters, setIsFetchingClusters] = useState(false);
52
51
  const [totalResultsNo, setTotalResultsNo] = useState(0);
53
52
  const { getFromCache, setInCache } = useLRUCache(50);
53
+ const textInputRef = useRef();
54
54
  const { isExportingPDF } = useContext(PDFContext);
55
55
  // gets a cluster id and returns display name
56
56
  const getDisplayName = (id, noClusterIdReasonExplanation, display_name) => {
@@ -74,7 +74,7 @@ function OpenshiftDropdownV4(props) {
74
74
  setTotalResultsNo(fetchedClusters.total);
75
75
  setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
76
76
  });
77
- const onToggle = (isOpen) => setIsOpen(isOpen);
77
+ const onToggle = () => setIsOpen(!isOpen);
78
78
  const onViewMoreClick = () => __awaiter(this, void 0, void 0, function* () {
79
79
  const page = Math.floor(clustersRawResponse.length / PER_PAGE) + 1;
80
80
  const fetchedClusters = yield fetchAccountClusters(inputVal, page);
@@ -85,31 +85,60 @@ function OpenshiftDropdownV4(props) {
85
85
  });
86
86
  const onSelect = (event, selectedCluster) => __awaiter(this, void 0, void 0, function* () {
87
87
  setInputVal('');
88
- if (event.target.tagName !== 'BUTTON') {
89
- // checkbox is clicked
88
+ if (selectedCluster.type === 'checkbox') {
90
89
  setShowArchivedClusters(!showArchivedClusters);
91
- // reset
92
90
  props.onClusterClear();
93
91
  setClustersRawResponse([]);
94
92
  }
95
93
  else {
96
94
  props.onClusterIdStateUpdate(selectedCluster);
95
+ const displayName = selectedCluster.display_name || selectedCluster.toString();
96
+ setInputVal(displayName);
97
97
  setIsOpen(false);
98
98
  }
99
99
  });
100
+ // Define dropdown options for keyboard navigation
101
+ const dropdownOptions = useMemo(() => [
102
+ { type: 'checkbox', key: 'show-hide-archived-clusters', label: t('Show archived clusters') },
103
+ { type: 'option', key: 'dont-have-id', label: t("I don't have my Cluster ID") },
104
+ ...(props.isV3 ? [{ type: 'option', key: 'v3-cluster', label: t('The case is for a v3 cluster') }] : []),
105
+ ], [props.isV3, t]);
106
+ // Use the keyboard navigation hook
107
+ const { focusedItemIndex, onInputKeyDown } = useSelectKeyboardNavigator({
108
+ list: dropdownOptions,
109
+ isOpen,
110
+ resetIndexOnClose: true,
111
+ isDisabled: props.isDisabled,
112
+ setIsOpen,
113
+ onSelect: (item) => {
114
+ if (item.type === 'checkbox') {
115
+ setShowArchivedClusters(!showArchivedClusters);
116
+ props.onClusterClear();
117
+ setClustersRawResponse([]);
118
+ }
119
+ else if (item.key === 'dont-have-id') {
120
+ props.onClusterIdStateUpdate(createState('dont-have-id', t("I don't have my Cluster ID")));
121
+ setIsOpen(false);
122
+ }
123
+ else if (item.key === 'v3-cluster') {
124
+ props.onClusterIdStateUpdate(createState('v3-cluster', t('The case is for a v3 cluster')));
125
+ setIsOpen(false);
126
+ }
127
+ },
128
+ });
100
129
  const dropdownHeaderOptions = useMemo(() => [
101
- React.createElement(SelectOption, { key: 'show-hide-archived-clusters', inputId: "check-box" },
102
- React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters, className: "archived-clusters-checkbox" })),
130
+ React.createElement(SelectOption, { key: 'show-hide-archived-clusters', value: { type: 'checkbox' } },
131
+ React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters || false, className: "archived-clusters-checkbox" })),
103
132
  React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
104
- React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")), "data-tracking-id": "dont-have-cluster-id" }),
133
+ React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")), "data-tracking-id": "dont-have-cluster-id", isFocused: focusedItemIndex === 1 }, "I don't have my Cluster ID"),
105
134
  ...(props.isV3
106
135
  ? [
107
- React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')) }),
136
+ React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')), isFocused: focusedItemIndex === 2 }),
108
137
  ]
109
138
  : []),
110
139
  ],
111
140
  // eslint-disable-next-line react-hooks/exhaustive-deps
112
- [showArchivedClusters]);
141
+ [showArchivedClusters, focusedItemIndex]);
113
142
  const getClusterOptions = (clusters) => {
114
143
  const clustersResponseGrouped = groupBy(clusters, 'console_url') || [];
115
144
  const domainNames = Object.keys(clustersResponseGrouped) || [];
@@ -124,13 +153,16 @@ function OpenshiftDropdownV4(props) {
124
153
  const clusterOptions = [];
125
154
  domainNames.forEach((domain, index) => {
126
155
  domain !== '' &&
127
- clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-v5-u-font-weight-bold pf-v5-u-color-400", value: createState(domain, domain), key: domain + index }));
156
+ clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-v6-u-font-weight-bold pf-v6-u-color-400", value: createState(domain, domain), key: domain + index }));
128
157
  clustersResponseGrouped[domain] &&
129
158
  clustersResponseGrouped[domain].forEach((cluster, i) => {
130
159
  clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, getDisplayNameForCluster(cluster) || cluster.external_cluster_id, cluster.openshift_version) }));
131
160
  });
132
161
  clusterOptions.push(React.createElement(Divider, { component: "div", key: index + domain }));
133
162
  });
163
+ if (!isFetchingClusters && clustersRawResponse.length < totalResultsNo) {
164
+ clusterOptions.push(React.createElement(SelectOption, { key: "load-more-option", value: {}, onClick: onViewMoreClick, isDisabled: false, className: "pf-v6-u-font-weight-bold" }, "Display additional results"));
165
+ }
134
166
  return [
135
167
  ...dropdownHeaderOptions,
136
168
  ...(clusterOptions.length !== 0 ? [React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider' })] : []),
@@ -255,24 +287,17 @@ function OpenshiftDropdownV4(props) {
255
287
  };
256
288
  // eslint-disable-next-line react-hooks/exhaustive-deps
257
289
  }, [props.isV3, showArchivedClusters, isOpen, inputVal]);
258
- useEffect(() => {
259
- if (props.isClusterIdInvalid) {
260
- setValidated('error');
261
- }
262
- else {
263
- setValidated('default');
264
- }
265
- }, [props.isClusterIdInvalid]);
266
- // when user type or paste a clusterId we land here
267
- const onTypeaheadInputChanged = (input) => __awaiter(this, void 0, void 0, function* () {
268
- setInputVal(input);
269
- const fetchedClusters = yield fetchAccountClusters(input);
290
+ const onTextInputChange = (_event, value) => {
291
+ setInputVal(value);
292
+ props.onClusterIdStateUpdate({ external_cluster_id: value });
293
+ debounceFn(value);
294
+ };
295
+ const debounceFn = debounce((value) => __awaiter(this, void 0, void 0, function* () {
296
+ const fetchedClusters = yield fetchAccountClusters(value);
270
297
  setClustersRawResponse(fetchedClusters.items);
271
298
  setTotalResultsNo(fetchedClusters.total);
272
299
  setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
273
- props.onClusterIdStateUpdate({ external_cluster_id: input });
274
- });
275
- const debounceFn = debounce(onTypeaheadInputChanged, 500);
300
+ }), 500);
276
301
  const getSelectedItem = () => {
277
302
  if (!isEmpty(inputVal)) {
278
303
  return createState(props.openshiftClusterIDState, inputVal);
@@ -281,6 +306,12 @@ function OpenshiftDropdownV4(props) {
281
306
  return createState(props.openshiftClusterIDState, getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState));
282
307
  }
283
308
  };
309
+ const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggle, onKeyDown: onInputKeyDown, isExpanded: isOpen, isFullWidth: true, isDisabled: props.isDisabled },
310
+ React.createElement(TextInputGroup, { isPlain: true },
311
+ React.createElement(TextInputGroupMain, { value: inputVal, onClick: onToggle, onChange: onTextInputChange, onKeyDown: onInputKeyDown, autoComplete: "off", innerRef: textInputRef, placeholder: t('Search by Cluster ID, alias, and domain or manually enter your Cluster ID'), role: "combobox", isExpanded: isOpen, "aria-controls": "openshift-cluster-selector-listbox" }),
312
+ isFetchingClusters ? (React.createElement(TextInputGroupUtilities, null,
313
+ React.createElement(Spinner, { size: "md" }))) : (inputVal && (React.createElement(TextInputGroupUtilities, null,
314
+ React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onDropdownClear, "aria-label": t('Clear input value') })))))));
284
315
  const titleId = 'case-details-cluster-nickname-selector';
285
316
  return (React.createElement(React.Fragment, null,
286
317
  React.createElement("div", { className: `${props.className} form-group` },
@@ -289,13 +320,8 @@ function OpenshiftDropdownV4(props) {
289
320
  React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
290
321
  !isExportingPDF ? React.createElement(CaseOpenShiftPopover, null) : ''),
291
322
  React.createElement("span", { id: titleId, hidden: true }, "Select a state"),
292
- React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, isDisabled: props.isDisabled, typeAheadAriaLabel: t('Search by Cluster ID, alias, and domain or manually enter your Cluster ID'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, onClear: !isExportingPDF ? onDropdownClear : undefined, selections: getSelectedItem(), isOpen: isOpen, "aria-labelledby": titleId, placeholderText: t('Search by Cluster ID, alias, and domain or manually enter your Cluster ID'), hasInlineFilter: false, onTypeaheadInputChanged: debounceFn, onFilter: () => undefined, validated: validated, "aria-invalid": props.isClusterIdInvalid, "aria-describedby": "clusterID-validate-helper", required: true }, (isFetchingClusters && { loadingVariant: 'spinner' }), (!isFetchingClusters &&
293
- clustersRawResponse.length < totalResultsNo && {
294
- loadingVariant: {
295
- text: 'Display additional results',
296
- onClick: onViewMoreClick,
297
- },
298
- }), { "data-tracking-id": "openshift-cluster-id", className: "openshift-cluster-id" }), clustersSelectOptions),
323
+ React.createElement(Select, { id: "openshift-cluster-selector", isOpen: isOpen, selected: getSelectedItem(), onSelect: onSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, shouldFocusFirstItemOnOpen: true, isScrollable: true, "aria-invalid": props.isClusterIdInvalid, "aria-describedby": "clusterID-validate-helper", "data-tracking-id": "openshift-cluster-id", className: "openshift-cluster-id" },
324
+ React.createElement(SelectList, { id: "openshift-cluster-selector-listbox" }, clustersSelectOptions)),
299
325
  React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
300
326
  }
301
327
  OpenshiftDropdownV4.defaultProps = defaultProps;
@@ -121,7 +121,7 @@ function RHAssociatesSelector(props) {
121
121
  }, placeholder: t(`Add an internal associate to watch this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating, "data-tracking-id": "case-contact-select-rh-watcher" })),
122
122
  caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher" },
123
123
  React.createElement(Trans, null, "Add me as a watcher"))),
124
- caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v5-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
124
+ caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
125
125
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
126
126
  React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
127
127
  React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-rh-watcher" },
@@ -1 +1 @@
1
- {"version":3,"file":"AddContactToGroupModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddContactToGroupModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,UAAU,CAAC;IAC9B,eAAe,EAAE,UAAU,CAAC;IAC5B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBAuDnD"}
1
+ {"version":3,"file":"AddContactToGroupModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddContactToGroupModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,UAAU,CAAC;IAC9B,eAAe,EAAE,UAAU,CAAC;IAC5B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBAkDnD"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { Button, Modal, ModalVariant, TextInput } from '@patternfly/react-core';
11
+ import { Button, Modal, ModalFooter, ModalVariant, TextInput } from '@patternfly/react-core';
12
12
  import { ToastNotification, useFetch } from '@rh-support/components';
13
13
  import React from 'react';
14
14
  import { Trans, useTranslation } from 'react-i18next';
@@ -30,16 +30,16 @@ export function AddContactToGroupModal(props) {
30
30
  const handleClose = () => {
31
31
  props.onClose && props.onClose();
32
32
  };
33
- return (React.createElement(Modal, { variant: ModalVariant.medium, title: t('Add to a group'), isOpen: true, onClose: handleClose, actions: [
34
- React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching },
35
- React.createElement(Trans, null, "Add")),
36
- React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose },
37
- React.createElement(Trans, null, " Cancel")),
38
- ] },
33
+ return (React.createElement(Modal, { variant: ModalVariant.medium, title: t('Add to a group'), isOpen: true, onClose: handleClose },
39
34
  React.createElement("label", { htmlFor: "group-member" },
40
35
  React.createElement(Trans, null, "New group member")),
41
36
  React.createElement(TextInput, { id: "group-member", isDisabled: true, value: props.selectedContact.ssoUsername }),
42
37
  React.createElement("label", { htmlFor: "group-selector" },
43
38
  React.createElement(Trans, null, "Group")),
44
- React.createElement(TextInput, { id: "group-selector", value: props.selectedCaseGroup.name, isDisabled: true })));
39
+ React.createElement(TextInput, { id: "group-selector", value: props.selectedCaseGroup.name, isDisabled: true }),
40
+ React.createElement(ModalFooter, null,
41
+ React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching },
42
+ React.createElement(Trans, null, "Add")),
43
+ React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose },
44
+ React.createElement(Trans, null, " Cancel")))));
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AddCustomEmailToAccountModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBAsGpD"}
1
+ {"version":3,"file":"AddCustomEmailToAccountModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBAsGpD"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { customEmail } from '@cee-eng/hydrajs';
11
- import { Button, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
11
+ import { Button, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalFooter, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
12
12
  import { ToastNotification, useFetch } from '@rh-support/components';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import React, { useState } from 'react';
@@ -45,13 +45,8 @@ export function AddCustomEmailToAccount(props) {
45
45
  : isEmpty(firstName.trim())
46
46
  ? ValidatedOptions.error
47
47
  : ValidatedOptions.default;
48
- return (React.createElement(Modal, { variant: ModalVariant.medium, title: t('Add a notification email to your account'), isOpen: true, onClose: handleClose, onEscapePress: handleClose, actions: [
49
- React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName.trim())) },
50
- React.createElement(Trans, null, "Add to account")),
51
- React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose, isDisabled: isFetching },
52
- React.createElement(Trans, null, "Cancel")),
53
- ] },
54
- React.createElement("p", { className: "pf-v5-u-mb-lg" },
48
+ return (React.createElement(Modal, { variant: ModalVariant.medium, title: t('Add a notification email to your account'), isOpen: true, onClose: handleClose, onEscapePress: handleClose },
49
+ React.createElement("p", { className: "pf-v6-u-mb-lg" },
55
50
  React.createElement(Trans, null, "Note: This email will be added at an account level, not a case level.")),
56
51
  React.createElement(Form, null,
57
52
  React.createElement(FormGroup, { label: t('New email address'), fieldId: "custom-email-address", isRequired: true },
@@ -62,6 +57,11 @@ export function AddCustomEmailToAccount(props) {
62
57
  React.createElement(HelperTextItem, { variant: "error" },
63
58
  React.createElement(Trans, null, "First name cannot be empty"))))),
64
59
  React.createElement(TextInput, { id: "custom-email-firstName", value: firstName, isRequired: true, type: "text", validated: firstNameValidated, onChange: (_event, firstName) => onFirstNameChange(firstName), "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254 })),
65
- React.createElement(FormGroup, { label: t('Last name'), fieldId: "custom-email-lastName", className: "pf-v5-u-mb-md" },
66
- React.createElement(TextInput, { id: "custom-email-lastName", value: lastName, type: "text", onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 })))));
60
+ React.createElement(FormGroup, { label: t('Last name'), fieldId: "custom-email-lastName", className: "pf-v6-u-mb-md" },
61
+ React.createElement(TextInput, { id: "custom-email-lastName", value: lastName, type: "text", onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 }))),
62
+ React.createElement(ModalFooter, null,
63
+ React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName.trim())) },
64
+ React.createElement(Trans, null, "Add to account")),
65
+ React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose, isDisabled: isFetching },
66
+ React.createElement(Trans, null, "Cancel")))));
67
67
  }
@@ -259,7 +259,7 @@ function CaseContactSelector(props) {
259
259
  const getCreateNewText = (query) => `Add to your account: ${query}`;
260
260
  if (!canSeeEmailNotifications)
261
261
  return React.createElement(React.Fragment, null);
262
- return (React.createElement("div", { className: "form-group pf-v5-u-mb-md" },
262
+ return (React.createElement("div", { className: "form-group pf-v6-u-mb-md" },
263
263
  React.createElement("label", { className: "react-typeahead-label-wrapper", htmlFor: "get-support-notifications" },
264
264
  React.createElement(Trans, null, "Send notifications"),
265
265
  loggedInUserRights.data.isOrgAdmin() ? (React.createElement(React.Fragment, null,
@@ -286,7 +286,7 @@ function CaseContactSelector(props) {
286
286
  React.createElement(Button, { variant: "link", isInline: true, component: "span", onClick: onAddEmailToAccountBtnClick }, "add them at the account level"))))),
287
287
  caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher" },
288
288
  React.createElement(Trans, null, "Add me as a watcher"))),
289
- caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v5-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
289
+ caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
290
290
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
291
291
  React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
292
292
  React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-watcher" },
@@ -1 +1 @@
1
- {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAeD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA4JxD"}
1
+ {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAqCD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0MxD"}
@@ -19,11 +19,10 @@ var __rest = (this && this.__rest) || function (s, e) {
19
19
  return t;
20
20
  };
21
21
  import { accounts } from '@cee-eng/hydrajs';
22
- import { Button, Flex, FlexItem } from '@patternfly/react-core';
22
+ import { Button, Flex, FlexItem, Label, LabelGroup, Menu, MenuContent, MenuItem, MenuList, Popper, TextInput, } from '@patternfly/react-core';
23
23
  import { getHydraContactLabel, useFetch } from '@rh-support/components';
24
24
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
25
- import React, { useContext, useState } from 'react';
26
- import { Highlighter, Token, Typeahead } from 'react-bootstrap-typeahead';
25
+ import React, { useContext, useEffect, useRef, useState } from 'react';
27
26
  import { Trans } from 'react-i18next';
28
27
  const isCustomEmailAddress = (user) => {
29
28
  return !!(user === null || user === void 0 ? void 0 : user.emailAddress);
@@ -35,18 +34,41 @@ const getKey = (option) => {
35
34
  if (isCustomEmailAddress(option))
36
35
  return option.emailAddress;
37
36
  if (isContact(option))
38
- return option.ssoUsername;
37
+ return option.ssoUsername || '';
38
+ return '';
39
+ };
40
+ const CustomHighlighter = ({ search, children }) => {
41
+ if (!search)
42
+ return React.createElement(React.Fragment, null, children);
43
+ const regex = new RegExp(`(${search})`, 'gi');
44
+ const parts = children.split(regex);
45
+ return (React.createElement(React.Fragment, null, parts.map((part, index) => regex.test(part) ? (React.createElement("mark", { key: index, style: { backgroundColor: '#fff3cd' } }, part)) : (part))));
39
46
  };
40
47
  export function NonOrgCaseNotifyeesSelector(props) {
41
48
  const [inputVal, setInputVal] = useState('');
49
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
50
+ const inputRef = useRef(null);
51
+ const menuRef = useRef(null);
42
52
  const { request, isFetching } = useFetch(accounts.searchAccountForContactAndNotificationAddress);
43
53
  const [notifyeesList, setNotifyeesList] = useState([]);
44
54
  const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
45
55
  const [showGroupPermissionError, setShowGroupPermissionError] = useState(false);
46
56
  const [showAccountPermissionError, setShowAccountPermissionError] = useState(false);
47
- const onItemSelect = (selected) => {
48
- props.onChange && props.onChange(selected);
57
+ useEffect(() => {
58
+ if (props.typeaheadRef) {
59
+ props.typeaheadRef.current = inputRef.current;
60
+ }
61
+ }, [props.typeaheadRef]);
62
+ const onItemSelect = (option) => {
63
+ const newSelected = [...props.selectedItems, option];
64
+ props.onChange && props.onChange(newSelected);
65
+ setInputVal('');
49
66
  clearList();
67
+ setIsDropdownOpen(false);
68
+ };
69
+ const onRemoveItem = (optionToRemove) => {
70
+ const newSelected = props.selectedItems.filter((item) => getKey(item) !== getKey(optionToRemove));
71
+ props.onChange && props.onChange(newSelected);
50
72
  };
51
73
  const onAddClick = () => __awaiter(this, void 0, void 0, function* () {
52
74
  var _a, _b, _c;
@@ -62,7 +84,11 @@ export function NonOrgCaseNotifyeesSelector(props) {
62
84
  const { ssoName } = c, rest = __rest(c, ["ssoName"]);
63
85
  return Object.assign({ ssoUsername: ssoName }, rest);
64
86
  });
65
- setNotifyeesList([...mappedContacts, { emailAddress: notificationAddress.email }]);
87
+ setNotifyeesList([
88
+ ...mappedContacts,
89
+ { emailAddress: notificationAddress.email, caseNumber: '' },
90
+ ]);
91
+ setIsDropdownOpen(true);
66
92
  }
67
93
  else {
68
94
  if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
@@ -102,22 +128,37 @@ export function NonOrgCaseNotifyeesSelector(props) {
102
128
  setInputVal(val);
103
129
  }
104
130
  clearList();
131
+ setIsDropdownOpen(false);
105
132
  };
106
- const renderToken = (option, thProps, idx) => {
107
- const isContactOption = isContact(option);
108
- const isCurrentUserCaseContact = option.ssoUsername === props.contactSsoUsername;
109
- return (React.createElement(Token, { option: option, key: idx, onRemove: thProps.onRemove, disabled: (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact }, getHydraContactLabel(option)));
110
- };
111
- const renderMenuItemChildren = (option, p) => (React.createElement(Highlighter, { key: getKey(option), search: p.text }, getHydraContactLabel(option)));
112
- const onBlur = () => {
133
+ const onBlur = (event) => {
134
+ if (menuRef.current && menuRef.current.contains(event.relatedTarget)) {
135
+ return;
136
+ }
113
137
  clearList();
138
+ setIsDropdownOpen(false);
139
+ };
140
+ const renderSelectedItems = () => {
141
+ if (props.selectedItems.length === 0)
142
+ return null;
143
+ return (React.createElement(LabelGroup, { style: { marginBottom: '8px' } }, props.selectedItems.map((option, index) => {
144
+ const isContactOption = isContact(option);
145
+ const isCurrentUserCaseContact = isContactOption && option.ssoUsername === props.contactSsoUsername;
146
+ const isDisabled = (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact;
147
+ return (React.createElement(Label, { key: getKey(option) || index, onClose: !isDisabled ? () => onRemoveItem(option) : undefined, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline" }, getHydraContactLabel(option)));
148
+ })));
114
149
  };
150
+ const menu = (React.createElement(Menu, { ref: menuRef },
151
+ React.createElement(MenuContent, null,
152
+ React.createElement(MenuList, null, notifyeesList.map((option, index) => (React.createElement(MenuItem, { key: getKey(option) || index, onClick: () => onItemSelect(option) },
153
+ React.createElement(CustomHighlighter, { search: inputVal }, getHydraContactLabel(option)))))))));
115
154
  return (React.createElement(Flex, null,
116
155
  React.createElement(FlexItem, { grow: { sm: 'grow' } },
117
- React.createElement(Typeahead, { id: props.id, "data-tracking-id": props.dataTrackingId, onChange: onItemSelect, onInputChange: onInputChange, open: notifyeesList.length > 0, ref: props.typeaheadRef, selected: props.selectedItems, placeholder: props.placeholder, disabled: props.isDisabled || isFetching, options: notifyeesList, renderToken: renderToken, multiple: true, filterBy: () => true, labelKey: getHydraContactLabel, renderMenuItemChildren: renderMenuItemChildren, onBlur: onBlur, isInvalid: showGroupPermissionError || showAccountPermissionError }),
156
+ React.createElement("div", null,
157
+ renderSelectedItems(),
158
+ React.createElement(Popper, { trigger: React.createElement(TextInput, { ref: inputRef, id: props.id, "data-tracking-id": props.dataTrackingId, value: inputVal, onChange: (event, value) => onInputChange(value), placeholder: props.placeholder, isDisabled: props.isDisabled || isFetching, onBlur: onBlur, validated: showGroupPermissionError || showAccountPermissionError ? 'error' : 'default' }), popper: menu, isVisible: isDropdownOpen && notifyeesList.length > 0, position: "start" })),
118
159
  props.selectedItems.length > 0 && !showAccountPermissionError && !showAccountPermissionError && (React.createElement("p", { className: "form-instructions" },
119
160
  React.createElement(Trans, null, "Enter an email address or username for the person you want to notify"))),
120
- React.createElement("p", { className: "pf-v5-c-form__helper-text pf-m-error", style: { color: '#c9190b' } },
161
+ React.createElement("p", { className: "pf-v6-c-form__helper-text pf-m-error", style: { color: '#c9190b' } },
121
162
  showGroupPermissionError && (React.createElement(Trans, null,
122
163
  inputVal,
123
164
  " was not found under the selected group. Please contact your Org Admin to add them to this group.")),
@@ -1 +1 @@
1
- {"version":3,"file":"NoAttachmentSelectedModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/NoAttachmentSelectedModal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAiBvE,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAuJtD"}
1
+ {"version":3,"file":"NoAttachmentSelectedModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/NoAttachmentSelectedModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAiBvE,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAiJtD"}
@@ -1,4 +1,4 @@
1
- import { Button, ButtonVariant, Modal, ModalVariant } from '@patternfly/react-core';
1
+ import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
2
2
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
3
  import { ability, resourceActions, resources } from '@rh-support/user-permissions';
4
4
  import { pendoTrackEvent } from '@rh-support/utils';
@@ -56,26 +56,6 @@ export function NoAttachmentSelectedModal(props) {
56
56
  }
57
57
  return title;
58
58
  };
59
- const getModalActionButtons = () => {
60
- let actionButtons = [];
61
- if (isUploading) {
62
- actionButtons = [
63
- React.createElement(Button, { key: "create-case", variant: ButtonVariant.primary, onClick: props.onConfirm, "data-tracking-id": "skip-upload-or-analysis-and-submit" },
64
- React.createElement(Trans, null, "Skip analyze and create my case")),
65
- ];
66
- }
67
- else if (isAnyFileAttachedLocal) {
68
- actionButtons = [];
69
- }
70
- else {
71
- actionButtons = [
72
- React.createElement(FileSelectorButton, { key: "file-selector-btn", buttonLabel: t('Upload a file'), className: "pf-m-primary", "data-tracking-id": "no-attachment-file-selector-button", isSessionId: true }),
73
- React.createElement(Button, { key: "skip-file", onClick: props.onConfirm, className: "pf-v5-u-ml-sm", "data-tracking-id": "submit-without-attachment", variant: ButtonVariant.secondary },
74
- React.createElement(Trans, null, "Yes, I'm sure")),
75
- ];
76
- }
77
- return actionButtons;
78
- };
79
59
  const onFileUploadClick = () => {
80
60
  if (skipAndCreateCaseBtntimeoutRef.current) {
81
61
  clearTimeout(skipAndCreateCaseBtntimeoutRef.current);
@@ -92,12 +72,17 @@ export function NoAttachmentSelectedModal(props) {
92
72
  !isUploading && setIsUploading(true);
93
73
  }
94
74
  };
95
- return (React.createElement(Modal, { id: "no-attachment-selected", title: t(getModalTitle()), "aria-describedby": "no-attachment-selected-modal", isOpen: props.isOpen, onClose: props.onClose, showClose: true, actions: getModalActionButtons(), variant: ModalVariant.large, "data-tracking-id": "no-attachment-selected-modal-body" },
96
- !isAnyFileAttachedLocal && (React.createElement(React.Fragment, null,
97
- React.createElement("p", { className: "pf-v5-u-mb-md" },
75
+ return (React.createElement(Modal, { id: "no-attachment-selected", title: t(getModalTitle()), "aria-describedby": "no-attachment-selected-modal", isOpen: props.isOpen, onClose: props.onClose, variant: ModalVariant.large, "data-tracking-id": "no-attachment-selected-modal-body" },
76
+ React.createElement(ModalHeader, { title: t(getModalTitle()) }),
77
+ React.createElement(ModalBody, null, !isAnyFileAttachedLocal && (React.createElement(React.Fragment, null,
78
+ React.createElement("p", { className: "pf-v6-u-mb-md" },
98
79
  React.createElement(Trans, null, "Uploading an attachment will speed up your case's resolution time")),
99
- React.createElement(FileEARule, { isInline: true }))),
80
+ React.createElement(FileEARule, { isInline: true })))),
100
81
  React.createElement(FileUpload, { idToUploadTo: activeSessionId, onUploadClick: onFileUploadClick, isSessionId: true, needsAnalyzing: true, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, isSecureSupport: loggedInUsersAccount.data.secureSupport, isPrivate: false }),
101
- !canUseSessionManagement && isAnyFileAttachedLocal && (React.createElement(Button, { className: "pf-v5-u-mt-sm", variant: ButtonVariant.primary, onClick: props.onConfirm, "data-tracking-id": "no-attachment-modal-create-case" },
102
- React.createElement(Trans, null, "Create Case")))));
82
+ React.createElement(ModalFooter, null, isUploading ? (React.createElement(Button, { key: "create-case", variant: ButtonVariant.primary, onClick: props.onConfirm, "data-tracking-id": "skip-upload-or-analysis-and-submit" },
83
+ React.createElement(Trans, null, "Skip analyze and create my case"))) : isAnyFileAttachedLocal ? (!canUseSessionManagement && (React.createElement(Button, { className: "pf-v6-u-mt-sm", variant: ButtonVariant.primary, onClick: props.onConfirm, "data-tracking-id": "no-attachment-modal-create-case" },
84
+ React.createElement(Trans, null, "Create Case")))) : (React.createElement(React.Fragment, null,
85
+ React.createElement(FileSelectorButton, { key: "file-selector-btn", buttonLabel: t('Upload a file'), className: "pf-m-primary", "data-tracking-id": "no-attachment-file-selector-button", isSessionId: true }),
86
+ React.createElement(Button, { key: "skip-file", onClick: props.onConfirm, className: "pf-v6-u-ml-sm", "data-tracking-id": "submit-without-attachment", variant: ButtonVariant.secondary },
87
+ React.createElement(Trans, null, "Yes, I'm sure")))))));
103
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PreferredSecureSupportModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/PreferredSecureSupportModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,2BAA2B,UAAW,MAAM,sBAiCxD,CAAC"}
1
+ {"version":3,"file":"PreferredSecureSupportModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/PreferredSecureSupportModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,2BAA2B,UAAW,MAAM,sBAgCxD,CAAC"}
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { Trans, useTranslation } from 'react-i18next';
4
4
  export const PreferredSecureSupportModal = (props) => {
5
5
  const { t } = useTranslation();
6
- return (React.createElement(Modal, { id: "preferred-secured-support-modal", title: t('Preferred secure support account'), "aria-describedby": "preferred-secured-support-modal", isOpen: props.isOpen, onClose: props.onClose, showClose: true, variant: ModalVariant.small },
6
+ return (React.createElement(Modal, { id: "preferred-secured-support-modal", title: t('Preferred secure support account'), "aria-describedby": "preferred-secured-support-modal", isOpen: props.isOpen, onClose: props.onClose, variant: ModalVariant.small },
7
7
  React.createElement("p", null,
8
8
  React.createElement(Trans, null, "To comply with AT&T's SISR agreement, all Red Hat support cases must be opened under a different, designated secure support account."),
9
9
  "\u00A0",
@@ -1 +1 @@
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
+ {"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,sBAsNnC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
- import { Button, Flex, FlexItem, Label, LabelGroup, Text, TextVariants } from '@patternfly/react-core';
2
+ import { Button, Content, ContentVariants, Flex, FlexItem, Label, LabelGroup } from '@patternfly/react-core';
3
3
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
4
4
  import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon';
5
5
  import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
@@ -66,7 +66,7 @@ export const CveItem = (props) => {
66
66
  ? SessionResourceWorkflowComponent.CVE_MODEl
67
67
  : SessionResourceWorkflowComponent.CVE_ASIDE, isVisited ? true : false, isCveModalOpened ? 3 : 2));
68
68
  };
69
- const renderDate = () => (cve === null || cve === void 0 ? void 0 : cve.publicDate) && (React.createElement("div", { className: "pf-v5-u-disabled-color-100" },
69
+ const renderDate = () => (cve === null || cve === void 0 ? void 0 : cve.publicDate) && (React.createElement("div", { className: "pf-v6-u-disabled-color-100" },
70
70
  React.createElement(Trans, null, "Public on"),
71
71
  " - ",
72
72
  formatDate(cve.publicDate)));
@@ -78,7 +78,7 @@ export const CveItem = (props) => {
78
78
  : cve.severity === 'Important'
79
79
  ? 'orange'
80
80
  : cve.severity === 'Moderate'
81
- ? 'gold'
81
+ ? 'yellow'
82
82
  : undefined, isCompact: true }, cve.severity)),
83
83
  !isEmpty(cve.errataData) && (React.createElement(Label, { color: "blue", isCompact: true },
84
84
  React.createElement(Trans, null, "Fixed"))),
@@ -88,7 +88,7 @@ export const CveItem = (props) => {
88
88
  if (isEmpty(cve === null || cve === void 0 ? void 0 : cve.errataData)) {
89
89
  return null;
90
90
  }
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' } },
91
+ return (React.createElement(Table, { "aria-label": "Errata table", variant: 'compact', className: "pf-v6-u-mt-md" },
92
92
  React.createElement(Thead, null,
93
93
  React.createElement(Tr, null,
94
94
  React.createElement(Th, null,
@@ -101,9 +101,9 @@ export const CveItem = (props) => {
101
101
  var _a, _b, _c;
102
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 })),
103
103
  React.createElement(Td, null,
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 :
104
+ React.createElement(Content, { component: ContentVariants.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 :
105
105
  _c.name,
106
- React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" }))),
106
+ React.createElement(ExternalLinkAltIcon, { className: "pf-v6-u-ml-sm" }))),
107
107
  React.createElement(Td, { modifier: "truncate" }, errata === null || errata === void 0 ? void 0 : errata.package),
108
108
  React.createElement(Td, null,
109
109
  React.createElement(Trans, null, errata === null || errata === void 0 ? void 0 : errata.state))));
@@ -112,7 +112,7 @@ export const CveItem = (props) => {
112
112
  const displayDescription = () => {
113
113
  var _a;
114
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) {
115
- return (React.createElement("p", { className: "pf-v5-u-mt-md" },
115
+ return (React.createElement("p", { className: "pf-v6-u-mt-md" },
116
116
  React.createElement(Trans, null, "for this CVE, mitigation and fix is not available, for more details, go to the CVE page.")));
117
117
  }
118
118
  const MAX_DESCRIPTION_LENGTH = isCveModalOpened ? 300 : 120;
@@ -122,7 +122,7 @@ export const CveItem = (props) => {
122
122
  const trimmedDescription = description.length <= MAX_DESCRIPTION_LENGTH
123
123
  ? description
124
124
  : description.slice(0, MAX_DESCRIPTION_LENGTH).trim() + '...';
125
- return React.createElement("p", { className: "pf-v5-u-mt-md pf-v5-u-color-300", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
125
+ return React.createElement("p", { className: "pf-v6-u-mt-md pf-v6-u-color-300", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
126
126
  };
127
127
  const onClickGoToCveButtonPage = () => {
128
128
  onPresentOrVisitedCveErrataData(true);
@@ -133,7 +133,6 @@ export const CveItem = (props) => {
133
133
  React.createElement(FlexItem, null, renderDate())),
134
134
  displayErrataTable(),
135
135
  displayDescription(),
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 },
137
- React.createElement(Trans, null, "Go to CVE"),
138
- React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" })))));
136
+ (cve === null || cve === void 0 ? void 0 : cve.cveLink) && (React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, { className: "pf-v6-u-ml-sm" }), variant: "primary", className: isCveModalOpened ? 'pf-v6-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 },
137
+ React.createElement(Trans, null, "Go to CVE")))));
139
138
  };
@@ -1 +1 @@
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,yBAuEpB,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,yBAyEpB,CAAC"}