@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,37 +7,108 @@ 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 { caseAttachments, sessionAttachments } from '@cee-eng/hydrajs';
10
+ import { useApolloClient } from '@apollo/client/react';
11
+ import { sessionAttachments } from '@cee-eng/hydrajs';
11
12
  import { useFetch, usePrevious } from '@rh-support/components';
12
13
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
- import { getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
14
+ import { deleteCaseAttachment, fetchCaseDetailsByCaseNumber, getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE, } from '@rh-support/utils';
14
15
  import debounce from 'lodash/debounce';
15
16
  import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
16
17
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
17
18
  import { SESSION_REFERRER_URL_LIMIT } from '../../../reducers/CaseConstNTypes';
18
19
  import { getSessionDetailsFromCase } from '../../../reducers/CaseHelpers';
19
20
  import { createSession } from '../../../reducers/SessionRestoreReducer';
20
- import { doSosReportAnalysisForFile, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
21
- import { onFileEdit, onFileRemove, UploadStatusConstants } from './reducer/AttachmentReducer';
21
+ import { doSosReportAnalysisForFile, hasSomeSelectedFiles, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
22
+ import { onFileEdit, onFileRemove, resetAttachment, UploadStatusConstants, } from './reducer/AttachmentReducer';
22
23
  import { AttachmentDispatchContext, AttachmentStateContext } from './reducer/AttachmentReducerContext';
24
+ /** Wait for staggered onDrop dispatches before auto-uploading. */
25
+ const AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS = 300;
23
26
  export function useFileUploader(props) {
27
+ var _a;
24
28
  const { attachmentState, attachmentState: { caseFiles }, } = useContext(AttachmentStateContext);
25
29
  const dispatch = useContext(AttachmentDispatchContext);
30
+ const apolloClient = useApolloClient();
31
+ const caseSalesforceIdRef = useRef();
26
32
  const { request: deleteSessionAttachment } = useFetch(sessionAttachments.deleteSesionAttachment);
27
- const { request: deleteCaseAttachment } = useFetch(caseAttachments.deleteAttachment);
28
- const { idToUploadTo, needsAnalyzing, isSecureSupport, isSessionId, autoUploadOnSelect, onUploadClick } = props;
29
- const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
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);
30
41
  const { sessionRestore } = useContext(SessionRestoreStateContext);
31
42
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
32
43
  const checkForS3SlowUploads = getConfigField(pcmConfig.data, 'checkForS3SlowUploads', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
33
44
  const useBrowserAPIForDetection = getConfigField(pcmConfig.data, 'useBrowserAPIForSpeedDetection', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
34
- const slowUploadConfig = {
45
+ const slowUploadConfig = useMemo(() => ({
35
46
  checkForS3SlowUploads,
36
47
  useBrowserAPIForDetection,
37
- };
48
+ }), [checkForS3SlowUploads, useBrowserAPIForDetection]);
38
49
  const isInitialMountRef = useRef(true);
39
50
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
40
51
  const prevSelectedFiles = usePrevious(selectedLocalFiles);
52
+ const resolveCaseSalesforceId = useCallback(() => __awaiter(this, void 0, void 0, function* () {
53
+ var _a;
54
+ if (caseSalesforceIdRef.current || isSessionId || !idToUploadTo || !apolloClient) {
55
+ return;
56
+ }
57
+ try {
58
+ 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));
59
+ caseSalesforceIdRef.current = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
60
+ }
61
+ catch (_b) {
62
+ caseSalesforceIdRef.current = undefined;
63
+ }
64
+ }), [apolloClient, idToUploadTo, isSessionId, (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport]);
65
+ const onUploadAll = useCallback((event) => __awaiter(this, void 0, void 0, function* () {
66
+ onUploadClick && onUploadClick();
67
+ yield resolveCaseSalesforceId();
68
+ // on truobleshoot flow, user can upload a file while no data has added therefore no sessionId is available
69
+ let sessionId = '';
70
+ if (!idToUploadTo) {
71
+ const userAgent = getUserAgentForCaseMode(true);
72
+ const session = {
73
+ userAgent,
74
+ originatingSystem: userAgent,
75
+ referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
76
+ isInternal: loggedInUserRights.data.isInternal(),
77
+ };
78
+ if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
79
+ sessionId = yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase({}, []), session);
80
+ }
81
+ }
82
+ uploadAllFiles({
83
+ dispatch,
84
+ idToUploadTo: idToUploadTo || sessionId,
85
+ caseFiles,
86
+ needsAnalyzing,
87
+ isSessionId,
88
+ slowUploadConfig,
89
+ apolloClient: !isSessionId ? apolloClient : undefined,
90
+ caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
91
+ onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
92
+ });
93
+ }), [
94
+ apolloClient,
95
+ caseFiles,
96
+ dispatch,
97
+ idToUploadTo,
98
+ isSessionId,
99
+ loggedInUserRights.data,
100
+ needsAnalyzing,
101
+ onCaseFileUploaded,
102
+ onUploadClick,
103
+ referrerUrl,
104
+ resolveCaseSalesforceId,
105
+ sessionRestore.sessionCreationStatus.isCreating,
106
+ sessionRestore.sessionCreationStatus.isError,
107
+ sessionRestoreDispatch,
108
+ slowUploadConfig,
109
+ ]);
110
+ const debouncedAutoUploadOnSelect = useMemo(() => debounce(() => void onUploadAll(), AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS), [onUploadAll]);
111
+ useEffect(() => () => debouncedAutoUploadOnSelect.cancel(), [debouncedAutoUploadOnSelect]);
41
112
  useEffect(() => {
42
113
  if (isInitialMountRef.current) {
43
114
  isInitialMountRef.current = false;
@@ -47,19 +118,18 @@ export function useFileUploader(props) {
47
118
  prevSelectedFiles &&
48
119
  selectedLocalFiles &&
49
120
  selectedLocalFiles.length > prevSelectedFiles.length) {
50
- onUploadAll();
121
+ debouncedAutoUploadOnSelect();
51
122
  }
52
- // eslint-disable-next-line react-hooks/exhaustive-deps
53
- }, [selectedLocalFiles]);
123
+ }, [autoUploadOnSelect, debouncedAutoUploadOnSelect, prevSelectedFiles, selectedLocalFiles]);
54
124
  const updateSessionAttachmentMetadata = useCallback((file, changes) => __awaiter(this, void 0, void 0, function* () {
55
125
  sessionAttachments.updateSessionAttachmentMetadata(idToUploadTo, [Object.assign({ id: file.attachmentId }, changes)]);
56
126
  }), [idToUploadTo]);
57
127
  const debounceSessionMetadataUpdate = useMemo(() => debounce(updateSessionAttachmentMetadata, 800), [updateSessionAttachmentMetadata]);
58
- const onRetryLocal = (indexToRetry) => {
128
+ const onRetryLocal = (indexToRetry) => __awaiter(this, void 0, void 0, function* () {
59
129
  if (idToUploadTo && attachmentState.caseFiles.selectedLocalFiles[indexToRetry]) {
60
- onUploadFile(indexToRetry);
130
+ yield onUploadFile(indexToRetry);
61
131
  }
62
- };
132
+ });
63
133
  const onRetryAnalysis = (indexToRetry) => {
64
134
  const file = attachmentState.caseFiles.selectedLocalFiles[indexToRetry];
65
135
  if (idToUploadTo && file && file.attachmentId) {
@@ -75,59 +145,58 @@ export function useFileUploader(props) {
75
145
  debounceSessionMetadataUpdate(editedLocalFile, changes);
76
146
  });
77
147
  const onFileRemoveLocal = (fileIndexToRemove, file) => __awaiter(this, void 0, void 0, function* () {
148
+ var _a, _b, _c;
149
+ // Stop in-flight S3 transfer if Remove is used while upload/verify is still active
150
+ (_b = (_a = file.uploadProgress).onAbort) === null || _b === void 0 ? void 0 : _b.call(_a, fileIndexToRemove);
151
+ const attachmentIdToDelete = file.attachmentId || ((_c = file.uploadProgress.multipartResumeState) === null || _c === void 0 ? void 0 : _c.attachmentId);
78
152
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
79
- if (!isUploadingAttachment(selectedLocalFiles) && !isAnalysingAnyAttachment(selectedLocalFiles)) {
153
+ const isBusy = isUploadingAttachment(selectedLocalFiles) || isAnalysingAnyAttachment(selectedLocalFiles);
154
+ let nextLocalFiles;
155
+ if (!isBusy) {
80
156
  onFileRemove(dispatch, fileIndexToRemove);
157
+ nextLocalFiles = selectedLocalFiles.filter((_, index) => index !== fileIndexToRemove);
81
158
  }
82
159
  else {
83
160
  updateUploadMetadata(dispatch, fileIndexToRemove, {
84
161
  uploadStatus: UploadStatusConstants.deleted,
162
+ onAbort: undefined,
85
163
  });
164
+ nextLocalFiles = selectedLocalFiles.map((localFile, index) => index === fileIndexToRemove
165
+ ? Object.assign(Object.assign({}, localFile), { uploadProgress: Object.assign(Object.assign({}, localFile.uploadProgress), { uploadStatus: UploadStatusConstants.deleted, onAbort: undefined }) }) : localFile);
86
166
  }
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);
167
+ // Drop soft-deleted stubs so "Uploading attachment(s)" / Upload new file do not linger
168
+ if (!hasSomeSelectedFiles(nextLocalFiles)) {
169
+ resetAttachment(dispatch);
170
+ }
171
+ if (attachmentIdToDelete && isSessionId && isUploadedSuccessfully(file)) {
172
+ deleteSessionAttachment(idToUploadTo, attachmentIdToDelete);
173
+ }
174
+ // Abort/fail after Hydra init still has an attachmentId clean up SFDC "In Progress" on Remove only
175
+ if (attachmentIdToDelete && !isSessionId) {
176
+ try {
177
+ yield deleteCaseAttachmentRequest(idToUploadTo, attachmentIdToDelete);
178
+ }
179
+ catch (_d) {
180
+ // Best-effort: row is already removed from the PCM queue
106
181
  }
107
182
  }
108
- uploadAllFiles({
109
- dispatch,
110
- idToUploadTo: idToUploadTo || sessionId,
111
- caseFiles,
112
- isSecureSupport,
113
- needsAnalyzing,
114
- isSessionId,
115
- slowUploadConfig,
116
- });
117
183
  });
118
- const onUploadFile = (fileIndex) => {
184
+ const onUploadFile = (fileIndex) => __awaiter(this, void 0, void 0, function* () {
185
+ yield resolveCaseSalesforceId();
119
186
  uploadFile({
120
187
  dispatch,
121
188
  idToUploadTo,
122
189
  localFile: attachmentState.caseFiles.selectedLocalFiles[fileIndex],
123
190
  originalFile: attachmentState.caseFiles.selectedOriginalFiles[fileIndex],
124
191
  index: fileIndex,
125
- isSecureSupport,
126
192
  needsAnalyzing,
127
193
  isSessionId,
128
194
  slowUploadConfig,
195
+ apolloClient: !isSessionId ? apolloClient : undefined,
196
+ caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
197
+ onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
129
198
  });
130
- };
199
+ });
131
200
  return {
132
201
  retryUpload: onRetryLocal,
133
202
  editFile: onFileEditLocal,
@@ -1 +1 @@
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
+ {"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,18 +1,7 @@
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';
11
1
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
- import find from 'lodash/find';
13
2
  import isEmpty from 'lodash/isEmpty';
14
3
  import isEqual from 'lodash/isEqual';
15
- import React, { useContext, useEffect, useState } from 'react';
4
+ import React, { useContext, useEffect } from 'react';
16
5
  import { Trans } from 'react-i18next';
17
6
  import { useCaseSelector } from '../../context/CaseContext';
18
7
  import { RouteContext, useRouteDispatchContext } from '../../context/RouteContext';
@@ -24,9 +13,8 @@ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
24
13
  import { setNoValidEntitlement } from '../../reducers/RouteReducer';
25
14
  import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
26
15
  export function useIsSectionValid(sectionName) {
27
- var _a, _b;
28
16
  const { isVariationA } = useAB();
29
- const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ssoUsername, manageSupportCases, } = useCaseSelector((state) => ({
17
+ const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, manageSupportCases, } = useCaseSelector((state) => ({
30
18
  caseState: state,
31
19
  caseType: state.caseDetails.caseType,
32
20
  product: state.caseDetails.product,
@@ -42,35 +30,19 @@ export function useIsSectionValid(sectionName) {
42
30
  environment: state.caseDetails.environment,
43
31
  timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
44
32
  periodicityOfIssue: state.caseDetails.periodicityOfIssue,
45
- ssoUsername: state.selectedOwner.data.ssoUsername,
33
+ // ssoUsername: state.selectedOwner.data.ssoUsername,
46
34
  manageSupportCases: state.selectedOwner.data.manageSupportCases,
47
35
  }), isEqual);
48
36
  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
69
37
  const { routeState: { isCaseCreate }, } = useContext(RouteContext);
70
38
  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]);
71
44
  const { topContentState: { topContent }, } = useContext(TCStateContext);
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);
45
+ const { routeState: { activeSection }, } = useContext(RouteContext);
74
46
  const { attachmentState } = useContext(AttachmentStateContext);
75
47
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
76
48
  const allowedTypesIdea = ['image/jpeg', 'image/png', 'image/jpg', 'image/gif'];
@@ -111,8 +83,6 @@ export function useIsSectionValid(sectionName) {
111
83
  }
112
84
  return (!isEmpty(product) &&
113
85
  !isEmpty(version) &&
114
- !isEmpty(accountNumber) &&
115
- !isEmpty(contactSSOName) &&
116
86
  !isEmpty(summary) &&
117
87
  (summary === null || summary === void 0 ? void 0 : summary.length) <= TITLE_SUMMARY_LENGTH_LIMIT &&
118
88
  !isEmpty(issue) &&
@@ -129,30 +99,29 @@ export function useIsSectionValid(sectionName) {
129
99
  };
130
100
  const isResourcesSectionValid = () => {
131
101
  var _a;
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
102
+ // isEntitledProduct check removed product-level entitlement now resolved from SFDCProductJSON__c
135
103
  const clusterIdValid = isVariationA ? true : isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
136
- return isEntitledProductLocal && clusterIdValid;
104
+ return clusterIdValid;
137
105
  };
138
106
  const isReviewSectionValid = () => {
139
107
  var _a;
140
- return (isEntitledProduct &&
141
- isCaseStateValid(caseState, loggedInUserRights) &&
108
+ return (
109
+ // isEntitledProduct — product-level entitlement now resolved from SFDCProductJSON__c
110
+ isCaseStateValid(caseState, loggedInUserRights) &&
142
111
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
143
112
  isSummarizeSectionValid() &&
144
113
  isAdditionalInformationSectionValidLocal());
145
114
  };
146
115
  const isDescribeIdeaSectionValid = () => {
147
116
  return (isCaseManagementStateValid(caseState, loggedInUserRights) &&
148
- isEntitledProduct &&
117
+ // isEntitledProduct — product-level entitlement now resolved from SFDCProductJSON__c
149
118
  isIdeaCaseStateValid(caseState, loggedInUserRights) &&
150
119
  checkUnallowedFiles());
151
120
  };
152
121
  const isAdditionalInformationSectionValidLocal = () => {
153
122
  var _a;
154
123
  const hostnameIsValid = hostname ? (hostname === null || hostname === void 0 ? void 0 : hostname.length) <= HOSTNAME_LENGTH_LIMIT : true;
155
- return (!caseState.hasInvalidEntitlements &&
124
+ return (isEntitlement &&
156
125
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
157
126
  isCaseInformationSectionValid(caseState, loggedInUserRights) &&
158
127
  hostnameIsValid &&
@@ -185,16 +154,10 @@ export function useIsSectionValid(sectionName) {
185
154
  }
186
155
  };
187
156
  const recommendationSectionError = () => {
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.")) : ('');
157
+ // isEntitledProduct check removed — product-level entitlement now resolved from SFDCProductJSON__c
158
+ return '';
196
159
  };
197
- const getSupportSectionError = () => {
160
+ const getEntitlementSectionError = () => {
198
161
  if (manageSupportCases === false) {
199
162
  return (React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
200
163
  "You need additional access to manage cases.\u00A0 Please contact",
@@ -218,7 +181,9 @@ export function useIsSectionValid(sectionName) {
218
181
  case AppRouteSections.RESOURCES:
219
182
  return recommendationSectionError();
220
183
  case AppRouteSections.GET_SUPPORT:
221
- return getSupportSectionError();
184
+ case AppRouteSections.SUMMARIZE:
185
+ case AppRouteSections.TROUBLESHOOT:
186
+ return getEntitlementSectionError();
222
187
  default:
223
188
  return '';
224
189
  }
@@ -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;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"}
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"}
@@ -7,36 +7,24 @@ 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 { 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';
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';
16
14
  export function usePostComment({ caseNumber }) {
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)
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)
27
20
  return;
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;
21
+ yield createComment({
22
+ caseId: caseSalesforceId,
23
+ body: commentBody,
24
+ isPublic: true,
25
+ });
26
+ if (updateDiscussionState) {
27
+ yield client.refetchQueries({ include: [GET_CASE_COMMENTS] });
40
28
  }
41
29
  });
42
30
  return { postComment, isPostingComment };
@@ -16,4 +16,5 @@ 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>;
19
20
  //# 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,OAAO,MAAM,WAI5C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,WAI3C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,MAAM,wBAG7E,CAAC"}
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,OAAO,MAAM,WAI5C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,WAI3C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,MAAM,wBAG7E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,YAAY,MAAM,wBAIpF,CAAC"}
@@ -14,9 +14,9 @@ import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
14
14
  */
15
15
  export function getChangedValueTooltip(valueNameCb, accessor) {
16
16
  return (currentValue, previousValue) => (React.createElement(React.Fragment, null,
17
- React.createElement(Trans, null,
18
- valueNameCb(currentValue, previousValue),
19
- " changed from"),
17
+ React.createElement(Trans, { i18nKey: valueNameCb(currentValue, previousValue) }),
18
+ " ",
19
+ React.createElement(Trans, null, "changed from"),
20
20
  React.createElement("b", null,
21
21
  " ",
22
22
  accessor ? accessor(previousValue, currentValue) : previousValue,
@@ -59,3 +59,9 @@ export const getProductObj = (products, product) => {
59
59
  const productIndex = findIndex(products, (p) => p.product === product);
60
60
  return productIndex === -1 ? {} : products[productIndex];
61
61
  };
62
+ export const getProductObjById = (products, productId) => {
63
+ if (!productId)
64
+ return {};
65
+ const productIndex = findIndex(products, (p) => p.productId === productId);
66
+ return productIndex === -1 ? {} : products[productIndex];
67
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAgUtD"}
1
+ {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAiBvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAoetD"}