@rh-support/troubleshoot 2.6.340 → 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 (331) 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 +1 -1
  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 +1 -2
  104. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  105. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  106. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  107. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  108. package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
  109. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  110. package/lib/esm/components/CaseManagement/Cep.js +9 -11
  111. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  112. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  113. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
  114. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  115. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -9
  116. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  117. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +18 -13
  118. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  119. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  120. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  121. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
  122. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  123. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  124. package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
  125. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  126. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  127. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  128. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  129. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  130. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  131. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  132. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  133. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  134. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  135. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  136. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  137. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  138. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  139. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  140. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  141. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  142. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  143. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  144. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  145. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  146. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  147. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  148. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  149. package/lib/esm/components/Review/Review.js +16 -20
  150. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  151. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  152. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  153. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  154. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  155. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  156. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -135
  157. package/lib/esm/components/shared/Constants.d.ts +0 -5
  158. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  159. package/lib/esm/components/shared/Constants.js +0 -5
  160. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  161. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  162. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  163. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  164. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  165. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  166. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
  167. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  168. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  169. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
  170. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  171. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
  172. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  173. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  174. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  175. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
  176. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  177. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  178. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  179. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
  180. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  181. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  182. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  183. package/lib/esm/components/shared/usePostComment.js +28 -16
  184. package/lib/esm/components/shared/utils.d.ts +0 -1
  185. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  186. package/lib/esm/components/shared/utils.js +3 -9
  187. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  188. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -160
  189. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  190. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  191. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  192. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
  193. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  194. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
  195. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  196. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  197. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  198. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  199. package/lib/esm/css/case.css +202 -60
  200. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  201. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  202. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
  203. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  204. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  205. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  206. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  207. package/lib/esm/hooks/useS3Upload.js +30 -28
  208. package/lib/esm/i18n/template-de.d.ts +2 -2
  209. package/lib/esm/i18n/template-de.js +2 -2
  210. package/lib/esm/i18n/template-es.d.ts +2 -2
  211. package/lib/esm/i18n/template-es.js +2 -2
  212. package/lib/esm/i18n/template-fr.d.ts +2 -2
  213. package/lib/esm/i18n/template-fr.js +2 -2
  214. package/lib/esm/i18n/template-it.d.ts +2 -2
  215. package/lib/esm/i18n/template-it.js +2 -2
  216. package/lib/esm/i18n/template-jp.d.ts +2 -2
  217. package/lib/esm/i18n/template-jp.js +2 -2
  218. package/lib/esm/i18n/template-ko.d.ts +2 -2
  219. package/lib/esm/i18n/template-ko.js +2 -2
  220. package/lib/esm/i18n/template-pt.d.ts +2 -2
  221. package/lib/esm/i18n/template-pt.js +2 -2
  222. package/lib/esm/i18n/template-ru.d.ts +2 -2
  223. package/lib/esm/i18n/template-ru.js +2 -2
  224. package/lib/esm/i18n/template-zh.d.ts +2 -2
  225. package/lib/esm/i18n/template-zh.js +2 -2
  226. package/lib/esm/index.js +0 -1
  227. package/lib/esm/models/cache.d.ts +2 -0
  228. package/lib/esm/models/cache.d.ts.map +1 -1
  229. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -121
  230. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  231. package/lib/esm/reducers/CaseConstNTypes.js +7 -30
  232. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  233. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  234. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  235. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
  236. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  237. package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
  238. package/lib/esm/reducers/CaseHelpers.d.ts +2 -3
  239. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  240. package/lib/esm/reducers/CaseHelpers.js +15 -98
  241. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  242. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  243. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  244. package/lib/esm/reducers/CaseReducer.d.ts +11 -50
  245. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  246. package/lib/esm/reducers/CaseReducer.js +99 -270
  247. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  248. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  249. package/lib/esm/scss/_main.scss +0 -9
  250. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  251. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  252. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  253. package/package.json +8 -9
  254. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
  255. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  256. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
  257. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
  258. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  259. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
  260. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  261. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  262. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  263. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  264. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  265. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
  266. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  267. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  268. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
  269. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  270. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  271. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
  272. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  273. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  274. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  275. package/lib/esm/graphql/index.d.ts +0 -4
  276. package/lib/esm/graphql/index.d.ts.map +0 -1
  277. package/lib/esm/graphql/index.js +0 -3
  278. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  279. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  280. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  281. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  282. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  283. package/lib/esm/graphql/mutations/index.js +0 -1
  284. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  285. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  286. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
  287. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  288. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  289. package/lib/esm/graphql/queries/getParentId.js +0 -16
  290. package/lib/esm/graphql/queries/index.d.ts +0 -3
  291. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  292. package/lib/esm/graphql/queries/index.js +0 -2
  293. package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
  294. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  295. package/lib/esm/graphql/schemas/escalation.js +0 -1
  296. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  297. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  298. package/lib/esm/graphql/schemas/index.js +0 -1
  299. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  300. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  301. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
  302. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  303. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  304. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  305. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  306. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  307. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  308. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
  309. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  310. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  311. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
  312. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  313. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
  314. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  315. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  316. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  317. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  318. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  319. package/lib/esm/hooks/useCaseHistory.js +0 -98
  320. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
  321. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  322. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  323. package/lib/esm/models/caseHistory.d.ts +0 -80
  324. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  325. package/lib/esm/models/caseHistory.js +0 -1
  326. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  327. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  328. package/lib/esm/utils/TimelineUtils.js +0 -135
  329. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  330. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  331. package/lib/esm/utils/caseHistoryUtils.js +0 -165
