@rh-support/troubleshoot 2.6.355 → 2.6.358

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 (349) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
  9. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
  10. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
  11. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
  12. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Case.js +60 -33
  14. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
  16. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
  18. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  23. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
  24. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
  26. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
  30. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  31. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  33. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  34. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  35. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
  40. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  41. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
  42. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
  43. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  44. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
  88. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
  90. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
  92. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  93. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
  94. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  95. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
  96. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  97. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
  99. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
  101. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  102. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
  103. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  104. package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
  105. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  106. package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
  107. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
  108. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
  109. package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
  110. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  111. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
  112. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  113. package/lib/esm/components/CaseInformation/Description.js +1 -1
  114. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  115. package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
  116. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  117. package/lib/esm/components/CaseInformation/Fts.js +31 -17
  118. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  119. package/lib/esm/components/CaseInformation/Severity.js +33 -24
  120. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  121. package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
  122. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
  123. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
  124. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
  125. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  126. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
  127. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  128. package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
  129. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  130. package/lib/esm/components/CaseManagement/Cep.js +11 -9
  131. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
  132. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  133. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
  134. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  135. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  136. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
  137. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  138. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
  139. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  140. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
  141. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  142. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
  143. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  144. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  145. package/lib/esm/components/IdeaInformation/IdeaInformation.js +23 -17
  146. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  147. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  148. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  149. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  150. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  151. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  152. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  153. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  154. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
  155. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
  156. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
  157. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
  158. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  159. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  160. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  161. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
  162. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  163. package/lib/esm/components/Recommendations/AsideResults.js +4 -3
  164. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  165. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  166. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  167. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
  168. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  169. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  170. package/lib/esm/components/Recommendations/Recommendations.js +3 -9
  171. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  172. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
  173. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  174. package/lib/esm/components/Review/Review.js +25 -19
  175. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  176. package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
  177. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  178. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  179. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  180. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  181. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +139 -91
  182. package/lib/esm/components/shared/Constants.d.ts +5 -0
  183. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  184. package/lib/esm/components/shared/Constants.js +5 -0
  185. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  186. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  187. package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
  188. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  189. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  190. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
  191. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  192. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
  193. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  194. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  195. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
  196. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  197. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
  198. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
  199. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  200. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
  201. package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
  202. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  203. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  204. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  205. package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
  206. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  207. package/lib/esm/components/shared/useIsSectionValid.js +22 -57
  208. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  209. package/lib/esm/components/shared/usePostComment.js +16 -28
  210. package/lib/esm/components/shared/utils.d.ts +1 -0
  211. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  212. package/lib/esm/components/shared/utils.js +9 -3
  213. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  214. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
  215. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  216. package/lib/esm/components/wizardLayout/MainSection.js +2 -1
  217. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  218. package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
  219. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  220. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
  221. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  222. package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
  223. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  224. package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
  225. package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
  226. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  227. package/lib/esm/constants/caseDetailsConstants.js +5 -0
  228. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  229. package/lib/esm/css/app.css +28 -0
  230. package/lib/esm/css/case.css +60 -209
  231. package/lib/esm/graphql/index.d.ts +4 -0
  232. package/lib/esm/graphql/index.d.ts.map +1 -0
  233. package/lib/esm/graphql/index.js +3 -0
  234. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  235. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  236. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  237. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  238. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  239. package/lib/esm/graphql/mutations/index.js +1 -0
  240. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  241. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  242. package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
  243. package/lib/esm/graphql/queries/index.d.ts +2 -0
  244. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  245. package/lib/esm/graphql/queries/index.js +1 -0
  246. package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
  247. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  248. package/lib/esm/graphql/schemas/escalation.js +1 -0
  249. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  250. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  251. package/lib/esm/graphql/schemas/index.js +1 -0
  252. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  253. package/lib/esm/hooks/useAB.js +45 -23
  254. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  255. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  256. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
  257. package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
  258. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  259. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  260. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  261. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  262. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
  263. package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
  264. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  265. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  266. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
  267. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  268. package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
  269. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  270. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  271. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  272. package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
  273. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
  274. package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
  275. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  276. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  277. package/lib/esm/hooks/useCaseHistory.js +98 -0
  278. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
  279. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
  280. package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
  281. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  282. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  283. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
  284. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  285. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  286. package/lib/esm/hooks/useS3Upload.d.ts +5 -4
  287. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  288. package/lib/esm/hooks/useS3Upload.js +28 -30
  289. package/lib/esm/i18n/template-de.d.ts +2 -2
  290. package/lib/esm/i18n/template-de.js +2 -2
  291. package/lib/esm/i18n/template-es.d.ts +2 -2
  292. package/lib/esm/i18n/template-es.js +2 -2
  293. package/lib/esm/i18n/template-fr.d.ts +2 -2
  294. package/lib/esm/i18n/template-fr.js +2 -2
  295. package/lib/esm/i18n/template-it.d.ts +2 -2
  296. package/lib/esm/i18n/template-it.js +2 -2
  297. package/lib/esm/i18n/template-jp.d.ts +2 -2
  298. package/lib/esm/i18n/template-jp.js +2 -2
  299. package/lib/esm/i18n/template-ko.d.ts +2 -2
  300. package/lib/esm/i18n/template-ko.js +2 -2
  301. package/lib/esm/i18n/template-pt.d.ts +2 -2
  302. package/lib/esm/i18n/template-pt.js +2 -2
  303. package/lib/esm/i18n/template-ru.d.ts +2 -2
  304. package/lib/esm/i18n/template-ru.js +2 -2
  305. package/lib/esm/i18n/template-zh.d.ts +2 -2
  306. package/lib/esm/i18n/template-zh.js +2 -2
  307. package/lib/esm/index.js +1 -0
  308. package/lib/esm/models/cache.d.ts +0 -2
  309. package/lib/esm/models/cache.d.ts.map +1 -1
  310. package/lib/esm/models/caseHistory.d.ts +80 -0
  311. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  312. package/lib/esm/models/caseHistory.js +1 -0
  313. package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
  314. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  315. package/lib/esm/reducers/CaseConstNTypes.js +31 -7
  316. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
  317. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  318. package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
  319. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
  320. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  321. package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
  322. package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
  323. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  324. package/lib/esm/reducers/CaseHelpers.js +119 -17
  325. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  326. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  327. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  328. package/lib/esm/reducers/CaseReducer.d.ts +56 -11
  329. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  330. package/lib/esm/reducers/CaseReducer.js +284 -100
  331. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  332. package/lib/esm/reducers/RecommendationsReducer.js +15 -18
  333. package/lib/esm/scss/_main.scss +9 -0
  334. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  335. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  336. package/lib/esm/utils/TimelineUtils.js +135 -0
  337. package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
  338. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  339. package/lib/esm/utils/caseHistoryUtils.js +165 -0
  340. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  341. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  342. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  343. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
  344. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
  345. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
  346. package/package.json +9 -8
  347. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
  348. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
  349. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
