@rh-support/troubleshoot 2.6.14 → 2.6.16

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
@@ -7,9 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Button, ButtonVariant, Modal, ModalVariant } from '@patternfly/react-core';
11
- import { Select, SelectOption } from '@patternfly/react-core/deprecated';
12
- import { ToastNotification } from '@rh-support/components';
10
+ import { Button, ButtonVariant, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
11
+ import { SingleSelectDropdown, ToastNotification } from '@rh-support/components';
13
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
14
13
  import { ability, resourceActions, resources } from '@rh-support/user-permissions';
15
14
  import isEqual from 'lodash/isEqual';
@@ -24,8 +23,6 @@ export function VerifyCaseStatusModal(props) {
24
23
  const caseUpdateError = useCaseUpdateErrorMessage();
25
24
  const [caseOverviewState, caseOverviewDispatch] = useReducer(caseOverviewReducer, initialCaseViewState);
26
25
  const canManageCase = ability.can(resourceActions.UPDATE, resources.CASE_DETAILS);
27
- const [showDropdown, setShowDropdown] = useState(false);
28
- const onDropdownToggle = (toggle) => setShowDropdown(toggle);
29
26
  const caseState = useCaseSelector((state) => ({
30
27
  caseDetails: {
31
28
  product: state.caseDetails.product,
@@ -81,23 +78,32 @@ export function VerifyCaseStatusModal(props) {
81
78
  return;
82
79
  }
83
80
  });
84
- const onStatusChange = (event, newStatus) => __awaiter(this, void 0, void 0, function* () {
81
+ const onStatusChange = (selectedOption) => __awaiter(this, void 0, void 0, function* () {
85
82
  if (canEditCase.alert())
86
83
  return;
87
- setStatusChange(newStatus);
88
- onDropdownToggle(false);
84
+ setStatusChange(selectedOption.value);
89
85
  });
90
- return (React.createElement(Modal, { id: "case-close-modal", title: t(`Please verify this case's status`), description: t(`Consider whether or not you're ready to nudge the customer`), "aria-describedby": "case-close-modal", isOpen: true, onClose: props.onClose, showClose: true, actions: [
91
- React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: isVerifyCaseStatusLoading, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-submit" },
92
- React.createElement(Trans, null, "Continue")),
93
- React.createElement(Button, { key: "close-modal", variant: ButtonVariant.link, onClick: props.onClose, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-cancel" },
94
- React.createElement(Trans, null, "Cancel")),
95
- ], variant: ModalVariant.medium },
86
+ // Create selected option for SingleSelectDropdown
87
+ const getSelectedOption = () => ({
88
+ label: t(statusChange || status),
89
+ value: statusChange || status,
90
+ });
91
+ // Create options array for SingleSelectDropdown
92
+ const getDropdownOptions = () => caseOverviewState.allCaseStatuses.data.map((statusOption) => ({
93
+ label: t(statusOption),
94
+ value: statusOption,
95
+ disabled: statusOption === status,
96
+ }));
97
+ return (React.createElement(Modal, { id: "case-close-modal", title: t(`Please verify this case's status`), "aria-describedby": "case-close-modal", isOpen: true, onClose: props.onClose, variant: ModalVariant.medium },
96
98
  React.createElement("h3", { className: "subheading subheading-sm" },
97
99
  React.createElement(Trans, null, "Status"),
98
100
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
99
- React.createElement(Select, { "aria-label": t(status), id: "verify-case-status", selections: statusChange, onSelect: onStatusChange, isOpen: showDropdown, isDisabled: !canManageCase ||
101
+ React.createElement(SingleSelectDropdown, { ariaLabel: t(status), id: "verify-case-status", selected: getSelectedOption(), options: getDropdownOptions(), onSelect: onStatusChange, isDisabled: !canManageCase ||
100
102
  caseOverviewState.allCaseStatuses.isFetching ||
101
- (caseOverviewState.caseStatusUpdating && isCaseUpdating), menuAppendTo: document.body, validated: !status ? 'error' : 'default', placeholderText: t(status), onToggle: (_event, toggle) => onDropdownToggle(toggle) }, caseOverviewState.allCaseStatuses.data.map((option, index) => (React.createElement(SelectOption, { key: index, value: option, isDisabled: option === status },
102
- React.createElement(Trans, null, option)))))));
103
+ (caseOverviewState.caseStatusUpdating && isCaseUpdating), isInvalid: !status, placeholder: t(status) }),
104
+ React.createElement(ModalFooter, null,
105
+ React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: isVerifyCaseStatusLoading, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-submit" },
106
+ React.createElement(Trans, null, "Continue")),
107
+ React.createElement(Button, { key: "close-modal", variant: ButtonVariant.link, onClick: props.onClose, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-cancel" },
108
+ React.createElement(Trans, null, "Cancel")))));
103
109
  }
@@ -73,7 +73,6 @@
73
73
  display: flex;
74
74
  justify-content: space-between;
75
75
  align-items: center;
76
- padding: 0.5rem 1rem;
77
76
  margin: 0 -0.8rem;
78
77
  }
79
78
 
@@ -85,12 +84,17 @@
85
84
  #options-menu-top-pagination {
86
85
  display: flex !important;
87
86
  flex-wrap: nowrap !important;
87
+ justify-content: flex-start;
88
88
  }
89
89
  .timeline-sort-order-select {
90
90
  width: auto;
91
91
  margin-left: 1rem;
92
92
  }
93
93
 
94
+ .timeline-sort-order-select .pf-v6-c-menu-toggle {
95
+ min-width: 17rem;
96
+ }
97
+
94
98
  .timeline-controls:last-of-type {
95
99
  justify-content: flex-start;
96
100
  }
@@ -254,14 +258,13 @@ ul#case-history-paginated-timeline {
254
258
  }
255
259
 
256
260
  .case-history-timeline-search {
257
- width: 30%;
261
+ width: 40%;
258
262
  }
259
263
 
260
264
  .timelineMenu {
261
265
  display: flex;
262
266
  justify-content: space-between;
263
267
  align-items: center;
264
- margin-bottom: 2rem;
265
268
  }
266
269
 
267
270
  .case-history-timeline-datepicker {
@@ -271,6 +274,14 @@ ul#case-history-paginated-timeline {
271
274
  width: 64.2%;
272
275
  }
273
276
 
277
+ .case-history-timeline-datepicker input[aria-label='Date picker'] {
278
+ min-width: 10rem;
279
+ }
280
+
281
+ .case-history-timeline-datepicker button {
282
+ height: 100% !important;
283
+ }
284
+
274
285
  .empty-state-date-picker {
275
286
  margin-left: 82%;
276
287
  }
@@ -284,8 +295,12 @@ ul#case-history-paginated-timeline {
284
295
  .timeline-sort-order-select {
285
296
  display: flex;
286
297
  justify-content: flex-end;
287
- margin: 1rem;
288
298
  width: 93.2%;
299
+ margin-top: var(--pf-t--global--spacer--md);
300
+ }
301
+
302
+ .order-select .pf-v6-c-menu-toggle {
303
+ min-width: 15rem;
289
304
  }
290
305
 
291
306
  @-moz-document url-prefix() {
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AA2BxB,OAAO,KAAsC,MAAM,OAAO,CAAC;AAwT3D,QAAA,MAAM,QAAQ;;uBA4Ub,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAwBxB,OAAO,KAAsC,MAAM,OAAO,CAAC;AAwT3D,QAAA,MAAM,QAAQ;;uBAuUb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -9,10 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import './Timeline.css';
11
11
  import { caseHistory } from '@cee-eng/hydrajs';
12
- import { Avatar, Button, DatePicker, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, MenuToggle, Pagination, SearchInput, Select, SelectOption, Spinner, } from '@patternfly/react-core';
12
+ import { Avatar, Button, DatePicker, EmptyState, EmptyStateBody, EmptyStateVariant, MenuToggle, Pagination, SearchInput, Select, SelectOption, Spinner, } from '@patternfly/react-core';
13
13
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
14
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
15
- import globalDangerColor100 from '@patternfly/react-tokens/dist/js/global_danger_color_100';
16
15
  import { haltEvent } from '@rh-support/utils';
17
16
  import { format, fromUnixTime, isSameDay, parse } from 'date-fns';
18
17
  import debounce from 'lodash/debounce';
@@ -419,8 +418,7 @@ const Timeline = ({ caseNumber }) => {
419
418
  };
420
419
  const renderTimelineContent = () => {
421
420
  if (fetchError) {
422
- return (React.createElement(EmptyState, { variant: EmptyStateVariant.full },
423
- React.createElement(EmptyStateHeader, { titleText: "Unable to connect", icon: React.createElement(EmptyStateIcon, { icon: ExclamationCircleIcon, color: globalDangerColor100.value }), headingLevel: "h2" }),
421
+ return (React.createElement(EmptyState, { headingLevel: "h2", icon: ExclamationCircleIcon, titleText: "Unable to connect", variant: EmptyStateVariant.full },
424
422
  React.createElement(EmptyStateBody, null,
425
423
  React.createElement(Trans, null,
426
424
  "Try ",
@@ -429,8 +427,7 @@ const Timeline = ({ caseNumber }) => {
429
427
  "or check back later"))));
430
428
  }
431
429
  if (filteredEvents.length < 1) {
432
- return (React.createElement(EmptyState, { variant: EmptyStateVariant.full },
433
- React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "No results found"), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h2" }),
430
+ return (React.createElement(EmptyState, { headingLevel: "h2", icon: SearchIcon, titleText: React.createElement(Trans, null, "No results found"), variant: EmptyStateVariant.full },
434
431
  React.createElement(EmptyStateBody, null,
435
432
  React.createElement(Trans, null, "Try modifying your search query or changing the date range and try again."))));
436
433
  }
@@ -442,11 +439,11 @@ const Timeline = ({ caseNumber }) => {
442
439
  React.createElement(SearchInput, { placeholder: t('Search for a user, action, or keyword'), value: searchValue, onChange: handleSearchChange, onClear: handleClear, className: "case-history-timeline-search" }),
443
440
  React.createElement("div", { className: "case-history-timeline-datepicker" },
444
441
  React.createElement(DatePicker, { value: dateValue, onChange: (_event, value) => handleDateChange(value), validators: [futureDateValidator] }),
445
- React.createElement(Button, { onClick: () => setDateValue(''), isDisabled: isEmpty(dateValue) }, "Reset"))),
442
+ React.createElement(Button, { className: "pf-v6-u-ml-xs", onClick: () => setDateValue(''), isDisabled: isEmpty(dateValue) }, "Reset"))),
446
443
  React.createElement("div", { className: "timeline-controls" },
447
444
  React.createElement("div", { className: "timeline-pagination" }, renderPagination()),
448
445
  React.createElement("div", { className: "timeline-sort-order-select" },
449
- React.createElement(Select, { id: "order-select", isOpen: isSelectOpen, selected: selectedOrder, onSelect: handleSelect, onOpenChange: (isOpen) => setIsSelectOpen(isOpen), shouldFocusToggleOnSelect: false, toggle: (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: handleSelectToggle, isExpanded: isSelectOpen, style: { width: '200px' } }, selectedOrder)) },
446
+ React.createElement(Select, { id: "order-select", isOpen: isSelectOpen, selected: selectedOrder, onSelect: handleSelect, onOpenChange: (isOpen) => setIsSelectOpen(isOpen), shouldFocusToggleOnSelect: false, toggle: (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: handleSelectToggle, isExpanded: isSelectOpen }, selectedOrder)) },
450
447
  React.createElement(SelectOption, { value: "Newest to Oldest" }, "Newest to Oldest"),
451
448
  React.createElement(SelectOption, { value: "Oldest to Newest" }, "Oldest to Newest")))),
452
449
  isFetchingData ? (React.createElement("div", { className: "timeline-loading-spinner" },
@@ -1 +1 @@
1
- {"version":3,"file":"CasePrivateNotes.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,KAAK,YAAY,GAAG,OAAO,YAAY,CAAC;AAExC,UAAU,MAAO,SAAQ,YAAY;CAAG;AAExC,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAwGtC;kBAxGQ,gBAAgB;;;;;AA2GzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CasePrivateNotes.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,KAAK,YAAY,GAAG,OAAO,YAAY,CAAC;AAExC,UAAU,MAAO,SAAQ,YAAY;CAAG;AAExC,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAwGtC;kBAxGQ,gBAAgB;;;;;AA2GzB,eAAe,gBAAgB,CAAC"}
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { Button } from '@patternfly/react-core';
10
11
  import { LoadingIndicator, TextAreaResizable, ToastNotification } from '@rh-support/components';
11
12
  import { useCanEditCase } from '@rh-support/react-context';
12
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -78,14 +79,14 @@ function CasePrivateNotes(props) {
78
79
  React.createElement(Trans, null, "Notes"))),
79
80
  canUpdatePrivateNotes && (React.createElement("form", null,
80
81
  React.createElement(TextAreaResizable, { style: { minHeight: '200px' }, id: "rha-case-notes", disabled: isUpdating, maxLength: 255, name: "notes", value: notesState, onChange: onChange }),
81
- React.createElement("div", { className: "pf-v5-u-mt-md" },
82
- React.createElement("button", { className: `btn btn-app btn-primary ${isExportingPDF ? 'hide-in-pdf' : ''}`, onClick: updateCase, disabled: isPrivateNotesEmpty || isUpdating || !formIsDirty, type: "button" },
82
+ React.createElement("div", { className: "pf-v6-u-mt-md" },
83
+ React.createElement(Button, { className: `${isExportingPDF ? 'hide-in-pdf' : ''}`, onClick: updateCase, disabled: isPrivateNotesEmpty || isUpdating || !formIsDirty, variant: "primary" },
83
84
  React.createElement(Trans, null, "Update"),
84
85
  " ",
85
86
  React.createElement(LoadingIndicator, { show: isUpdating, isInline: true })),
86
- React.createElement("button", { className: `btn btn-app btn-link ${isExportingPDF ? 'hide-in-pdf' : ''}`, onClick: discardNotes, disabled: isUpdating || !formIsDirty, type: "button" },
87
+ React.createElement(Button, { className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, onClick: discardNotes, disabled: isUpdating || !formIsDirty, variant: "secondary" },
87
88
  React.createElement(Trans, null, "Discard Changes"))))),
88
- React.createElement("p", { className: "pf-v5-u-mt-xl" },
89
+ React.createElement("p", { className: "pf-v6-u-mt-xl" },
89
90
  React.createElement(Trans, null, "Please note, contents of this field are not visible to Red Hat Support professionals."))));
90
91
  }
91
92
  CasePrivateNotes.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAwB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBA6KxC,CAAC"}
1
+ {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAsB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBA6KxC,CAAC"}
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import './caseSummary.css';
11
11
  import { caseSummary } from '@cee-eng/hydrajs';
12
12
  import { parseCommentMarkdown } from '@cee-eng/ui-toolkit';
13
- import { Alert, AlertActionLink, AlertVariant, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Spinner, TextContent, } from '@patternfly/react-core';
13
+ import { Alert, AlertActionLink, AlertVariant, Content, EmptyState, EmptyStateBody, EmptyStateVariant, Spinner, } from '@patternfly/react-core';
14
14
  import CubesIcon from '@patternfly/react-icons/dist/js/icons/cubes-icon';
15
15
  import { SupportFeedbackModal } from '@rh-support/components';
16
16
  import { getApiResourceObject } from '@rh-support/utils';
@@ -79,15 +79,14 @@ export const CaseSummary = (props) => {
79
79
  }
80
80
  const markeddownOptions = { openLinksInNewTab: true, gfm: true, breaks: true };
81
81
  const sanitizedHtml = DOMPurify.sanitize(parseCommentMarkdown(summary, { openImagesInNewTab: false, lazyLoadImages: false }, markeddownOptions));
82
- return (React.createElement(TextContent, { className: "case-summary-text-content" },
82
+ return (React.createElement(Content, { className: "case-summary-text-content" },
83
83
  React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizedHtml } })));
84
84
  };
85
85
  return (React.createElement("section", { className: "card card-white" },
86
86
  React.createElement(Alert, { variant: AlertVariant.info, title: "Case summary uses AI. Check for mistakes.", isInline: true, actionLinks: React.createElement(AlertActionLink, { onClick: (e) => triggerAppFeedbackItem(e), href: "#", "data-tracking-id": "send-feedback-button" },
87
87
  React.createElement(Trans, null, "Send Feedback")) },
88
88
  React.createElement("p", null, "By using this feature, your support case information will be used to create an AI-generated summary of your cases. Information may not be up-to-date or without error. Always review AI generated content prior to use. We encourage you to send feedback to improve the case summary feature")),
89
- caseSummaryState === CaseSummaryStates.NEW_CASE ? (React.createElement(EmptyState, { variant: EmptyStateVariant.lg },
90
- React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "Unable to generate case summary"), icon: React.createElement(EmptyStateIcon, { icon: CubesIcon }), headingLevel: "h2" }),
89
+ caseSummaryState === CaseSummaryStates.NEW_CASE ? (React.createElement(EmptyState, { headingLevel: "h2", icon: CubesIcon, titleText: React.createElement(Trans, null, "Unable to generate case summary"), variant: EmptyStateVariant.lg },
91
90
  React.createElement(EmptyStateBody, null,
92
91
  React.createElement("p", { className: "push-top-narrow" },
93
92
  React.createElement(Trans, null, errorMessage))))) : caseSummaryState === CaseSummaryStates.FAILED ||
@@ -104,8 +103,7 @@ export const CaseSummary = (props) => {
104
103
  second: '2-digit',
105
104
  hour12: true,
106
105
  })),
107
- React.createElement("div", { className: "case-summary-content" }, formatSummary((_c = caseSummaryData.data) === null || _c === void 0 ? void 0 : _c.generated_summary))))) : (React.createElement(EmptyState, { variant: EmptyStateVariant.lg },
108
- React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "Generating case summary using AI"), icon: React.createElement(EmptyStateIcon, { icon: Spinner }), headingLevel: "h2" }),
106
+ React.createElement("div", { className: "case-summary-content" }, formatSummary((_c = caseSummaryData.data) === null || _c === void 0 ? void 0 : _c.generated_summary))))) : (React.createElement(EmptyState, { headingLevel: "h2", icon: Spinner, titleText: React.createElement(Trans, null, "Generating case summary using AI"), variant: EmptyStateVariant.lg },
109
107
  React.createElement(EmptyStateBody, null,
110
108
  React.createElement("p", { className: "push-top-narrow" },
111
109
  React.createElement(Trans, null, "Almost there! case summary will be ready in approximately 30 seconds."))))),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSummaryErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,UAAU,MAAM;IACZ,gBAAgB,EAAE,GAAG,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC;CACzB;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA4FpD"}