@@ -7,286 +7,338 @@ 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 { Button, ButtonVariant, Checkbox } from '@patternfly/react-core';
10
+ import { publicApi } from '@cee-eng/hydrajs';
11
+ import { Button, ButtonVariant, Checkbox, debounce, Tooltip } from '@patternfly/react-core';
12
12
  import PlusIcon from '@patternfly/react-icons/dist/js/icons/plus-icon';
13
- import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
14
- import { LoadingIndicator, RichTextEditor, ToastNotification, usePrevious } from '@rh-support/components';
15
- import { GlobalMetadataStateContext, useCanEditCase, useUserPreferences } from '@rh-support/react-context';
16
- import { ability, CaseDiscussionFields, resourceActions, resources } from '@rh-support/user-permissions';
17
- import { formatDateTime, getHydraAttachmentImageUrl } from '@rh-support/utils';
13
+ import { EditorMode, LoadingIndicator, MarkdownEditor, ToastNotification, useFetch, usePrevious, } from '@rh-support/components';
14
+ import { FeatureAnnouncementKeys, GlobalMetadataStateContext, NewFeaturePopoverAnnouncement, useCanEditCase, useUserPreferences, } from '@rh-support/react-context';
15
+ import { ability, CaseDiscussionFields, CaseListFields, resourceActions, resources, } from '@rh-support/user-permissions';
18
16
  import isEmpty from 'lodash/isEmpty';
19
17
  import isEqual from 'lodash/isEqual';
20
- import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
18
+ import uniqBy from 'lodash/uniqBy';
19
+ import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
21
20
  import { useDropzone } from 'react-dropzone';
22
21
  import { Trans, useTranslation } from 'react-i18next';
