@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
@@ -143,7 +143,7 @@ function TroubleshootSection(props) {
143
143
  updateSession(sessionRestoreDispatch, activeSessionId, sessionDetails, newSession);
144
144
  }
145
145
  }
146
- // Enable Continue button when first chunk is received
146
+ // Enable "See more resources" button when first chunk is received
147
147
  if (eventData.eventName === ARHEventName.FirstMessageReceived) {
148
148
  aiResponseDispatch(setHasChunkReceived(true));
149
149
  }
@@ -355,7 +355,7 @@ function TroubleshootSection(props) {
355
355
  React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: isFunctionalCookieAccepted() &&
356
356
  props.aiServicesAvailable &&
357
357
  !aiResponseState.hasChunkReceived &&
358
- !aiResponseState.error }, t('Continue')))) : isCaseCreate ? (React.createElement("span", null,
358
+ !aiResponseState.error }, isFunctionalCookieAccepted() ? t('See more resources') : t('Continue')))) : isCaseCreate ? (React.createElement("span", null,
359
359
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
360
360
  span: React.createElement("span", { className: "return-to-case-text" }),
361
361
  button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: () => props.setIsAIChatMode(false) })),
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAgBxF,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAqlBxD"}
1
+ {"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAexF,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAwoBxD"}
@@ -7,11 +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 { publicApi } from '@cee-eng/hydrajs';
10
+ import { useApolloClient } from '@apollo/client/react';
11
11
  import { Button, Dropdown, DropdownItem, DropdownList, Flex, FlexItem, MenuToggle, Modal, ModalBody, ModalFooter, ModalHeader, Spinner, TextArea, } from '@patternfly/react-core';
12
- import { ToastNotification, useFetch } from '@rh-support/components';
12
+ import { ToastNotification } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
14
- import { autoEnableFtsOnCaseViewEditPage, isFtsEditableOnEditPage, isSev1, PreviousCaseTypes, severitySort, showFtsOnCreateCasePage, } from '@rh-support/utils';
14
+ import { autoEnableFtsOnCaseViewEditPage, isPremiumEntitlement, isSev1, PreviousCaseTypes, severitySort, showFtsOnCreateCasePage, } from '@rh-support/utils';
15
15
  import { isUndefined } from 'lodash';
16
16
  import find from 'lodash/find';
17
17
  import includes from 'lodash/includes';
@@ -21,13 +21,11 @@ import map from 'lodash/map';
21
21
  import React, { useContext, useEffect, useReducer, useRef, useState } from 'react';
22
22
  import { Trans, useTranslation } from 'react-i18next';
23
23
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
24
- import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
25
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
26
24
  import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
27
- import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
28
25
  import { getNewSeverityStringDef, getSeverityDescription } from '../../reducers/CaseHelpers';
29
26
  import { caseOverviewReducer, initialCaseViewState, setSeverityUpdating } from '../../reducers/CaseOverviewReducer';
