@rh-support/troubleshoot 2.6.341 → 2.6.349

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 (336) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -6
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
  9. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/Case.js +33 -60
  11. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
  13. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
  15. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
  17. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
  18. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
  23. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
  25. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
  27. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  30. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
  31. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
  35. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
  81. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  82. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
  83. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  84. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
  85. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  86. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
  87. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
  88. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
  90. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
  92. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  93. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
  94. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  95. package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
  96. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  97. package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
  98. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  99. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
  100. package/lib/esm/components/CaseInformation/Description.js +1 -1
  101. package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
  102. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  103. package/lib/esm/components/CaseInformation/Fts.js +16 -30
  104. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  105. package/lib/esm/components/CaseInformation/Severity.js +11 -17
  106. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  107. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  108. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  109. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
  110. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  111. package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
  112. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  113. package/lib/esm/components/CaseManagement/Cep.js +9 -11
  114. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  115. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  116. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
  117. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  118. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  119. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +22 -15
  120. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  121. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  122. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  123. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
  124. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  125. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  126. package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
  127. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  128. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  129. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  130. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  131. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  132. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  133. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  134. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  135. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  136. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  137. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  138. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  139. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  140. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  141. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  142. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  143. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  144. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  145. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  146. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  147. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  148. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  149. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  150. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  151. package/lib/esm/components/Review/Review.js +16 -20
  152. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  153. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  154. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  155. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  156. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  157. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  158. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -109
  159. package/lib/esm/components/shared/Constants.d.ts +0 -5
  160. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  161. package/lib/esm/components/shared/Constants.js +0 -5
  162. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  163. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  164. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  165. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  166. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  167. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  168. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
  169. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  170. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  171. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
  172. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  173. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
  174. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  175. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  176. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  177. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
  178. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  179. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  180. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  181. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
  182. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  183. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  184. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  185. package/lib/esm/components/shared/usePostComment.js +28 -16
  186. package/lib/esm/components/shared/utils.d.ts +0 -1
  187. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  188. package/lib/esm/components/shared/utils.js +3 -9
  189. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  190. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -170
  191. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  192. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  193. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  194. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
  195. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  196. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
  197. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  198. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  199. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  200. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  201. package/lib/esm/css/case.css +202 -60
  202. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  203. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  204. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
  205. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  206. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  207. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  208. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  209. package/lib/esm/hooks/useS3Upload.js +30 -28
  210. package/lib/esm/i18n/template-de.d.ts +2 -2
  211. package/lib/esm/i18n/template-de.js +2 -2
  212. package/lib/esm/i18n/template-es.d.ts +2 -2
  213. package/lib/esm/i18n/template-es.js +2 -2
  214. package/lib/esm/i18n/template-fr.d.ts +2 -2
  215. package/lib/esm/i18n/template-fr.js +2 -2
  216. package/lib/esm/i18n/template-it.d.ts +2 -2
  217. package/lib/esm/i18n/template-it.js +2 -2
  218. package/lib/esm/i18n/template-jp.d.ts +2 -2
  219. package/lib/esm/i18n/template-jp.js +2 -2
  220. package/lib/esm/i18n/template-ko.d.ts +2 -2
  221. package/lib/esm/i18n/template-ko.js +2 -2
  222. package/lib/esm/i18n/template-pt.d.ts +2 -2
  223. package/lib/esm/i18n/template-pt.js +2 -2
  224. package/lib/esm/i18n/template-ru.d.ts +2 -2
  225. package/lib/esm/i18n/template-ru.js +2 -2
  226. package/lib/esm/i18n/template-zh.d.ts +2 -2
  227. package/lib/esm/i18n/template-zh.js +2 -2
  228. package/lib/esm/index.js +0 -1
  229. package/lib/esm/models/cache.d.ts +2 -0
  230. package/lib/esm/models/cache.d.ts.map +1 -1
  231. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
  232. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  233. package/lib/esm/reducers/CaseConstNTypes.js +7 -31
  234. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  235. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  236. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  237. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
  238. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  239. package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
  240. package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
  241. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  242. package/lib/esm/reducers/CaseHelpers.js +17 -92
  243. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  244. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  245. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  246. package/lib/esm/reducers/CaseReducer.d.ts +11 -56
  247. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  248. package/lib/esm/reducers/CaseReducer.js +99 -279
  249. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  250. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  251. package/lib/esm/scss/_main.scss +0 -9
  252. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  253. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  254. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  255. package/package.json +8 -9
  256. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
  257. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  258. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
  259. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
  260. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  261. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
  262. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  263. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  264. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  265. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  266. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  267. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
  268. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  269. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  270. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
  271. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  272. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  273. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
  274. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  275. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  276. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  277. package/lib/esm/graphql/index.d.ts +0 -4
  278. package/lib/esm/graphql/index.d.ts.map +0 -1
  279. package/lib/esm/graphql/index.js +0 -3
  280. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  281. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  282. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  283. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  284. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  285. package/lib/esm/graphql/mutations/index.js +0 -1
  286. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  287. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  288. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
  289. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  290. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  291. package/lib/esm/graphql/queries/getParentId.js +0 -16
  292. package/lib/esm/graphql/queries/index.d.ts +0 -3
  293. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  294. package/lib/esm/graphql/queries/index.js +0 -2
  295. package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
  296. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  297. package/lib/esm/graphql/schemas/escalation.js +0 -1
  298. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  299. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  300. package/lib/esm/graphql/schemas/index.js +0 -1
  301. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  302. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  303. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
  304. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  305. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  306. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  307. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  308. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  309. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  310. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
  311. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  312. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  313. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
  314. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  315. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
  316. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  317. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  318. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  319. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  320. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  321. package/lib/esm/hooks/useCaseHistory.js +0 -98
  322. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
  323. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  324. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  325. package/lib/esm/models/caseHistory.d.ts +0 -80
  326. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  327. package/lib/esm/models/caseHistory.js +0 -1
  328. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  329. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  330. package/lib/esm/utils/TimelineUtils.js +0 -135
  331. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  332. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  333. package/lib/esm/utils/caseHistoryUtils.js +0 -165
  334. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
  335. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
  336. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