@@ -18,14 +18,19 @@ const NoClusterIDReasonSelector = (props) => {
18
18
  const globalDispatch = useGlobalDispatchContext();
19
19
  const { globalMetadataState: { caseNoClusterIdReasons }, } = useContext(GlobalMetadataStateContext);
20
20
  const { isExportingPDF } = useContext(PDFContext);
21
+ useEffect(() => {
22
+ setInputValue(props.noClusterIdReasonExplanation || '');
23
+ }, [props.noClusterIdReasonExplanation]);
21
24
  const caseNoClusterIdReasonsList = props.isCustomer
22
25
  ? filter(caseNoClusterIdReasons.data, (item) => item !==
23
26
  'I am opening a case on behalf of the customer and cannot provide their Cluster ID at this time')
24
27
  : caseNoClusterIdReasons.data;
25
28
  const clearSelection = () => {
29
+ var _a, _b;
26
30
  setNotRegistered(false);
27
31
  setInputValue('');
28
- props.onReasonInputBoxChanged('');
32
+ (_a = props.onReasonInputBoxBlur) === null || _a === void 0 ? void 0 : _a.call(props, '');
33
+ (_b = props.onReasonInputBoxChanged) === null || _b === void 0 ? void 0 : _b.call(props, '');
29
34
  props.onReasonChange('');
30
35
  };
31
36
  const handleReasonChange = (option) => {
@@ -37,10 +42,22 @@ const NoClusterIDReasonSelector = (props) => {
37
42
  }
38
43
  };
39
44
  const handleInputChange = (_event, value) => {
45
+ var _a;
40
46
  const cleaned = value.trim().length === 0 ? '' : value;
41
47
  setInputValue(cleaned);
42
48
  setHasLargeReasonExplanation(cleaned.length > SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT);
43
- props.onReasonInputBoxChanged(cleaned);
49
+ (_a = props.onReasonInputBoxChanged) === null || _a === void 0 ? void 0 : _a.call(props, cleaned);
50
+ };
51
+ const handleInputBlur = () => {
52
+ var _a;
53
+ const cleaned = (inputValue || '').trim();
54
+ setInputValue(cleaned);
55
+ setHasLargeReasonExplanation(cleaned.length > SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT);
56
+ if (props.onReasonInputBoxBlur) {
57
+ props.onReasonInputBoxBlur(cleaned);
58
+ return;
59
+ }
60
+ (_a = props.onReasonInputBoxChanged) === null || _a === void 0 ? void 0 : _a.call(props, cleaned);
44
61
  };
45
62
  const getDropdownOptions = () => {
46
63
  return map(caseNoClusterIdReasonsList || [], (option) => ({
@@ -85,7 +102,7 @@ const NoClusterIDReasonSelector = (props) => {
85
102
  React.createElement(SingleSelectDropdown, { placeholder: t('Select an option or briefly describe your reason'), dataTrackingId: "no-openshift-cluster-id-reason", options: getDropdownOptions(), selected: getSelectedOption(), isDisabled: caseNoClusterIdReasons.isFetching || props.isDisabled, isLoading: caseNoClusterIdReasons.isFetching, isInvalid: props.isInValid, onSelect: handleReasonChange, "aria-labelledby": titleId, "aria-invalid": props.isInValid, "aria-describedby": "validate-reason-helper" })),
86
103
  props.noClusterIdReason === 'Other' && (React.createElement("div", { className: "text-input-wrapper" },
87
104
  React.createElement(TextInputGroup, null,
88
- React.createElement(TextInput, { value: inputValue, onChange: handleInputChange, placeholder: t('Briefly describe your reason'), "aria-label": t('Other reason description'), validated: hasLargeReasonExplanation ? ValidatedOptions.error : ValidatedOptions.default }))))),
105
+ React.createElement(TextInput, { value: inputValue, onChange: handleInputChange, onBlur: handleInputBlur, placeholder: t('Briefly describe your reason'), "aria-label": t('Other reason description'), validated: hasLargeReasonExplanation ? ValidatedOptions.error : ValidatedOptions.default }))))),
89
106
  React.createElement(LoadingIndicator, { show: caseNoClusterIdReasons.isFetching, size: "xs" }),