30
- import { checkForCaseStatusToggleOnAttachOrComment, setCaseState, updateCaseDetails } from '../../reducers/CaseReducer';
27
+ import { checkForCaseStatusToggleOnAttachOrComment, setCaseState, updateCaseSeverityAndFtsGraphQL, } from '../../reducers/CaseReducer';
28
+ import { usePostComment } from '../shared/usePostComment';
31
29
  export default function UpdateSeverityModal(props) {
32
30
  const { show, onClose, isDisabled, isFetching } = props;
33
31
  const { t } = useTranslation();
@@ -40,12 +38,7 @@ export default function UpdateSeverityModal(props) {
40
38
  const [isUpdateClickedToShowError, setIsUpdateClickedToShowError] = useState(false);
41
39
  const [isSeverityInValid, setIsSeverityInValid] = useState(false);
42
40
  const [seviritiesOptions, setSeveritiesOptions] = useState([]);
43
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
44
- propgateErrors: true,
45
- });
46
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
47
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
48
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
41
+ const client = useApolloClient();
49
42
  const { globalMetadataState: { allCaseSeverities, allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
50
43
  const caseState = useCaseSelector((state) => ({
51
44
  caseDetails: {
@@ -61,19 +54,30 @@ export default function UpdateSeverityModal(props) {
61
54
  phoneCountryCode: state.caseDetails.phoneCountryCode,
62
55
  phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
63
56
  },
57
+ existingCaseDetails: state.caseDetails,
64
58
  isCaseUpdating: state.isCaseUpdating,
65
59
  versionsDetails: state.versionsDetails,
66
60
  ownersEntitlements: state.ownersEntitlements,
67
61
  ftsContactSameAsOwner: state.ftsContactSameAsOwner,
68
62
  }), isEqual);
69
- const { caseDetails, isCaseUpdating, ownersEntitlements, versionsDetails, ftsContactSameAsOwner } = caseState;
63
+ const { postComment, isPostingComment } = usePostComment({
64
+ caseNumber: caseState.caseDetails.caseNumber,
65
+ });
66
+ const { caseDetails, existingCaseDetails, isCaseUpdating, ownersEntitlements, versionsDetails, ftsContactSameAsOwner, } = caseState;
70
67
  const { entitlementSla, fts, contactInfo24x7, caseType, phoneAreaCodePrefixLineNumber, phoneCountryCode } = caseDetails;
71
68
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
72
69
  const [currentSeverity, setCurrentSeverity] = useState(caseDetails.caseSeverity);
70
+ const updateSeverityViaGraphQL = (payload) => __awaiter(this, void 0, void 0, function* () {
71
+ var _a, _b;
72
+ yield updateCaseSeverityAndFtsGraphQL(caseDispatch, client, caseDetails.caseNumber, payload, (_b = (_a = payload.severity) !== null && _a !== void 0 ? _a : currentSeverity) !== null && _b !== void 0 ? _b : caseDetails.caseSeverity, { existingCaseDetails });
73
+ });
73
74
  const [localFtsContact, setLocalFtsContact] = useState(contactInfo24x7 || '');
74
75
  const [localFts, setLocalFts] = useState(isUndefined(fts) ? true : fts);
75
76
  const initialContactSameAsOwnerRef = useRef(ftsContactSameAsOwner !== null && ftsContactSameAsOwner !== void 0 ? ftsContactSameAsOwner : false);
76
- const isFtsEditable = isFtsEditableOnEditPage(entitlementSla, currentSeverity);
77
+ const hasPremiumSla = isPremiumEntitlement(entitlementSla || '');
78
+ const severityForFts = String(currentSeverity !== null && currentSeverity !== void 0 ? currentSeverity : '').trim();
79
+ const shouldShowFts = isSev1(severityForFts) && hasPremiumSla;
80
+ const isPreviousSeveritySelected = isEqual(caseDetails.caseSeverity, currentSeverity);
77
81
  const [isOpen, setIsOpen] = useState(false);
78
82
  const onToggleClick = () => {
79
83
  setIsOpen(!isOpen);
@@ -148,25 +152,34 @@ export default function UpdateSeverityModal(props) {
148
152
  const getFtsUpdateComment = () => {
149
153
  if (isIdea)
150
154
  return '';
151
- if (isEqual(caseDetails.fts, localFts) && isEqual(caseDetails.contactInfo24x7, localFtsContact))
155
+ // 24x7 fields are only shown for severity 1; do not report contact changes the user could not make.
156
+ if (!shouldShowFts)
152
157
  return '';
153
- if (caseDetails.fts && !localFts)
154
- return '#### Contact Support Update \n User disabled 24x7 contact support';
155
- if (!caseDetails.fts && localFts)
156
- return '#### Contact Support Update \n User enabled 24x7 contact support';
157
- return '#### Contact Support Update \n User updated 24x7 contact information';
158
+ const normalize24x7Contact = (value) => (value !== null && value !== void 0 ? value : '').trim();
159
+ const savedContact = normalize24x7Contact(caseDetails.contactInfo24x7);
160
+ const localContact = normalize24x7Contact(localFtsContact);
161
+ if (isEqual(caseDetails.fts, localFts) && isEqual(savedContact, localContact))
162
+ return '';
163
+ if (caseDetails.fts && !localFts) {
164
+ return '<h4>Contact Support Update</h4><p>User disabled 24x7 contact support</p>';
165
+ }
166
+ if (!caseDetails.fts && localFts) {
167
+ return '<h4>Contact Support Update</h4><p>User enabled 24x7 contact support</p>';
168
+ }
169
+ return '<h4>Contact Support Update</h4><p>User updated 24x7 contact information</p>';
158
170
  };
159
171
  const updateCaseFtsInfo = () => __awaiter(this, void 0, void 0, function* () {
160
172
  try {
161
- const ftsUpdateComment = `${getFtsUpdateComment()} \n\n #### Description \n ${descriptionValue.trim()}`;
162
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
173
+ const ftsUpdateComment = `${getFtsUpdateComment()}<h4>Description</h4><p>${descriptionValue.trim()}</p>`;
174
+ yield updateSeverityViaGraphQL({
175
+ severity: currentSeverity || caseDetails.caseSeverity,
163
176
  fts: localFts,
164
177
  contactInfo24x7: localFtsContact,
165
178
  });
166
- yield postCommentRequest({
167
- caseNumber: caseDetails.caseNumber,
179
+ yield postComment({
168
180
  commentBody: ftsUpdateComment === null || ftsUpdateComment === void 0 ? void 0 : ftsUpdateComment.trim(),
169
181
  contentType: 'markdown',
182
+ updateDiscussionState: true,
170
183
  });
171
184
  ToastNotification.addSuccessMessage(t(`Case has been successfully updated`));
172
185
  }
@@ -190,46 +203,53 @@ export default function UpdateSeverityModal(props) {
190
203
  }
191
204
  const ftsUpdateComment = getFtsUpdateComment();
192
205
  // Severity update successful comment body
193
- const severityUpdateComment = t(`#### Severity update \n Severity changed from {{oldSeverity}} to {{newSeverity}}\n\n ${isEmpty(ftsUpdateComment) ? '' : ftsUpdateComment + '\n\n\n'} #### Description \n{{description}}`, {
206
+ const severityUpdateComment = t(`<h4>Severity update</h4><p>Severity changed from {{oldSeverity}} to {{newSeverity}}</p>${isEmpty(ftsUpdateComment) ? '' : ftsUpdateComment}<h4>Description</h4><p>{{description}}</p>`, {
194
207
  oldSeverity: caseDetails.caseSeverity,
195
208
  newSeverity: updatedCaseDetails['severity'],
196
209
  description: descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim(),
197
210
  });
198
211
  // Severity update failed comment body
199
- const severityUpdateFailedComment = t('#### Severity update \n Failed to change severity from {{oldSeverity}} to {{newSeverity}}. Please try again\n', {
212
+ const severityUpdateFailedComment = t('<h4>Severity update</h4><p>Failed to change severity from {{oldSeverity}} to {{newSeverity}}. Please try again</p>', {
200
213
  oldSeverity: caseDetails.caseSeverity,
201
- newSeveritay: updatedCaseDetails['severity'],
214
+ newSeverity: updatedCaseDetails['severity'],
202
215
  });
203
216
  try {
204
217
  setSeverityUpdating(caseOverviewDispatch, true);
205
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, updatedCaseDetails);
218
+ yield updateSeverityViaGraphQL(updatedCaseDetails);
206
219
  try {
207
- yield postCommentRequest({
208
- caseNumber: caseDetails.caseNumber,
220
+ yield postComment({
209
221
  commentBody: severityUpdateComment === null || severityUpdateComment === void 0 ? void 0 : severityUpdateComment.trim(),
210
222
  contentType: 'markdown',
223
+ updateDiscussionState: true,
211
224
  });
212
225
  try {
213
- checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), caseDetails.caseStatus);
226
+ yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), caseDetails.caseStatus, {
227
+ apolloClient: client,
228
+ caseNumber: caseDetails.caseNumber,
229
+ existingCaseDetails,
230
+ });
214
231
  setCurrentSeverity(updatedCaseDetails['severity']);
215
232
  onSuccessfulSubmit();
216
233
  ToastNotification.addSuccessMessage(t('Severity has been successfully updated'));
217
234
  }
218
235
  catch (e) {
219
- yield postCommentRequest({
220
- caseNumber: caseDetails.caseNumber,
236
+ yield postComment({
221
237
  commentBody: severityUpdateFailedComment === null || severityUpdateFailedComment === void 0 ? void 0 : severityUpdateFailedComment.trim(),
222
238
  contentType: 'markdown',
239
+ updateDiscussionState: true,
223
240
  });
224
241
  onClose();
225
242
  caseUpdateError.showError(e, t(`Failed to update case status. Please try again`));
226
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, Object.assign({ status: 'Waiting on Customer' }, updateCaseDetails));
243
+ yield updateSeverityViaGraphQL({
244
+ status: 'Waiting on Customer Action Required',
245
+ severity: updatedCaseDetails['severity'],
246
+ });
227
247
  }
228
248
  }
229
249
  catch (e) {
230
250
  onClose();
231
251
  caseUpdateError.showError(e, t(`Couldn't post severity update comment. Please try again`));
232
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
252
+ yield updateSeverityViaGraphQL({
233
253
  severity: caseDetails.caseSeverity,
234
254
  });
235
255
  setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
@@ -240,14 +260,13 @@ export default function UpdateSeverityModal(props) {
240
260
  catch (e) {
241
261
  onClose();
242
262
  caseUpdateError.showError(e, t('Severity failed to update'));
243
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
263
+ yield updateSeverityViaGraphQL({
244
264
  severity: caseDetails.caseSeverity,
245
265
  });
246
266
  reUpdateSeverity(caseDetails.caseSeverity);
247
267
  setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
248
268
  }
249
269
  finally {
250
- yield updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseDetails.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
251
270
  setIsUpdateClickedToShowError(false);
252
271
  setDescriptionValue('');
253
272
  }
@@ -265,14 +284,12 @@ export default function UpdateSeverityModal(props) {
265
284
  if (isEmpty(updatedCaseDetails)) {
266
285
  return false;
267
286
  }
268
- else if (isEqual(caseDetails.caseSeverity, currentSeverity) &&
287
+ if (isEqual(caseDetails.caseSeverity, currentSeverity) &&
269
288
  isEqual(caseDetails.fts, localFts) &&
270
289
  isEqual(caseDetails.contactInfo24x7, localFtsContact)) {
271
290
  return false;
272
291
  }
273
- else {
274
- return true;
275
- }
292
+ return true;
276
293
  };
277
294
  const onFtsChange = (e) => {
278
295
  if (canEditCase.alert())
@@ -287,8 +304,9 @@ export default function UpdateSeverityModal(props) {
287
304
  if (!e.target.checked) {
288
305
  return;
289
306
  }
290
- setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: `${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}` })));
291
- setLocalFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
307
+ const ownerPhone = `${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`;
308
+ setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: ownerPhone })));
309
+ setLocalFtsContact(ownerPhone);
292
310
  };
293
311
  const onFtsContactChange = (e) => {
294
312
  if (canEditCase.alert())
@@ -296,21 +314,46 @@ export default function UpdateSeverityModal(props) {
296
314
  setLocalFtsContact(e.target.value);
297
315
  setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: e.target.value.trim() })));
298
316
  };
299
- // To disable submit button wrt above conditions
300
- const isSubmitButtonDisabled = checkIsUpdateValid() && isTextAreaValid() ? false : true;
317
+ const isUpdateValid = checkIsUpdateValid();
318
+ const isDescriptionDisabled = (caseOverviewState.caseSeverityUpdating && isCaseUpdating) || isPostingComment || !isUpdateValid;
319
+ const isSubmitButtonDisabled = !(isUpdateValid && isTextAreaValid());
301
320
  // To handle the severity change
302
- const onSeverityChange = (event, option) => {
321
+ const onSeverityChange = (_event, value) => {
303
322
  if (canEditCase.alert())
304
323
  return;
305
- if (!isEqual(caseDetails.caseSeverity, option.name) &&
306
- isSev1(option.name) &&
307
- isFtsEditableOnEditPage(entitlementSla, option.name)) {
324
+ const option = typeof value === 'object' && value !== null && 'name' in value
325
+ ? value
326
+ : filteredSeverities.find((s) => s.name === value) || {
327
+ name: String(value),
328
+ disabled: false,
329
+ label: String(value),
330
+ additionalInfo: '',
331
+ };
332
+ // Re-selecting the previously saved severity: reset and keep description/Update disabled
333
+ if (isEqual(caseDetails.caseSeverity, option.name)) {
334
+ setCurrentSeverity(option.name);
335
+ setUpdatedCaseDetails({});
336
+ setLocalFts(isUndefined(fts) ? true : !!fts);
337
+ setLocalFtsContact(contactInfo24x7 || '');
338
+ setCaseState(caseDispatch, { ftsContactSameAsOwner: initialContactSameAsOwnerRef.current });
339
+ setDescriptionValue('');
340
+ setIsUpdateClickedToShowError(false);
341
+ setIsSeverityInValidLocal(option);
342
+ setIsOpen(false);
343
+ return;
344
+ }
345
+ if (isSev1(option.name) && (hasPremiumSla || isEmpty(entitlementSla))) {
308
346
  setLocalFts(true);
309
347
  setLocalFtsContact('');
310
348
  setCaseState(caseDispatch, { ftsContactSameAsOwner: false });
311
- setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { severity: option.name, fts: !isIdea, contactInfo24x7: '' })));
349
+ setUpdatedCaseDetails({
350
+ severity: option.name,
351
+ fts: !isIdea,
352
+ contactInfo24x7: '',
353
+ });
312
354
  }
313
355
  else {
356
+ setLocalFts(false);
314
357
  setUpdatedCaseDetails({ severity: option.name, fts: false });
315
358
  }
316
359
  setCurrentSeverity(option.name);
@@ -360,8 +403,8 @@ export default function UpdateSeverityModal(props) {
360
403
  ]);
361
404
  useEffect(() => {
362
405
  const phone = `${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`;
363
- setLocalFts(fts);
364
- setLocalFtsContact(contactInfo24x7);
406
+ setLocalFts(isUndefined(fts) ? true : fts);
407
+ setLocalFtsContact(contactInfo24x7 || '');
365
408
  if (contactInfo24x7 === phone) {
366
409
  setCaseState(caseDispatch, { ftsContactSameAsOwner: true });
367
410
  }
@@ -383,23 +426,21 @@ export default function UpdateSeverityModal(props) {
383
426
  React.createElement(FlexItem, null, selectedSeverity.label || t(`Select a severity`)),
384
427
  React.createElement(FlexItem, null, isFetching || versionsDetails.isFetching ? React.createElement(Spinner, { size: "md" }) : '')))), shouldFocusToggleOnSelect: true, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
385
428
  React.createElement(DropdownList, null, allCaseSeverities.data
386
- ? filteredSeverities.map((option) => (React.createElement(DropdownItem, { value: option, key: option.name, description: option.additionalInfo }, option.label)))
429
+ ? filteredSeverities.map((option) => (React.createElement(DropdownItem, { value: option.name, key: option.name, description: option.additionalInfo }, option.label)))
387
430
  : []))),
388
431
  React.createElement("div", null,
389
432
  React.createElement("label", { htmlFor: "date-input", className: "pf-v6-u-mt-md" },
390
433
  React.createElement(Trans, null, "Describe update"),
391
434
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
392
- React.createElement(TextArea, { placeholder: t('How has the business impact changed? If you have increased severity, please explain why.'), isDisabled: (caseOverviewState.caseSeverityUpdating && isCaseUpdating) ||
393
- isPostingComment ||
394
- !checkIsUpdateValid(), value: descriptionValue, onChange: (_event, value) => handleTextAreaChange(value), resizeOrientation: "vertical", "aria-label": "severity-update-descritpion", validated: isEmpty(descriptionValue) && isUpdateClickedToShowError ? 'error' : 'default', isRequired: true }),
435
+ React.createElement(TextArea, { placeholder: t('How has the business impact changed? If you have increased severity, please explain why.'), isDisabled: isDescriptionDisabled, value: descriptionValue, onChange: (_event, value) => handleTextAreaChange(value), resizeOrientation: "vertical", "aria-label": "severity-update-descritpion", validated: isEmpty(descriptionValue) && isUpdateClickedToShowError ? 'error' : 'default', isRequired: true }),
395
436
  React.createElement("div", { className: "pf-v6-u-mt-xs" },
396
437
  React.createElement(Trans, null, "To view your comment, go to the Discussion tab."))),
397
- !isIdea && isFtsEditable && (React.createElement("div", { className: "pf-v6-u-mt-md pf-v6-u-mb-sm" },
438
+ shouldShowFts && (React.createElement("div", { className: "pf-v6-u-mt-md pf-v6-u-mb-sm" },
398
439
  React.createElement("div", null,
399
440
  React.createElement("input", { type: "checkbox", id: "update-severity-fts", "data-tracking-id": "update-severity-fts", name: "update-severity-fts", checked: localFts, onChange: onFtsChange }),
400
441
  React.createElement("label", { htmlFor: "update-severity-fts" },
401
442
  React.createElement(Trans, null, "24x7 Support"))),
402
- localFts && (React.createElement("div", null,
443
+ (localFts || isSev1(currentSeverity)) && (React.createElement("div", null,
403
444
  React.createElement("label", { htmlFor: "update-severity-24-7-contact", className: "pf-v6-u-mt-xs" },
404
445
  React.createElement(Trans, null, "Contact for 24x7 support")),
405
446
  React.createElement("div", null,
@@ -419,8 +460,9 @@ export default function UpdateSeverityModal(props) {
419
460
  React.createElement("p", { className: "pf-v6-u-text-color-subtle pf-v6-u-font-size-sm pf-v6-u-mb-md" }, t('Describing your update helps us better assist you.')),
420
461
  modalBody()),
421
462
  React.createElement(ModalFooter, null,
422
- React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, isLoading: isCaseUpdating || isPostingComment, "data-tracking-id": "update-severity-submit", isDisabled: !isUpdateClickedToShowError && checkIsUpdateValid()
423
- ? false
424
- : isSubmitButtonDisabled || isCaseUpdating || isPostingComment }, t('Update')),
463
+ React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, isLoading: isCaseUpdating || isPostingComment, "data-tracking-id": "update-severity-submit", isDisabled: (isPreviousSeveritySelected && !onlyFtsInfoChanged) ||
464
+ (!isUpdateClickedToShowError && isUpdateValid
465
+ ? false
466
+ : isSubmitButtonDisabled || isCaseUpdating || isPostingComment) }, t('Update')),
425
467
  React.createElement(Button, { key: "back", variant: "link", onClick: onCancel, "data-tracking-id": "update-severity-cancel", isDisabled: isCaseUpdating || isPostingComment }, t('Cancel')))));
426
468
  }
@@ -11,6 +11,7 @@ declare const _default: {
11
11
  de: string;
12
12
  es: string;
13
13
  pt: string;
14
+ pt_BR: string;
14
15
  fr: string;
15
16
  ko: string;
16
17
  it: string;
@@ -47,6 +48,10 @@ export declare enum CaseValuesToWatch {
47
48
  hostname = "Hostname",
48
49
  openshiftClusterID = "OpenShift Cluster ID"
49
50
  }
51
+ export declare const preferredSSModalOpenPendoEvent = "PCM-Next > Preferred-secured-support-modal-open";
52
+ export declare const recsViewedFromNoAttachmentModalEvent = "PCM-Next > No-Attachment-modal-view-recommendations";
53
+ export declare const markdownInlineFileSelectEvent = "PCM-Next > Markdown-toolbar-file-select";
54
+ export declare const markdownFilePasteEvent = "PCM-Next > Markdown-toolbar-file-paste";
50
55
  export declare const riskLabels: {
51
56
  1: {
52
57
  icon: React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,iBAAiB;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,8BAA8B;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
1
+ {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,wBAgCE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,iBAAiB;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,8BAA8B;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
@@ -15,6 +15,7 @@ export default {
15
15
  de: 'Deutsch',
16
16
  es: 'Español',
17
17
  pt: 'Português',
18
+ pt_BR: 'Português',
18
19
  fr: 'Français',
19
20
  ko: '한국어',
20
21
  it: 'Italiano',
@@ -51,6 +52,10 @@ export var CaseValuesToWatch;
51
52
  CaseValuesToWatch["hostname"] = "Hostname";
52
53
  CaseValuesToWatch["openshiftClusterID"] = "OpenShift Cluster ID";
53
54
  })(CaseValuesToWatch || (CaseValuesToWatch = {}));
55
+ export const preferredSSModalOpenPendoEvent = 'PCM-Next > Preferred-secured-support-modal-open';
56
+ export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-modal-view-recommendations';
57
+ export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
58
+ export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
54
59
  export const riskLabels = {
55
60
  1: { icon: React.createElement(AngleDoubleDownIcon, null), label: 'Low', className: 'pf-m-blue' },
56
61
  2: { icon: React.createElement(EqualsIcon, null), label: 'Moderate', className: 'pf-m-gold' },
@@ -1 +1 @@
1
- {"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAqS/C"}
1
+ {"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAuB1B,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAqS/C"}
@@ -11,7 +11,7 @@ import React from 'react';
11
11
  import { Trans, useTranslation } from 'react-i18next';
12
12
  import { useCaseSelector } from '../../../context/CaseContext';
13
13
  import { ATTACHMENT_DESCRIPTION_LENGTH_LIMIT } from '../../../reducers/CaseConstNTypes';
14
- import { isAnalysingFile, isAnalysisFailed, isFileDeleted, isUploadAborted, isUploadedAndAnalysisFailed, isUploadedAndAnalysisSkipped, isUploadedAndAnalyzed, isUploadFailed, isUploading, isUploadingAttachment, isUploadingOnCase, isUploadingOnSession, isUploadOnTrack, isVerifyingUpload, shouldHideDescription, } from './reducer/AttachmentHelper';
14
+ import { isAnalysingFile, isAnalysisFailed, isFileDeleted, isUploadAborted, isUploadedAndAnalysisFailed, isUploadedAndAnalysisSkipped, isUploadedAndAnalyzed, isUploadFailed, isUploading, isUploadingAttachment, isUploadingOnCase, isUploadingOnSession, isUploadOnTrack, isVerifyingUpload, shouldHideDescription, shouldShowUploadProgressIndicator, } from './reducer/AttachmentHelper';
15
15
  import { FileStatusHelper } from './reducer/FileStatusHelper';
16
16
  export const CaseDiagnosticsStatus = pcm.preCase.diag.CaseDiagnosticsStatus;
17
17
  const analysisSteps = [
@@ -108,7 +108,7 @@ export default function FileLister(props) {
108
108
  !isUploadOnTrack(localFile) && (React.createElement("i", { className: "icon-warning pf-v6-u-mr-sm", title: getUploadErrorMessage(localFile, localFile.uploadability), "aria-label": getUploadErrorMessage(localFile, localFile.uploadability) })),
109
109
  isUploadedAndAnalysisFailed(localFile) && (React.createElement("i", { className: "icon-warning text-danger pf-v6-u-mr-sm", title: getUploadErrorMessage(localFile, localFile.uploadability), "aria-label": getUploadErrorMessage(localFile, localFile.uploadability) })),
110
110
  isUploadedAndAnalyzed(localFile) && (React.createElement("i", { className: "icon-check-alt text-green pf-v6-u-mr-sm", title: t('File uploaded and analyzed'), "aria-label": t('File uploaded and analyzed') })),
111
- isUploading(localFile.uploadProgress.uploadStatus) && (React.createElement("div", { className: "pf-v6-u-mr-sm pf-v6-u-display-inline-block", style: { height: '20px', width: '20px' } },
111
+ shouldShowUploadProgressIndicator(localFile, props.isSessionId) && (React.createElement("div", { className: "pf-v6-u-mr-sm pf-v6-u-display-inline-block", style: { height: '20px', width: '20px' } },
112
112
  React.createElement(CircularProgressbar, { title: getRadialProgressTitle(localFile), strokeWidth: 13, value: localFile.uploadProgress.percentUploaded }))),
113
113
  React.createElement("span", null, `${localFile.name} (${humanizeSize(localFile.size)})`),
114
114
  !localFile.uploadability.ableToUpload && (React.createElement("span", { className: "file-error" },
@@ -122,7 +122,7 @@ export default function FileLister(props) {
122
122
  React.createElement(HistoryIcon, null))),
123
123
  !isVerifyingUpload(localFile.uploadProgress.uploadStatus) &&
124
124
  !isAnalysingFile(localFile.analysisMetadata.analysisStatus) && (React.createElement(React.Fragment, null,
125
- canShowAbortBtn(localFile.uploadProgress.uploadStatus) && (React.createElement(Button, { variant: ButtonVariant.link, isDanger: true, "aria-label": t('Cancel Upload'), title: t('Cancel Upload'), className: "btn btn-link btn-app remove-file", "data-tracking-id": "file-lister-abort", onClick: onAbortClick(localFile, index), hidden: !localFile.uploadability.ableToUpload, isDisabled: !(localFile.uploadProgress.percentUploaded > 0) },
125
+ canShowAbortBtn(localFile.uploadProgress.uploadStatus) && (React.createElement(Button, { variant: ButtonVariant.link, isDanger: true, "aria-label": t('Cancel Upload'), title: t('Cancel Upload'), className: "btn btn-link btn-app remove-file", "data-tracking-id": "file-lister-abort", onClick: onAbortClick(localFile, index), hidden: !localFile.uploadability.ableToUpload, isDisabled: !localFile.uploadProgress.onAbort },
126
126
  React.createElement(Trans, null, "Cancel"))),
127
127
  showDeleteBtn(localFile.uploadProgress.uploadStatus, localFile) && (React.createElement(Button, { variant: ButtonVariant.link, isDanger: true, "aria-label": t('Delete file'), title: t('Delete file'), className: "btn btn-link btn-app remove-file", "data-tracking-id": "file-lister-delete", onClick: onRemoveClick(localFile, index), hidden: !localFile.uploadability.ableToUpload },
128
128
  React.createElement(Trans, null, "Remove")))))),
@@ -1,7 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { Trans } from 'react-i18next';
3
3
  import FileLister from './FileLister';
4
- import { isUploadingAttachment } from './reducer/AttachmentHelper';
4
+ import { hasSomeSelectedFiles, isUploadingAttachment } from './reducer/AttachmentHelper';
5
5
  import { AttachmentStateContext } from './reducer/AttachmentReducerContext';
6
6
  import { FileUploadButton } from './UploadButton';
7
7
  import { useFileUploader } from './useFileUploader';
@@ -14,12 +14,11 @@ const defaultProps = {
14
14
  showDescriptionInfoMsg: false,
15
15
  };
16
16
  function FileUpload(props) {
17
- var _a, _b, _c;
18
17
  // Attachment Reducer Related
19
18
  const { attachmentState } = useContext(AttachmentStateContext);
20
19
  const { editFile, removeFile, retryUpload, uploadAll, retryAnalysis } = useFileUploader(props);
21
20
  return (React.createElement("section", { className: `${props.className}`, id: `${props.id}` },
22
- ((_c = (_b = (_a = attachmentState === null || attachmentState === void 0 ? void 0 : attachmentState.caseFiles) === null || _a === void 0 ? void 0 : _a.selectedLocalFiles) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 0 && (React.createElement(React.Fragment, null,
21
+ hasSomeSelectedFiles(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(React.Fragment, null,
23
22
  !props.isSessionId ? (React.createElement("h4", null,
24
23
  React.createElement(Trans, null, "Uploading attachment(s)"))) : null,
25
24
  React.createElement(FileLister, { onRetryAnalysis: retryAnalysis, selectedLocalFiles: attachmentState.caseFiles.selectedLocalFiles, onFileEdit: editFile, onFileRemove: removeFile, onRetry: retryUpload, isSessionId: props.isSessionId, showSlowUploadMsg: attachmentState.showUploadingOnSlowConnectionMsg }))),
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD,UAAU,MAAO,SAAQ,wBAAwB;CAAG;AAQpD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBA4ClC;kBA5CQ,YAAY;;;AA8CrB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD,UAAU,MAAO,SAAQ,wBAAwB;CAAG;AAQpD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBA+ClC;kBA/CQ,YAAY;;;AAiDrB,eAAe,YAAY,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { useApolloClient } from '@apollo/client/react';
1
2
  import React, { useContext, useEffect } from 'react';
2
3
  import { Trans } from 'react-i18next';
3
4
  import { SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
@@ -18,13 +19,14 @@ function FileUploader(props) {
18
19
  const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
19
20
  const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
20
21
  const { editFile, removeFile, retryUpload, uploadFile } = useFileUploader(props);
22
+ const apolloClient = useApolloClient();
21
23
  useEffect(() => {
22
24
  attachmentState.caseFiles.selectedLocalFiles.forEach((file, index) => {
23
25
  if (file.uploadProgress.uploadStatus === UploadStatusConstants.attachedOnSession) {
24
26
  uploadFile(index);
25
27
  }
26
28
  else if (isSessionUploadComplete(file.uploadProgress.uploadStatus)) {
27
- moveSessionAttachmentToCase(dispatchToAttachmentReducer, props.idToUploadTo, activeSessionId, file, index);
29
+ moveSessionAttachmentToCase(dispatchToAttachmentReducer, props.idToUploadTo, activeSessionId, file, index, apolloClient, props.caseSalesforceId);
28
30
  }
29
31
  });
30
32
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -6,6 +6,7 @@ interface IProps extends IFileUploaderCommonProps, IDClassNameProps {
6
6
  isSessionId: boolean;
7
7
  isPrivate: boolean;
8
8
  isIdea?: boolean;
9
+ isSecureSupport?: boolean;
9
10
  }
10
11
  declare function WidgetFileUploader(props: IProps): React.JSX.Element;
11
12
  declare namespace WidgetFileUploader {
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/WidgetFileUploader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAInD,UAAU,MAAO,SAAQ,wBAAwB,EAAE,gBAAgB;IAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAiPxC;kBAjPQ,kBAAkB;;;AAqP3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"WidgetFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/WidgetFileUploader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAInD,UAAU,MAAO,SAAQ,wBAAwB,EAAE,gBAAgB;IAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAYD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAkPxC;kBAlPQ,kBAAkB;;;AAsP3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -42,7 +42,7 @@ function WidgetFileUploader(props) {
42
42
  const [unallowedLocalFileExists, setUnallowedLocalFileExists] = useState(false);
43
43
  const [fileExceedInfo, setfileExceedInfo] = useState({ show: false, fileName: [] });
44
44
  useEffect(() => {
45
- if (rulesState.triggerRuleNotification) {
45
+ if (rulesState.triggerRuleNotification && !props.isSecureSupport) {
46
46
  !showViewRecBtn && setShowViewRecBtn(true);
47
47
  }
48
48
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -161,13 +161,14 @@ function WidgetFileUploader(props) {
161
161
  ' '))) : (React.createElement(React.Fragment, null,
162
162
  unallowedLocalFileExists && (React.createElement(Alert, { variant: "danger", title: t('File type is not allowed on this support type. Please remove file to proceed.') })),
163
163
  React.createElement(FileLister, { selectedLocalFiles: attachmentState.caseFiles.selectedLocalFiles, onFileEdit: editFile, onFileRemove: removeFile, onRetry: retryUpload, onRetryAnalysis: retryAnalysis, isSessionId: props.isSessionId, showSlowUploadMsg: attachmentState.showUploadingOnSlowConnectionMsg, setfileExceedInfo: setfileExceedInfo }),
164
- hasUploadedSomeAttachments(selectedLocalFiles) && !props.isIdea && (React.createElement("p", null,
164
+ hasUploadedSomeAttachments(selectedLocalFiles) && !props.isIdea && !props.isSecureSupport && (React.createElement("p", null,
165
165
  React.createElement(Trans, null, "If you can't find a solution, all files are moved to your case."))))),
166
166
  React.createElement(FileUploadButton, { className: "file-buttons", onUploadAll: uploadAll, uploadAnotherBtn: false, isSessionId: props.isSessionId }),
167
- isAnalysingAnyAttachment(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(Button, { isDisabled: true },
167
+ !props.isSecureSupport && isAnalysingAnyAttachment(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(Button, { isDisabled: true },
168
168
  React.createElement(Trans, null, "Analyzing..."))),
169
169
  showViewRecBtn &&
170
170
  !props.isIdea &&
171
+ !props.isSecureSupport &&
171
172
  !isAnalysingAnyAttachment(attachmentState.caseFiles.selectedLocalFiles) &&
172
173
  hasAnalysedSomeAttachments(attachmentState.caseFiles.selectedLocalFiles) &&
173
174
  rulesState.allResults.length > 0 && (React.createElement(Button, { "data-tracking-id": "widget-file-uploader-view-recs", onClick: onViewRecBtnClick },
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  interface IProps extends React.HTMLProps<HTMLButtonElement> {
3
3
  isSessionId: boolean;
4
4
  isPrivate?: boolean;
5
- buttonLabel?: string;
5
+ buttonLabel?: React.ReactNode;
6
6
  isDisabled?: boolean;
7
7
  }
8
8
  declare function FileSelectorButton({ isSessionId, id, className, buttonLabel, isPrivate, isDisabled, ...btnProps }: IProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FileSelectorButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/fileSelectors/FileSelectorButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,UAAU,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,iBAAS,kBAAkB,CAAC,EACxB,WAAW,EACX,EAAO,EACP,SAA4B,EAC5B,WAA6B,EAC7B,SAAiB,EACjB,UAAkB,EAClB,GAAG,QAAQ,EACd,EAAE,MAAM,qBA8BR;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"FileSelectorButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/fileSelectors/FileSelectorButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,UAAU,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,iBAAS,kBAAkB,CAAC,EACxB,WAAW,EACX,EAAO,EACP,SAA4B,EAC5B,WAA6B,EAC7B,SAAiB,EACjB,UAAkB,EAClB,GAAG,QAAQ,EACd,EAAE,MAAM,qBA8BR;AAED,eAAe,kBAAkB,CAAC"}