@rh-support/troubleshoot 2.6.354 → 2.6.357

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 (345) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
  9. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
  10. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
  11. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
  12. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Case.js +60 -33
  14. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
  16. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
  18. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  23. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
  24. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
  26. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/CaseOverview/index.js +76 -45
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
  30. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  31. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  33. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  34. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  35. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
  40. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  41. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
  42. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
  43. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  44. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +23 -10
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +132 -57
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
  88. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
  90. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
  92. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  93. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
  94. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  95. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
  96. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  97. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
  99. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
  101. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  102. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
  103. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  104. package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
  105. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  106. package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
  107. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
  108. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
  109. package/lib/esm/components/CaseInformation/CaseLabels.js +103 -0
  110. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  111. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
  112. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  113. package/lib/esm/components/CaseInformation/Description.js +1 -1
  114. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  115. package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
  116. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  117. package/lib/esm/components/CaseInformation/Fts.js +31 -17
  118. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  119. package/lib/esm/components/CaseInformation/Severity.js +21 -13
  120. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  121. package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
  122. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
  123. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
  124. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +110 -0
  125. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  126. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
  127. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  128. package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
  129. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  130. package/lib/esm/components/CaseManagement/Cep.js +11 -9
  131. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
  132. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  133. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +22 -3
  134. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  135. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  136. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +15 -22
  137. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  138. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
  139. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  140. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
  141. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  142. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  143. package/lib/esm/components/IdeaInformation/IdeaInformation.js +16 -18
  144. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  145. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  146. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  147. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  148. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  149. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  150. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  151. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  152. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
  153. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
  154. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
  155. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
  156. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  157. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  158. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  159. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
  160. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  161. package/lib/esm/components/Recommendations/AsideResults.js +4 -3
  162. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  163. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  164. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  165. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
  166. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  167. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  168. package/lib/esm/components/Recommendations/Recommendations.js +3 -9
  169. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  170. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
  171. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  172. package/lib/esm/components/Review/Review.js +25 -19
  173. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  174. package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
  175. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  176. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  177. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  178. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  179. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +104 -62
  180. package/lib/esm/components/shared/Constants.d.ts +5 -0
  181. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  182. package/lib/esm/components/shared/Constants.js +5 -0
  183. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  184. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  185. package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
  186. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  187. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  188. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
  189. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  190. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
  191. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  192. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  193. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +21 -5
  194. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  195. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +210 -34
  196. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
  197. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  198. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
  199. package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
  200. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  201. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  202. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  203. package/lib/esm/components/shared/fileUpload/useFileUploader.js +116 -47
  204. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  205. package/lib/esm/components/shared/useIsSectionValid.js +22 -57
  206. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  207. package/lib/esm/components/shared/usePostComment.js +16 -28
  208. package/lib/esm/components/shared/utils.d.ts +1 -0
  209. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  210. package/lib/esm/components/shared/utils.js +9 -3
  211. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  212. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
  213. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  214. package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
  215. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  216. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
  217. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  218. package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
  219. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  220. package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
  221. package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
  222. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  223. package/lib/esm/constants/caseDetailsConstants.js +5 -0
  224. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  225. package/lib/esm/css/app.css +28 -0
  226. package/lib/esm/css/case.css +60 -209
  227. package/lib/esm/graphql/index.d.ts +4 -0
  228. package/lib/esm/graphql/index.d.ts.map +1 -0
  229. package/lib/esm/graphql/index.js +3 -0
  230. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  231. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  232. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  233. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  234. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  235. package/lib/esm/graphql/mutations/index.js +1 -0
  236. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  237. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  238. package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
  239. package/lib/esm/graphql/queries/index.d.ts +2 -0
  240. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  241. package/lib/esm/graphql/queries/index.js +1 -0
  242. package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
  243. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  244. package/lib/esm/graphql/schemas/escalation.js +1 -0
  245. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  246. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  247. package/lib/esm/graphql/schemas/index.js +1 -0
  248. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  249. package/lib/esm/hooks/useAB.js +45 -23
  250. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  251. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  252. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
  253. package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
  254. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  255. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  256. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  257. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  258. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
  259. package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
  260. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  261. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  262. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
  263. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  264. package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
  265. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  266. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  267. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  268. package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
  269. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
  270. package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
  271. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  272. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  273. package/lib/esm/hooks/useCaseHistory.js +98 -0
  274. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +21 -0
  275. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
  276. package/lib/esm/hooks/useCaseLabelLinkMutations.js +91 -0
  277. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  278. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  279. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
  280. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  281. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  282. package/lib/esm/hooks/useS3Upload.d.ts +5 -4
  283. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  284. package/lib/esm/hooks/useS3Upload.js +28 -30
  285. package/lib/esm/i18n/template-de.d.ts +2 -2
  286. package/lib/esm/i18n/template-de.js +2 -2
  287. package/lib/esm/i18n/template-es.d.ts +2 -2
  288. package/lib/esm/i18n/template-es.js +2 -2
  289. package/lib/esm/i18n/template-fr.d.ts +2 -2
  290. package/lib/esm/i18n/template-fr.js +2 -2
  291. package/lib/esm/i18n/template-it.d.ts +2 -2
  292. package/lib/esm/i18n/template-it.js +2 -2
  293. package/lib/esm/i18n/template-jp.d.ts +2 -2
  294. package/lib/esm/i18n/template-jp.js +2 -2
  295. package/lib/esm/i18n/template-ko.d.ts +2 -2
  296. package/lib/esm/i18n/template-ko.js +2 -2
  297. package/lib/esm/i18n/template-pt.d.ts +2 -2
  298. package/lib/esm/i18n/template-pt.js +2 -2
  299. package/lib/esm/i18n/template-ru.d.ts +2 -2
  300. package/lib/esm/i18n/template-ru.js +2 -2
  301. package/lib/esm/i18n/template-zh.d.ts +2 -2
  302. package/lib/esm/i18n/template-zh.js +2 -2
  303. package/lib/esm/index.js +1 -0
  304. package/lib/esm/models/cache.d.ts +0 -2
  305. package/lib/esm/models/cache.d.ts.map +1 -1
  306. package/lib/esm/models/caseHistory.d.ts +80 -0
  307. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  308. package/lib/esm/models/caseHistory.js +1 -0
  309. package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
  310. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  311. package/lib/esm/reducers/CaseConstNTypes.js +31 -7
  312. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
  313. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  314. package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
  315. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
  316. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  317. package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
  318. package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
  319. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  320. package/lib/esm/reducers/CaseHelpers.js +117 -17
  321. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  322. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  323. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  324. package/lib/esm/reducers/CaseReducer.d.ts +56 -11
  325. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  326. package/lib/esm/reducers/CaseReducer.js +279 -99
  327. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  328. package/lib/esm/reducers/RecommendationsReducer.js +15 -18
  329. package/lib/esm/scss/_main.scss +9 -0
  330. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  331. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  332. package/lib/esm/utils/TimelineUtils.js +135 -0
  333. package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
  334. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  335. package/lib/esm/utils/caseHistoryUtils.js +165 -0
  336. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  337. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  338. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  339. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
  340. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
  341. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
  342. package/package.json +9 -8
  343. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
  344. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
  345. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