90
107
  React.createElement("p", { id: "validate-reason-helper", className: `form-instructions ${props.isInValid ? 'form-invalid' : ''}` }, notRegistered ? (registerMyClusterID()) : hasLargeReasonExplanation ? (React.createElement("span", { className: "form-instructions form-invalid pf-v6-u-danger-color-100 no-cluster-ID" }, t(`This reason exceeds ${SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT} characters. Try shortening it.`))) : (React.createElement(React.Fragment, null,
91
108
  props.isInValid && React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-v6-u-mr-sm" }),
@@ -1 +1 @@
1
- {"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,eAAO,MAAM,oBAAoB,yBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,yBAYxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAIjC,CAAC;AAEF,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAmT/C"}
1
+ {"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,eAAO,MAAM,oBAAoB,yBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,yBAYxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAIjC,CAAC;AAEF,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAkT/C"}
@@ -90,8 +90,8 @@ export function OpenShiftClusterId(props) {
90
90
  if (isEmpty(product))
91
91
  return;
92
92
  const isClusterVisible = () => __awaiter(this, void 0, void 0, function* () {
93
- var _a, _b;
94
- const hasCluster = yield isClusterIdEnabledForProduct(product, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
93
+ var _a;
94
+ const hasCluster = yield isClusterIdEnabledForProduct(product);
95
95
  setShowClusterId(hasCluster);
96
96
  if (!hasCluster) {
97
97
  resetClusterData();
@@ -117,7 +117,7 @@ export function OpenShiftClusterId(props) {
117
117
  setIsClusterIdInValid(false);
118
118
  }
119
119
  }
120
- const majorVersion = (_b = getVersion(version)) === null || _b === void 0 ? void 0 : _b.major;
120
+ const majorVersion = (_a = getVersion(version)) === null || _a === void 0 ? void 0 : _a.major;
121
121
  const isOpenShiftV3 = product === 'OpenShift Container Platform' && majorVersion === '3';
122
122
  setShowV3TextBox(isOpenShiftV3);
123
123
  if (isOpenShiftV3 || noClusterIdReasonExplanation === 'v3-cluster') {
@@ -207,9 +207,9 @@ export function OpenShiftClusterId(props) {
207
207
  const infoMessage = v3Selected ? v3Tov4TransitionLink() : discoverV4ClusterIdLink();
208
208
  return isNextBtnClickedToShowValidationError && errorMessage ? errorMessage : infoMessage;
209
209
  };
210
- const onReasonExplanationInputBoxChanged = (noClusterIdReasonExplanation) => {
210
+ const onReasonExplanationInputBoxChanged = (explanation) => {
211
211
  if (noClusterIdReason === 'Other') {
212
- setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: noClusterIdReasonExplanation });
212
+ setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: explanation });
213
213
  }
214
214
  };
215
215
  const v3ClusterNameInputBoxChanged = (v3Cluster) => {
@@ -232,7 +232,7 @@ export function OpenShiftClusterId(props) {
232
232
  return null;
233
233
  return (React.createElement("div", { className: `${props.className ? props.className : ''}` },
234
234
  !showV3TextBox && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: isNextBtnClickedToShowValidationError &&
235
- ((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform' })),
235
+ ((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData })),
236
236
  noClusterIdReasonExplanation !== 'v3-cluster' && dontKnowSelected && !showV3TextBox && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
237
237
  (v3Selected || showV3TextBox) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && isNextBtnClickedToShowValidationError, v3Selected: v3Selected }))));
238
238
  }
@@ -7,7 +7,6 @@ interface IProps extends IDClassNameProps {
7
7
  isClusterIdInvalid: boolean;
8
8
  clusterIdDropdownFormInstructions?: JSX.Element;
9
9
  onClusterClear: () => void;
10
- isV3: boolean;
11
10
  isDisabled?: boolean;
12
11
  noClusterIdReasonExplanation?: string;
13
12
  openshiftDisplayName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAgB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CAC3C;AAsBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAsfzC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAgB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CAC3C;AAsBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmfzC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -37,6 +37,18 @@ function OpenshiftDropdownV4(props) {
37
37
  const { t } = useTranslation();
38
38
  const PER_PAGE = 200;
39
39
  const LOAD_MORE_VALUE = 'loader';
40
+ const getDisplayName = (id, noClusterIdReasonExplanation, display_name) => {
41
+ if (isEmpty(id))
42
+ return '';
43
+ if (id === 'dont-have-id') {
44
+ return noClusterIdReasonExplanation === 'v3-cluster'
45
+ ? t('The case is for a v3 cluster')
46
+ : t("I don't have my Cluster ID");
47
+ }
48
+ if (id === 'v3-cluster')
49
+ return t('The case is for a v3 cluster');
50
+ return display_name || id;
51
+ };
40
52
  const [clustersRawResponse, setClustersRawResponse] = useState([]);
41
53
  const clustersRawResponseRef = useRef(clustersRawResponse);
42
54
  clustersRawResponseRef.current = clustersRawResponse;
@@ -44,7 +56,7 @@ function OpenshiftDropdownV4(props) {
44
56
  const loadMoreInProgressRef = useRef(false);
45
57
  const [clustersSelectOptions, setClustersSelectOptions] = useState([]);
46
58
  const [isOpen, setIsOpen] = useState(false);
47
- const [inputVal, setInputVal] = useState(props.openshiftDisplayName);
59
+ const [inputVal, setInputVal] = useState(() => getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState));
48
60
  const inputValRef = useRef(inputVal);
49
61
  inputValRef.current = inputVal;
50
62
  const [showArchivedClusters, setShowArchivedClusters] = useState(false);
@@ -53,19 +65,6 @@ function OpenshiftDropdownV4(props) {
53
65
  const { getFromCache, setInCache } = useLRUCache(50);
54
66
  const textInputRef = useRef();
55
67
  const { isExportingPDF } = useContext(PDFContext);
56
- // gets a cluster id and returns display name
57
- const getDisplayName = (id, noClusterIdReasonExplanation, display_name) => {
58
- if (isEmpty(id))
59
- return '';
60
- if (id === 'dont-have-id') {
61
- return noClusterIdReasonExplanation === 'v3-cluster'
62
- ? t('The case is for a v3 cluster')
63
- : t("I don't have my Cluster ID");
64
- }
65
- if (id === 'v3-cluster')
66
- return t('The case is for a v3 cluster');
67
- return display_name || id;
68
- };
69
68
  const onDropdownClear = () => __awaiter(this, void 0, void 0, function* () {
70
69
  setIsOpen(false);
71
70
  setInputVal('');
@@ -118,8 +117,8 @@ function OpenshiftDropdownV4(props) {
118
117
  const dropdownOptions = useMemo(() => [
119
118
  { type: 'checkbox', key: 'show-hide-archived-clusters', label: t('Show archived clusters') },
120
119
  { type: 'option', key: 'dont-have-id', label: t("I don't have my Cluster ID") },
121
- ...(props.isV3 ? [{ type: 'option', key: 'v3-cluster', label: t('The case is for a v3 cluster') }] : []),
122
- ], [props.isV3, t]);
120
+ { type: 'option', key: 'v3-cluster', label: t('The case is for a v3 cluster') },
121
+ ], [t]);
123
122
  // Use the keyboard navigation hook
124
123
  const { focusedItemIndex, onInputKeyDown } = useSelectKeyboardNavigator({
125
124
  list: dropdownOptions,
@@ -146,15 +145,9 @@ function OpenshiftDropdownV4(props) {
146
145
  const dropdownHeaderOptions = useMemo(() => [
147
146
  React.createElement(SelectOption, { hasCheckbox: true, key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", className: "archived-clusters-checkbox", "data-tracking-id": "show-hide-archived-clusters", value: { type: 'checkbox' }, isSelected: showArchivedClusters }, t('Show archived clusters')),
148
147
  React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
149
- 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"),
150
- ...(props.isV3
151
- ? [
152
- React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')), isFocused: focusedItemIndex === 2 }),
153
- ]
154
- : []),
155
- ],
156
- // eslint-disable-next-line react-hooks/exhaustive-deps
157
- [showArchivedClusters, focusedItemIndex]);
148
+ 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 }, t("I don't have my Cluster ID")),
149
+ React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')), "data-tracking-id": "v3-cluster-case", isFocused: focusedItemIndex === 2 }, t('The case is for a v3 cluster')),
150
+ ], [showArchivedClusters, focusedItemIndex, t]);
158
151
  const getClusterOptions = (clusters, total = totalResultsNo) => {
159
152
  const clustersResponseGrouped = groupBy(clusters, 'console_url') || [];
160
153
  const domainNames = Object.keys(clustersResponseGrouped) || [];
@@ -224,17 +217,14 @@ function OpenshiftDropdownV4(props) {
224
217
  }
225
218
  else {
226
219
  if (abortControllerRef.current !== undefined) {
227
- // Cancel the previous request
228
220
  abortControllerRef.current.abort();
229
221
  }
230
- // recreate a new AbortController for each call
231
222
  let controller = new AbortController();
232
223
  abortControllerRef.current = controller;
233
224
  const clusterStatus = ` AND status not in ('Deprovisioned'${!showArchivedClusters ? ",'Archived'" : ''})`;
234
225
  const searchPhrase = search
235
226
  ? ` AND (external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%' OR console_url ILIKE '%${search}%')`
236
227
  : '';
237
- // query language: https://github.com/yaacov/tree-search-language
238
228
  clustersResponse = yield cloud.getAccountClustersSubscription({
239
229
  order: 'display_name asc',
240
230
  page,
@@ -265,7 +255,6 @@ function OpenshiftDropdownV4(props) {
265
255
  };
266
256
  }
267
257
  catch (e) {
268
- // silently fails
269
258
  setIsFetchingClusters(false);
270
259
  return { items: [], totalResult: 0, page: 1, total: 0 };
271
260
  }
@@ -301,8 +290,6 @@ function OpenshiftDropdownV4(props) {
301
290
  }, [props.openshiftClusterIDState, props.openshiftDisplayName, props.noClusterIdReasonExplanation]);
302
291
  // need to get clusters when user opens the dropdown
303
292
  // as the api response is cached np extra call is made on open/close
304
- // added observing props.isV3 because re-render
305
- // is needed when user on overview page changing version
306
293
  useEffect(() => {
307
294
  if (!isOpen)
308
295
  return;
@@ -321,7 +308,7 @@ function OpenshiftDropdownV4(props) {
321
308
  isUnmounted = true;
322
309
  };
323
310
  // eslint-disable-next-line react-hooks/exhaustive-deps
324
- }, [props.isV3, showArchivedClusters, isOpen, inputVal]);
311
+ }, [showArchivedClusters, isOpen, inputVal]);
325
312
  const onTextInputChange = (_event, value) => {
326
313
  setInputVal(value);
327
314
  props.onClusterIdStateUpdate({ external_cluster_id: value });
@@ -1 +1 @@
1
- {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,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;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA+NxD"}
1
+ {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,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;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA2NxD"}
@@ -69,58 +69,52 @@ export function NonOrgCaseNotifyeesSelector(props) {
69
69
  const onRemoveItem = (optionToRemove) => {
70
70
  props.onChange && props.onChange([optionToRemove]);
71
71
  };
72
+ const mapContactsToNotifyees = (rawContacts) => rawContacts
73
+ .filter((c) => !!c.ssoName)
74
+ .map((c) => {
75
+ const { ssoName } = c, rest = __rest(c, ["ssoName"]);
76
+ return Object.assign({ ssoUsername: ssoName }, rest);
77
+ });
78
+ const hasSelectedUsername = (mappedContacts) => mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
72
79
  const onAddClick = () => __awaiter(this, void 0, void 0, function* () {
73
80
  var _a, _b, _c, _d;
74
81
  clearErrors();
75
- const searchResults = yield request(props.accountNumber, inputVal,
76
- // eslint-disable-next-line eqeqeq
77
- props.groupNumber == '-1' ? null : props.groupNumber);
82
+ const searchResults = yield request(props.accountNumber, inputVal, props.groupNumber || null);
78
83
  const { notificationAddress = { email: '' }, contacts = [] } = (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults[0]) !== null && _a !== void 0 ? _a : {};
79
84
  if ((notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) && (contacts === null || contacts === void 0 ? void 0 : contacts.length)) {
80
- const mappedContacts = contacts
81
- .filter((c) => !!c.ssoName)
82
- .map((c) => {
83
- const { ssoName } = c, rest = __rest(c, ["ssoName"]);
84
- return Object.assign({ ssoUsername: ssoName }, rest);
85
- });
86
- const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
87
- if (!isUsernameAlreadySelected) {
85
+ const mappedContacts = mapContactsToNotifyees(contacts);
86
+ if (!hasSelectedUsername(mappedContacts)) {
88
87
  (_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, [...mappedContacts]);
89
88
  }
90
89
  setInputVal('');
91
90
  setNotifyeesList([...mappedContacts, { emailAddress: notificationAddress.email }]);
91
+ return;
92
92
  }
93
- else {
94
- if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
95
- const isEmailAlreadySelected = props.selectedItems.some((item) => {
96
- var _a, _b;
97
- return isCustomEmailAddress(item) &&
98
- ((_a = item.emailAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = notificationAddress.email) === null || _b === void 0 ? void 0 : _b.toLowerCase());
99
- });
100
- if (!isEmailAlreadySelected) {
101
- const updatedSelection = [{ emailAddress: notificationAddress.email, caseNumber: '' }];
102
- (_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, updatedSelection);
103
- }
104
- setInputVal('');
105
- }
106
- else if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
107
- const mappedContacts = contacts
108
- .filter((c) => !!c.ssoName)
109
- .map((c) => {
110
- const { ssoName } = c, rest = __rest(c, ["ssoName"]);
111
- return Object.assign({ ssoUsername: ssoName }, rest);
112
- });
113
- const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
114
- if (!isUsernameAlreadySelected) {
115
- (_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
116
- }
117
- setInputVal('');
93
+ if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
94
+ const isEmailAlreadySelected = props.selectedItems.some((item) => {
95
+ var _a, _b;
96
+ return isCustomEmailAddress(item) &&
97
+ ((_a = item.emailAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = notificationAddress.email) === null || _b === void 0 ? void 0 : _b.toLowerCase());
98
+ });
99
+ if (!isEmailAlreadySelected) {
100
+ (_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, [{ emailAddress: notificationAddress.email, caseNumber: '' }]);
118
101
  }
119
- else {
120
- loggedInUsersAccount.data.hasGroupACLs && props.groupNumber && props.groupNumber !== '-1'
121
- ? setShowGroupPermissionError(true)
122
- : setShowAccountPermissionError(true);
102
+ setInputVal('');
103
+ return;
104
+ }
105
+ if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
106
+ const mappedContacts = mapContactsToNotifyees(contacts);
107
+ if (!hasSelectedUsername(mappedContacts)) {
108
+ (_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
123
109
  }
110
+ setInputVal('');
111
+ return;
112
+ }
113
+ if (loggedInUsersAccount.data.hasGroupACLs && props.groupNumber) {
114
+ setShowGroupPermissionError(true);
115
+ }
116
+ else {
117
+ setShowAccountPermissionError(true);
124
118
  }
125
119
  });
126
120
  const clearErrors = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"NoAttachmentSelectedModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/NoAttachmentSelectedModal.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,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,qBAgJtD"}
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,qBAkJtD"}
@@ -1,12 +1,14 @@
1
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
+ import { pendoTrackEvent } from '@rh-support/utils';
4
5
  import React, { useContext, useEffect, useRef, useState } from 'react';
5
6
  import { Trans, useTranslation } from 'react-i18next';
6
7
  import { RulesDispatchContext, RulesStateContext } from '../../context/RulesContext';
7
8
  import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
8
9
  import { RulesReducerConstants } from '../../reducers/RulesReducer';
9
10
  import FileEARule from '../ImproveCase/FileEARule';
11
+ import { recsViewedFromNoAttachmentModalEvent } from '../shared/Constants';
10
12
  import { AttachmentStateContext, isAnyFileAttached, isAnyFileDiagnosticsAttachment, isUploadingAttachment, } from '../shared/fileUpload';
11
13
  import FileSelectorButton from '../shared/fileUpload/fileSelectors/FileSelectorButton';
12
14
  import FileUpload from '../shared/fileUpload/FileUpload';
@@ -14,26 +16,28 @@ const TIMEOUT_DURATION = 9000;
14
16
  export function NoAttachmentSelectedModal(props) {
15
17
  const { t } = useTranslation();
16
18
  const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
17
- const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
18
19
  const { attachmentState: { caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
19
20
  const [isUploading, setIsUploading] = useState(false);
20
21
  const isAnyFileAttachedLocal = isAnyFileAttached(selectedLocalFiles);
21
22
  const skipAndCreateCaseBtntimeoutRef = useRef(null);
22
23
  const rulesDispatch = useContext(RulesDispatchContext);
23
24
  const { rulesState } = useContext(RulesStateContext);
25
+ const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
26
+ const isSecureSupport = Boolean(loggedInUsersAccount.data.secureSupport);
24
27
  const isFirstMounRef = useRef(true);
25
28
  const canUseSessionManagement = ability.can(resourceActions.CREATE, resources.SESSION_TRACKING);
26
29
  useEffect(() => {
27
- if (rulesState.triggerRuleNotification && !isFirstMounRef.current) {
30
+ if (rulesState.triggerRuleNotification && !isFirstMounRef.current && !isSecureSupport) {
28
31
  rulesDispatch({
29
32
  type: RulesReducerConstants.triggerEARulesModalVisibiltyChange,
30
33
  payload: { isRuleModalVisible: true },
31
34
  });
35
+ pendoTrackEvent(recsViewedFromNoAttachmentModalEvent);
32
36
  props.onClose();
33
37
  }
34
38
  isFirstMounRef.current = false;
35
39
  // eslint-disable-next-line react-hooks/exhaustive-deps
36
- }, [rulesState.triggerRuleNotification, rulesDispatch]);
40
+ }, [rulesState.triggerRuleNotification, rulesDispatch, isSecureSupport]);
37
41
  /** Clearing timeout on component unmount */
38
42
  useEffect(() => {
39
43
  return () => {
@@ -75,7 +79,7 @@ export function NoAttachmentSelectedModal(props) {
75
79
  React.createElement("p", { className: "pf-v6-u-mb-md" },
76
80
  React.createElement(Trans, null, "Uploading an attachment will speed up your case's resolution time")),
77
81
  React.createElement(FileEARule, { isInline: true })))),
78
- React.createElement(FileUpload, { idToUploadTo: activeSessionId, onUploadClick: onFileUploadClick, isSessionId: true, needsAnalyzing: true, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, isSecureSupport: loggedInUsersAccount.data.secureSupport, isPrivate: false }),
82
+ React.createElement(FileUpload, { idToUploadTo: activeSessionId, onUploadClick: onFileUploadClick, isSessionId: true, needsAnalyzing: !isSecureSupport, autoUploadOnSelect: isSecureSupport ? false : true, isSecureSupport: isSecureSupport, isPrivate: false }),
79
83
  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" },
80
84
  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" },
81
85
  React.createElement(Trans, null, "Create Case")))) : (React.createElement(React.Fragment, null,
@@ -41,7 +41,7 @@ export default function EditDescription(props) {
41
41
  try {
42
42
  setIsUpdating(true);
43
43
  const caseDetails = { description: localDescription };
44
- // Only GS4 internal can edit description
44
+ //Only GS4 internal can edit description
45
45
  yield kase.updateCase(caseNumber, caseDetails, true);
46
46
  setIsUpdating(false);
47
47
  setCaseDetails(caseDispatch, caseDetails);
@@ -1 +1 @@
1
- {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBA8ItC"}
1
+ {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAoBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBA0JtC"}
@@ -1,3 +1,4 @@
1
+ import { useApolloClient } from '@apollo/client/react';
1
2
  import { Grid, GridItem } from '@patternfly/react-core';
2
3
  import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
3
4
  import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
@@ -7,29 +8,33 @@ import isEqual from 'lodash/isEqual';
7
8
  import React, { useContext, useEffect } from 'react';
8
9
  import { Trans, useTranslation } from 'react-i18next';
9
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
+ import { useShowCaseGroupField } from '../../hooks/useCaseGroupUiState';
10
12
  import { setCaseDetails } from '../../reducers/CaseReducer';
11
13
  import CaseGroup from '../CaseInformation/CaseGroup';
12
14
  import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
13
- import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
15
+ // TODO: Re-enable once phone number verification flow is fully supported with GraphQL
16
+ // import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
14
17
  import Severity from '../CaseInformation/Severity';
15
18
  import SupportLevel from '../CaseInformation/SupportLevel';
19
+ import CaseLabelsCreate from '../CaseManagement/CaseLabelsCreate';
16
20
  import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
17
- import { Cep } from '../CaseManagement/Cep';
21
+ // import { Cep } from '../CaseManagement/Cep';
18
22
  import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
19
23
  import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
20
- import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
24
+ // import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
21
25
  import KtQuestions from '../ImproveCase/KtQuestions';
22
26
  export default function IdeaInformation() {
23
27
  const { t } = useTranslation();
24
28
  const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
25
29
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
26
- const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
30
+ const apolloClient = useApolloClient();
31
+ const { contactSSOName, selectedAccountDetails, ownersCaseGroups } = useCaseSelector((state) => ({
27
32
  contactSSOName: state.caseDetails.contactSSOName,
28
33
  ownersCaseGroups: state.ownersCaseGroups,
29
34
  selectedAccountDetails: state.selectedAccountDetails,
30
- hasInvalidEntitlements: state.hasInvalidEntitlements,
31
35
  }), isEqual);
32
36
  const caseDispatch = useCaseDispatch();
37
+ const showCaseGroupField = useShowCaseGroupField();
33
38
  const isMetadataLoading = () => {
34
39
  return !isMetadataLoadingError() && (loggedInUser.isFetching || selectedAccountDetails.isFetching);
35
40
  };
@@ -48,13 +53,13 @@ export default function IdeaInformation() {
48
53
  }
49
54
  const allPromisses = [];
50
55
  if (haventLoadedMetadata(allCaseTypes)) {
51
- allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
56
+ allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient));
52
57
  }
53
58
  if (haventLoadedMetadata(allCaseSeverities)) {
54
- allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
59
+ allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, apolloClient));
55
60
  }
56
61
  if (haventLoadedMetadata(caseLanguages)) {
57
- allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
62
+ allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient));
58
63
  }
59
64
  Promise.all(allPromisses);
60
65
  }, [
@@ -66,6 +71,7 @@ export default function IdeaInformation() {
66
71
  loggedInUserJwtToken,
67
72
  selectedAccountDetails,
68
73
  loggedInUsersAccount.data.secureSupport,
74
+ apolloClient,
69
75
  ]);
70
76
  const onSeverityChange = (payload) => {
71
77
  setCaseDetails(caseDispatch, payload);
@@ -79,13 +85,13 @@ export default function IdeaInformation() {
79
85
  ' ',
80
86
  React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
81
87
  " for assistance.")),
82
- React.createElement(AlertMessage, { show: hasInvalidEntitlements, variant: AlertType.DANGER, className: "pf-v6-u-mb-md", isInline: true },
88
+ React.createElement(AlertMessage, { show: !loggedInUserRights.data.isEntitled(), variant: AlertType.DANGER, className: "pf-v6-u-mb-md", isInline: true },
83
89
  React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
84
90
  "You need a valid entitlement to create a case.\u00A0 Please contact",
85
91
  ' ',
86
92
  React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
87
93
  " for assistance.")),
88
- !hasInvalidEntitlements &&
94
+ loggedInUserRights.data.isEntitled() &&
89
95
  !isMetadataLoading() &&
90
96
  !isMetadataLoadingError() &&
91
97
  loggedInUserRights.data.canManageCases() && (React.createElement(React.Fragment, null,
@@ -97,14 +103,14 @@ export default function IdeaInformation() {
97
103
  React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
98
104
  React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xl" },
99
105
  React.createElement(ContactPhoneNumber, null))),
100
- React.createElement(ContactPhoneNumberAlert, null),
101
106
  React.createElement(Grid, { hasGutter: true },
102
- React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
107
+ React.createElement(GridItem, { span: 12, xl2: showCaseGroupField ? 6 : 12, className: "pf-v6-u-mb-xs" },
103
108
  React.createElement(CaseLanguageSelector, { isManageStep: true })),
104
- React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
105
- React.createElement(CaseGroup, { init: true }))),
106
- React.createElement(CaseContactSelector, null),
109
+ showCaseGroupField && (React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
110
+ React.createElement(CaseGroup, { init: true })))),
111
+ React.createElement(Grid, { hasGutter: true },
112
+ React.createElement(GridItem, { span: 12, xl2: 12, className: "pf-v6-u-mb-xs" },
113
+ React.createElement(CaseLabelsCreate, null))),
107
114
  React.createElement(RHAssociatesSelector, null),
108
- React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
109
- React.createElement(Cep, null))))));
115
+ React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))))));
110
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBAiM9C"}
1
+ {"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBAkM9C"}
@@ -1,3 +1,4 @@
1
+ import { useApolloClient } from '@apollo/client/react';
1
2
  import { Bullseye, Card, CardBody, Gallery, GalleryItem, Split, SplitItem } from '@patternfly/react-core';
2
3
  import { LoadingIndicator } from '@rh-support/components';
3
4
  import { fetchCaseTypes, useGlobalDispatchContext, useGlobalStateContext } from '@rh-support/react-context';
@@ -11,8 +12,9 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
11
12
  import { setCaseDetails } from '../../reducers/CaseReducer';
12
13
  import { BugIcon, CertificationIcon, CustomerServiceIcon, DocumentationIcon, GearIcon, IdeaIcon, RcaIcon, } from './SupportTypeIcons';
13
14
  export default function SupportTypeSelectorPage() {
14
- const { globalMetadataState: { allCaseTypes, loggedInUsersAccount }, } = useGlobalStateContext();
15
+ const { globalMetadataState: { allCaseTypes }, } = useGlobalStateContext();
15
16
  const globalDispatch = useGlobalDispatchContext();
17
+ const apolloClient = useApolloClient();
16
18
  const [selectedSupportType, setSelectedSupportType] = useState('');
17
19
  const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
18
20
  const { caseType, isFetchingSelectedAccountDetails, issue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
@@ -27,7 +29,7 @@ export default function SupportTypeSelectorPage() {
27
29
  useEffect(() => {
28
30
  if (haventLoadedMetadata(allCaseTypes)) {
29
31
  // Load support types.
30
- fetchCaseTypes(globalDispatch, loggedInUsersAccount.data.secureSupport);
32
+ fetchCaseTypes(globalDispatch, apolloClient);
31
33
  }
32
34
  // eslint-disable-next-line react-hooks/exhaustive-deps
33
35
  }, []);
@@ -6,7 +6,6 @@ interface IProps {
6
6
  routeProps: RouteComponentProps<IRouteUrlParams>;
7
7
  loadTCOnChange?: boolean;
8
8
  showTCAfterButtonClicked?: boolean;
9
- checkEntitledProduct?: boolean;
10
9
  isOnSummaryPage?: boolean;
11
10
  isOnGetSupportPage?: boolean;
12
11
  isOnReviewPage?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAOD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAoJvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}