@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
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentReducer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,OAAO,E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2
2
  import forEach from 'lodash/forEach';
3
- import { isAnalysingAnyAttachment, isUploadComplete, isUploadingAttachment } from './AttachmentHelper';
3
+ import { isAnalysingAnyAttachment, isUploadingAttachment } from './AttachmentHelper';
4
4
  // Constants
5
5
  export var AttachmentReducerConstants;
6
6
  (function (AttachmentReducerConstants) {
@@ -13,7 +13,6 @@ export var AttachmentReducerConstants;
13
13
  AttachmentReducerConstants["updateAnalysisMetadata"] = "updateAnalysisMetadata";
14
14
  AttachmentReducerConstants["udpateFileUploadMetadata"] = "udpateFileUploadMetadata";
15
15
  AttachmentReducerConstants["setShowUploadingOnSlowConnectionMsg"] = "setShowUploadingOnSlowConnectionMsg";
16
- AttachmentReducerConstants["clearCompletedAttachments"] = "clearCompletedAttachments";
17
16
  })(AttachmentReducerConstants || (AttachmentReducerConstants = {}));
18
17
  export var UploadStatusConstants;
19
18
  (function (UploadStatusConstants) {
@@ -60,7 +59,6 @@ export const initialAttachmentState = {
60
59
  includeAnalysisResults: true,
61
60
  showUploadingOnSlowConnectionMsg: false,
62
61
  };
63
- const getLocalFileAtIndex = (selectedLocalFiles, index) => index >= 0 && index < selectedLocalFiles.length ? selectedLocalFiles[index] : undefined;
64
62
  export const attachmentReducer = (pState, action) => {
65
63
  switch (action.type) {
66
64
  case AttachmentReducerConstants.caseFileSelected: {
@@ -80,9 +78,6 @@ export const attachmentReducer = (pState, action) => {
80
78
  case AttachmentReducerConstants.caseLocalFileEdited: {
81
79
  const editedLocalFile = action.payload.editedLocalFile;
82
80
  const indexToEdit = action.payload.fileIndexToEdit;
83
- if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
84
- return pState;
85
- }
86
81
  const newState = Object.assign({}, pState);
87
82
  const newCaseFiles = Object.assign({}, newState.caseFiles);
88
83
  const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
@@ -134,9 +129,6 @@ export const attachmentReducer = (pState, action) => {
134
129
  }
135
130
  case AttachmentReducerConstants.updateAttachmentIdForFile: {
136
131
  const indexToEdit = action.payload.fileIndexToEdit;
137
- if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
138
- return pState;
139
- }
140
132
  const newState = Object.assign({}, pState);
141
133
  const newCaseFiles = Object.assign({}, newState.caseFiles);
142
134
  const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
@@ -147,9 +139,6 @@ export const attachmentReducer = (pState, action) => {
147
139
  }
148
140
  case AttachmentReducerConstants.updateAnalysisMetadata: {
149
141
  const indexToEdit = action.payload.fileIndexToEdit;
150
- if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
151
- return pState;
152
- }
153
142
  const newState = Object.assign({}, pState);
154
143
  const newCaseFiles = Object.assign({}, newState.caseFiles);
155
144
  const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
@@ -160,9 +149,6 @@ export const attachmentReducer = (pState, action) => {
160
149
  }
161
150
  case AttachmentReducerConstants.udpateFileUploadMetadata: {
162
151
  const indexToEdit = action.payload.fileIndexToEdit;
163
- if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
164
- return pState;
165
- }
166
152
  const newState = Object.assign({}, pState);
167
153
  const newCaseFiles = Object.assign({}, newState.caseFiles);
168
154
  const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
@@ -174,24 +160,6 @@ export const attachmentReducer = (pState, action) => {
174
160
  case AttachmentReducerConstants.setShowUploadingOnSlowConnectionMsg: {
175
161
  return Object.assign(Object.assign({}, pState), { showUploadingOnSlowConnectionMsg: action.payload.showUploadingOnSlowConnectionMsg });
176
162
  }
177
- case AttachmentReducerConstants.clearCompletedAttachments: {
178
- const selectedLocalFiles = pState.caseFiles.selectedLocalFiles;
179
- const selectedOriginalFiles = pState.caseFiles.selectedOriginalFiles;
180
- const keptLocalFiles = [];
181
- const keptOriginalFiles = [];
182
- selectedLocalFiles.forEach((localFile, index) => {
183
- if (!isUploadComplete(localFile.uploadProgress.uploadStatus)) {
184
- keptLocalFiles.push(localFile);
185
- if (selectedOriginalFiles[index]) {
186
- keptOriginalFiles.push(selectedOriginalFiles[index]);
187
- }
188
- }
189
- });
190
- return Object.assign(Object.assign({}, pState), { caseFiles: {
191
- selectedLocalFiles: keptLocalFiles,
192
- selectedOriginalFiles: keptOriginalFiles,
193
- } });
194
- }
195
163
  default: {
196
164
  return pState;
197
165
  }
@@ -210,9 +178,6 @@ export const onFileRemove = (dispatch, fileIndexToRemove) => {
210
178
  export const resetAttachment = (dispatch) => {
211
179
  dispatch({ type: AttachmentReducerConstants.resetAttachment });
212
180
  };
213
- export const clearCompletedAttachments = (dispatch) => {
214
- dispatch({ type: AttachmentReducerConstants.clearCompletedAttachments });
215
- };
216
181
  export const onIncludeExcludeResults = (dispatch, includeResults) => {
217
182
  dispatch({ type: AttachmentReducerConstants.caseFileIncludeExclude, payload: { includeResults } });
218
183
  };
@@ -1,14 +1,10 @@
1
1
  export interface IFileUploaderCommonProps {
2
- isSecureSupport?: boolean;
2
+ isSecureSupport: boolean;
3
3
  idToUploadTo: string;
4
- /** Salesforce case Id from caseDetails.state — avoids an extra GetCaseByCaseNumber on upload. */
5
- caseSalesforceId?: string;
6
4
  needsAnalyzing?: boolean;
7
5
  isSessionId: boolean;
8
6
  autoUploadOnSelect?: boolean;
9
7
  isPrivate?: boolean;
10
8
  onUploadClick?: () => void;
11
- /** Fired after each successful case attachment upload so discussion can refresh immediately. */
12
- onCaseFileUploaded?: () => void;
13
9
  }
14
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gGAAgG;IAChG,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACrC,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B"}
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import { IFileLocal } from './reducer/AttachmentReducer';
3
3
  import { IFileUploaderCommonProps } from './types';
4
4
  export declare function useFileUploader(props: IFileUploaderCommonProps): {
5
- retryUpload: (indexToRetry: number) => Promise<void>;
5
+ retryUpload: (indexToRetry: number) => void;
6
6
  editFile: (editedLocalFile: IFileLocal, fileIndexToEdit: number, changes: IFileLocal) => Promise<void>;
7
7
  removeFile: (fileIndexToRemove: number, file: IFileLocal) => Promise<void>;
8
8
  uploadAll: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => Promise<void>;
9
- uploadFile: (fileIndex: number) => Promise<void>;
9
+ uploadFile: (fileIndex: number) => void;
10
10
  retryAnalysis: (indexToRetry: number) => void;
11
11
  };
12
12
  //# sourceMappingURL=useFileUploader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAgBnF,OAAO,EACH,UAAU,EAKb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCA8JjB,MAAM;gCAYA,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBAxGzD,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BAwJ3B,MAAM;kCA9DN,MAAM;EAwFhD"}
1
+ {"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAenF,OAAO,EAAE,UAAU,EAAmD,MAAM,6BAA6B,CAAC;AAE1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCA8DvB,MAAM;gCAYM,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBAczC,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BA4BjD,MAAM;kCAxDA,MAAM;EA8EhD"}
@@ -7,111 +7,37 @@ 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 { sessionAttachments } from '@cee-eng/hydrajs';
10
+ import { caseAttachments, sessionAttachments } from '@cee-eng/hydrajs';
12
11
  import { useFetch, usePrevious } from '@rh-support/components';
13
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
14
- import { deleteCaseAttachment, fetchCaseDetailsByCaseNumber, getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE, } from '@rh-support/utils';
13
+ import { getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
15
14
  import debounce from 'lodash/debounce';
16
15
  import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
17
16
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
18
17
  import { SESSION_REFERRER_URL_LIMIT } from '../../../reducers/CaseConstNTypes';
19
18
  import { getSessionDetailsFromCase } from '../../../reducers/CaseHelpers';
20
19
  import { createSession } from '../../../reducers/SessionRestoreReducer';
21
- import { doSosReportAnalysisForFile, hasSomeSelectedFiles, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
22
- import { onFileEdit, onFileRemove, resetAttachment, UploadStatusConstants, } from './reducer/AttachmentReducer';
20
+ import { doSosReportAnalysisForFile, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
21
+ import { onFileEdit, onFileRemove, UploadStatusConstants } from './reducer/AttachmentReducer';
23
22
  import { AttachmentDispatchContext, AttachmentStateContext } from './reducer/AttachmentReducerContext';
24
- /** Wait for staggered onDrop dispatches before auto-uploading. */
25
- const AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS = 300;
26
23
  export function useFileUploader(props) {
27
- var _a;
28
24
  const { attachmentState, attachmentState: { caseFiles }, } = useContext(AttachmentStateContext);
29
25
  const dispatch = useContext(AttachmentDispatchContext);
30
- const apolloClient = useApolloClient();
31
- const caseSalesforceIdRef = useRef();
32
26
  const { request: deleteSessionAttachment } = useFetch(sessionAttachments.deleteSesionAttachment);
33
- const { request: deleteCaseAttachmentRequest } = useFetch(deleteCaseAttachment);
34
- const { idToUploadTo, caseSalesforceId, needsAnalyzing, isSessionId, autoUploadOnSelect, onUploadClick, onCaseFileUploaded, } = props;
35
- useEffect(() => {
36
- if (caseSalesforceId) {
37
- caseSalesforceIdRef.current = caseSalesforceId;
38
- }
39
- }, [caseSalesforceId]);
40
- const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
27
+ const { request: deleteCaseAttachment } = useFetch(caseAttachments.deleteAttachment);
28
+ const { idToUploadTo, needsAnalyzing, isSecureSupport, isSessionId, autoUploadOnSelect, onUploadClick } = props;
29
+ const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
41
30
  const { sessionRestore } = useContext(SessionRestoreStateContext);
42
31
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
43
32
  const checkForS3SlowUploads = getConfigField(pcmConfig.data, 'checkForS3SlowUploads', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
44
33
  const useBrowserAPIForDetection = getConfigField(pcmConfig.data, 'useBrowserAPIForSpeedDetection', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
45
- const slowUploadConfig = useMemo(() => ({
34
+ const slowUploadConfig = {
46
35
  checkForS3SlowUploads,
47
36
  useBrowserAPIForDetection,
48
- }), [checkForS3SlowUploads, useBrowserAPIForDetection]);
37
+ };
49
38
  const isInitialMountRef = useRef(true);
50
- const caseFilesRef = useRef(caseFiles);
51
- caseFilesRef.current = caseFiles;
52
39
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
53
40
  const prevSelectedFiles = usePrevious(selectedLocalFiles);
54
- const resolveCaseSalesforceId = useCallback(() => __awaiter(this, void 0, void 0, function* () {
55
- var _a;
56
- if (caseSalesforceIdRef.current || isSessionId || !idToUploadTo || !apolloClient) {
57
- return;
58
- }
59
- try {
60
- const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, idToUploadTo, Boolean((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport));
61
- caseSalesforceIdRef.current = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
62
- }
63
- catch (_b) {
64
- caseSalesforceIdRef.current = undefined;
65
- }
66
- }), [apolloClient, idToUploadTo, isSessionId, (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport]);
67
- const onUploadAll = useCallback((event) => __awaiter(this, void 0, void 0, function* () {
68
- onUploadClick && onUploadClick();
69
- yield resolveCaseSalesforceId();
70
- // on truobleshoot flow, user can upload a file while no data has added therefore no sessionId is available
71
- let sessionId = '';
72
- if (!idToUploadTo) {
73
- const userAgent = getUserAgentForCaseMode(true);
74
- const session = {
75
- userAgent,
76
- originatingSystem: userAgent,
77
- referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
78
- isInternal: loggedInUserRights.data.isInternal(),
79
- };
80
- if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
81
- sessionId = yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase({}, []), session);
82
- }
83
- }
84
- uploadAllFiles({
85
- dispatch,
86
- idToUploadTo: idToUploadTo || sessionId,
87
- caseFiles: caseFilesRef.current,
88
- needsAnalyzing,
89
- isSessionId,
90
- slowUploadConfig,
91
- apolloClient: !isSessionId ? apolloClient : undefined,
92
- caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
93
- onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
94
- });
95
- }), [
96
- apolloClient,
97
- dispatch,
98
- idToUploadTo,
99
- isSessionId,
100
- loggedInUserRights.data,
101
- needsAnalyzing,
102
- onCaseFileUploaded,
103
- onUploadClick,
104
- referrerUrl,
105
- resolveCaseSalesforceId,
106
- sessionRestore.sessionCreationStatus.isCreating,
107
- sessionRestore.sessionCreationStatus.isError,
108
- sessionRestoreDispatch,
109
- slowUploadConfig,
110
- ]);
111
- const onUploadAllRef = useRef(onUploadAll);
112
- onUploadAllRef.current = onUploadAll;
113
- const debouncedAutoUploadOnSelect = useMemo(() => debounce(() => void onUploadAllRef.current(), AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS), []);
114
- useEffect(() => () => debouncedAutoUploadOnSelect.cancel(), [debouncedAutoUploadOnSelect]);
115
41
  useEffect(() => {
116
42
  if (isInitialMountRef.current) {
117
43
  isInitialMountRef.current = false;
@@ -121,18 +47,19 @@ export function useFileUploader(props) {
121
47
  prevSelectedFiles &&
122
48
  selectedLocalFiles &&
123
49
  selectedLocalFiles.length > prevSelectedFiles.length) {
124
- debouncedAutoUploadOnSelect();
50
+ onUploadAll();
125
51
  }
126
- }, [autoUploadOnSelect, debouncedAutoUploadOnSelect, prevSelectedFiles, selectedLocalFiles]);
52
+ // eslint-disable-next-line react-hooks/exhaustive-deps
53
+ }, [selectedLocalFiles]);
127
54
  const updateSessionAttachmentMetadata = useCallback((file, changes) => __awaiter(this, void 0, void 0, function* () {
128
55
  sessionAttachments.updateSessionAttachmentMetadata(idToUploadTo, [Object.assign({ id: file.attachmentId }, changes)]);
129
56
  }), [idToUploadTo]);
130
57
  const debounceSessionMetadataUpdate = useMemo(() => debounce(updateSessionAttachmentMetadata, 800), [updateSessionAttachmentMetadata]);
131
- const onRetryLocal = (indexToRetry) => __awaiter(this, void 0, void 0, function* () {
58
+ const onRetryLocal = (indexToRetry) => {
132
59
  if (idToUploadTo && attachmentState.caseFiles.selectedLocalFiles[indexToRetry]) {
133
- yield onUploadFile(indexToRetry);
60
+ onUploadFile(indexToRetry);
134
61
  }
135
- });
62
+ };
136
63
  const onRetryAnalysis = (indexToRetry) => {
137
64
  const file = attachmentState.caseFiles.selectedLocalFiles[indexToRetry];
138
65
  if (idToUploadTo && file && file.attachmentId) {
@@ -148,58 +75,59 @@ export function useFileUploader(props) {
148
75
  debounceSessionMetadataUpdate(editedLocalFile, changes);
149
76
  });
150
77
  const onFileRemoveLocal = (fileIndexToRemove, file) => __awaiter(this, void 0, void 0, function* () {
151
- var _a, _b, _c;
152
- // Stop in-flight S3 transfer if Remove is used while upload/verify is still active
153
- (_b = (_a = file.uploadProgress).onAbort) === null || _b === void 0 ? void 0 : _b.call(_a, fileIndexToRemove);
154
- const attachmentIdToDelete = file.attachmentId || ((_c = file.uploadProgress.multipartResumeState) === null || _c === void 0 ? void 0 : _c.attachmentId);
155
78
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
156
- const isBusy = isUploadingAttachment(selectedLocalFiles) || isAnalysingAnyAttachment(selectedLocalFiles);
157
- let nextLocalFiles;
158
- if (!isBusy) {
79
+ if (!isUploadingAttachment(selectedLocalFiles) && !isAnalysingAnyAttachment(selectedLocalFiles)) {
159
80
  onFileRemove(dispatch, fileIndexToRemove);
160
- nextLocalFiles = selectedLocalFiles.filter((_, index) => index !== fileIndexToRemove);
161
81
  }
162
82
  else {
163
83
  updateUploadMetadata(dispatch, fileIndexToRemove, {
164
84
  uploadStatus: UploadStatusConstants.deleted,
165
- onAbort: undefined,
166
85
  });
167
- nextLocalFiles = selectedLocalFiles.map((localFile, index) => index === fileIndexToRemove
168
- ? Object.assign(Object.assign({}, localFile), { uploadProgress: Object.assign(Object.assign({}, localFile.uploadProgress), { uploadStatus: UploadStatusConstants.deleted, onAbort: undefined }) }) : localFile);
169
- }
170
- // Drop soft-deleted stubs so "Uploading attachment(s)" / Upload new file do not linger
171
- if (!hasSomeSelectedFiles(nextLocalFiles)) {
172
- resetAttachment(dispatch);
173
86
  }
174
- if (attachmentIdToDelete && isSessionId && isUploadedSuccessfully(file)) {
175
- deleteSessionAttachment(idToUploadTo, attachmentIdToDelete);
176
- }
177
- // Abort/fail after Hydra init still has an attachmentId — clean up SFDC "In Progress" on Remove only
178
- if (attachmentIdToDelete && !isSessionId) {
179
- try {
180
- yield deleteCaseAttachmentRequest(idToUploadTo, attachmentIdToDelete);
181
- }
182
- catch (_d) {
183
- // Best-effort: row is already removed from the PCM queue
87
+ isUploadedSuccessfully(file) && isSessionId && deleteSessionAttachment(idToUploadTo, file.attachmentId);
88
+ isUploadedSuccessfully(file) &&
89
+ !isSessionId &&
90
+ deleteCaseAttachment(idToUploadTo, file.attachmentId, isSecureSupport);
91
+ });
92
+ const onUploadAll = (event) => __awaiter(this, void 0, void 0, function* () {
93
+ onUploadClick && onUploadClick();
94
+ // on truobleshoot flow, user can upload a file while no data has added therefore no sessionId is available
95
+ let sessionId = '';
96
+ if (!idToUploadTo) {
97
+ const userAgent = getUserAgentForCaseMode(true);
98
+ let session = {
99
+ userAgent,
100
+ originatingSystem: userAgent,
101
+ referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
102
+ isInternal: loggedInUserRights.data.isInternal(),
103
+ };
104
+ if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
105
+ sessionId = yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase({}, []), session);
184
106
  }
185
107
  }
108
+ uploadAllFiles({
109
+ dispatch,
110
+ idToUploadTo: idToUploadTo || sessionId,
111
+ caseFiles,
112
+ isSecureSupport,
113
+ needsAnalyzing,
114
+ isSessionId,
115
+ slowUploadConfig,
116
+ });
186
117
  });
187
- const onUploadFile = (fileIndex) => __awaiter(this, void 0, void 0, function* () {
188
- yield resolveCaseSalesforceId();
118
+ const onUploadFile = (fileIndex) => {
189
119
  uploadFile({
190
120
  dispatch,
191
121
  idToUploadTo,
192
122
  localFile: attachmentState.caseFiles.selectedLocalFiles[fileIndex],
193
123
  originalFile: attachmentState.caseFiles.selectedOriginalFiles[fileIndex],
194
124
  index: fileIndex,
125
+ isSecureSupport,
195
126
  needsAnalyzing,
196
127
  isSessionId,
197
128
  slowUploadConfig,
198
- apolloClient: !isSessionId ? apolloClient : undefined,
199
- caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
200
- onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
201
129
  });
202
- });
130
+ };
203
131
  return {
204
132
  retryUpload: onRetryLocal,
205
133
  editFile: onFileEditLocal,
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAuBrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAoP9D"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAMnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAkR9D"}
@@ -1,7 +1,18 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { contacts } from '@cee-eng/hydrajs';
1
11
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
+ import find from 'lodash/find';
2
13
  import isEmpty from 'lodash/isEmpty';
3
14
  import isEqual from 'lodash/isEqual';
4
- import React, { useContext, useEffect } from 'react';
15
+ import React, { useContext, useEffect, useState } from 'react';
5
16
  import { Trans } from 'react-i18next';
6
17
  import { useCaseSelector } from '../../context/CaseContext';
7
18
  import { RouteContext, useRouteDispatchContext } from '../../context/RouteContext';
@@ -13,8 +24,9 @@ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
13
24
  import { setNoValidEntitlement } from '../../reducers/RouteReducer';
14
25
  import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
15
26
  export function useIsSectionValid(sectionName) {
27
+ var _a, _b;
16
28
  const { isVariationA } = useAB();
17
- const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, manageSupportCases, } = useCaseSelector((state) => ({
29
+ const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ssoUsername, manageSupportCases, } = useCaseSelector((state) => ({
18
30
  caseState: state,
19
31
  caseType: state.caseDetails.caseType,
20
32
  product: state.caseDetails.product,
@@ -30,19 +42,35 @@ export function useIsSectionValid(sectionName) {
30
42
  environment: state.caseDetails.environment,
31
43
  timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
32
44
  periodicityOfIssue: state.caseDetails.periodicityOfIssue,
33
- // ssoUsername: state.selectedOwner.data.ssoUsername,
45
+ ssoUsername: state.selectedOwner.data.ssoUsername,
34
46
  manageSupportCases: state.selectedOwner.data.manageSupportCases,
35
47
  }), isEqual);
36
48
  const routeDispatch = useRouteDispatchContext();
49
+ const [isEntitlement, setIsEntitlement] = useState(null);
50
+ useEffect(() => {
51
+ const fetchContactDetails = () => __awaiter(this, void 0, void 0, function* () {
52
+ var _a;
53
+ if (ssoUsername) {
54
+ try {
55
+ const response = yield contacts.getSFDCContactBySso(ssoUsername);
56
+ setIsEntitlement((_a = response === null || response === void 0 ? void 0 : response.isEntitled) !== null && _a !== void 0 ? _a : null);
57
+ setNoValidEntitlement(routeDispatch, !(response === null || response === void 0 ? void 0 : response.isEntitled));
58
+ }
59
+ catch (error) {
60
+ console.error('Error fetching contact details:', error);
61
+ setIsEntitlement(null);
62
+ setNoValidEntitlement(routeDispatch, null);
63
+ }
64
+ }
65
+ });
66
+ fetchContactDetails();
67
+ }, [ssoUsername, routeDispatch]);
68
+ //&seSessionId=8e8960ac-680b-443e-bf67-9e13f2acd64e
37
69
  const { routeState: { isCaseCreate }, } = useContext(RouteContext);
38
70
  const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
39
- // Global entitlement from subscription GraphQL → loggedInUser.isEntitled → UserAuth.isEntitled()
40
- const isEntitlement = loggedInUserRights.data.isEntitled();
41
- useEffect(() => {
42
- setNoValidEntitlement(routeDispatch, !isEntitlement);
43
- }, [isEntitlement, routeDispatch]);
44
71
  const { topContentState: { topContent }, } = useContext(TCStateContext);
45
- const { routeState: { activeSection }, } = useContext(RouteContext);
72
+ const isEntitledProduct = (_b = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === caseState.caseDetails.product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
73
+ const { routeState: { activeSection, isSearchIntent }, } = useContext(RouteContext);
46
74
  const { attachmentState } = useContext(AttachmentStateContext);
47
75
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
48
76
  const allowedTypesIdea = ['image/jpeg', 'image/png', 'image/jpg', 'image/gif'];
@@ -83,6 +111,8 @@ export function useIsSectionValid(sectionName) {
83
111
  }
84
112
  return (!isEmpty(product) &&
85
113
  !isEmpty(version) &&
114
+ !isEmpty(accountNumber) &&
115
+ !isEmpty(contactSSOName) &&
86
116
  !isEmpty(summary) &&
87
117
  (summary === null || summary === void 0 ? void 0 : summary.length) <= TITLE_SUMMARY_LENGTH_LIMIT &&
88
118
  !isEmpty(issue) &&
@@ -99,29 +129,30 @@ export function useIsSectionValid(sectionName) {
99
129
  };
100
130
  const isResourcesSectionValid = () => {
101
131
  var _a;
102
- // isEntitledProduct check removed product-level entitlement now resolved from SFDCProductJSON__c
132
+ // don't check for entitled product if user is on search intent flow
133
+ const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
134
+ // Skip cluster ID validation for Variant A
103
135
  const clusterIdValid = isVariationA ? true : isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
104
- return clusterIdValid;
136
+ return isEntitledProductLocal && clusterIdValid;
105
137
  };
106
138
  const isReviewSectionValid = () => {
107
139
  var _a;
108
- return (
109
- // isEntitledProduct — product-level entitlement now resolved from SFDCProductJSON__c
110
- isCaseStateValid(caseState, loggedInUserRights) &&
140
+ return (isEntitledProduct &&
141
+ isCaseStateValid(caseState, loggedInUserRights) &&
111
142
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
112
143
  isSummarizeSectionValid() &&
113
144
  isAdditionalInformationSectionValidLocal());
114
145
  };
115
146
  const isDescribeIdeaSectionValid = () => {
116
147
  return (isCaseManagementStateValid(caseState, loggedInUserRights) &&
117
- // isEntitledProduct — product-level entitlement now resolved from SFDCProductJSON__c
148
+ isEntitledProduct &&
118
149
  isIdeaCaseStateValid(caseState, loggedInUserRights) &&
119
150
  checkUnallowedFiles());
120
151
  };
121
152
  const isAdditionalInformationSectionValidLocal = () => {
122
153
  var _a;
123
154
  const hostnameIsValid = hostname ? (hostname === null || hostname === void 0 ? void 0 : hostname.length) <= HOSTNAME_LENGTH_LIMIT : true;
124
- return (isEntitlement &&
155
+ return (!caseState.hasInvalidEntitlements &&
125
156
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
126
157
  isCaseInformationSectionValid(caseState, loggedInUserRights) &&
127
158
  hostnameIsValid &&
@@ -154,10 +185,16 @@ export function useIsSectionValid(sectionName) {
154
185
  }
155
186
  };
156
187
  const recommendationSectionError = () => {
157
- // isEntitledProduct check removed — product-level entitlement now resolved from SFDCProductJSON__c
158
- return '';
188
+ if (!product)
189
+ return '';
190
+ const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
191
+ return !isEntitledProductLocal ? (React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
192
+ "You need a valid entitlement to create a case.\u00A0 Please contact",
193
+ ' ',
194
+ React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
195
+ " for assistance.")) : ('');
159
196
  };
160
- const getEntitlementSectionError = () => {
197
+ const getSupportSectionError = () => {
161
198
  if (manageSupportCases === false) {
162
199
  return (React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
163
200
  "You need additional access to manage cases.\u00A0 Please contact",
@@ -181,9 +218,7 @@ export function useIsSectionValid(sectionName) {
181
218
  case AppRouteSections.RESOURCES:
182
219
  return recommendationSectionError();
183
220
  case AppRouteSections.GET_SUPPORT:
184
- case AppRouteSections.SUMMARIZE:
185
- case AppRouteSections.TROUBLESHOOT:
186
- return getEntitlementSectionError();
221
+ return getSupportSectionError();
187
222
  default:
188
223
  return '';
189
224
  }
@@ -1 +1 @@
1
- {"version":3,"file":"usePostComment.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/usePostComment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAM9E,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE;;CAAA;2FAUtC,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,aAAa,GAAG,mBAAmB,CAAC,GAAG;QAChF,qBAAqB,EAAE,OAAO,CAAC;KAClC;;EAYJ"}
1
+ {"version":3,"file":"usePostComment.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/usePostComment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAW9E,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE;;CAAA;2FAgBtC,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,aAAa,GAAG,mBAAmB,CAAC,GAAG;QAChF,qBAAqB,EAAE,OAAO,CAAC;KAClC;;EAwBJ"}
@@ -7,24 +7,36 @@ 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 isEqual from 'lodash/isEqual';
12
- import { useCaseSelector } from '../../context/CaseContext';
13
- import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../hooks/useCaseComments';
10
+ import { publicApi } from '@cee-eng/hydrajs';
11
+ import { useFetch } from '@rh-support/components';
12
+ import { useCaseDispatch } from '../../context/CaseContext';
13
+ import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
14
+ import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
15
+ import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
14
16
  export function usePostComment({ caseNumber }) {
15
- const client = useApolloClient();
16
- const { createComment, loading: isPostingComment } = useCreateCaseComment();
17
- const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
18
- const postComment = (_a) => __awaiter(this, [_a], void 0, function* ({ commentBody, contentType, updateDiscussionState = true, doNotChangeStatus = false, }) {
19
- if (!commentBody || !caseSalesforceId)
17
+ const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
18
+ propgateErrors: true,
19
+ });
20
+ const caseDispatch = useCaseDispatch();
21
+ const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
22
+ const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
23
+ const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
24
+ const defaultContentType = 'plaintext';
25
+ const postComment = (_a) => __awaiter(this, [_a], void 0, function* ({ commentBody, contentType = defaultContentType, updateDiscussionState = true, doNotChangeStatus = false, }) {
26
+ if (!commentBody)
20
27
  return;
21
- yield createComment({
22
- caseId: caseSalesforceId,
23
- body: commentBody,
24
- isPublic: true,
25
- });
26
- if (updateDiscussionState) {
27
- yield client.refetchQueries({ include: [GET_CASE_COMMENTS] });
28
+ try {
29
+ yield postCommentRequest({
30
+ caseNumber,
31
+ commentBody,
32
+ contentType,
33
+ doNotChangeStatus,
34
+ });
35
+ updateDiscussionState &&
36
+ updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
37
+ }
38
+ catch (e) {
39
+ throw e;
28
40
  }
29
41
  });
30
42
  return { postComment, isPostingComment };
@@ -16,5 +16,4 @@ export declare const trimAndReplacePlus: (value: string) => string;
16
16
  export declare const removeAllSpaces: (value: string) => string;
17
17
  export declare const removeAllChars: (value: string) => string;
18
18
  export declare const getProductObj: (products: Partial<ISEProduct>[], product: string) => Partial<ISEProduct>;
19
- export declare const getProductObjById: (products: Partial<ISEProduct>[], productId?: string) => Partial<ISEProduct>;
20
19
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,IAEnC,cAAc,CAAC,EAAE,eAAe,CAAC,uBAQ5C;AAED,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,EAAE,WAAW,MAAM,KAAG,OAarE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,WAG/C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OA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