@@ -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 { useApolloClient } from '@apollo/client/react';
11
10
  import { publicApi } from '@cee-eng/hydrajs';
12
- import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
11
+ import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
13
12
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
14
13
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
15
14
  import { SingleSelectDropdown, useFetch } from '@rh-support/components';
@@ -17,19 +16,41 @@ import isEqual from 'lodash/isEqual';
17
16
  import React, { useEffect, useState } from 'react';
18
17
  import { Trans, useTranslation } from 'react-i18next';
19
18
  import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
20
- import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
21
- import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetailsGraphQL } from '../../../reducers/CaseReducer';
22
- import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
19
+ import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
20
+ import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
21
+ import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
22
+ import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetails } from '../../../reducers/CaseReducer';
23
+ const getLocaleNameFromLocalCode = (localeCode) => {
24
+ if ('Intl' in window && 'DisplayNames' in Intl) {
25
+ try {
26
+ const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
27
+ // https://github.com/microsoft/TypeScript/issues/41338
28
+ const langName = new Intl.DisplayNames([lang], { type: 'language' });
29
+ const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
30
+ return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
31
+ }
32
+ catch (e) {
33
+ return localeCode;
34
+ }
35
+ }
36
+ return localeCode;
37
+ };
38
+ const formatSessionLinks = (sessionLink) => {
39
+ const links = sessionLink
40
+ .split(/[;,| \n\r\t]+/)
41
+ .map((link) => link.trim())
42
+ .filter(Boolean);
43
+ const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
+ return formattedLinks;
45
+ };
23
46
  export function NewEssTermsModal(props) {
24
47
  const { t } = useTranslation();
25
48
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
26
49
  remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
27
50
  }), isEqual);
28
51
  const [isTermsChecked, setIsTermsChecked] = useState(false);
29
- const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
30
52
  const { request } = useFetch(publicApi.terms.getRequiredTerms);
31
53
  const caseDispatch = useCaseDispatch();