1
+ {"version":3,"file":"CaseSummaryErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,UAAU,MAAM;IACZ,gBAAgB,EAAE,GAAG,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC;CACzB;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA6FpD"}
@@ -1,7 +1,6 @@
1
- import { Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Flex, FlexItem, } from '@patternfly/react-core';
1
+ import { Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateVariant, Flex, FlexItem, } from '@patternfly/react-core';
2
2
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
3
3
  import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon';
4
- import globalDangerColor100 from '@patternfly/react-tokens/dist/js/global_danger_color_100';
5
4
  import { SupportFeedbackModal } from '@rh-support/components';
6
5
  import React, { useEffect, useState } from 'react';
7
6
  import { Trans } from 'react-i18next';
@@ -40,10 +39,9 @@ export function CaseSummaryErrorMessage(props) {
40
39
  // eslint-disable-next-line react-hooks/exhaustive-deps
41
40
  }, []);
42
41
  return (React.createElement(React.Fragment, null,
43
- React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
44
- React.createElement(EmptyStateHeader, { titleText: props.caseSummaryState === CaseSummaryStates.CASE_LANGUAGE_NOT_SUPPORTED
45
- ? 'Unsupported language detected'
46
- : 'Error while loading case summary', icon: React.createElement(EmptyStateIcon, { icon: ExclamationCircleIcon, color: globalDangerColor100.value }), headingLevel: "h2" }),
42
+ React.createElement(EmptyState, { headingLevel: "h2", icon: ExclamationCircleIcon, status: "danger", titleText: props.caseSummaryState === CaseSummaryStates.CASE_LANGUAGE_NOT_SUPPORTED
43
+ ? 'Unsupported language detected'
44
+ : 'Error while loading case summary', variant: EmptyStateVariant.sm },
47
45
  React.createElement(EmptyStateBody, null,
48
46
  React.createElement(Trans, null, props.errorMessage && React.createElement("div", { dangerouslySetInnerHTML: { __html: props.errorMessage } }))),
49
47
  React.createElement(EmptyStateFooter, null,
@@ -125,7 +125,7 @@ export default function RMEEscalationList(props) {
125
125
  React.createElement(Button, { variant: ButtonVariant.secondary, onClick: () => requestUpdateRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-update", isDisabled: customerEscalation },
126
126
  React.createElement(Trans, null, "Request Update"))),
127
127
  React.createElement(FlexItem, null,
128
- React.createElement(Button, { variant: ButtonVariant.secondary, className: "pf-v5-u-mt-sm", onClick: () => requestClosureRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-closure" },
128
+ React.createElement(Button, { variant: ButtonVariant.secondary, className: "pf-v6-u-mt-sm", onClick: () => requestClosureRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-closure" },
129
129
  React.createElement(Trans, null, "Request Closure")))));
130
130
  }
131
131
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RelatedTasks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,QAAA,MAAM,YAAY,yBA+KjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"RelatedTasks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,QAAA,MAAM,YAAY,yBA8KjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Badge, EmptyState, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Pagination, SearchInput, ToggleGroup, ToggleGroupItem, } from '@patternfly/react-core';
10
+ import { Badge, EmptyState, EmptyStateVariant, Pagination, SearchInput, ToggleGroup, ToggleGroupItem, } from '@patternfly/react-core';
11
11
  import CubesIcon from '@patternfly/react-icons/dist/js/icons/cubes-icon';
12
12
  import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
13
13
  import isEqual from 'lodash/isEqual';
@@ -112,7 +112,6 @@ const RelatedTasks = () => {
112
112
  React.createElement(Td, { dataLabel: columnNames.title }, item.title)))))),
113
113
  React.createElement("div", { className: "push-top" },
114
114
  React.createElement(Pagination, { itemCount: filteredData.length, perPage: itemsPerPage, page: currentPage, onSetPage: (_, page) => setCurrentPage(page), onPerPageSelect: (_, perPage) => setItemsPerPage(perPage) })))) : (React.createElement("div", null,
115
- React.createElement(EmptyState, { variant: EmptyStateVariant.full },
116
- React.createElement(EmptyStateHeader, { titleText: t("There aren't any related tasks."), headingLevel: "h4", icon: React.createElement(EmptyStateIcon, { icon: CubesIcon }) }))))));
115
+ React.createElement(EmptyState, { headingLevel: "h4", icon: CubesIcon, titleText: t("There aren't any related tasks."), variant: EmptyStateVariant.full })))));
117
116
  };