23
22
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
24
- import { useCreateCaseComment } from '../../../../hooks/useCaseComments';
25
- import { useS3Upload } from '../../../../hooks/useS3Upload';
26
- import { checkForCaseStatusToggleOnAttachOrComment } from '../../../../reducers/CaseReducer';
27
- import { AttachmentDispatchContext, AttachmentStateContext, hasAbortedOrFailedAttachments, hasQueuedAttachmentUploads, hasSomeSelectedFiles, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
23
+ import { CaseDetailsCacheNamespaces } from '../../../../enums/cache';
24
+ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
25
+ import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
26
+ import { addingNotifiedUsers, checkForCaseStatusToggleOnAttachOrComment, setNotifiedUser, } from '../../../../reducers/CaseReducer';
27
+ import { CaseDetailsCacheUtils } from '../../../../utils/caseDetailsCacheUtils';
28
+ import { AttachmentDispatchContext, AttachmentStateContext, hasSomeSelectedFiles, hasSomeUnUploadedAttachments, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
28
29
  import FileSelectorButton from '../../../shared/fileUpload/fileSelectors/FileSelectorButton';
29
30
  import FileUpload from '../../../shared/fileUpload/FileUpload';
30
31
  import { PDFContext } from '../../PDFContainer';
31
- import { useAttachmentUploadCompletion } from './PostComment/useAttachmentUploadCompletion';
32
- import { useCommentDrafts } from './PostComment/useCommentDrafts';
33
32
  import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
34
33
  import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
35
34
  export function PostComment(props) {
36
- var _a, _b, _c, _d, _e, _f, _g;
35
+ var _a, _b;
37
36
  const { t } = useTranslation();
37
+ const caseUpdateError = useCaseUpdateErrorMessage();
38
38
  let { caseNumber } = props;
39
39
  const [isTextAreaFocused, setIsTextAreaFocused] = useState(false);
40
+ const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
40
41
  const canPostPrivateComments = ability.can(resourceActions.PATCH, resources.CASE_COMMENTS, CaseDiscussionFields.POST_PRIVATE_COMMENT);
41
- const { createComment, loading: isPostingComment } = useCreateCaseComment();
42
+ const { request, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
43
+ propgateErrors: true,
44
+ });
42
45
  const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
43
46
  const { attachmentState } = useContext(AttachmentStateContext);
47
+ const [commentText, setCommentText] = useState(props.commentText || '');
48
+ const [isPublic, setIsPublic] = useState(props.defaultIsPublic === null ? true : props.defaultIsPublic);
49
+ const isPublicRef = useRef(isPublic);
44
50
  const isUploadingAttachmentPrevious = useRef(false);
45
- const batchSuccessCountRef = useRef(0);
46
51
  const isUploadingAttachments = isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles);
47
- const hasQueuedUploads = hasQueuedAttachmentUploads(attachmentState.caseFiles.selectedLocalFiles);
48
- const hasAbortedOrFailed = hasAbortedOrFailedAttachments(attachmentState.caseFiles.selectedLocalFiles);
52
+ const hasSomeUnUploadedFiles = hasSomeUnUploadedAttachments(attachmentState.caseFiles.selectedLocalFiles);
49
53
  const hasSomeSelectedFilesLocal = hasSomeSelectedFiles(attachmentState.caseFiles.selectedLocalFiles);
50
- const [isPublic, setIsPublic] = useState((_a = props.defaultIsPublic) !== null && _a !== void 0 ? _a : true);
54
+ const [commentType, setCommentType] = useState(EditorMode.PLAIN);
51
55
  const [commentSignature, setCommentSignature] = useState('');
52
- const [commentText, setCommentText] = useState('');
53
56
  const { isExportingPDF } = useContext(PDFContext);
54
57
  const { getCommentTypeFromPreference, getCommentSignature } = useUserPreferences();
55
- const applySignature = useCallback((text) => {
56
- if (isEmpty(commentSignature))
57
- return;
58
- const signatureHtml = `<p>${commentSignature}</p>`;
59
- const signed = text.includes(commentSignature) ? text : text + signatureHtml;
60
- setCommentText(signed);
61
- }, [commentSignature]);
62
- useEffect(() => {
63
- function loadPrefs() {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- try {
66
- yield getCommentTypeFromPreference();
67
- const sig = (yield getCommentSignature()) || '';
68
- setCommentSignature(sig);
69
- if (isEmpty(commentText) && !isEmpty(sig)) {
70
- setCommentText(`<p><br></p><p>${sig}</p>`);
71
- }
72
- }
73
- catch (error) {
74
- console.error('Failed to load comment preferences:', error);
75
- }
76
- });
58
+ const userOriginalCommentPrefs = () => __awaiter(this, void 0, void 0, function* () {
59
+ try {
60
+ const retrievedComment = yield getCommentTypeFromPreference();
61
+ const retrievedCommentSignature = yield getCommentSignature();
62
+ const defaultCommentType = retrievedComment ? retrievedComment : EditorMode.PLAIN;
63
+ // @ts-ignore
64
+ setCommentType(defaultCommentType);
65
+ const defaultCommentSignature = retrievedCommentSignature || '';
66
+ setCommentSignature(defaultCommentSignature);
67
+ if (isEmpty(commentText) && !isEmpty(defaultCommentSignature)) {
68
+ setCommentText(`\n ${defaultCommentSignature}` || '');
69
+ }
77
70
  }
78
- loadPrefs();
71
+ catch (error) {
72
+ console.log(error);
73
+ }
74
+ });
75
+ useEffect(() => {
76
+ userOriginalCommentPrefs();
79
77
  // eslint-disable-next-line react-hooks/exhaustive-deps
80
78
  }, []);
81
79
  const [isModalOpen, setIsModalOpen] = useState(false);
82
80
  const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
83
- const [isProcessing, setIsProcessing] = useState(false);
81
+ const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
84
82
  const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
85
- const { onFileAttach, cancelFileUpload } = useMarkdownFileUploader({
83
+ const { onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload } = useMarkdownFileUploader({
86
84
  caseNumber,
87
- onAttachmentAdded: (_b = props.onAttachmentAdded) !== null && _b !== void 0 ? _b : (() => undefined),
85
+ secureSupport: loggedInUsersAccount.data.secureSupport,
86
+ onAttachmentAdded: props.onAttachmentAdded,
88
87
  });
89
- const { getRootProps, getInputProps } = useDropzone({
90
- onDrop: (files) => onFileAttach(files, isPublic),
91
- multiple: false,
92
- noClick: true,
93
- noKeyboard: true,
94
- });
95
- const { status, caseSalesforceId, existingCaseDetails } = useCaseSelector((state) => ({
88
+ const { selectedNotificationContacts, status, contactSSOName, selectedAccountDetails } = useCaseSelector((state) => ({
96
89
  status: state.caseDetails.status,
97
- caseSalesforceId: state.caseDetails.id,
98
- existingCaseDetails: state.caseDetails,
90
+ contactSSOName: state.caseDetails.contactSSOName,
91
+ selectedNotificationContacts: state.selectedNotificationContacts,
92
+ selectedAccountDetails: state.selectedAccountDetails,
99
93
  }), isEqual);
100
- const apolloClient = useApolloClient();
101
- const { uploadFile: uploadImageFile } = useS3Upload(caseNumber, apolloClient, caseSalesforceId);
102
- const onImageUpload = useCallback((file) => __awaiter(this, void 0, void 0, function* () {
103
- const attachmentId = yield uploadImageFile({ file });
104
- if (!attachmentId) {
105
- throw new Error('Upload did not return an attachment id.');
106
- }
107
- return getHydraAttachmentImageUrl(caseNumber, attachmentId);
108
- }), [caseNumber, uploadImageFile]);
109
- const isConfirmedStateSideSupport = (_c = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _c === void 0 ? void 0 : _c.hasConfirmedStatesideSupport;
94
+ const isConfirmedStateSideSupport = ((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport) ||
95
+ ((_b = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _b === void 0 ? void 0 : _b.hasConfirmedStatesideSupport);
110
96
  const caseDispatch = useCaseDispatch();
111
97
  const [isCommentTooLong, setIsCommentTooLong] = useState(false);
112
98
  const canEditCase = useCanEditCase();
113
99
  const componentRef = useRef(null);
114
- const resetIsPublic = useCallback(() => { var _a; return setIsPublic((_a = props.defaultIsPublic) !== null && _a !== void 0 ? _a : true); }, [props.defaultIsPublic]);
100
+ let passedReply = props.commentText;
101
+ const { getRootProps, getInputProps, open } = useDropzone({
102
+ onDrop: (files) => onFileAttach(files, isPublic),
103
+ multiple: false,
104
+ });
105
+ // Allows the isPublic default state to be changed by the parent component
106
+ const resetIsPublic = useCallback(() => setIsPublic(props.defaultIsPublic === null ? true : props.defaultIsPublic), [props.defaultIsPublic]);
115
107
  const previousDefaultIsPublic = usePrevious(props.defaultIsPublic);
116
108
  useEffect(() => {
117
- var _a;
118
109
  if (previousDefaultIsPublic === props.defaultIsPublic)
119
110
  return;
120
- setIsPublic((_a = props.defaultIsPublic) !== null && _a !== void 0 ? _a : true);
111
+ props.defaultIsPublic === null ? resetIsPublic() : setIsPublic(props.defaultIsPublic);
121
112
  }, [props.defaultIsPublic, resetIsPublic, previousDefaultIsPublic]);
122
- const quillEditorRef = useRef(null);
123
- const loggedInUserSSO = loggedInUserRights.data.getSSOUsername();
124
- const { saveDraft, clearDraft } = useCommentDrafts({
125
- caseNumber,
126
- loggedInUserSSO,
127
- isInternal: loggedInUserRights.data.isInternal(),
128
- commentSignature,
129
- canPostPrivateComments,
130
- setCommentText,
131
- setIsPublic,
132
- applySignature,
133
- });
113
+ // why usecallback instead of useRef?
114
+ // https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node
115
+ const textAreaRef = useCallback((node) => {
116
+ if (node !== null &&
117
+ props.commentText &&
118
+ props.commentCreator &&
119
+ commentText &&
120
+ commentText === getReplyText(props.commentText, props.commentCreator)) {
121
+ node.scrollTop = node.scrollHeight;
122
+ node.focus();
123
+ }
124
+ },
125
+ // eslint-disable-next-line react-hooks/exhaustive-deps
126
+ [commentText]);
134
127
  const resetCommentSection = () => __awaiter(this, void 0, void 0, function* () {
135
128
  setCommentText('');
136
129
  setIsTextAreaFocused(false);
137
130
  resetIsPublic();
138
- yield clearDraft();
139
- setCommentText(commentSignature ? `<p><br></p><p>${commentSignature}</p>` : '');
131
+ const { value: prevDraftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername())) || {};
132
+ if (prevDraftComments[caseNumber]) {
133
+ delete prevDraftComments[caseNumber];
134
+ }
135
+ CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername(), { value: prevDraftComments });
136
+ props.onCommentClear && props.onCommentClear();
137
+ setCommentText(`\n ${commentSignature}` || '');
140
138
  });
141
139
  const resetAttachmentSection = () => {
142
140
  resetAttachment(dispatchToAttachmentReducer);
143
141
  };
144
- const onCaseFileUploaded = () => {
145
- ToastNotification.addSuccessMessage(t('Attachment uploaded successfully'));
146
- batchSuccessCountRef.current += 1;
147
- };
148
- useAttachmentUploadCompletion({
149
- isUploadingAttachments,
150
- hasQueuedUploads,
151
- hasAbortedOrFailed,
152
- isUploadingAttachmentPrevious,
153
- batchSuccessCountRef,
154
- caseDispatch,
155
- apolloClient,
156
- caseNumber,
157
- existingCaseDetails,
158
- isInternal: loggedInUserRights.data.isInternal(),
159
- status,
160
- resetAttachmentSection,
161
- setCssCommentAgreed,
162
- onAttachmentBatchAdded: props.onAttachmentAdded,
163
- });
164
142
  const onCancelClick = () => {
165
- // Cancel only clears comment text; file removal stays on FileLister Remove.
166
143
  resetCommentSection();
144
+ resetAttachmentSection();
167
145
  cancelFileUpload();
168
146
  };
169
- const onCommentTextChange = (html) => {
170
- setCommentText(html);
171
- saveDraft(html, isPublic);
172
- };
173
- const onCancel = () => {
174
- setIsModalOpen(false);
175
- };
176
- const isNotInternalConfirm = () => {
177
- onPostComment();
178
- };
179
- const onConfirm = () => {
180
- setIsModalOpen(false);
181
- isNotInternalConfirm();
182
- };
183
- const onBtnClick = () => {
184
- setIsModalOpen(true);
185
- };
186
- // TODO: Re-enable after GraphQL migration (REST notification)
187
- // const addUserToNotifyList = async () => {
188
- // const sso = loggedInUserRights.data.getSSOUsername();
189
- // const alreadyNotified = (selectedNotificationContacts || []).some((item) => item.ssoUsername === sso);
190
- // if (sso === contactSSOName || alreadyNotified) return;
191
- // await addingNotifiedUsers(caseDispatch, caseNumber, [{ ssoUsername: sso }]);
192
- // setNotifiedUser(caseDispatch, uniqBy([...selectedNotificationContacts, loggedInUser.data], 'ssoUsername'));
193
- // };
194
- const plainTextContent = (_g = (_f = (_e = (_d = quillEditorRef.current) === null || _d === void 0 ? void 0 : _d.getText) === null || _e === void 0 ? void 0 : _e.call(_d)) === null || _f === void 0 ? void 0 : _f.trim()) !== null && _g !== void 0 ? _g : '';
195
- const checkCommentSignature = plainTextContent.replace(commentSignature, '');
196
- const isCommentEmpty = isEmpty(checkCommentSignature === null || checkCommentSignature === void 0 ? void 0 : checkCommentSignature.trim());
197
- const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
198
- var _a, _b;
199
- if (canEditCase.alert())
200
- return;
201
- if (!commentText)
202
- return;
203
- if (!caseSalesforceId)
204
- return;
205
- let body = commentText;
206
- if (props.replyingToAuthor) {
207
- const formattedTimestamp = props.replyingToTimestamp ? formatDateTime(props.replyingToTimestamp) : '';
208
- const replyPrefix = formattedTimestamp
209
- ? t('(replying to {{commentCreator}}, {{timestamp}}) \n', {
210
- commentCreator: props.replyingToAuthor,
211
- timestamp: formattedTimestamp,
212
- })
213
- : t('(replying to {{commentCreator}}) \n', {
214
- commentCreator: props.replyingToAuthor,
215
- });
216
- body = `<p>${replyPrefix}</p>${body}`;
217
- }
218
- try {
219
- setIsProcessing(true);
220
- yield createComment({
221
- caseId: caseSalesforceId,
222
- body,
223
- isPublic,
224
- isAssociate: loggedInUserRights.data.isInternal(),
225
- });
226
- yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status, {
227
- apolloClient,
228
- caseNumber,
229
- existingCaseDetails,
147
+ const loggedInUserSSO = loggedInUserRights.data.getSSOUsername();
148
+ // https://github.com/facebook/react/issues/19240
149
+ const debouncedCacheSave = useMemo(() => debounce(function (value, mode, publicFlag) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ const { value: prevDraftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO)) || {};
152
+ if (prevDraftComments[caseNumber]) {
153
+ }
154
+ prevDraftComments[caseNumber] = { text: value, privateFlag: !publicFlag, type: mode };
155
+ CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO, {
156
+ value: prevDraftComments,
230
157
  });
231
- if (!isPublic)
232
- setIsPublic(true);
233
- // TODO: Re-enable after GraphQL migration (REST notification)
234
- // addUserToNotifyList();
235
- yield ((_a = props.onCommentAdded) === null || _a === void 0 ? void 0 : _a.call(props));
236
- resetCommentSection();
237
- (_b = props.onClearReply) === null || _b === void 0 ? void 0 : _b.call(props);
238
- ToastNotification.addSuccessMessage(t('Comment submitted'));
239
- setCssCommentAgreed(false);
158
+ });
159
+ }, 500), [caseNumber, loggedInUserSSO]);
160
+ const onCommentTextChange = (value, mode) => __awaiter(this, void 0, void 0, function* () {
161
+ setCommentType(mode);
162
+ setCommentText(value);
163
+ debouncedCacheSave(value, mode, isPublic);
164
+ });
165
+ const addUserToNotifyList = () => __awaiter(this, void 0, void 0, function* () {
166
+ const loggedInUserSSO = loggedInUserRights.data.getSSOUsername();
167
+ if (loggedInUserSSO !== contactSSOName &&
168
+ !(selectedNotificationContacts || []).map((item) => item.ssoUsername).includes(loggedInUserSSO)) {
169
+ yield addingNotifiedUsers(caseDispatch, caseNumber, [{ ssoUsername: loggedInUserSSO }]);
170
+ setNotifiedUser(caseDispatch, uniqBy([...selectedNotificationContacts, loggedInUser.data], 'ssoUsername'));
240
171
  }
241
- catch (_c) {
242
- ToastNotification.addDangerMessage(t('Could not submit comment. Please refresh the page and try again.'));
172
+ });
173
+ useEffect(() => {
174
+ isPublicRef.current = isPublic;
175
+ }, [isPublic]);
176
+ useEffect(() => {
177
+ if (isCommentEmpty) {
178
+ props.onCommentClear && props.onCommentClear();
243
179
  }
244
- finally {
245
- setIsProcessing(false);
180
+ // eslint-disable-next-line react-hooks/exhaustive-deps
181
+ }, [commentText]);
182
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
183
+ const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
184
+ if (canEditCase.alert())
185
+ return;
186
+ if (commentText) {
187
+ try {
188
+ setIsProcessing(true);
189
+ const newCommentText = commentText.replace(/(^|\n)(-\s.+)(\n(?![-\s]))/g, '$1$2\n\n');
190
+ yield request({ caseNumber, commentBody: newCommentText, isPublic, contentType: commentType });
191
+ checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status);
192
+ !isPublic && setIsPublic(true);
193
+ addUserToNotifyList();
194
+ // update state
195
+ yield props.onCommentAdded();
196
+ resetCommentSection();
197
+ ToastNotification.addSuccessMessage(t('Comment submitted'));
198
+ setCssCommentAgreed(false);
199
+ }
200
+ catch (e) {
201
+ caseUpdateError.showError(e, t('Could not submit comment'));
202
+ }
203
+ finally {
204
+ setIsProcessing(false);
205
+ }
246
206
  }
247
207
  });
248
208
  const handleCheckboxToggle = () => {
249
209
  setIsPublic((publicComment) => !publicComment);
250
210
  };
251
211
  function isCommentSignatureMatch() {
252
- var _a, _b, _c, _d;
253
- const plainText = (_d = (_c = (_b = (_a = quillEditorRef.current) === null || _a === void 0 ? void 0 : _a.getText) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.trim()) !== null && _d !== void 0 ? _d : commentText.trim();
254
- return plainText === commentSignature;
212
+ return commentText.trim() === commentSignature;
255
213
  }
256
214
  const isPostCommentDisabled = isProcessing || !commentText || isCommentSignatureMatch();
257
- const isFileUploadDisabled = (isConfirmedStateSideSupport && !cssCommentAgreed) || canEditCase.isCaseNotEditable;
215
+ const isFileUploadDisabled = isConfirmedStateSideSupport && !cssCommentAgreed;
258
216
  const onFileUploadClick = () => {
259
217
  ToastNotification.addInfoMessage(t('Uploading Attachment(s)'));
260
218
  };
219
+ const getReplyText = (replyText, commentCreator) => {
220
+ const person = t(`(replying to {{commentCreator}}) \n`, { commentCreator });
221
+ const reply = replyText
222
+ .substring(0, 1000)
223
+ .split(/\n/)
224
+ .reduce((acc, line) => (acc += '> ' + line + '\n'), person);
225
+ return reply;
226
+ };
227
+ const addCommentSignature = (preSigComment) => {
228
+ if (!isEmpty(commentSignature)) {
229
+ let signedComment = '';
230
+ // Checks if somment signature already exists and depending on that check, adds the signature
231
+ if (preSigComment.includes(commentSignature)) {
232
+ signedComment = preSigComment;
233
+ }
234
+ else {
235
+ signedComment = preSigComment + '\n' + commentSignature;
236
+ }
237
+ setCommentText(signedComment);
238
+ }
239
+ };
240
+ useEffect(() => {
241
+ if (!props.commentText || !props.commentCreator) {
242
+ return;
243
+ }
244
+ const reply = getReplyText(props.commentText, props.commentCreator);
245
+ if (reply.includes(commentSignature)) {
246
+ setCommentText(reply);
247
+ }
248
+ else {
249
+ addCommentSignature(reply);
250
+ }
251
+ // eslint-disable-next-line react-hooks/exhaustive-deps
252
+ }, [props.commentText, props.commentCreator]);
253
+ useEffect(() => {
254
+ if (isUploadingAttachmentPrevious.current && !isUploadingAttachments && !hasSomeUnUploadedFiles) {
255
+ ToastNotification.addSuccessMessage(t('Attachment(s) uploaded successfully'));
256
+ checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status);
257
+ // update state
258
+ resetAttachmentSection();
259
+ props.onAttachmentAdded();
260
+ setCssCommentAgreed(false);
261
+ }
262
+ isUploadingAttachmentPrevious.current = isUploadingAttachments;
263
+ // eslint-disable-next-line react-hooks/exhaustive-deps
264
+ }, [isUploadingAttachments]);
265
+ useEffect(() => {
266
+ function getDraftComments() {
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ const { value: draftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername())) || {};
269
+ if (draftComments[caseNumber]) {
270
+ const { text, privateFlag, type } = draftComments[caseNumber];
271
+ if (text.trim()) {
272
+ addCommentSignature(text);
273
+ privateFlag === true && setIsPublic(false);
274
+ setCommentType(type);
275
+ }
276
+ }
277
+ });
278
+ }
279
+ getDraftComments();
280
+ // eslint-disable-next-line react-hooks/exhaustive-deps
281
+ }, [commentSignature]);
261
282
  const onTextAreaBlur = () => {
262
- if (!commentText)
263
- setIsTextAreaFocused(false);
283
+ !commentText && setIsTextAreaFocused(false);
264
284
  };
265
285
  const onCommentExceedCharsLimit = (lengthExceededNew) => {
266
286
  if (isCommentTooLong !== lengthExceededNew)
267
287
  setIsCommentTooLong(lengthExceededNew);
268
288
  };
269
- // Submit stays independent of attachment upload so comments can be posted mid-upload (PCM-15915).
270
- const isSubmitDisabled = isCommentEmpty ||
289
+ const showCaseIsNotEditableAlert = () => {
290
+ if (canEditCase.alert())
291
+ return;
292
+ };
293
+ const fileUploadButton = (React.createElement(React.Fragment, null, canEditCase.isCaseNotEditable ? (React.createElement(Button, { variant: ButtonVariant.secondary, onClick: showCaseIsNotEditableAlert, isDisabled: isFileUploadDisabled }, t(isPublic || !canPostPrivateComments ? 'Attach files' : 'Attach private files'))) : (React.createElement(FileSelectorButton, { buttonLabel: t(isPublic || !canPostPrivateComments ? 'Attach files' : 'Attach private files'), isSessionId: false, isPrivate: !isPublic, "data-tracking-id": "case-discussion-file-selector-button", isDisabled: isFileUploadDisabled }))));
294
+ const markdownToolbarFileSelectorBtn = (React.createElement(Button, { type: "button", onClick: open, "data-tracking-id": "inline-image-attach-file", isDisabled: isUploadingFile, variant: ButtonVariant.link, icon: React.createElement(PlusIcon, null) }, t(isPublic ? 'Attach files' : 'Attach private files')));
295
+ // This is where we get all attachments to show in dropdown
296
+ const getAllAttachments = () => {
297
+ return (props.allDiscussions || [])
298
+ .filter((item) => item.discussionType === DiscussionType.ATTACHMENT)
299
+ .map((elem) => elem.item);
300
+ };
301
+ const onClipboardPaste = (files) => {
302
+ onFileAttach(files, isPublicRef.current);
303
+ };
304
+ const onCancel = () => {
305
+ setIsModalOpen(false);
306
+ };
307
+ const isNotInternalConfirm = () => {
308
+ onPostComment();
309
+ };
310
+ const onConfirm = (commentText) => {
311
+ setIsModalOpen(false);
312
+ isNotInternalConfirm();
313
+ };
314
+ const onBtnClick = () => {
315
+ setIsModalOpen(true);
316
+ };
317
+ // To check is commment is empty
318
+ const checkCommentSignature = commentText.replace(commentSignature, '');
319
+ const isCommentEmpty = isEmpty(checkCommentSignature === null || checkCommentSignature === void 0 ? void 0 : checkCommentSignature.trim());
320
+ // To check is comment reply is empty and disable if it is
321
+ const isReplyDisabled = () => {
322
+ let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
323
+ return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
324
+ };
325
+ const isSubmitDisabled = isReplyDisabled() ||
326
+ isCommentEmpty ||
271
327
  isPostCommentDisabled ||
272
- (isConfirmedStateSideSupport && !cssCommentAgreed) ||
273
- canEditCase.isCaseNotEditable;
328
+ (isConfirmedStateSideSupport && !cssCommentAgreed);
274
329
  return (React.createElement("div", { className: `pf-v6-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
275
- props.replyingToAuthor && (React.createElement("div", { className: "post-comment-reply-banner pf-v6-u-mb-sm", "data-tracking-id": "reply-banner" },
276
- React.createElement("span", null,
277
- React.createElement(Trans, null, "Replying to"),
278
- " ",
279
- React.createElement("strong", null, props.replyingToAuthor),
280
- props.replyingToTimestamp && (React.createElement("span", { className: "pf-v6-u-ml-xs pf-v6-u-color-200" },
281
- "(",
282
- formatDateTime(props.replyingToTimestamp),
283
- ")"))),
284
- React.createElement(Button, { variant: ButtonVariant.plain, "aria-label": t('Cancel reply'), onClick: props.onClearReply, "data-tracking-id": "cancel-reply-button" },
285
- React.createElement(TimesIcon, null)))),
286
- React.createElement(RichTextEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, height: isTextAreaFocused ? 313 : 120, onCharLimitExceeded: onCommentExceedCharsLimit, placeholder: !isPublic && canPostPrivateComments
287
- ? 'Add a comment or attach a file privately'
288
- : 'Add a comment to this case', charLimit: 32000, onImageUpload: onImageUpload, bindEditor: (editor) => {
289
- quillEditorRef.current = editor;
330
+ React.createElement(MarkdownEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic || !canPostPrivateComments
331
+ ? 'Add a comment using markdown'
332
+ : 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic || !canPostPrivateComments
333
+ ? 'Add a comment to this case'
334
+ : 'Add a comment or attach a file privately', fileSelectorProps: {
335
+ showFileSelectorInToolbar: !loggedInUsersAccount.data.secureSupport,
336
+ filesList: getAllAttachments(),
337
+ onFileDelete: onFileDelete,
338
+ isSupportedFile: (extension) => true,
339
+ attachFileBtn: markdownToolbarFileSelectorBtn,
340
+ isUploadingFile: isMarkdownFileUploadInProgress,
341
+ onClipboardPaste,
290
342
  } }),
291
343
  isConfirmedStateSideSupport && (React.createElement("div", { className: "pf-v6-u-mt-md pf-v6-u-mb-lg" },
292
344
  React.createElement("input", { type: "checkbox", id: "css-case-comment-agreement", name: "css-case-comment-agreement", "data-tracking-id": "css-case-comment-agreement", checked: cssCommentAgreed, onChange: (e) => setCssCommentAgreed(e.target.checked) }),
@@ -297,15 +349,15 @@ export function PostComment(props) {
297
349
  isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
298
350
  React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
299
351
  React.createElement(Trans, null, "Submit")),
300
- React.createElement(FileSelectorButton, { isSessionId: false, isDisabled: isFileUploadDisabled, buttonLabel: React.createElement(React.Fragment, null,
301
- React.createElement(PlusIcon, null),
302
- " ",
303
- React.createElement(Trans, null, "Attach files")) }),
304
- React.createElement(Button, { className: "secondary-button-pill", "data-tracking-id": "postcomment-cancel-button", type: "button", variant: ButtonVariant.link, onClick: onCancelClick, isDisabled: isCommentEmpty || isProcessing },
352
+ canAddAttachments &&
353
+ (isPublic && canPostPrivateComments ? (React.createElement(Tooltip, { content: t('You can attach files privately') }, fileUploadButton)) : (fileUploadButton)),
354
+ React.createElement(Button, { className: "secondary-button-pill", "data-tracking-id": "postcomment-cancel-button", type: "button", variant: ButtonVariant.link, onClick: onCancelClick, isDisabled: isPostCommentDisabled },
305
355
  React.createElement(Trans, null, "Cancel")),
306
356
  canPostPrivateComments && (React.createElement("span", { className: "post-comment-checkbox" },
307
357
  React.createElement(Checkbox, { label: t('Private'), isChecked: !isPublic && canPostPrivateComments, onChange: handleCheckboxToggle, "aria-label": t('Private'), id: "private-comment", name: "private-comment", "data-tracking-id": "private-comment-checkbox" }))))),
308
- React.createElement("div", Object.assign({}, getRootProps(), { className: "post-comment-dropzone" }),
309
- React.createElement("input", Object.assign({}, getInputProps())),
310
- React.createElement(FileUpload, { className: `file-upload-section ${hasSomeSelectedFilesLocal ? 'card card-white pf-v6-u-mt-lg pf-v6-u-p-lg' : ''}`, idToUploadTo: caseNumber, caseSalesforceId: caseSalesforceId, onUploadClick: onFileUploadClick, onCaseFileUploaded: onCaseFileUploaded, isSessionId: false, needsAnalyzing: false, autoUploadOnSelect: true, isPrivate: !isPublic, showDescriptionInfoMsg: true }))));
358
+ React.createElement(FileUpload, { className: `file-upload-section ${hasSomeSelectedFilesLocal ? 'card card-white pf-v6-u-mt-lg pf-v6-u-p-lg' : ''}`, idToUploadTo: caseNumber, onUploadClick: onFileUploadClick, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport, isPrivate: !isPublic, autoUploadOnSelect: true, showDescriptionInfoMsg: true }),
359
+ React.createElement("span", Object.assign({}, getRootProps(), { tabIndex: -1 }),
360
+ React.createElement("input", Object.assign({ style: { display: 'none !important' } }, getInputProps()))),
361
+ !loggedInUsersAccount.data.secureSupport && (React.createElement(NewFeaturePopoverAnnouncement, { "aria-label": "Attach and embed images! You'll find all of your uploaded images here.", featureName: FeatureAnnouncementKeys.MARKDOWN_INLINE_IMAGES, sectionRef: componentRef, bodyContent: React.createElement("div", null,
362
+ React.createElement(Trans, null, "Attach and embed images! You'll find all of your uploaded images here.")), triggerRef: () => document.getElementById('md-editor-toolbar-file-selector') }))));
311
363
  }
@@ -1 +1 @@
1
- {"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAiJlD"}
1
+ {"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA6IlD"}
@@ -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 { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
12
11
  import { SingleSelectDropdown, ToastNotification } from '@rh-support/components';
13
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
@@ -44,12 +43,11 @@ export function VerifyCaseStatusModal(props) {
44
43
  selectedAccountDetails: state.selectedAccountDetails,
45
44
  }), isEqual);
46
45
  const { status } = caseState.caseDetails;
47
- const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
48
- const apolloClient = useApolloClient();
46
+ const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
49
47
  const canManageCase = loggedInUserRights.data.canManageCases();
50
48
  useEffect(() => {
51
- fetchAllStatuses(caseOverviewDispatch, apolloClient);
52
- }, [caseOverviewDispatch, apolloClient]);
49
+ fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
50
+ }, [caseOverviewDispatch, loggedInUsersAccount.data.secureSupport]);
53
51
  const { isCaseUpdating } = caseState;
54
52
  const canEditCase = useCanEditCase();
55
53
  const caseDispatch = useCaseDispatch();
@@ -71,7 +69,7 @@ export function VerifyCaseStatusModal(props) {
71
69
  }
72
70
  catch (e) {
73
71
  setStatusUpdating(caseOverviewDispatch, false);
74
- caseUpdateError.showError(e, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
72
+ caseUpdateError.showError(e, t('Status failed to update'));
75
73
  }
76
74
  }
77
75
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,MAAM,sBAQjC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,MAAM,sBAMjC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
- import { useCaseSelector } from '../../../../context/CaseContext';
3
2
  import Timeline from './Timeline';
4
3
  const CaseHistory = (props) => {
5
- const sfdcCaseId = useCaseSelector((state) => { var _a; return (_a = state.caseDetails) === null || _a === void 0 ? void 0 : _a.id; });
6
4
  return (React.createElement("div", { className: "pf-v6-u-p-sm" },
7
- React.createElement(Timeline, { caseNumber: props.caseNumber, sfdcCaseId: sfdcCaseId !== null && sfdcCaseId !== void 0 ? sfdcCaseId : '' })));
5
+ React.createElement(Timeline, { caseNumber: props.caseNumber })));
8
6
  };
9
7
  export default CaseHistory;