32
- const apolloClient = useApolloClient();
33
54
  const [selectedTranslation, setSelectedTranslation] = useState({
34
55
  id: '5001',
35
56
  isDefault: false,
@@ -72,32 +93,15 @@ export function NewEssTermsModal(props) {
72
93
  fetchTerms();
73
94
  // eslint-disable-next-line react-hooks/exhaustive-deps
74
95
  }, []);
75
- const client = useApolloClient();
76
- const { createComment, loading: isPostingComment } = useCreateCaseComment();
77
- const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
96
+ const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
97
+ propgateErrors: true,
98
+ });
99
+ const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
100
+ const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
101
+ const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
78
102
  const updateSessionExpectation = (event, value) => setSessionExpectations(value);
79
103
  const updateImpact = (event, value) => setImpact(value);
80
104
  const updateSessionLink = (event, value) => setSessionLink(value);
81
- const getVariantSessionExpectations = () => {
82
- if (!sessionExpectations)
83
- return ProgressVariant.success;
84
- if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
85
- return ProgressVariant.warning;
86
- }
87
- else {
88
- return ProgressVariant.success;
89
- }
90
- };
91
- const getVariantImpact = () => {
92
- if (!impact)
93
- return ProgressVariant.success;
94
- if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
95
- return ProgressVariant.warning;
96
- }
97
- else {
98
- return ProgressVariant.success;
99
- }
100
- };
101
105
  // To handle modal cancel and close