@@ -7,9 +7,9 @@ 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 { escalations, kase, publicApi } from '@cee-eng/hydrajs';
11
- import { getApiResourceObject } from '@rh-support/utils';
12
- import without from 'lodash/without';
10
+ import { publicApi } from '@cee-eng/hydrajs';
11
+ import { buildAccessRestrictionExclusionFilter, fetchCaseAttachmentsViaGraphQL, fetchCaseDetailsByCaseNumber, getApiResourceObject, } from '@rh-support/utils';
12
+ import { GET_ESCALATION_DETAILS } from '../graphql';
13
13
  export var CaseDetailsConstants;
14
14
  (function (CaseDetailsConstants) {
15
15
  CaseDetailsConstants["updateState"] = "updateState";
@@ -17,6 +17,8 @@ export var CaseDetailsConstants;
17
17
  export const initialCaseDetailsPageState = {
18
18
  caseFeedbacksHydra: getApiResourceObject([]),
19
19
  caseAttachmentHydra: getApiResourceObject([]),
20
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
21
+ // caseExternalTrackersUpdate: getApiResourceObject([]),
20
22
  caseExternalTrackersUpdate: getApiResourceObject([]),
21
23
  caseEscalations: getApiResourceObject([]),
22
24
  };
@@ -30,13 +32,21 @@ export const caseDetailsPageReducer = (state, action) => {
30
32
  }
31
33
  }
32
34
  };
