@rh-support/troubleshoot 2.6.358 → 2.6.363

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 +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 +9 -19
  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 +47 -79
  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 +17 -63
  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 +55 -130
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +5 -10
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +65 -110
  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 +102 -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 +26 -40
  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 +148 -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 +145 -76
  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 +267 -217
  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 +61 -168
  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 +31 -108
  100. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  101. package/lib/esm/components/CaseInformation/Description.js +1 -1
  102. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  103. package/lib/esm/components/CaseInformation/FileDiag.js +5 -2
  104. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  105. package/lib/esm/components/CaseInformation/Fts.js +17 -31
  106. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  107. package/lib/esm/components/CaseInformation/Severity.js +24 -33
  108. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  109. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  110. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  111. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
  112. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  113. package/lib/esm/components/CaseManagement/CaseManagement.js +10 -13
  114. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  115. package/lib/esm/components/CaseManagement/Cep.js +9 -11
  116. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  117. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  118. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -20
  119. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  120. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  121. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +1 -0
  122. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  123. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +32 -19
  124. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  125. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  126. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  127. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +4 -8
  128. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  129. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  130. package/lib/esm/components/IdeaInformation/IdeaInformation.js +17 -23
  131. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  132. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  133. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  134. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  135. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  136. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  137. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  138. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  139. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  140. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  141. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  142. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  143. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  144. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  145. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  146. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  147. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  148. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  149. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  150. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  151. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  152. package/lib/esm/components/Recommendations/Recommendations.js +9 -3
  153. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  154. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  155. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  156. package/lib/esm/components/Review/Review.js +19 -25
  157. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  158. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  159. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  160. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  161. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  162. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  163. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +91 -139
  164. package/lib/esm/components/shared/Constants.d.ts +0 -5
  165. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  166. package/lib/esm/components/shared/Constants.js +0 -5
  167. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  168. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  169. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  170. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  171. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  172. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +0 -1
  173. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  174. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -4
  175. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  176. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  177. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -22
  178. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  179. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +59 -307
  180. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  181. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  182. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  183. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -5
  184. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  185. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  186. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  187. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -119
  188. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  189. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  190. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  191. package/lib/esm/components/shared/usePostComment.js +28 -16
  192. package/lib/esm/components/shared/utils.d.ts +0 -1
  193. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  194. package/lib/esm/components/shared/utils.js +3 -9
  195. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  196. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -178
  197. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  198. package/lib/esm/components/wizardLayout/MainSection.js +1 -2
  199. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  200. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  201. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  202. package/lib/esm/components/wizardLayout/WizardLayout.js +13 -12
  203. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  204. package/lib/esm/components/wizardLayout/WizardMain.js +0 -7
  205. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  206. package/lib/esm/components/wizardLayout/WizardNavigation.js +11 -14
  207. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  208. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  209. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  210. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  211. package/lib/esm/css/app.css +0 -28
  212. package/lib/esm/css/case.css +209 -60
  213. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  214. package/lib/esm/hooks/useAB.js +23 -45
  215. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  216. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  217. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
  218. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  219. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  220. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  221. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  222. package/lib/esm/hooks/useS3Upload.js +30 -28
  223. package/lib/esm/i18n/template-de.d.ts +2 -2
  224. package/lib/esm/i18n/template-de.js +2 -2
  225. package/lib/esm/i18n/template-es.d.ts +2 -2
  226. package/lib/esm/i18n/template-es.js +2 -2
  227. package/lib/esm/i18n/template-fr.d.ts +2 -2
  228. package/lib/esm/i18n/template-fr.js +2 -2
  229. package/lib/esm/i18n/template-it.d.ts +2 -2
  230. package/lib/esm/i18n/template-it.js +2 -2
  231. package/lib/esm/i18n/template-jp.d.ts +2 -2
  232. package/lib/esm/i18n/template-jp.js +2 -2
  233. package/lib/esm/i18n/template-ko.d.ts +2 -2
  234. package/lib/esm/i18n/template-ko.js +2 -2
  235. package/lib/esm/i18n/template-pt.d.ts +2 -2
  236. package/lib/esm/i18n/template-pt.js +2 -2
  237. package/lib/esm/i18n/template-ru.d.ts +2 -2
  238. package/lib/esm/i18n/template-ru.js +2 -2
  239. package/lib/esm/i18n/template-zh.d.ts +2 -2
  240. package/lib/esm/i18n/template-zh.js +2 -2
  241. package/lib/esm/index.js +0 -1
  242. package/lib/esm/models/cache.d.ts +2 -0
  243. package/lib/esm/models/cache.d.ts.map +1 -1
  244. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
  245. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  246. package/lib/esm/reducers/CaseConstNTypes.js +7 -31
  247. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  248. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  249. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  250. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
  251. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  252. package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
  253. package/lib/esm/reducers/CaseHelpers.d.ts +1 -11
  254. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  255. package/lib/esm/reducers/CaseHelpers.js +17 -119
  256. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  257. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  258. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  259. package/lib/esm/reducers/CaseReducer.d.ts +11 -56
  260. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  261. package/lib/esm/reducers/CaseReducer.js +100 -284
  262. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  263. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  264. package/lib/esm/scss/_main.scss +0 -9
  265. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  266. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  267. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  268. package/package.json +8 -9
  269. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -8
  270. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  271. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -18
  272. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
  273. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  274. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
  275. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  276. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  277. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  278. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  279. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  280. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
  281. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  282. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  283. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -106
  284. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  285. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  286. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -141
  287. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  288. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  289. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  290. package/lib/esm/graphql/index.d.ts +0 -4
  291. package/lib/esm/graphql/index.d.ts.map +0 -1
  292. package/lib/esm/graphql/index.js +0 -3
  293. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  294. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  295. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  296. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  297. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  298. package/lib/esm/graphql/mutations/index.js +0 -1
  299. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  300. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  301. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
  302. package/lib/esm/graphql/queries/index.d.ts +0 -2
  303. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  304. package/lib/esm/graphql/queries/index.js +0 -1
  305. package/lib/esm/graphql/schemas/escalation.d.ts +0 -66
  306. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  307. package/lib/esm/graphql/schemas/escalation.js +0 -1
  308. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  309. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  310. package/lib/esm/graphql/schemas/index.js +0 -1
  311. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  312. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  313. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
  314. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  315. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  316. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  317. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  318. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  319. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  320. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
  321. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  322. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  323. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
  324. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  325. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
  326. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  327. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  328. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  329. package/lib/esm/hooks/useCaseGroupUiState.d.ts +0 -3
  330. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +0 -1
  331. package/lib/esm/hooks/useCaseGroupUiState.js +0 -10
  332. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  333. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  334. package/lib/esm/hooks/useCaseHistory.js +0 -98
  335. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -23
  336. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  337. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  338. package/lib/esm/models/caseHistory.d.ts +0 -80
  339. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  340. package/lib/esm/models/caseHistory.js +0 -1
  341. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  342. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  343. package/lib/esm/utils/TimelineUtils.js +0 -135
  344. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  345. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  346. package/lib/esm/utils/caseHistoryUtils.js +0 -165
  347. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
  348. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
  349. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