102
106
  const onCancel = () => {
103
107
  if (agreeLoading || isPostingComment)
@@ -123,26 +127,21 @@ export function NewEssTermsModal(props) {
123
127
  };
124
128
  // Function to ack remote session terms and post comment
125
129
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
126
- const requestComment = t(`<p><strong>Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).</strong></p><p>Submitted a remote session request with following details:</p><p><strong>Preferred Time and Expectations of remote session</strong></p><p>${sessionExpectations}</p><p><strong>Describe the impact to you or the business</strong></p><p>${impact}</p>${sessionLink
127
- ? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
128
- : ''}<p>This action does not initiate a remote session. A Red Hat Associate will get back to you soon.</p>`);
130
+ const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
129
131
  try {
130
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
132
+ yield updateCaseDetails(caseDispatch, props.caseNumber, {
131
133
  remoteSessionTermsAcked: true,
134
+ screenSessionRequested: true,
132
135
  waitingOnCallback: true,
133
- }, false, { existingCaseDetails });
136
+ });
134
137
  try {
135
- yield createComment({
136
- caseId: caseSalesforceId,
137
- body: requestComment,
138
- isPublic: true,
139
- });
140
- client.refetchQueries({ include: [GET_CASE_COMMENTS] });
141
- yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
142
- apolloClient,
138
+ yield postCommentRequest({
143
139
  caseNumber: props.caseNumber,
144
- existingCaseDetails,
140
+ commentBody: requestComment,
141
+ contentType: 'markdown',
145
142
  });
143
+ updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
144
+ checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
146
145
  setAgreeLoading(false);
147
146
  setHasSubmitted(true);
148
147
  // ToastNotification.addSuccessMessage(
@@ -171,9 +170,8 @@ export function NewEssTermsModal(props) {
171
170
  onCancel();
172
171
  setAgreeLoading(false);
173
172
  setIsTermsChecked(false);
174
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
175
- remoteSessionTermsAcked: false,
176
- waitingOnCallback: false,
173
+ yield updateCaseDetails(caseDispatch, props.caseNumber, {
174
+ screenSessionRequested: false,
177
175
  });
178
176
  // ToastNotification.addDangerMessage(
179
177
  // t('Could not submit a request for remote session'),
@@ -217,14 +215,12 @@ export function NewEssTermsModal(props) {
217
215
  React.createElement("label", { className: "pf-v6-u-mt-md" },
218
216
  React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
219
217
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
220
- React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
221
- React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
218
+ React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
222
219
  React.createElement("div", null,
223
220
  React.createElement("label", { className: "pf-v6-u-mt-md" },
224
221
  React.createElement(Trans, null, "Describe the impact to you or the business"),
225
222
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
226
- React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
227
- React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
223
+ React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
228
224
  React.createElement("div", null,
229
225
  React.createElement("label", { className: "pf-v6-u-mt-md" },
230
226
  React.createElement(Trans, null, "Remote session link (optional)")),
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAibxD"}
1
+ {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AA4BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0XxD"}
@@ -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 { useApolloClient } from '@apollo/client/react';
11
10
  import { publicApi } from '@cee-eng/hydrajs';
12
- import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
11
+ import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
13
12
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
14
13
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
15
14
  import { SingleSelectDropdown, useFetch } from '@rh-support/components';
@@ -17,19 +16,41 @@ import isEqual from 'lodash/isEqual';
17
16
  import React, { useEffect, useState } from 'react';
18
17
  import { Trans, useTranslation } from 'react-i18next';
19
18
  import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
20
- import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
21
- import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetailsGraphQL, } from '../../../reducers/CaseReducer';
22
- import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
19
+ import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
20
+ import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
21
+ import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
22
+ import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetails, } from '../../../reducers/CaseReducer';
23
+ const getLocaleNameFromLocalCode = (localeCode) => {
24
+ if ('Intl' in window && 'DisplayNames' in Intl) {
25
+ try {
26
+ const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
27
+ // https://github.com/microsoft/TypeScript/issues/41338
28
+ const langName = new Intl.DisplayNames([lang], { type: 'language' });
29
+ const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
30
+ return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
31
+ }
32
+ catch (e) {
33
+ return localeCode;
34
+ }
35
+ }
36
+ return localeCode;
37
+ };
38
+ const formatSessionLinks = (sessionLink) => {
39
+ const links = sessionLink
40
+ .split(/[;,| \n\r\t]+/)
41
+ .map((link) => link.trim())
42
+ .filter(Boolean);
43
+ const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
+ return formattedLinks;
45
+ };
23
46
  export function RemoteSessionAgreementModal(props) {
24
47
  const { t } = useTranslation();
25
48
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
26
49
  remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
27
- caseDetails: state.caseDetails,
28
50
  }), isEqual);
29
51
  const [isTermsChecked, setIsTermsChecked] = useState(false);
30
52
  const { request } = useFetch(publicApi.terms.getRequiredTerms);
31
53
  const caseDispatch = useCaseDispatch();
32
- const apolloClient = useApolloClient();
33
54
  const [selectedTranslation, setSelectedTranslation] = useState({
34
55
  id: '5001',
35
56
  isDefault: false,
@@ -72,32 +93,15 @@ export function RemoteSessionAgreementModal(props) {
72
93
  fetchTerms();
73
94
  // eslint-disable-next-line react-hooks/exhaustive-deps
74
95
  }, []);
75
- const client = useApolloClient();
76
- const { createComment, loading: isPostingComment } = useCreateCaseComment();
77
- const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
96
+ const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
97
+ propgateErrors: true,
98
+ });
99
+ const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
100
+ const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
101
+ const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
78
102
  const updateSessionExpectation = (event, value) => setSessionExpectations(value);
79
103
  const updateImpact = (event, value) => setImpact(value);
80
104
  const updateSessionLink = (event, value) => setSessionLink(value);
81
- const getVariantSessionExpectations = () => {
82
- if (!sessionExpectations)
83
- return ProgressVariant.success;
84
- if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
85
- return ProgressVariant.warning;
86
- }
87
- else {
88
- return ProgressVariant.success;
89
- }
90
- };
91
- const getVariantImpact = () => {
92
- if (!impact)
93
- return ProgressVariant.success;
94
- if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
95
- return ProgressVariant.warning;
96
- }
97
- else {
98
- return ProgressVariant.success;
99
- }
100
- };
101
105
  // To handle modal cancel and close
102
106
  const onCancel = () => {
103
107
  if (agreeLoading || isPostingComment)
@@ -111,30 +115,23 @@ export function RemoteSessionAgreementModal(props) {
111
115
  props.onClose && props.onClose();
112
116
  };
113
117
  const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
114
- const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
115
118
  // Function to ack remote session terms and post comment
116
119
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
117
- const requestComment = t(`<p><strong>Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).</strong></p><p>Submitted a remote session request with following details:</p><p><strong>Preferred Time and Expectations of remote session</strong></p><p>${sessionExpectations}</p><p><strong>Describe the impact to you or the business</strong></p><p>${impact}</p>${sessionLink
118
- ? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
119
- : ''}<p>This action does not initiate a remote session. A Red Hat Associate will get back to you soon.</p>`);
120
+ const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
120
121
  try {
121
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
122
+ yield updateCaseDetails(caseDispatch, props.caseNumber, {
122
123
  remoteSessionTermsAcked: true,
123
124
  waitingOnCallback: true,
124
- }, false, { existingCaseDetails });
125
+ });
125
126
  setRemoteRiderFlag(caseDispatch, true);
126
127
  try {
127
- yield createComment({
128
- caseId: caseSalesforceId,
129
- body: requestComment,
130
- isPublic: true,
131
- });
132
- client.refetchQueries({ include: [GET_CASE_COMMENTS] });
133
- yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
134
- apolloClient: client,
128
+ yield postCommentRequest({
135
129
  caseNumber: props.caseNumber,
136
- existingCaseDetails,
130
+ commentBody: requestComment,
131
+ contentType: 'markdown',
137
132
  });
133
+ updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
134
+ checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
138
135
  setAgreeLoading(false);
139
136
  setHasSubmitted(true);
140
137
  // ToastNotification.addSuccessMessage(
@@ -201,14 +198,12 @@ export function RemoteSessionAgreementModal(props) {
201
198
  React.createElement("label", { className: "pf-v6-u-mt-md" },
202
199
  React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
203
200
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
204
- React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
205
- React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
201
+ React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
206
202
  React.createElement("div", null,
207
203
  React.createElement("label", { className: "pf-v6-u-mt-md" },
208
204
  React.createElement(Trans, null, "Describe the impact to you or the business"),
209
205
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
210
- React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
211
- React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
206
+ React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
212
207
  React.createElement("div", null,
213
208
  React.createElement("label", { className: "pf-v6-u-mt-md" },
214
209
  React.createElement(Trans, null, "Remote session link (optional)")),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,sBAAsB,sBAgYrC"}
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBAoYrC"}
@@ -7,7 +7,6 @@ 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 { useApolloClient } from '@apollo/client/react';
11
10
  import { contacts } from '@cee-eng/hydrajs';
12
11
  import { InputGroupText, ValidatedOptions } from '@patternfly/react-core';
13
12
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
@@ -15,7 +14,6 @@ import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon
15
14
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
16
15
  import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
17
16
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
18
- import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
19
17
  import isEmpty from 'lodash/isEmpty';
20
18
  import isEqual from 'lodash/isEqual';
21
19
  import React, { useContext, useEffect, useState } from 'react';
@@ -24,43 +22,21 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
24
22
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
25
23
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
26
24
  import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
27
- import { setCaseState, updateCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
25
+ import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
28
26
  import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
29
27
  import { removeAllChars, trimAndReplacePlus } from '../../../shared/utils';
30
28
  import { PDFContext } from '../../PDFContainer';
31
- function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34
- const { data } = yield apolloClient.query({
35
- query: GET_ACCOUNT_CONTACTS,
36
- variables: {
37
- accountNumber: { eq: accountNumber },
38
- contactsWhere: { SSOUserName__c: { eq: ssoUsername } },
39
- first: 1,
40
- },
41
- fetchPolicy: 'network-only',
42
- });
43
- const response = data;
44
- const contactNode = (_j = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.node;
45
- return {
46
- phone: (_l = (_k = contactNode === null || contactNode === void 0 ? void 0 : contactNode.Phone) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : '',
47
- };
48
- });
49
- }
50
29
  export function CaseContactPhoneNumber() {
51
30
  var _a;
52
- const apolloClient = useApolloClient();
53
- const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, accountNumberRef, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, existingCaseDetails, } = useCaseSelector((state) => ({
31
+ const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, } = useCaseSelector((state) => ({
54
32
  phoneCountryCode: state.caseDetails.phoneCountryCode || '',
55
33
  phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
56
34
  caseNumber: state.caseDetails.caseNumber,
57
35
  contactSSOName: state.caseDetails.contactSSOName,
58
- accountNumberRef: state.caseDetails.accountNumberRef,
59
36
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
60
37
  isCaseOwnerUpdating: state.isCaseOwnerUpdating,
61
38
  hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
62
39
  isCasePhoneUpdating: state.isCasePhoneUpdating,
63
- existingCaseDetails: state.caseDetails,
64
40
  }), isEqual);
65
41
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
66
42
  const canEditCase = useCanEditCase();
@@ -103,10 +79,8 @@ export function CaseContactPhoneNumber() {
103
79
  const phoneLine = (_a = getPhoneObj(localFullPhoneState)) === null || _a === void 0 ? void 0 : _a.phoneLine;
104
80
  const countryCode = (_b = getPhoneObj(localFullPhoneState)) === null || _b === void 0 ? void 0 : _b.countryCode;
105
81
  try {
106
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, {
107
- phoneCountryCode: countryCode,
108
- phoneAreaCodePrefixLineNumber: phoneLine,
109
- }, false, { existingCaseDetails });
82
+ // update case contact info
83
+ yield updateCaseDetails(caseDispatch, caseNumber, Object.assign(Object.assign({ phoneCountryCode: countryCode, phoneAreaCodePrefixLineNumber: phoneLine }, (contactSSOName === loggedInUser.data.ssoUsername && { suppliedPhoneNumberVerified: 'True' })), (!countryCode && !phoneLine && { clearPhoneNumber: true, suppliedPhoneNumberVerified: 'False' })));
110
84
  setIsSavedClicked(false);
111
85
  setCaseState(caseDispatch, { isCasePhoneUpdating: false });
112
86
  ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
@@ -193,10 +167,6 @@ export function CaseContactPhoneNumber() {
193
167
  // eslint-disable-next-line react-hooks/exhaustive-deps
194
168
  }, [suppliedPhoneNumberVerified]);
195
169
  useEffect(() => {
196
- if (!isEmpty(phoneCountryCode) || !isEmpty(phoneAreaCodePrefixLineNumber)) {
197
- setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
198
- return;
199
- }
200
170
  if (isEmpty(contactSSOName)) {
201
171
  setLocalFullPhoneState('');
202
172
  return;
@@ -210,17 +180,29 @@ export function CaseContactPhoneNumber() {
210
180
  if (contactSSOName === loggedInUser.data.ssoUsername) {
211
181
  try {
212
182
  setIsFetchingSSO(true);
213
- const loggedInUserContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
183
+ const loggedInUserContact = yield (contacts === null || contacts === void 0 ? void 0 : contacts.getSFDCContactBySso(contactSSOName));
214
184
  setIsFetchingSSO(false);
215
- const phoneLine = getPhoneObj(loggedInUserContact.phone).phoneLine || '';
216
- const countryCode = getPhoneObj(loggedInUserContact.phone).countryCode;
217
- _phoneAreaCodePrefixLineNumber = phoneLine;
218
- _phoneCountryCode = countryCode;
219
- _suppliedPhoneNumberVerified =
220
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
221
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
222
- ? hasLoggedInUserConfirmedPhoneNumber
223
- : 'False';
185
+ if (loggedInUserContact.supportPhoneAreaCodePrefixLineNumber) {
186
+ // User has opened a case before and has phone and area code in her/his contact on SF
187
+ _phoneAreaCodePrefixLineNumber = loggedInUserContact.supportPhoneAreaCodePrefixLineNumber;
188
+ _phoneCountryCode = loggedInUserContact.supportPhoneCountryCode;
189
+ _suppliedPhoneNumberVerified =
190
+ isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
191
+ isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
192
+ ? hasLoggedInUserConfirmedPhoneNumber
193
+ : 'False';
194
+ }
195
+ else {
196
+ const phoneLine = getPhoneObj(loggedInUserContact.phone).phoneLine || '';
197
+ const countryCode = getPhoneObj(loggedInUserContact.phone).countryCode;
198
+ _phoneAreaCodePrefixLineNumber = phoneLine;
199
+ _phoneCountryCode = countryCode;
200
+ _suppliedPhoneNumberVerified =
201
+ isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
202
+ isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
203
+ ? hasLoggedInUserConfirmedPhoneNumber
204
+ : 'False';
205
+ }
224
206
  }
225
207
  catch (_a) {
226
208
  _phoneAreaCodePrefixLineNumber = '';
@@ -234,11 +216,18 @@ export function CaseContactPhoneNumber() {
234
216
  // user is openning case for others (use is partner or red hatter)
235
217
  try {
236
218
  setIsFetchingSSO(true);
237
- const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
219
+ const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
238
220
  setIsFetchingSSO(false);
239
- _phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
240
- _phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
241
- _suppliedPhoneNumberVerified = 'Deferred';
221
+ if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
222
+ _phoneAreaCodePrefixLineNumber = selectedContact.supportPhoneAreaCodePrefixLineNumber;
223
+ _phoneCountryCode = selectedContact.supportPhoneCountryCode;
224
+ _suppliedPhoneNumberVerified = 'Deferred';
225
+ }
226
+ else {
227
+ _phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
228
+ _phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
229
+ _suppliedPhoneNumberVerified = 'Deferred';
230
+ }
242
231
  }
243
232
  catch (e) {
244
233
  _phoneAreaCodePrefixLineNumber = '';
@@ -263,9 +252,14 @@ export function CaseContactPhoneNumber() {
263
252
  setLocalFullPhoneState(checkingPlusInLocalFullPhone(_localFullPhone));
264
253
  setCaseState(caseDispatch, { isCasePhoneUpdating: false });
265
254
  });
266
- initContactPhoneNumber();
255
+ if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber)) {
256
+ initContactPhoneNumber();
257
+ }
258
+ else {
259
+ setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
260
+ }
267
261
  // eslint-disable-next-line react-hooks/exhaustive-deps
268
- }, [contactSSOName, phoneCountryCode, phoneAreaCodePrefixLineNumber]);
262
+ }, [contactSSOName]);
269
263
  return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
270
264
  React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
271
265
  React.createElement(Trans, null, "Case owner's phone number"),
@@ -281,7 +275,7 @@ export function CaseContactPhoneNumber() {
281
275
  isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
282
276
  React.createElement(CheckIcon, null)),
283
277
  React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isCaseOwnerUpdating || isCasePhoneUpdating, "aria-label": "Clear" },
284
- React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating || canEditCase.isCaseNotEditable },
278
+ React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating },
285
279
  React.createElement(PencilAltIcon, null)))),
286
280
  !invalid &&
287
281
  (localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) <= PHONE_LIMIT &&
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAoBvD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAqF1D"}
1
+ {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAkBvD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAgE1D"}
@@ -1,63 +1,52 @@
1
1
  import { Flex, FlexItem } from '@patternfly/react-core';
2
- import { AlertMessage, AlertType } from '@rh-support/components';
3
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
4
3
  import isEqual from 'lodash/isEqual';
5
4
  import React, { useContext, useState } from 'react';
6
- import { useTranslation } from 'react-i18next';
7
5
  import { useCaseSelector } from '../../../../context/CaseContext';
8
6
  import { OwnerSelector } from '../../../AccountInfo/OwnerSelector';
9
7
  import CaseGroup from '../../../CaseInformation/CaseGroup';
10
- import CaseLabels from '../../../CaseInformation/CaseLabels';
11
8
  import Fts from '../../../CaseInformation/Fts';
12
- // import { Cep } from '../../../CaseManagement/Cep';
13
- // import { RHAssociatesSelector } from '../../../CaseManagement/RHAssociatesSelector';
14
- // import CaseContactSelector from '../../../CaseManagement/SendNotifications/CaseContactSelector';
9
+ import { Cep } from '../../../CaseManagement/Cep';
10
+ import { RHAssociatesSelector } from '../../../CaseManagement/RHAssociatesSelector';
11
+ import CaseContactSelector from '../../../CaseManagement/SendNotifications/CaseContactSelector';
15
12
  import { PartnerCaseHelper } from '../../ShareCase/PartnerCaseHelper';
16
13
  import { ShareWithPartner } from '../../ShareCase/PartnerShare';
17
14
  import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
18
15
  import CaseInternalStatus from './CaseInternalStatus';
19
- // TODO: Re-enable once phone number verification flow is fully supported with GraphQL
20
- // import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
16
+ import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
21
17
  import CaseReferenceNumber from './CaseReferenceNumber';
22
18
  import CaseSbrGroups from './CaseSbrGroups';
23
19
  import SFDCUrl from './SFDCUrl';
24
20
  export default function CaseDetailsManagement(props) {
25
- const { t } = useTranslation();
26
21
  const [isUpdatingPartner, setIsUpdatingPartner] = useState(false);
27
22
  const caseState = useCaseSelector((state) => ({
28
23
  caseDetails: {
29
24
  accountNumber: state.caseDetails.accountNumberRef,
30
25
  },
31
- showMandatoryCaseGroupValidationError: state.showMandatoryCaseGroupValidationError,
32
26
  }), isEqual);
33
27
  const accountNumber = caseState.caseDetails.accountNumber;
34
28
  const ability = useContext(AbilityContext);
35
- // const canSeeEmailNotifications = ability.can(
36
- // resourceActions.PATCH,
37
- // resources.CASE_DETAILS,
38
- // CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS
39
- // );
29
+ const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
40
30
  const canSeeInternalStatus = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_INTERNAL_STATUS);
41
31
  const canSeeSBRGroups = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SBR_GROUP);
42
32
  return (React.createElement(React.Fragment, null,
43
33
  React.createElement(PartnerCaseHelper, { setIsUpdatingPartners: setIsUpdatingPartner, caseNumber: props.caseNumber, routeProps: props.routeProps }),
44
34
  React.createElement("section", { className: "card card-white" },
45
- React.createElement(AlertMessage, { show: !!caseState.showMandatoryCaseGroupValidationError, variant: AlertType.DANGER, isInline: true, title: t('Please address the errors to proceed'), className: "pf-v6-u-mb-lg", "data-tracking-id": "proceed-address-errors" }),
46
35
  React.createElement("form", null,
47
36
  React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
48
37
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
49
38
  React.createElement(OwnerSelector, null)),
50
39
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
51
40
  React.createElement(CaseContactPhoneNumber, null))),
41
+ React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
52
42
  canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
53
43
  canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
54
- React.createElement(Flex, { direction: { default: 'column', lg: 'row' } },
55
- React.createElement(FlexItem, { flex: { default: 'flex_1' } },
56
- React.createElement(CaseGroup, null)),
57
- React.createElement(FlexItem, { flex: { default: 'flex_1' } },
58
- React.createElement(CaseLabels, null))),
44
+ React.createElement(CaseGroup, null),
59
45
  React.createElement(CaseReferenceNumber, null),
46
+ canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
47
+ React.createElement(RHAssociatesSelector, null),
60
48
  React.createElement(Fts, { inlineEditable: true }),
49
+ React.createElement(Cep, null),
61
50
  React.createElement(SFDCUrl, null),
62
51
  React.createElement(ShareWithPartner, { routeProps: props.routeProps, isUpdatingPartner: isUpdatingPartner, accountNumber: accountNumber })))));
63
52
  }
@@ -111,7 +111,7 @@ function CaseHostname(props) {
111
111
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
112
112
  React.createElement(Trans, { className: "pf-v6-u-mr-xs" }, "Hostname"),
113
113
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
114
- React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable && !canEditCase.isCaseNotEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
114
+ React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
115
115
  React.createElement(TextInput, { type: "text", id: "case-details-hostname", className: `${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: (e, phone) => onHostnameChange(phone), isDisabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
116
116
  lengthError && (React.createElement("div", { className: "pull-top" },
117
117
  React.createElement("p", { className: "form-instructions form-invalid" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAwD5C"}
1
+ {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAwD5C"}