118
117
  export default RelatedTasks;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAW5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAqV/B;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAW5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAwV/B;AAED,eAAe,SAAS,CAAC"}
@@ -219,8 +219,7 @@ function CaseGroup(props) {
219
219
  React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onInputQueryChange, onKeyDown: onInputKeyDown, autoComplete: "off", innerRef: textInputRef, placeholder: t(`Select a group`), role: "combobox", isExpanded: isOpen, "aria-controls": "select-typeahead-listbox" }),
220
220
  !isCaseOwnerUpdating && (ownersCaseGroups.isFetching || isCaseGroupUpdating) ? (React.createElement(TextInputGroupUtilities, null,
221
221
  React.createElement(Spinner, { size: "md" }))) : (React.createElement(TextInputGroupUtilities, Object.assign({}, (!inputValue ? { style: { display: 'none' } } : {})),
222
- React.createElement(Button, { variant: "plain", onClick: onCaseGroupClear, "aria-label": "Clear input value" },
223
- React.createElement(TimesIcon, { "aria-hidden": true })))))));
222
+ React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onCaseGroupClear, "aria-label": "Clear input value" }))))));
224
223
  return (React.createElement("div", { className: "form-group" },
225
224
  React.createElement("label", { htmlFor: "get-support-group" },
226
225
  React.createElement(Trans, null, "Group"),
@@ -59,14 +59,14 @@ export default function CaseInformation(props) {
59
59
  ]);
60
60
  return (React.createElement(React.Fragment, null,
61
61
  React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
62
- React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError() }),
63
- React.createElement(AlertMessage, { show: !canManageCase(loggedInUserJwtToken), variant: AlertType.DANGER, className: "pf-v5-u-mt-lg" },
62
+ React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError() }),
63
+ React.createElement(AlertMessage, { show: !canManageCase(loggedInUserJwtToken), variant: AlertType.DANGER, className: "pf-v6-u-mt-lg" },
64
64
  React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
65
65
  "You need additional access to manage cases.\u00A0 Please contact",
66
66
  ' ',
67
67
  React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
68
68
  " for assistance.")),