@@ -7,12 +7,12 @@ 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
- import { MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
10
+ import { caseAttachments } from '@cee-eng/hydrajs';
11
+ import { Alert, MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
12
12
  import { AlertMessage, AlertType, ErrorBoundary, LoadingIndicator, ToastNotification } from '@rh-support/components';
13
13
  import { useGlobalStateContext } from '@rh-support/react-context';
14
14
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
15
- import { downloadCaseAttachment, dtmTrackEventCaseStepEncountered, getUrlParsedParams, scrollIntoView, } from '@rh-support/utils';
15
+ import { dtmTrackEventCaseStepEncountered, getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView, } from '@rh-support/utils';
16
16
  import cloneDeep from 'lodash/cloneDeep';
17
17
  import filter from 'lodash/filter';
18
18
  import findIndex from 'lodash/findIndex';
@@ -26,16 +26,16 @@ import { AutoSizer, CellMeasurer, CellMeasurerCache, List, WindowScroller } from
26
26
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
27
27
  import { useCaseDetailsPageDispatchContext, useCaseDetailsPageStateContext, } from '../../../../context/CaseDetailsPageContext';
28
28
  import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../../context/CaseDiscussionTabContext';
29
- import { clearReplyingTo, discussionSortOrderConst, DiscussionType, setDiscussions, setReplyingTo, setSort, updateAttachment, updateAttacmentsAfterRemoval, updateDiscussionStateAttachments, } from '../../../../reducers/CaseDiscussionTabReducer';
29
+ import { clearReplyComment, discussionSortOrderConst, DiscussionType, setCommentText, setDiscussions, setFilter, setSort, updateAttachment, updateAttacmentsAfterRemoval, updateCommentStateFeedback, updateDiscussionStateAttachments, updateDiscussionStateComments, } from '../../../../reducers/CaseDiscussionTabReducer';
30
30
  import { setCaseState } from '../../../../reducers/CaseReducer';
31
31
  import { AttachmentContextProvider } from '../../../shared/fileUpload/reducer/AttachmentReducerContext';
32
32
  import { PDFContext } from '../../PDFContainer';
33
33
  import CaseAttachment from './CaseAttachment';
34
- import CaseComments from './CaseComments';
35
- // import CaseExternalTrackerUpdate from './CaseExternalTrackerUpdate';
34
+ import CaseChat from './CaseChat';
35
+ import CaseComments, { AUTOMATED_SUPPORT_ASSISTANT } from './CaseComments';
36
+ import CaseExternalTrackerUpdate from './CaseExternalTrackerUpdate';
36
37
  import { CommentSearch } from './CommentSearch';
37
38
  import { PostComment } from './PostComment';
38
- /** Threshold above which comments render in a virtualized (windowed) list for performance. */
39
39
  const VC_MINIMUM_COMMENT = 150;
40
40
  let cellMeasureCache = new CellMeasurerCache({
41
41
  fixedWidth: true,
@@ -43,26 +43,30 @@ let cellMeasureCache = new CellMeasurerCache({
43
43
  });
44
44
  export default function CaseDiscussion(props) {
45
45
  const { t } = useTranslation();
46
- const { isPostingRemoteRequestCommentCompleted, product, version, caseSalesforceId } = useCaseSelector((state) => ({
46
+ const { isPostingRemoteRequestCommentCompleted, screenSessionRequested, product, version } = useCaseSelector((state) => ({
47
47
  isPostingRemoteRequestCommentCompleted: state.isPostingRemoteRequestCommentCompleted,
48
+ screenSessionRequested: state.caseDetails.screenSessionRequested,
48
49
  product: state.caseDetails.product,
49
50
  version: state.caseDetails.version,
50
- caseSalesforceId: state.caseDetails.id,
51
51
  }), isEqual);
52
52
  const urlSearchParams = getUrlParsedParams(useLocation().search);
53
- const discussionIdFromUrl = ((urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.commentId) || (urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.attachmentId));
53
+ const discussionIdFromUrl = ((urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.commentId) ||
54
+ (urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.externalTrackerId) ||
55
+ (urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.attachmentId) ||
56
+ (urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.chatId));
54
57
  const activeDiscussionElementRef = useRef(null);
55
- const { sort, discussionFiltersListState, allDiscussions, replyingToAuthor, replyingToTimestamp } = useCaseDiscussionTabStateContext();
56
- const { globalMetadataState: { navBarRef, loggedInUsersAccount }, } = useGlobalStateContext();
58
+ const { sort, discussionFiltersListState, allDiscussions, replyCommentText, replyCommentCreator } = useCaseDiscussionTabStateContext();
59
+ const { globalMetadataState: { loggedInUsersAccount, navBarRef }, } = useGlobalStateContext();
57
60
  const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
58
- const { caseDetailsPageState: { caseAttachmentHydra }, } = useCaseDetailsPageStateContext();
59
- const dispatchCaseDetailsHydraAttachments = useCaseDetailsPageDispatchContext();
60
61
  const caseDispatch = useCaseDispatch();
61
- const apolloClient = useApolloClient();
62
- const ability = useContext(AbilityContext);
63
- const canSeeAttachments = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEE_ATTACHMENTS);
62
+ const { caseDetailsPageState: { caseFeedbacksHydra, caseAttachmentHydra, caseExternalTrackersUpdate }, } = useCaseDetailsPageStateContext();
63
+ const dispatchCaseDetailsHydraAttachments = useCaseDetailsPageDispatchContext();
64
64
  const { caseNumber } = props;
65
65
  const activeElementId = useRef(null);
66
+ const ability = useContext(AbilityContext);
67
+ const canSeeExternalTracker = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_EXTERNAL_TRACKER);
68
+ const canSeeChat = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_CHAT);
69
+ const canSeeAttachments = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEE_ATTACHMENTS);
66
70
  const listRef = React.useRef(null);
67
71
  const windowScrollerRef = React.useRef(null);
68
72
  const commentRef = React.useRef(null);
@@ -73,7 +77,11 @@ export default function CaseDiscussion(props) {
73
77
  const [isCommentSearchCleared, setIsCommentSearchCleared] = useState(false);
74
78
  const [isJumpToCommentClicked, setJumpToCommentClicked] = useState(false);
75
79
  const [canUpdateScrollTop, setCanUpdateScrollTop] = useState(true);
80
+ const [replyingToPrivateComment, setReplyingToPrivateComment] = useState(null);
81
+ // used for tracking comment section width changes
76
82
  const [discussionSectionWidth, setDiscussionSectionWidth] = useState(null);
83
+ const [isOpen, setIsOpen] = useState(false);
84
+ const [selectedFilterItems, setSelectedFilterItems] = useState([]);
77
85
  const [isSortOpen, setIsSortOpen] = useState(false);
78
86
  const [sortSelected, setSortSelected] = useState('Select a value');
79
87
  if (props.isDiscussionTab) {
@@ -82,10 +90,19 @@ export default function CaseDiscussion(props) {
82
90
  defaultHeight: 100,
83
91
  });
84
92
  }
93
+ const computeFilterComment = () => {
94
+ return filter(allDiscussions, (discussion) => {
95
+ const activeFilter = discussionFiltersListState.filter((filter) => filter.value === discussion.discussionType && filter.isSelected);
96
+ return activeFilter.length === 1 ? discussion : null;
97
+ });
98
+ };
85
99
  const shouldRenderRVComponent = !isExportingPDF && allDiscussions.length > VC_MINIMUM_COMMENT;
100
+ const hasAsaComment = (props.caseComments || []).some((comment) => (comment === null || comment === void 0 ? void 0 : comment.createdBy) === AUTOMATED_SUPPORT_ASSISTANT);
101
+ // filter comments on the basis of filterBy and search api
102
+ const computeFilteredComments = computeFilterComment();
86
103
  const comuteSearchedComments = searchResult.length === 0
87
- ? cloneDeep(allDiscussions)
88
- : filter([...allDiscussions], (o) => { var _a; return searchResult.indexOf((_a = o === null || o === void 0 ? void 0 : o.item) === null || _a === void 0 ? void 0 : _a.id) !== -1; });
104
+ ? cloneDeep(computeFilteredComments)
105
+ : filter([...computeFilteredComments], (o) => { var _a; return searchResult.indexOf((_a = o === null || o === void 0 ? void 0 : o.item) === null || _a === void 0 ? void 0 : _a.id) !== -1; });
89
106
  const isSearchResultEmpty = !isEmpty(searchCommentText) && (searchResult.length === 0 || comuteSearchedComments.length === 0);
90
107
  const setVRCommentIndex = (cId) => {
91
108
  setCommentIndex(cId < 0 ? 0 : cId);
@@ -104,6 +121,8 @@ export default function CaseDiscussion(props) {
104
121
  if (allDiscussions.length > VC_MINIMUM_COMMENT) {
105
122
  const commentIndex = findIndex([...comuteSearchedComments], (discussion) => discussion.item.id === discussionIdFromUrl);
106
123
  setVRCommentIndex(commentIndex);
124
+ // to fix scrolling to comment index when scrollTop value from window scroller is 0
125
+ // initial list items
107
126
  if (0 <= commentIndex && commentIndex <= 3) {
108
127
  const offset = 80;
109
128
  const scrollTopValue = ((_a = windowScrollerRef === null || windowScrollerRef === void 0 ? void 0 : windowScrollerRef.current) === null || _a === void 0 ? void 0 : _a._positionFromTop) - offset;
@@ -127,38 +146,57 @@ export default function CaseDiscussion(props) {
127
146
  }
128
147
  // eslint-disable-next-line react-hooks/exhaustive-deps
129
148
  }, [discussionIdFromUrl, allDiscussions, activeElementId.current]);
130
- useEffect(() => {
131
- if (!isExportingPDF) {
132
- setDiscussions(dispatchDiscussion, props.caseComments, [], caseAttachmentHydra.data, [], [], discussionFiltersListState, false, false, canSeeAttachments);
133
- }
134
- // eslint-disable-next-line react-hooks/exhaustive-deps
135
- }, [props.caseComments, caseAttachmentHydra, canSeeAttachments]);
136
149
  useEffect(() => {
137
150
  if (!caseAttachmentHydra.isFetching && caseAttachmentHydra.isError) {
138
- ToastNotification.addDangerMessage(t('There was an error loading attachments.'));
151
+ ToastNotification.addDangerMessage(t(`There was an error loading attachments.`));
139
152
  }
140
- }, [caseAttachmentHydra.isFetching, caseAttachmentHydra.isError, t]);
141
- const onCommentAdded = () => __awaiter(this, void 0, void 0, function* () {
142
- try {
143
- yield props.refetchComments();
153
+ if (!caseExternalTrackersUpdate.isFetching && caseExternalTrackersUpdate.isError) {
154
+ ToastNotification.addDangerMessage(t(`There was an error loading external trackers.`));
144
155
  }
145
- catch (e) {
146
- console.error('Failed to refetch comments:', e);
156
+ if (!caseFeedbacksHydra.isFetching && caseFeedbacksHydra.isError) {
157
+ console.log(`There was an error loading feedback.`);
147
158
  }
159
+ // Attachments, feedbacks and external tracker updates apis are called in advance
160
+ if (!isExportingPDF &&
161
+ !caseAttachmentHydra.isFetching &&
162
+ !caseFeedbacksHydra.isFetching &&
163
+ !caseExternalTrackersUpdate.isFetching) {
164
+ setDiscussions(dispatchDiscussion, props.caseComments, props.caseChats, caseAttachmentHydra.data, caseFeedbacksHydra.data, caseExternalTrackersUpdate.data, discussionFiltersListState, canSeeExternalTracker, canSeeChat, canSeeAttachments);
165
+ }
166
+ // eslint-disable-next-line react-hooks/exhaustive-deps
167
+ }, [props.caseComments, caseAttachmentHydra, props.caseChats, caseFeedbacksHydra, caseExternalTrackersUpdate]);
168
+ const onAttachmentRemove = (uuid_removed) => {
169
+ updateAttacmentsAfterRemoval(dispatchDiscussion, uuid_removed, allDiscussions, discussionFiltersListState);
170
+ };
171
+ const onFeedbackUpdate = (comment_id, feedback, feedbackReason) => {
172
+ updateCommentStateFeedback(dispatchDiscussion, comment_id, feedback, allDiscussions, feedbackReason);
173
+ };
174
+ const onCommentAdded = () => __awaiter(this, void 0, void 0, function* () {
175
+ yield updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
148
176
  dtmTrackEventCaseStepEncountered('comment', caseNumber, product, version);
149
177
  });
150
- const onReply = (author, commentId, timestamp) => {
151
- setReplyingTo(dispatchDiscussion, author, commentId, timestamp);
178
+ const onAttachmentAdded = () => __awaiter(this, void 0, void 0, function* () {
179
+ ToastNotification.addSuccessMessage(t('Attachment(s) uploaded successfully'));
180
+ yield updateDiscussionStateAttachments(dispatchDiscussion, caseNumber, allDiscussions, sort, loggedInUsersAccount.data.secureSupport, discussionFiltersListState, dispatchCaseDetailsHydraAttachments);
181
+ });
182
+ const onReply = (commentText, commentCreator, isPublic) => {
183
+ var _a;
184
+ setReplyingToPrivateComment(!isPublic);
185
+ setCommentText(dispatchDiscussion, commentText, commentCreator);
152
186
  scrollIntoView(props.tabRef, { navBarRef, timeout: 0, onlyIfNotInViewport: true, offset: 30 });
187
+ commentIndex !== -1 && setCommentIndex(-1);
188
+ isCommentSearchCleared && setIsCommentSearchCleared(false);
189
+ (_a = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _a === void 0 ? void 0 : _a.scrollToPosition(0);
153
190
  };
154
- const onClearReply = () => {
155
- clearReplyingTo(dispatchDiscussion);
191
+ const resetReplyComment = () => {
192
+ clearReplyComment(dispatchDiscussion);
193
+ setReplyingToPrivateComment(null);
156
194
  };
157
- /** Strips special chars to prevent regex injection, then HTML-escapes via DOM round-trip to prevent XSS. */
158
195
  const sanitizedSearchInput = (value) => {
159
196
  if (!value)
160
197
  return '';
161
198
  const sanitizedValue = value.replace(/[^a-zA-Z0-9]/g, '');
199
+ // To escape HTML-like characters (e.g., <, >, &) in sanitizedValue
162
200
  const div = document.createElement('div');
163
201
  div.textContent = sanitizedValue;
164
202
  return div.innerHTML;
@@ -172,10 +210,10 @@ export default function CaseDiscussion(props) {
172
210
  isCommentSearchCleared && setIsCommentSearchCleared(false);
173
211
  };
174
212
  const highlightSearchResults = (searchTerm) => {
175
- // Delay allows the DOM (especially virtualized rows) to finish rendering before mark.js can highlight matches.
176
213
  setTimeout(() => {
214
+ // to mark attachment link button text
177
215
  if (!isEmpty(sanitizedSearchInput(searchTerm))) {
178
- const sanitizedSearchTerm = sanitizedSearchInput(searchTerm);
216
+ const sanitizedSearchTerm = sanitizedSearchInput(searchTerm); // Sanitize the search term
179
217
  document.querySelectorAll('button.attachment-download-btn').forEach((button) => {
180
218
  var _a, _b;
181
219
  if ((_a = button === null || button === void 0 ? void 0 : button.textContent) === null || _a === void 0 ? void 0 : _a.includes(sanitizedSearchTerm)) {
@@ -189,6 +227,9 @@ export default function CaseDiscussion(props) {
189
227
  done: () => {
190
228
  if (isEmpty(searchTerm))
191
229
  return;
230
+ // removed { separateWordSearch: false }
231
+ // so the search term is split into individual words, and each word is matched separately.
232
+ // Search Term: "frontend developer" Matches: Text containing "frontend" or "developer".
192
233
  markInstance.mark(searchTerm);
193
234
  },
194
235
  });
@@ -200,26 +241,22 @@ export default function CaseDiscussion(props) {
200
241
  highlightSearchResults('');
201
242
  setSearchResult([]);
202
243
  if (cId === discussionIdFromUrl) {
244
+ // reason to reset activeElementId if comment id is same in the url on click jump to comment button
245
+ // we need to re compute filtered comments after clear search results.
246
+ // it will call useEffect and will set virtual comment Index(setVRCommentIndex())
203
247
  activeElementId.current = '';
204
248
  }
205
249
  };
206
- const onAttachmentRemove = (uuid_removed) => {
207
- updateAttacmentsAfterRemoval(dispatchDiscussion, uuid_removed, allDiscussions, discussionFiltersListState);
208
- };
209
- const onAttachmentAdded = () => __awaiter(this, void 0, void 0, function* () {
210
- var _a;
211
- yield updateDiscussionStateAttachments(dispatchDiscussion, caseNumber, allDiscussions, sort, discussionFiltersListState, dispatchCaseDetailsHydraAttachments, apolloClient, caseSalesforceId, Boolean((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport));
212
- });
213
250
  const onMetadataUpdate = (attachmentId, updatedAttachment) => {
214
251
  updateAttachment(dispatchDiscussion, attachmentId, updatedAttachment, allDiscussions);
215
252
  };
216
- const downloadAttachment = ({ caseNumber: attachmentCaseNumber, uuid, name }) => {
253
+ const downloadAttachment = (_a) => __awaiter(this, [_a], void 0, function* ({ caseNumber, uuid, name }) {
217
254
  const tempToastId = ToastNotification.addInfoMessage(t('Starting file download'));
218
255
  try {
219
- downloadCaseAttachment(attachmentCaseNumber, uuid, name);
256
+ yield caseAttachments.downloadAttachmentS3(caseNumber, uuid, name, false, loggedInUsersAccount.data.secureSupport);
220
257
  }
221
258
  catch (e) {
222
- ToastNotification.addDangerMessage(t('Could not download {{filename}}: {{error}}', {
259
+ ToastNotification.addDangerMessage(t(`Could not download {{filename}}: {{error}}`, {
223
260
  filename: name,
224
261
  error: e === null || e === void 0 ? void 0 : e.message,
225
262
  }));
@@ -227,7 +264,11 @@ export default function CaseDiscussion(props) {
227
264
  finally {
228
265
  tempToastId && ToastNotification.clearToast(tempToastId);
229
266
  }
230
- };
267
+ });
268
+ /**
269
+ * We need to clear the cell measurer cache if user resizes the window or discussion section width is changed
270
+ * so that the height of the rows are re-calculated
271
+ */
231
272
  useEffect(() => {
232
273
  if (discussionSectionWidth && shouldRenderRVComponent) {
233
274
  cellMeasureCache && cellMeasureCache.clearAll();
@@ -242,6 +283,7 @@ export default function CaseDiscussion(props) {
242
283
  return (React.createElement(WindowScroller, { ref: windowScrollerRef, onScroll: handleScroll }, ({ height, registerChild, onChildScroll, isScrolling, scrollTop }) => {
243
284
  return (React.createElement("div", { ref: commentRef, "data-tracking-id": "vr-case-comments" },
244
285
  React.createElement(AutoSizer, { disableHeight: true }, ({ width }) => {
286
+ // setTimeout to update state in the next tick and avoid bad setState warnings
245
287
  discussionSectionWidth !== width &&
246
288
  setTimeout(() => setDiscussionSectionWidth(width), 0);
247
289
  return (React.createElement("div", { ref: registerChild },
@@ -255,19 +297,16 @@ export default function CaseDiscussion(props) {
255
297
  if (isEmpty(discussion) || isEmpty(discussion.item))
256
298
  return null;
257
299
  return (React.createElement("div", { "data-tracking-id": "discussion-elements", key: discussion.item.id },
258
- discussion.discussionType === DiscussionType.COMMENT && (React.createElement(CaseComments, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, comment: discussion.item, onFeedBackUpdate: () => { }, feedback: discussion.feedback, accountNumber: props.accountNumber, onReply: onReply, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment })),
259
- discussion.discussionType === DiscussionType.ATTACHMENT && (React.createElement(CaseAttachment, { attachment: discussion.item, onAttachmentRemove: onAttachmentRemove, onMetadataUpdate: onMetadataUpdate, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null }))));
300
+ discussion.discussionType === DiscussionType.COMMENT && (React.createElement(CaseComments, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, comment: discussion.item, onFeedBackUpdate: onFeedbackUpdate, feedback: discussion.feedback, feedbackReason: discussion.feedbackReason, accountNumber: props.accountNumber, onReply: onReply, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment })),
301
+ discussion.discussionType === DiscussionType.ATTACHMENT && (React.createElement(CaseAttachment, { attachment: discussion.item, onAttachmentRemove: onAttachmentRemove, onMetadataUpdate: onMetadataUpdate, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null })),
302
+ discussion.discussionType === DiscussionType.CHAT && (React.createElement(CaseChat, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, chat: discussion.item, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment })),
303
+ discussion.discussionType === DiscussionType.EXTERNAL_TRACKER && (React.createElement(CaseExternalTrackerUpdate, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, trackerUpdate: discussion.item, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment }))));
260
304
  };
261
- const rowRenderer = ({ index, parent, key, style, }) => {
305
+ const rowRenderer = ({ index, parent, key, style }) => {
262
306
  const discussion = comuteSearchedComments[index];
263
307
  return (React.createElement(CellMeasurer, { key: key, cache: cellMeasureCache, parent: parent, columnIndex: 0, rowIndex: index },
264
308
  React.createElement("div", { className: "comment-virtualized-row", key: key, style: style }, renderCaseCommentElement(discussion))));
265
309
  };
266
- /**
267
- * One-shot scroll override used after search/filter changes.
268
- * Resets the virtualized list to the top, then yields control back to
269
- * WindowScroller's default onChildScroll for subsequent scroll events.
270
- */
271
310
  const customChildScroll = ({ scrollTop }) => {
272
311
  var _a;
273
312
  if (!canUpdateScrollTop) {
@@ -280,25 +319,23 @@ export default function CaseDiscussion(props) {
280
319
  };
281
320
  const handleScroll = ({ scrollTop }) => {
282
321
  var _a, _b, _c, _d, _e, _f;
322
+ // here we are doing couple of things
323
+ // 1. check scroll position on the first comment, 2. set scrollposition as par window top
324
+ // 3. if user click on jump to comment button then select row as per commentid and adding css class.
283
325
  isCommentSearchCleared && setIsCommentSearchCleared(false);
284
326
  if (listRef && commentRef) {
285
- // Skip one scroll cycle after a search/filter reset to let customChildScroll re-sync
286
327
  if (!canUpdateScrollTop) {
287
328
  setCanUpdateScrollTop(true);
288
329
  return;
289
330
  }
290
331
  const commentTop = (_b = (_a = commentRef === null || commentRef === void 0 ? void 0 : commentRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.top;
291
- // Re-apply search highlights on scroll since virtualized rows re-mount
292
332
  !isEmpty(searchCommentText) && highlightSearchResults(searchCommentText);
293
- // Normal browsing or comment section visible above viewport — sync list position
294
333
  if (isEmpty(discussionIdFromUrl) || commentTop > 0) {
295
334
  (_c = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _c === void 0 ? void 0 : _c.scrollToPosition(commentTop > 0 ? 0 : Math.abs(commentTop));
296
335
  }
297
336
  else if (commentTop < 0 && !isEmpty(discussionIdFromUrl) && !isJumpToCommentClicked) {
298
- // Deep-link navigation: let WindowScroller drive the list scroll position
299
337
  (_d = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _d === void 0 ? void 0 : _d.scrollToPosition(scrollTop);
300
338
  }
301
- // After a "jump to comment" click, scroll the virtualized list to the target row
302
339
  if (isJumpToCommentClicked) {
303
340
  (_e = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _e === void 0 ? void 0 : _e.scrollToRow(commentIndex);
304
341
  (_f = windowScrollerRef === null || windowScrollerRef === void 0 ? void 0 : windowScrollerRef.current) === null || _f === void 0 ? void 0 : _f.updatePosition();
@@ -306,6 +343,7 @@ export default function CaseDiscussion(props) {
306
343
  }
307
344
  }
308
345
  };
346
+ const list = discussionFiltersListState.filter((filter) => filter.canSee);
309
347
  useEffect(() => {
310
348
  if (isPostingRemoteRequestCommentCompleted) {
311
349
  onCommentAdded();
@@ -313,33 +351,64 @@ export default function CaseDiscussion(props) {
313
351
  }
314
352
  // eslint-disable-next-line react-hooks/exhaustive-deps
315
353
  }, [isPostingRemoteRequestCommentCompleted]);
354
+ const onToggleClick = (e) => {
355
+ e.stopPropagation();
356
+ setIsOpen(!isOpen);
357
+ };
316
358
  const onSortToggleClick = (e) => {
317
359
  e.stopPropagation();
318
360
  setIsSortOpen(!isSortOpen);
319
361
  };
320
- const onSortSelect = (_event, value) => {
321
- const selectedSort = discussionSortOrderConst.find((option) => option.name === value);
322
- if (selectedSort) {
323
- setSort(dispatchDiscussion, selectedSort, allDiscussions);
324
- setSortSelected(selectedSort.name);
325
- }
362
+ const onFilterSelect = (_event, prevOption) => {
363
+ const isFilterSelected = !prevOption.isSelected; // to get updated state of changed filter
364
+ const prevSelectedFilters = list.filter((option) => option.isSelected && option.value !== prevOption.value); // to get previously selected filters
365
+ const prevSelectedFiltersValue = prevSelectedFilters.map((option) => option.value);
366
+ const newSelectedFilters = isFilterSelected // has all the selected values of filter with the updated selected filter state
367
+ ? [...prevSelectedFiltersValue, prevOption.value]
368
+ : prevSelectedFiltersValue;
369
+ setFilter(dispatchDiscussion, newSelectedFilters, discussionFiltersListState);
370
+ shouldRenderRVComponent && setCanUpdateScrollTop(false);
371
+ setSelectedFilterItems(prevSelectedFiltersValue);
372
+ };
373
+ const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true }, getDropdownBtnPlaceholder(t('Select a filter'), list.filter((i) => i.isSelected).map((i) => i.filterLabel), ' ', list.length, t('All comments'))));
374
+ const onSortSelect = (_event, selectedSort) => {
375
+ setSort(dispatchDiscussion, selectedSort, allDiscussions);
376
+ setSortSelected(selectedSort.value);
326
377
  setIsSortOpen(false);
327
378
  };
328
379
  const onSortToggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onSortToggleClick, isExpanded: isSortOpen, isFullWidth: true }, sort.name));
329
380
  return (React.createElement(React.Fragment, null,
381
+ hasAsaComment && (React.createElement(Alert, { className: `asa-discussion-alert ${isExportingPDF ? 'hide-in-pdf' : ''}`, isInline: true, variant: "info", title: t('Important'), "data-tracking-id": "case-discussion-asa-notice" },
382
+ React.createElement(Trans, null,
383
+ "This feature uses AI technology to analyze interactions and provide you with support. Interactions may be used to improve Red Hat products or services. For more information about Red Hat's privacy practices, please refer to the",
384
+ ' ',
385
+ React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" }, "Red Hat Privacy Statement")))),
330
386
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading post comment section') } },
331
387
  React.createElement(AttachmentContextProvider, null,
332
- React.createElement(PostComment, { caseNumber: caseNumber, allDiscussions: allDiscussions, onCommentAdded: onCommentAdded, onAttachmentAdded: onAttachmentAdded, onAttachmentRemove: onAttachmentRemove, replyingToAuthor: replyingToAuthor, replyingToTimestamp: replyingToTimestamp, onClearReply: onClearReply }))),
333
- props.commentsLoading && allDiscussions.length === 0 && React.createElement(LoadingIndicator, { size: "sm" }),
334
- props.commentsError && allDiscussions.length === 0 && (React.createElement(AlertMessage, { variant: AlertType.DANGER, show: true, title: t('Failed to load comments. Try refreshing.') })),
335
- !props.commentsLoading && !props.commentsError && allDiscussions.length === 0 && (React.createElement(Trans, null, "No comments")),
336
- allDiscussions.length !== 0 && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading comments. Try refreshing.') } },
388
+ React.createElement(PostComment, { caseNumber: caseNumber, allDiscussions: allDiscussions, onCommentAdded: onCommentAdded, onAttachmentAdded: onAttachmentAdded, commentText: replyCommentText, onCommentClear: resetReplyComment, commentCreator: replyCommentCreator, defaultIsPublic: replyingToPrivateComment === null ? replyingToPrivateComment : !replyingToPrivateComment }))),
389
+ React.createElement(LoadingIndicator, { className: "text-center", isInline: true, show: caseAttachmentHydra.isFetching ||
390
+ caseExternalTrackersUpdate.isFetching ||
391
+ caseFeedbacksHydra.isFetching ||
392
+ (screenSessionRequested && allDiscussions.length === 0) }),
393
+ !caseAttachmentHydra.isFetching &&
394
+ !caseFeedbacksHydra.isFetching &&
395
+ !caseExternalTrackersUpdate.isFetching &&
396
+ !screenSessionRequested &&
397
+ allDiscussions.length === 0 && React.createElement(Trans, null, "No comments"),
398
+ !caseAttachmentHydra.isFetching &&
399
+ !caseFeedbacksHydra.isFetching &&
400
+ !caseExternalTrackersUpdate.isFetching &&
401
+ allDiscussions.length !== 0 && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading comments. Try refreshing.') } },
337
402
  React.createElement("div", { className: `pfe-l-grid pfe-m-all-6-col pfe-m-gutters push-bottom ${isExportingPDF ? 'hide-in-pdf' : ''}` },
338
- React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions: allDiscussions || [], onCommentSearch: onCaseCommentSearch, isCommentSearchCleared: isCommentSearchCleared }))),
403
+ React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions: computeFilteredComments || [], onCommentSearch: onCaseCommentSearch, isCommentSearchCleared: isCommentSearchCleared }))),
404
+ React.createElement("span", { className: "push-top-narrow" },
405
+ React.createElement("label", { htmlFor: "case-list-comments-dropdown", className: "pf-v6-u-mb-sm" }, t('Filter by')),
406
+ React.createElement(Select, { "data-tracking-id": "discussions-filter-comments-dropdown", id: "case-list-comments-dropdown", role: "menu", isOpen: isOpen, selected: selectedFilterItems, onSelect: onFilterSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, popperProps: { direction: 'down', enableFlip: false }, zIndex: 9 },
407
+ React.createElement(SelectList, null, list.map((option) => (React.createElement(SelectOption, { hasCheckbox: true, value: option, isSelected: option.isSelected, isDisabled: option.isDisabled }, option.filterLabel)))))),
339
408
  React.createElement("span", { className: "push-top-narrow" },
340
409
  React.createElement("label", { htmlFor: "se-discussion-sort", className: "pf-v6-u-mb-sm" }, t('Sort by')),
341
410
  React.createElement(Select, { id: "se-discussion-sort", "data-tracking-id": "discussions-sort-dropdown", isOpen: isSortOpen, selected: sortSelected, onSelect: onSortSelect, onOpenChange: (isSortOpen) => setIsSortOpen(isSortOpen), toggle: onSortToggle, shouldFocusToggleOnSelect: true, popperProps: { direction: 'down', enableFlip: false }, zIndex: 9 },
342
- React.createElement(SelectList, null, discussionSortOrderConst.map((option) => (React.createElement(SelectOption, { value: option.name, isSelected: isEqual(sort.name, option.name) }, option.name))))))),
411
+ React.createElement(SelectList, null, discussionSortOrderConst.map((option) => (React.createElement(SelectOption, { value: option, isSelected: isEqual(sort.name, option.name) }, option.name))))))),
343
412
  React.createElement("div", { className: "support-comment-section" }, !shouldRenderRVComponent &&
344
413
  !isSearchResultEmpty &&
345
414
  comuteSearchedComments.map((discussion, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CommentSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.tsx"],"names":[],"mappings":"AASA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5F,UAAU,MAAM;IACZ,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,qBA6G1C"}
1
+ {"version":3,"file":"CommentSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5F,UAAU,MAAM;IACZ,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,qBAgG1C"}
@@ -46,24 +46,18 @@ export function CommentSearch(props) {
46
46
  }
47
47
  else if (discussion.discussionType === DiscussionType.ATTACHMENT) {
48
48
  const caseAttachment = discussion.item;
49
- const attachmentSizeBytes = caseAttachment.size > 0
50
- ? caseAttachment.size
51
- : caseAttachment.sizeKB > 0
52
- ? caseAttachment.sizeKB * 1024
53
- : 0;
54
- const attachmentSizeText = attachmentSizeBytes > 0 ? humanizeSize(attachmentSizeBytes) : '';
55
- const caseAttachmentText = `delete ${caseAttachment.modifiedBy} ${caseAttachment.description || ''} ${caseAttachment.lastModifiedDate} ${caseAttachment.checksum || ''} Attached file ${caseAttachment.fileName}${attachmentSizeText ? ` ${attachmentSizeText}` : ''} to this case.`;
49
+ const caseAttachmentText = `delete ${caseAttachment.modifiedBy} ${caseAttachment.description || ''} ${caseAttachment.lastModifiedDate} ${caseAttachment.checksum || ''} Attached file ${caseAttachment.fileName} ${humanizeSize(caseAttachment.size)} to this case.`;
56
50
  searchApi.indexDocument(discussion.item.id, caseAttachmentText || '');
57
51
  }
58
52
  else if (discussion.discussionType === DiscussionType.CHAT) {
59
53
  const caseChat = discussion.item;
60
54
  const caseChatText = `Chat transcript ${caseChat.startTime} Between ${caseChat.agentName} and ${caseChat.visitorName} ${caseChat.body}`;
61
55
  searchApi.indexDocument(discussion.item.id, caseChatText || '');
62
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
63
- // } else if (discussion.discussionType === DiscussionType.EXTERNAL_TRACKER) {
64
- // const externalTracker = discussion.item as IExternalTrackerUpdate;
65
- // const externalTrackerText = `${externalTracker.updateBy} ${externalTracker.createdDate} ${externalTracker.originatingSystem} ${externalTracker.body}`;
66
- // searchApi.indexDocument(discussion.item.id, externalTrackerText || '');
56
+ }
57
+ else if (discussion.discussionType === DiscussionType.EXTERNAL_TRACKER) {
58
+ const externalTracker = discussion.item;
59
+ const externalTrackerText = `${externalTracker.updateBy} ${externalTracker.createdDate} ${externalTracker.originatingSystem} ${externalTracker.body}`;
60
+ searchApi.indexDocument(discussion.item.id, externalTrackerText || '');
67
61
  }
68
62
  });
69
63
  try {
@@ -75,22 +69,15 @@ export function CommentSearch(props) {
75
69
  }
76
70
  });
77
71
  const computeCommentFooter = (comment) => {
78
- if (!comment.isPublic && comment.createdBy === 'Automated Support Assistant') {
79
- return 'Private automated comment';
80
- }
81
- else if (!comment.isPublic) {
72
+ if (!comment.isPublic) {
82
73
  return 'Private comment';
83
74
  }
84
- else if (comment.createdBy === 'Automated Support Assistant') {
85
- return 'Automated comment';
86
- }
87
75
  };
88
76
  props.isCommentSearchCleared && !isEmpty(searchValue) && setSearchValue('');
89
77
  return (React.createElement("form", { onSubmit: handleSubmit },
90
78
  React.createElement("div", { className: "case-comment-input-container", "data-tracking-id": "case-comment-search" },
91
- React.createElement("div", { className: "case-comment-search-input-wrapper" },
92
- React.createElement(TextInput, { type: "search", value: searchValue, placeholder: t('Search for a comment'), id: "case-comment-search", "aria-label": t('Search for a comment'), onChange: (_event, value) => onSearchValChange(value), "data-tracking-id": "case-comment-search-input" }),
93
- searchValue && (React.createElement(Button, { icon: React.createElement(TimesIcon, null), onClick: clearSearchVal, className: "clear-btn", variant: "plain", "data-tracking-id": "case-comment-search-clear-button", "aria-label": t('Clear this search') }))),
79
+ React.createElement(TextInput, { type: "search", value: searchValue, className: "pf-v6-u-mr-lg", placeholder: t('Search for a comment'), id: "case-comment-search", "aria-label": t('Search for a comment'), onChange: (_event, value) => onSearchValChange(value), "data-tracking-id": "case-comment-search-input" }),
80
+ searchValue && (React.createElement(Button, { icon: React.createElement(TimesIcon, null), onClick: clearSearchVal, className: "clear-btn", variant: "plain", "data-tracking-id": "case-comment-search-clear-button", "aria-label": t('Clear this search') })),
94
81
  React.createElement(Button, { variant: "secondary", type: "submit", "data-tracking-id": "case-comment-search-button" },
95
82
  React.createElement(Trans, null, "Search")))));
96
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DiscussionItemLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAE/E,UAAU,MAAM;IACZ,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAUD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAiC/C"}
1
+ {"version":3,"file":"DiscussionItemLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAE/E,UAAU,MAAM;IACZ,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AASD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA0B/C"}
@@ -7,8 +7,7 @@ const trackingIdMap = {
7
7
  [DiscussionType.CHAT]: 'chatid-link',
8
8
  [DiscussionType.ATTACHMENT]: 'attachmentid-link',
9
9
  [DiscussionType.COMMENT]: 'public-private-comment-link',
10
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
11
- // [DiscussionType.EXTERNAL_TRACKER]: 'externaltrackerid-link',
10
+ [DiscussionType.EXTERNAL_TRACKER]: 'externaltrackerid-link',
12
11
  };
13
12
  export function DiscussionItemLink(props) {
14
13
  const currentQuery = getUrlParsedParams(useLocation().search);
@@ -19,14 +18,8 @@ export function DiscussionItemLink(props) {
19
18
  };
20
19
  return getStringifiedParams(Object.assign(Object.assign({}, requiredQueries), newQueryObj));
21
20
  };
22
- const handleClick = (e) => {
23
- if (props.isCopyLink) {
24
- e.preventDefault();
25
- }
26
- props.onClick();
27
- };
28
21
  return (React.createElement(Link, { replace: true, to: {
29
22
  pathname: `/case/${props.caseNumber}/discussion`,
30
23
  search: getQueryString(),
31
- }, className: "case-public-private-link", onClick: handleClick, "data-tracking-id": `${!props.isCopyLink ? 'jumptocomment-' : 'case-'}${trackingIdMap[props.discussionType]}` }, props.children));
24
+ }, className: "case-public-private-link", onClick: props.onClick, "data-tracking-id": `${!props.isCopyLink ? 'jumptocomment-' : 'case-'}${trackingIdMap[props.discussionType]}` }, props.children));
32
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"JumpAndCopyLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAG/E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;CAClC;AAQD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBA+BrC;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"JumpAndCopyLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAG/E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;CAClC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBA8BrC;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -4,20 +4,13 @@ import { useCopyToClipboard } from '@rh-support/components';
4
4
  import React, { useRef } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { DiscussionItemLink } from './DiscussionItemLink';
7
- function getAppBasePath() {
8
- const path = window.location.pathname;
9
- if (path.startsWith('/support-beta'))
10
- return '/support-beta';
11
- return '/support/cases';
12
- }
13
7
  function JumpAndCopyLink(props) {
14
8
  const { t } = useTranslation();
15
9
  const clipboardRefLink = useRef(null);
16
10
  const queryString = `${props.discussionType}Id=${props.cardId}`;
17
- const basePath = getAppBasePath();
18
11
  const { clipboardText, copyToClipboard } = useCopyToClipboard(clipboardRefLink);
19
12
  return (React.createElement(React.Fragment, null,
20
- React.createElement("div", { ref: clipboardRefLink, style: { position: 'absolute', left: '-9999px' } }, `https://${window.location.host}${basePath}/#/case/${props.caseNumber}/discussion?${queryString}`),
13
+ React.createElement("div", { ref: clipboardRefLink, style: { position: 'absolute', left: '-9999px' } }, `https://${window.location.host}/support/cases/#/case/${props.caseNumber}/discussion?${queryString}`),
21
14
  React.createElement(DiscussionItemLink, { onClick: copyToClipboard, caseNumber: props.caseNumber, discussionType: props.discussionType, itemId: props.cardId, isCopyLink: true },
22
15
  React.createElement(Popover, { position: PopoverPosition.top, bodyContent: (hide) => React.createElement("div", null, clipboardText), hasAutoWidth: true, showClose: false },
23
16
  React.createElement(LinkIcon, { title: t('Copy link') })))));
@@ -2,13 +2,13 @@ import { IAttachment } from '@cee-eng/hydrajs/@types/models/attachment';
2
2
  interface IProps {
3
3
  onAttachmentAdded: () => void;
4
4
  caseNumber: string;
5
+ secureSupport: boolean;
5
6
  }
6
7
  export declare const FILE_SIZE_LIMIT: number;
7
- export declare function useMarkdownFileUploader({ caseNumber, onAttachmentAdded }: IProps): {
8
+ export declare function useMarkdownFileUploader({ caseNumber, secureSupport, onAttachmentAdded }: IProps): {
8
9
  isMarkdownFileUploadInProgress: boolean;
9
10
  isDeletingFile: boolean;
10
11
  isUploadingFile: boolean;
11
- onFileSelect: (selectedImage: any) => void;
12
12
  onFileAttach: (files: any, isPublic: any) => Promise<void>;
13
13
  onFileDelete: (attachment: Partial<IAttachment>) => Promise<void>;
14
14
  cancelFileUpload: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useMarkdownFileUploader.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAexE,UAAU,MAAM;IACZ,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,QAAkB,CAAC;AAE/C,wBAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,MAAM;;;;;;+BA0DrC,OAAO,CAAC,WAAW,CAAC;;EA2C/D"}
1
+ {"version":3,"file":"useMarkdownFileUploader.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAYxE,UAAU,MAAM;IACZ,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,QAAkB,CAAC;AAE/C,wBAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,MAAM;;;;;+BAqDpD,OAAO,CAAC,WAAW,CAAC;;EA0C/D"}