33
- export const fetchAttachments = (dispatch, caseNumber, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
35
+ export const fetchAttachments = (dispatch_1, caseNumber_1, apolloClient_1, caseSalesforceId_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, apolloClient_1, caseSalesforceId_1, ...args_1], void 0, function* (dispatch, caseNumber, apolloClient, caseSalesforceId, includeSecureSupport = false) {
34
36
  try {
35
37
  dispatch({
36
38
  type: CaseDetailsConstants.updateState,
37
39
  payload: { caseAttachmentHydra: getApiResourceObject([], true) },
38
40
  });
39
- const allAttachments = yield kase.getAttachments(caseNumber, false, isSecureSupport);
41
+ let resolvedCaseSalesforceId = caseSalesforceId;
42
+ if (!resolvedCaseSalesforceId) {
43
+ const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
44
+ resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
45
+ }
46
+ if (!resolvedCaseSalesforceId) {
47
+ throw new Error('Missing Salesforce case id');
48
+ }
49
+ const allAttachments = yield fetchCaseAttachmentsViaGraphQL(apolloClient, caseNumber, resolvedCaseSalesforceId);
40
50
  dispatch({
41
51
  type: CaseDetailsConstants.updateState,
42
52
  payload: { caseAttachmentHydra: getApiResourceObject(allAttachments) },
@@ -69,34 +79,56 @@ export const fetchFeedbacks = (dispatch, caseNumber) => __awaiter(void 0, void 0
69
79
  });
70
80
  }
71
81
  });
72
- export const fetchExternalTrackers = (dispatch, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
73
- try {
74
- dispatch({
75
- type: CaseDetailsConstants.updateState,
76
- payload: { caseExternalTrackersUpdate: getApiResourceObject([], true) },
77
- });
78
- const caseExtUpdates = yield publicApi.kase.getExternalUpdates(caseNumber);
79
- dispatch({
80
- type: CaseDetailsConstants.updateState,
81
- payload: { caseExternalTrackersUpdate: getApiResourceObject(caseExtUpdates) },
82
- });
83
- }
84
- catch (e) {
85
- dispatch({
86
- type: CaseDetailsConstants.updateState,
87
- payload: { caseExternalTrackersUpdate: getApiResourceObject([], false, true, e.message) },
88
- });
89
- }
82
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
83
+ // export const fetchExternalTrackers = async (dispatch: CaseDetailsReducerDispatchType, caseNumber: string) => {
84
+ // try {
85
+ // dispatch({
86
+ // type: CaseDetailsConstants.updateState,
87
+ // payload: { caseExternalTrackersUpdate: getApiResourceObject([], true) },
88
+ // });
89
+ // const caseExtUpdates = await publicApi.kase.getExternalUpdates(caseNumber);
90
+ //
91
+ // dispatch({
92
+ // type: CaseDetailsConstants.updateState,
93
+ // payload: { caseExternalTrackersUpdate: getApiResourceObject(caseExtUpdates) },
94
+ // });
95
+ // } catch (e) {
96
+ // dispatch({
97
+ // type: CaseDetailsConstants.updateState,
98
+ // payload: { caseExternalTrackersUpdate: getApiResourceObject([], false, true, e.message) },
99
+ // });
100
+ // }
101
+ // };
102
+ export const fetchExternalTrackers = (_dispatch, _caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
103
+ // no-op stub until External Trackers has a functioning GraphQL endpoint
90
104
  });
91
- export const fetchCaseEscalations = (dispatch_1, caseNumber_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, accountNumber_1, ...args_1], void 0, function* (dispatch, caseNumber, accountNumber, setLoading = true) {
105
+ export const fetchCaseEscalations = (dispatch_1, parentId_1, apolloClient_1, ...args_1) => __awaiter(void 0, [dispatch_1, parentId_1, apolloClient_1, ...args_1], void 0, function* (dispatch, parentId, apolloClient, setLoading = true, includeSecureSupport = false) {
106
+ var _a, _b, _c, _d;
92
107
  try {
93
108
  setLoading &&
94
109
  dispatch({
95
110
  type: CaseDetailsConstants.updateState,
96
111
  payload: { caseEscalations: getApiResourceObject([], setLoading) },
97
112
  });
98
- const res = yield escalations.getEscalations({ caseNumber, accountNumber });
99
- const caseEscalations = without((res || []).filter((item) => item.escalationSource === 'RME Escalation'), null, undefined);
113
+ const { data } = yield apolloClient.query({
114
+ query: GET_ESCALATION_DETAILS,
115
+ variables: {
116
+ where: {
117
+ and: [{ ParentId: { eq: parentId } }, buildAccessRestrictionExclusionFilter(includeSecureSupport)],
118
+ },
119
+ },
120
+ });
121
+ const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportCase) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
122
+ const caseEscalations = edges.map(({ node }) => {
123
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
124
+ return ({
125
+ name: (_b = (_a = node.CaseNumber__c) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '',
126
+ subject: (_d = (_c = node.Subject) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : '',
127
+ status: (_f = (_e = node.Status) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : '',
128
+ owner: (_j = (_h = (_g = node.Owner) === null || _g === void 0 ? void 0 : _g.Name) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : '',
129
+ escalationSource: 'RME Escalation',
130
+ });
131
+ });
100
132
  dispatch({
101
133
  type: CaseDetailsConstants.updateState,
102
134
  payload: { caseEscalations: getApiResourceObject(caseEscalations, false) },
@@ -1,16 +1,15 @@
1
- import { ICaseChat, ICaseComment, IExternalTrackerUpdate } from '@cee-eng/hydrajs/@types/api/public/case';
1
+ import { ICaseChat, ICaseComment } from '@cee-eng/hydrajs/@types/api/public/case';
2
2
  import { ICommentFeedback } from '@cee-eng/hydrajs/@types/api/public/commentFeedback';
3
3
  import { IAttachment } from '@cee-eng/hydrajs/@types/models/attachment';
4
4
  import { IAction } from '@rh-support/types/shared';
5
- import { CaseReducerDispatchType } from './CaseConstNTypes';
5
+ import { ApolloQueryClient } from '@rh-support/utils';
6
6
  type IActionType = IAction<DiscussionsConstants, IDiscussionState>;
7
7
  export type DiscussionsReducerDispatchType = (value: IActionType) => void;
8
8
  export interface IDiscussion {
9
- item: Partial<ICaseComment | IAttachment | ICaseChat | IExternalTrackerUpdate>;
9
+ item: Partial<ICaseComment | IAttachment | ICaseChat>;
10
10
  last_modified_date: string;
11
11
  discussionType: string;
12
12
  feedback?: number;
13
- feedbackReason?: string;
14
13
  }
15
14
  export declare enum DiscussionType {
16
15
  COMMENT = "comment",
@@ -35,9 +34,10 @@ export declare const initDiscussionFiltersListState: IFilter[];
35
34
  export interface IDiscussionState {
36
35
  sort: ISort;
37
36
  allDiscussions: IDiscussion[];
38
- replyCommentText: string;
39
- replyCommentCreator: string;
40
37
  discussionFiltersListState: IFilter[];
38
+ replyingToAuthor: string | null;
39
+ replyingToCommentId: string | null;
40
+ replyingToTimestamp: string | null;
41
41
  }
42
42
  export declare const initialDiscussionState: IDiscussionState;
43
43
  export declare enum DiscussionsConstants {
@@ -45,14 +45,13 @@ export declare enum DiscussionsConstants {
45
45
  }
46
46
  export declare const discussionReducer: (state: IDiscussionState, action: IActionType) => IDiscussionState;
47
47
  export declare const setSort: (dispatch: DiscussionsReducerDispatchType, sort: ISort, allDiscussions: IDiscussion[]) => void;
48
+ export declare const setReplyingTo: (dispatch: DiscussionsReducerDispatchType, author: string, commentId: string, timestamp: string) => void;
49
+ export declare const clearReplyingTo: (dispatch: DiscussionsReducerDispatchType) => void;
48
50
  export declare const setFilter: (dispatch: DiscussionsReducerDispatchType, selected: string[], discussionFiltersListState: IFilter[]) => void;
49
- export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<IExternalTrackerUpdate[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
51
+ export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<unknown[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
50
52
  export declare const updateAttacmentsAfterRemoval: (dispatch: DiscussionsReducerDispatchType, uuid_removed: string, allDiscussions: IDiscussion[], discussionFiltersListState: IFilter[]) => void;
51
- export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[], feedbackReason?: string) => Promise<void>;
53
+ export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[]) => Promise<void>;
52
54
  export declare const updateAttachment: (dispatch: DiscussionsReducerDispatchType, uuid: string, newAttachment: any, allDiscussions: IDiscussion[]) => void;
53
- export declare const updateDiscussionStateComments: (dispatch: DiscussionsReducerDispatchType, caseDispatch: CaseReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, feedbacks: ICommentFeedback[], discussionFiltersListState: IFilter[]) => Promise<void>;
54
- export declare const updateDiscussionStateAttachments: (dispatch: DiscussionsReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, isSecureSupport: boolean, discussionFiltersListState: IFilter[], dispatchCaseDetailsHydraAttachments: any) => Promise<void>;
55
- export declare const setCommentText: (dispatch: DiscussionsReducerDispatchType, replyCommentText: string, replyCommentCreator: string) => void;
56
- export declare const clearReplyComment: (dispatch: DiscussionsReducerDispatchType) => void;
55
+ export declare const updateDiscussionStateAttachments: (dispatch: DiscussionsReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, discussionFiltersListState: IFilter[], dispatchCaseDetailsHydraAttachments: any, apolloClient: ApolloQueryClient, caseSalesforceId?: string, includeSecureSupport?: boolean) => Promise<void>;
57
56
  export {};
58
57
  //# sourceMappingURL=CaseDiscussionTabReducer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDiscussionTabReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDiscussionTabReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAOnD,OAAO,EAAwB,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAGlF,KAAK,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;AACnE,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1E,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,OAAO,CAAC,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,sBAAsB,CAAC,CAAC;IAC/E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,oBAAY,cAAc;IACtB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,gBAAgB,oBA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,gBAAgB,WAAW,EAAE,SAUhC,CAAC;AAEF,eAAO,MAAM,gCAAgC,GACzC,UAAU,8BAA8B,EACxC,YAAY,MAAM,EAClB,gBAAgB,WAAW,EAAE,EAC7B,MAAM,KAAK,EACX,4BAA4B,OAAO,EAAE,EACrC,wCAAmC,EACnC,cAAc,iBAAiB,EAC/B,mBAAmB,MAAM,EACzB,8BAA4B,kBAoD/B,CAAC"}
@@ -7,13 +7,11 @@ 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 { kase, publicApi } from '@cee-eng/hydrajs';
11
- import { getApiResourceObject } from '@rh-support/utils';
10
+ import { fetchCaseAttachmentsViaGraphQLWithRetry, fetchCaseDetailsByCaseNumber, getApiResourceObject, mergeAttachmentsByUuid, } from '@rh-support/utils';
12
11
  import filter from 'lodash/filter';
13
12
  import findIndex from 'lodash/findIndex';
14
13
  import isEqual from 'lodash/isEqual';
15
14
  import orderBy from 'lodash/orderBy';
16
- import { CaseReducerConstants } from './CaseConstNTypes';
17
15
  import { CaseDetailsConstants } from './CaseDetailsPageReducer';
18
16
  export var DiscussionType;
19
17
  (function (DiscussionType) {
@@ -62,20 +60,22 @@ export const initDiscussionFiltersListState = [
62
60
  isSelected: true,
63
61
  canSee: false,
64
62
  },
65
- {
66
- filterLabel: 'External Tracker',
67
- value: DiscussionType.EXTERNAL_TRACKER,
68
- isDisabled: false,
69
- isSelected: true,
70
- canSee: false,
71
- },
63
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
64
+ // {
65
+ // filterLabel: 'External Tracker',
66
+ // value: DiscussionType.EXTERNAL_TRACKER,
67
+ // isDisabled: false,
68
+ // isSelected: true,
69
+ // canSee: false,
70
+ // },
72
71
  ];
73
72
  export const initialDiscussionState = {
74
73
  sort: discussionSortOrderConst[0],
75
74
  allDiscussions: [],
76
- replyCommentText: '',
77
- replyCommentCreator: '',
78
75
  discussionFiltersListState: initDiscussionFiltersListState,
76
+ replyingToAuthor: null,
77
+ replyingToCommentId: null,
78
+ replyingToTimestamp: null,
79
79
  };
80
80
  export var DiscussionsConstants;
81
81
  (function (DiscussionsConstants) {
@@ -98,6 +98,18 @@ export const setSort = (dispatch, sort, allDiscussions) => {
98
98
  payload: { sort, allDiscussions: sortedDiscussions },
99
99
  });
100
100
  };
101
+ export const setReplyingTo = (dispatch, author, commentId, timestamp) => {
102
+ dispatch({
103
+ type: DiscussionsConstants.updateDiscussionState,
104
+ payload: { replyingToAuthor: author, replyingToCommentId: commentId, replyingToTimestamp: timestamp },
105
+ });
106
+ };
107
+ export const clearReplyingTo = (dispatch) => {
108
+ dispatch({
109
+ type: DiscussionsConstants.updateDiscussionState,
110
+ payload: { replyingToAuthor: null, replyingToCommentId: null, replyingToTimestamp: null },
111
+ });
112
+ };
101
113
  export const setFilter = (dispatch, selected, discussionFiltersListState) => {
102
114
  const prevSelectedListLength = discussionFiltersListState.filter((filter) => filter.isSelected).length;
103
115
  if (selected.length > prevSelectedListLength &&
@@ -117,11 +129,13 @@ const commputeFeedback = (commentId, feedbacks) => {
117
129
  const feedback = feedbacks.filter((feedback) => feedback.commentId === commentId);
118
130
  return feedback.length === 0 ? undefined : parseInt(feedback[0].feedback);
119
131
  };
120
- const computeFeedbackReason = (commentId, feedbacks) => {
121
- const feedback = (feedbacks || []).find((item) => item.commentId === commentId);
122
- return feedback === null || feedback === void 0 ? void 0 : feedback.feedbackReason;
123
- };
124
- export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks, trackerUpdates, discussionFiltersListState, canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
132
+ export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks,
133
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
134
+ // trackerUpdates: Partial<IExternalTrackerUpdate[]>,
135
+ trackerUpdates, discussionFiltersListState,
136
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
137
+ // canSeeExternalTracker: boolean,
138
+ canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
125
139
  // set all discussions state
126
140
  // we need to transform discussions item because:
127
141
  // - last_modified_date is needed for sort and field name is different in different discussion types
@@ -138,19 +152,25 @@ export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks
138
152
  discussionType: DiscussionType.COMMENT,
139
153
  last_modified_date: comment.lastModifiedDate || comment.createdDate,
140
154
  feedback: commputeFeedback(comment.id, feedbacks),
141
- feedbackReason: computeFeedbackReason(comment.id, feedbacks),
142
- }));
143
- const allExternalTrackers = (trackerUpdates || []).map((externalUpdate) => ({
144
- item: Object.assign(Object.assign({}, externalUpdate), { originating_system_last_updated_at: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate }),
145
- last_modified_date: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
146
- discussionType: DiscussionType.EXTERNAL_TRACKER,
147
155
  }));
156
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
157
+ // const allExternalTrackers: IDiscussion[] = (trackerUpdates || []).map((externalUpdate) => ({
158
+ // item: {
159
+ // ...externalUpdate,
160
+ // originating_system_last_updated_at:
161
+ // externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
162
+ // },
163
+ // last_modified_date: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
164
+ // discussionType: DiscussionType.EXTERNAL_TRACKER,
165
+ // }));
148
166
  const allAttachments = attachments.map((attachment) => ({
149
167
  item: Object.assign(Object.assign({}, attachment), { lastModifiedDate: attachment.lastModifiedDate || attachment.createdDate }),
150
168
  last_modified_date: attachment.lastModifiedDate || attachment.createdDate,
151
169
  discussionType: DiscussionType.ATTACHMENT,
152
170
  }));
153
- const allDiscussions = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
171
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
172
+ // const allDiscussions: IDiscussion[] = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
173
+ const allDiscussions = [...allComments, ...allChats, ...allAttachments];
154
174
  const sortedAllDiscussions = orderBy(allDiscussions, 'last_modified_date', 'desc');
155
175
  //set filter dropdown state
156
176
  // when we don't have any result for a discussion type, in filter options dropdown list, we make that type disable
@@ -162,10 +182,10 @@ export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks
162
182
  else if (filter.value === DiscussionType.CHAT) {
163
183
  filter.isDisabled = allChats.length === 0 ? true : false;
164
184
  filter.canSee = canSeeChat;
165
- }
166
- else if (filter.value === DiscussionType.EXTERNAL_TRACKER) {
167
- filter.isDisabled = allExternalTrackers.length === 0 ? true : false;
168
- filter.canSee = canSeeExternalTracker;
185
+ // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
186
+ // } else if (filter.value === DiscussionType.EXTERNAL_TRACKER) {
187
+ // filter.isDisabled = allExternalTrackers.length === 0 ? true : false;
188
+ // filter.canSee = canSeeExternalTracker;
169
189
  }
170
190
  else if (filter.value === DiscussionType.COMMENT) {
171
191
  filter.isDisabled = allComments.length === 0 ? true : false;
@@ -198,13 +218,10 @@ export const updateAttacmentsAfterRemoval = (dispatch, uuid_removed, allDiscussi
198
218
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
199
219
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions } });
200
220
  };
201
- export const updateCommentStateFeedback = (dispatch, comment_id, newFeedback, allDiscussions, feedbackReason) => __awaiter(void 0, void 0, void 0, function* () {
221
+ export const updateCommentStateFeedback = (dispatch, comment_id, newFeedback, allDiscussions) => __awaiter(void 0, void 0, void 0, function* () {
202
222
  const updateDiscussions = allDiscussions.map((discussion) => {
203
223
  if (discussion.discussionType === DiscussionType.COMMENT && discussion.item.id === comment_id) {
204
224
  discussion.feedback = newFeedback;
205
- if (feedbackReason !== undefined) {
206
- discussion.feedbackReason = feedbackReason;
207
- }
208
225
  }
209
226
  return discussion;
210
227
  });
@@ -219,36 +236,21 @@ export const updateAttachment = (dispatch, uuid, newAttachment, allDiscussions)
219
236
  });
220
237
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions: updatedDiscussions } });
221
238
  };
222
- export const updateDiscussionStateComments = (dispatch, caseDispatch, caseNumber, allDiscussions, sort, feedbacks, discussionFiltersListState) => __awaiter(void 0, void 0, void 0, function* () {
239
+ export const updateDiscussionStateAttachments = (dispatch_1, caseNumber_1, allDiscussions_1, sort_1, discussionFiltersListState_1, dispatchCaseDetailsHydraAttachments_1, apolloClient_1, caseSalesforceId_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, allDiscussions_1, sort_1, discussionFiltersListState_1, dispatchCaseDetailsHydraAttachments_1, apolloClient_1, caseSalesforceId_1, ...args_1], void 0, function* (dispatch, caseNumber, allDiscussions, sort, discussionFiltersListState, dispatchCaseDetailsHydraAttachments, apolloClient, caseSalesforceId, includeSecureSupport = false) {
223
240
  try {
224
- const comments = yield publicApi.kase.getComments(caseNumber);
225
- const allComments = (comments || [])
226
- .filter((comment) => comment.isDraft === false)
227
- .map((comment) => ({
228
- item: Object.assign(Object.assign({}, comment), { isPublic: comment.isPublic === undefined ? true : comment.isPublic, last_modified_date: comment.lastModifiedDate || comment.createdDate }),
229
- discussionType: DiscussionType.COMMENT,
230
- last_modified_date: comment.lastModifiedDate || comment.createdDate,
231
- feedback: commputeFeedback(comment.id, feedbacks),
232
- feedbackReason: computeFeedbackReason(comment.id, feedbacks),
233
- }));
234
- const filteredDiscussion = filter([...allDiscussions], (o) => o.discussionType !== DiscussionType.COMMENT);
235
- const updatedDiscussions = orderBy([...filteredDiscussion, ...allComments], 'last_modified_date', sort.sortOrder);
236
- discussionFiltersListState.forEach((filter) => {
237
- if (filter.value === DiscussionType.COMMENT) {
238
- filter.isDisabled = false;
239
- }
240
- });
241
- dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
242
- dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions: updatedDiscussions } });
243
- caseDispatch({ type: CaseReducerConstants.updateComments, payload: { caseDetails: { comments } } });
244
- }
245
- catch (e) {
246
- console.log(e);
247
- }
248
- });
249
- export const updateDiscussionStateAttachments = (dispatch, caseNumber, allDiscussions, sort, isSecureSupport, discussionFiltersListState, dispatchCaseDetailsHydraAttachments) => __awaiter(void 0, void 0, void 0, function* () {
250
- try {
251
- const attachments = yield kase.getAttachments(caseNumber, false, isSecureSupport);
241
+ let resolvedCaseSalesforceId = caseSalesforceId;
242
+ if (!resolvedCaseSalesforceId) {
243
+ const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
244
+ resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
245
+ }
246
+ if (!resolvedCaseSalesforceId) {
247
+ throw new Error('Missing Salesforce case id');
248
+ }
249
+ const existingAttachments = filter(allDiscussions, (o) => o.discussionType === DiscussionType.ATTACHMENT).map((discussion) => discussion.item);
250
+ const fetchedAttachments = yield fetchCaseAttachmentsViaGraphQLWithRetry(apolloClient, caseNumber, resolvedCaseSalesforceId,
251
+ // After a successful upload batch we expect at least one new attachment beyond what discussion already shows
252
+ { minExpectedCount: existingAttachments.length + 1 });
253
+ const attachments = mergeAttachmentsByUuid(existingAttachments, fetchedAttachments);
252
254
  const allAttachments = attachments.map((attachment) => ({
253
255
  item: Object.assign(Object.assign({}, attachment), { lastModifiedDate: attachment.lastModifiedDate || attachment.createdDate }),
254
256
  last_modified_date: attachment.lastModifiedDate || attachment.createdDate,
@@ -272,12 +274,3 @@ export const updateDiscussionStateAttachments = (dispatch, caseNumber, allDiscus
272
274
  console.log(e);
273
275
  }
274
276
  });
275
- export const setCommentText = (dispatch, replyCommentText, replyCommentCreator) => {
276
- dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { replyCommentText, replyCommentCreator } });
277
- };
278
- export const clearReplyComment = (dispatch) => {
279
- dispatch({
280
- type: DiscussionsConstants.updateDiscussionState,
281
- payload: { replyCommentText: '', replyCommentCreator: '' },
282
- });
283
- };
@@ -6,7 +6,7 @@ import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
6
6
  import { IApiResponseDetails } from '@rh-support/types/shared';
7
7
  import { UserAuth } from '@rh-support/user-permissions';
8
8
  import React from 'react';
9
- import { ICaseState } from './CaseConstNTypes';
9
+ import { ICaseState, IGraphQLCasePayload } from './CaseConstNTypes';
10
10
  export declare const getCaseRecommendations: (docs: ISolrRecommendation[], oldDocs: any) => any[];
11
11
  export declare const getCepCommentFromCepDetails: (cepDetails: ICepDetails) => string;
12
12
  export declare const getRecommendationObject: (doc: ISolrRecommendation, index: number) => ICaseResourceLink;
@@ -17,10 +17,20 @@ export declare const getNewSeverityStringDef: (severity: string) => string | Rea
17
17
  export declare const getOrtForSLAAndSeverity: (slaProcessId: string, severity: string) => string;
18
18
  export declare const getSeverityDescription: (severity: string) => string;
19
19
  export declare const isClusterIDValid: (caseState: any, allProducts: any) => boolean;
20
+ export interface ICaseGroupUiState {
21
+ groupsLoaded: boolean;
22
+ hasGroups: boolean;
23
+ isGroupMandatory: boolean;
24
+ shouldHideSelector: boolean;
25
+ isNoGroupsBlockedState: boolean;
26
+ }
27
+ export declare const getCaseGroupUiState: (caseState: ICaseState) => ICaseGroupUiState;
28
+ export declare const isCaseGroupSelectionValid: (caseState: ICaseState) => boolean;
20
29
  export declare const isCaseStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
21
30
  export declare const isIdeaCaseStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
22
31
  export declare const isCaseManagementStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
23
32
  export declare const isCaseInformationSectionValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
33
+ export declare const createCasePayloadGraphQL: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean, traditionalSupportAgreed?: boolean) => IGraphQLCasePayload;
24
34
  export declare const createCasePayload: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => Partial<ICasePayload>;
25
35
  export declare const getProcessedEntitlements: (caseEntitlements: IEntitlement[]) => IEntitlement[];
26
36
  export declare const getHasInvalidEntitlements: (caseEntitlements: IEntitlement[]) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAexD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAOH,UAAU,EAkBb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,GAAI,MAAM,mBAAmB,EAAE,EAAE,YAAO,UAM1E,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,YAAY,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,KAAK,mBAAmB,EAAE,OAAO,MAAM,sBAyB9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,GAC9B,OAAO,MAAM,EACb,cAAc,MAAM,EACpB,qBAAqB,MAAM,EAC3B,uBAAuB,MAAM,EAC7B,gBAAgB,MAAM,EACtB,UAAU,MAAM,EAChB,UAAU,MAAM,KACjB,MAyBF,CAAC;AA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