69
- React.createElement(AlertMessage, { show: hasInvalidEntitlements, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", isInline: true },
69
+ React.createElement(AlertMessage, { show: hasInvalidEntitlements, variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", isInline: true },
70
70
  React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
71
71
  "You need a valid entitlement to create a case.\u00A0 Please contact",
72
72
  ' ',
@@ -1 +1 @@
1
- {"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,yBAAyB,yBAkBrC,CAAC"}
1
+ {"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,yBAAyB,yBAqBrC,CAAC"}
@@ -5,5 +5,5 @@ import { Trans } from 'react-i18next';
5
5
  export const ContactPhoneNumberPopOver = () => {
6
6
  return (React.createElement(Popover, { "aria-label": "Support Severity Level info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
7
7
  React.createElement(Trans, null, "When you change the phone number, it affects both this case and your contact info in the Red Hat support system.")), closeBtnAriaLabel: "Close" },
8
- React.createElement(QuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", "aria-label": "Contact Phone Number Info" })));
8
+ React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size cursor-pointer pf-v6-u-text-color-status-custom", "aria-label": "Contact Phone Number Info" })));
9
9
  };
@@ -60,13 +60,13 @@ export default function Description(props) {
60
60
  React.createElement(Trans, null, "Tips for describing your problem")));
61
61
  const PopoverContent = (React.createElement("div", { className: "popover-body-info-description" },
62
62
  React.createElement(Trans, null, "Example:"),
63
- React.createElement("p", { className: "pf-v5-u-color-200" },
63
+ React.createElement("p", { className: "pf-v6-u-color-200" },
64
64
  React.createElement(Trans, null,
65
65
  "I'm unable to start the SSHD service receiving the error message",
66
66
  React.createElement("br", null),
67
67
  "\"Bad yes/no argument for ShowPatchLevel parameter\"")),
68
68
  React.createElement(Trans, null, "To expedite your case, include these details:"),
69
- React.createElement("p", { className: "pf-v5-u-color-200" },
69
+ React.createElement("p", { className: "pf-v6-u-color-200" },
70
70
  React.createElement(Trans, null, "Problem"),
71
71
  React.createElement("br", null),
72
72
  React.createElement(Trans, null, "Steps you've taken"),
@@ -77,9 +77,9 @@ export default function Description(props) {
77
77
  React.createElement(Trans, { i18nKey: "i18nKeyDescribeProblem" }, "Describe your problem. Include specific actions and error messages."),
78
78
  isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
79
79
  React.createElement(Popover, { isVisible: isOpen, shouldClose: handleClose, headerContent: headerPopoverContent, bodyContent: PopoverContent },
80
- React.createElement(OutlinedQuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", onClick: handleToggle }))))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
80
+ React.createElement(OutlinedQuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size", onClick: handleToggle }))))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
81
81
  React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) || isEmpty(summary) || isEmpty(product) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) || isEmpty(summary) || isEmpty(product), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t('i18nKeyPlaceHolderDetail', `The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ? 10 : 4, ref: textAreaRef, onClick: handleTextAreaClick }),
82
- React.createElement("p", { className: "form-instructions pf-v5-u-danger-color-100", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT
82
+ React.createElement("p", { className: "form-instructions pf-v6-u-danger-color-100", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT
83
83
  ? `This description exceeds ${CASE_DETAILS_ISSUE_LIMIT} characters. Try shortening it.`
84
84
  : ''}`)));
85
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA6OzB;kBA7OQ,GAAG;;;AAgPZ,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA2OzB;kBA3OQ,GAAG;;;AA8OZ,eAAe,GAAG,CAAC"}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { InlineEdit, LoadingIndicator, TextAreaAutosize, ToastNotification, usePrevious } from '@rh-support/components';
10
+ import { InlineEdit, LoadingIndicator, PhoneInput, ToastNotification, usePrevious } from '@rh-support/components';
11
11
  import { useCanEditCase } from '@rh-support/react-context';
12
12
  import { isFtsEditableOnEditPage, PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage, } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
@@ -86,13 +86,13 @@ function Fts(props) {
86
86
  onCaseDetailsChange(caseDetails);
87
87
  }
88
88
  });
89
- const onFtsContactChange = (e) => {
89
+ const onFtsContactChange = (number) => {
90
90
  if (canEditCase.alert())
91
91
  return;
92
- setFtsContact(e.target.value);
92
+ setFtsContact(number);
93
93
  if (props.inlineEditable && !isEmpty(caseNumber))
94
94
  return;
95
- setContactInfoIntoGlobalState(e.target.value);
95
+ setContactInfoIntoGlobalState(number);
96
96
  };
97
97
  const onSetContactSameAsOwner = (e) => {
98
98
  if (canEditCase.alert())
@@ -161,17 +161,21 @@ function Fts(props) {
161
161
  // To disable save button if field is empty or is updating
162
162
  const isSaveDisabled = contactInfo24X7State === contactInfo24x7 || isFtsContactUpdating;
163
163
  return (React.createElement(React.Fragment, null,
164
- React.createElement("div", { className: "form-group pf-v5-u-mb-xs" },
164
+ React.createElement("div", { className: "form-group pf-v6-u-mb-xs" },
165
165
  React.createElement("input", { type: "checkbox", id: "get-support-fts", "data-tracking-id": "get-support-fts", disabled: disableFtsNContact, name: "get-support-fts", checked: fts, onChange: onFtsChange }),
166
166
  React.createElement("label", { htmlFor: "get-support-fts" },
167
167
  React.createElement(Trans, null, "24x7 Support")),
168
- React.createElement(LoadingIndicator, { size: "sm", isInline: true, show: isFtsUpdating, className: "pf-v5-u-ml-sm" })),
168
+ React.createElement(LoadingIndicator, { size: "sm", isInline: true, show: isFtsUpdating, className: "pf-v6-u-ml-sm" })),
169
169
  fts === true && (React.createElement(React.Fragment, null,
170
- React.createElement(InlineEdit, { formClassName: "pf-v5-u-mb-md", labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
170
+ React.createElement(InlineEdit, { formClassName: "pf-v6-u-mb-md", labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
171
171
  React.createElement("input", { type: "checkbox", id: "same-as-case-owner-phone", name: "same-as-case-owner-phone", "data-tracking-id": "same-as-case-owner-phone", checked: ftsContactSameAsOwner, onChange: onSetContactSameAsOwner }),
172
- React.createElement("label", { htmlFor: "same-as-case-owner-phone", className: "pf-v5-u-font-weight-normal pf-v5-u-font-size-md" },
172
+ React.createElement("label", { htmlFor: "same-as-case-owner-phone", className: "pf-v6-u-font-weight-normal pf-v6-u-font-size-md" },
173
173
  React.createElement(Trans, null, "Same as case owner's phone number")),
174
- React.createElement(TextAreaAutosize, { id: "get-support-24-7-contact", className: `form-control`, name: "get-support-24-7-contact", value: contactInfo24X7State, onChange: onFtsContactChange, disabled: disableFtsNContact || ftsContactSameAsOwner, "data-tracking-id": "get-support-24-7-contact" }),
174
+ React.createElement(PhoneInput
175
+ // id="get-support-24-7-contact"
176
+ , {
177
+ // id="get-support-24-7-contact"
178
+ isDisabled: disableFtsNContact || ftsContactSameAsOwner, "data-tracking-id": "get-support-24-7-contact", phoneValue: contactInfo24X7State || '', onPhoneValueChange: onFtsContactChange }),
175
179
  React.createElement("p", { className: "form-instructions" },
176
180
  React.createElement(Trans, null, "Please provide contact information where you can be reached at any time to help you with your case."))),
177
181
  (contactInfo24X7State === null || contactInfo24X7State === void 0 ? void 0 : contactInfo24X7State.length) > CONTACT_INFO_24X7_LIMIT && (React.createElement("div", { className: "pull-top" },
@@ -85,9 +85,9 @@ function OpenCaseIssue(props) {
85
85
  ? 'error'
86
86
  : 'default', "aria-invalid": getTitleSummaryInvalid(), "aria-required": !!props.required, required: !!props.required, name: isIdea() ? 'get-support-title' : 'get-support-summary', placeholder: t('i18nkeySummarizeExperience', 'Create a heading that summarizes your issue'), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": isIdea() ? 'get-support-title' : 'get-support-summary', "aria-disabled": isEmpty(version), isDisabled: isEmpty(version) }),
87
87
  React.createElement(React.Fragment, null, hasLargeTitleSummary && (React.createElement("div", null,
88
- React.createElement("p", { className: "form-instructions form-invalid pf-v5-u-danger-color-100 title-summary-error" }, t(`This title exceeds ${TITLE_SUMMARY_LENGTH_LIMIT} characters. Try shortening it.`))))),
88
+ React.createElement("p", { className: "form-instructions form-invalid pf-v6-u-danger-color-100 title-summary-error" }, t(`This title exceeds ${TITLE_SUMMARY_LENGTH_LIMIT} characters. Try shortening it.`))))),
89
89
  React.createElement(Description, { isSummarizeInvalid: getIssueSummaryInvalid() }),
90
- React.createElement(Progress, { value: issue === null || issue === void 0 ? void 0 : issue.length, min: 0, max: ISSUE_SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${issue === null || issue === void 0 ? void 0 : issue.length} / ${ISSUE_SUMMARY_LENGTH_LIMIT}`, valueText: `${issue === null || issue === void 0 ? void 0 : issue.length} / ${ISSUE_SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${issue === null || issue === void 0 ? void 0 : issue.length} / ${ISSUE_SUMMARY_LENGTH_LIMIT}`, variant: getVariant(), title: ' ', className: `pf-v5-u-mt-md ${!isNextBtnClickedToShowValidationError && isEmpty(issue) ? 'gray' : ''}`, id: "summary-progress-bar" }))));
90
+ React.createElement(Progress, { value: issue === null || issue === void 0 ? void 0 : issue.length, min: 0, max: ISSUE_SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${issue === null || issue === void 0 ? void 0 : issue.length} / ${ISSUE_SUMMARY_LENGTH_LIMIT}`, valueText: `${issue === null || issue === void 0 ? void 0 : issue.length} / ${ISSUE_SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${issue === null || issue === void 0 ? void 0 : issue.length} / ${ISSUE_SUMMARY_LENGTH_LIMIT}`, variant: getVariant(), title: ' ', className: `pf-v6-u-mt-md ${!isNextBtnClickedToShowValidationError && isEmpty(issue) ? 'gray' : ''}`, id: "summary-progress-bar" }))));
91
91
  }
92
92
  OpenCaseIssue.defaultProps = defaultProps;
93
93
  export default OpenCaseIssue;
@@ -160,7 +160,7 @@ function Severity(props) {
160
160
  ' ',
161
161
  React.createElement("a", { href: "/support/policy/severity", target: "_blank" },
162
162
  React.createElement(Trans, null, "Red Hat Support Severity Level Definitions"))), closeBtnAriaLabel: "Close" },
163
- React.createElement(QuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", "aria-label": t(`Support Severity Level info`) }))),
163
+ React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size", "aria-label": t(`Support Severity Level info`) }))),
164
164
  "\u00A0",
165
165
  filteredSeverities.filter((s) => s.disabled).length !== 0 && (React.createElement(Tooltip, { position: TooltipPosition.top, content: React.createElement(Trans, null, "Only the enabled severity levels are supported for selected product and version.") },
166
166
  React.createElement(Icon, { size: "sm" },
@@ -1 +1 @@
1
- {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBA+HlC;kBA/HQ,YAAY;;;AAiIrB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBAiIlC;kBAjIQ,YAAY;;;AAmIrB,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
- import { Popover, PopoverPosition, ValidatedOptions } from '@patternfly/react-core';
2
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
1
+ import { Popover, PopoverPosition } from '@patternfly/react-core';
3
2
  import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
3
+ import { SingleSelectDropdown } from '@rh-support/components';
4
4
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
5
5
  import { PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
6
6
  import isEmpty from 'lodash/isEmpty';
@@ -26,16 +26,12 @@ function SupportLevel(props) {
26
26
  const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
27
27
  const { t } = useTranslation();
28
28
  const [isSupportLevelInValid, setIsSupportLevelInValid] = useState(false);
29
- const [isOpen, setIsOpen] = useState(false);
30
29
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
31
- const onToggle = (isOpen) => {
32
- setIsOpen(isOpen);
33
- };
34
30
  const onCaseDetailsChange = (caseDetails) => {
35
31
  setCaseDetails(caseDispatch, caseDetails);
36
32
  };
37
- const onEntitlementChange = (event, selected) => {
38
- setIsOpen(false);
33
+ const onEntitlementChange = (selectedOption) => {
34
+ const selected = selectedOption.value;
39
35
  const casePayload = { entitlementSla: selected };
40
36
  casePayload.fts = caseNumber
41
37
  ? showFtsOnCaseViewEditPage(selected, severity)
@@ -76,6 +72,16 @@ function SupportLevel(props) {
76
72
  }
77
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
78
74
  }, [selectedSla, entitlementSla]);
75
+ // Create selected option for SingleSelectDropdown
76
+ const getSelectedOption = () => ({
77
+ label: selectedSla || '',
78
+ value: selectedSla || '',
79
+ });
80
+ // Create options array for SingleSelectDropdown
81
+ const getDropdownOptions = () => getSlaList().map((sla) => ({
82
+ label: sla,
83
+ value: sla,
84
+ }));
79
85
  return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
80
86
  React.createElement("label", { htmlFor: "get-support-supportLevel" },
81
87
  React.createElement(Trans, null, "Support level"),
@@ -86,8 +92,8 @@ function SupportLevel(props) {
86
92
  "Learn more about our",
87
93
  ' ',
88
94
  React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
89
- React.createElement(QuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", "aria-label": "Support Level Info" })),
90
- React.createElement(Select, { variant: SelectVariant.single, "aria-label": t('Select Support Level'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onEntitlementChange, selections: selectedSla, isOpen: isOpen, "aria-labelledby": 'get-support-supportLevel', isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), validated: isSupportLevelInValid ? ValidatedOptions.error : ValidatedOptions.default, "data-tracking-id": "get-support-supportLevel" }, getSlaList().map((sla, index) => (React.createElement(SelectOption, { key: index, value: sla })))),
95
+ React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size", "aria-label": "Support Level Info" })),
96
+ React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') }),
91
97
  isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
92
98
  }
93
99
  SupportLevel.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseLanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseLanguageSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,MAAM,WAAW,MAAM;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAoGzD"}
1
+ {"version":3,"file":"CaseLanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseLanguageSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,MAAM,WAAW,MAAM;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAoGzD"}