@rh-support/troubleshoot 2.6.341 → 2.6.349

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -6
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
  9. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/Case.js +33 -60
  11. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
  13. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
  15. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
  17. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
  18. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
  23. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
  25. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
  27. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  30. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
  31. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
  35. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
  81. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  82. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
  83. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  84. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
  85. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  86. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
  87. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
  88. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
  90. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
  92. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  93. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
  94. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  95. package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
  96. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  97. package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
  98. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  99. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
  100. package/lib/esm/components/CaseInformation/Description.js +1 -1
  101. package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
  102. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  103. package/lib/esm/components/CaseInformation/Fts.js +16 -30
  104. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  105. package/lib/esm/components/CaseInformation/Severity.js +11 -17
  106. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  107. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  108. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  109. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
  110. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  111. package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
  112. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  113. package/lib/esm/components/CaseManagement/Cep.js +9 -11
  114. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  115. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  116. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
  117. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  118. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  119. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +22 -15
  120. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  121. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  122. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  123. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
  124. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  125. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  126. package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
  127. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  128. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  129. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  130. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  131. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  132. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  133. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  134. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  135. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  136. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  137. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  138. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  139. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  140. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  141. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  142. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  143. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  144. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  145. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  146. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  147. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  148. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  149. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  150. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  151. package/lib/esm/components/Review/Review.js +16 -20
  152. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  153. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  154. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  155. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  156. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  157. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  158. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -109
  159. package/lib/esm/components/shared/Constants.d.ts +0 -5
  160. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  161. package/lib/esm/components/shared/Constants.js +0 -5
  162. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  163. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  164. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  165. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  166. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  167. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  168. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
  169. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  170. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  171. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
  172. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  173. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
  174. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  175. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  176. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  177. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
  178. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  179. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  180. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  181. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
  182. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  183. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  184. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  185. package/lib/esm/components/shared/usePostComment.js +28 -16
  186. package/lib/esm/components/shared/utils.d.ts +0 -1
  187. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  188. package/lib/esm/components/shared/utils.js +3 -9
  189. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  190. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -170
  191. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  192. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  193. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  194. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
  195. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  196. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
  197. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  198. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  199. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  200. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  201. package/lib/esm/css/case.css +202 -60
  202. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  203. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  204. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
  205. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  206. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  207. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  208. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  209. package/lib/esm/hooks/useS3Upload.js +30 -28
  210. package/lib/esm/i18n/template-de.d.ts +2 -2
  211. package/lib/esm/i18n/template-de.js +2 -2
  212. package/lib/esm/i18n/template-es.d.ts +2 -2
  213. package/lib/esm/i18n/template-es.js +2 -2
  214. package/lib/esm/i18n/template-fr.d.ts +2 -2
  215. package/lib/esm/i18n/template-fr.js +2 -2
  216. package/lib/esm/i18n/template-it.d.ts +2 -2
  217. package/lib/esm/i18n/template-it.js +2 -2
  218. package/lib/esm/i18n/template-jp.d.ts +2 -2
  219. package/lib/esm/i18n/template-jp.js +2 -2
  220. package/lib/esm/i18n/template-ko.d.ts +2 -2
  221. package/lib/esm/i18n/template-ko.js +2 -2
  222. package/lib/esm/i18n/template-pt.d.ts +2 -2
  223. package/lib/esm/i18n/template-pt.js +2 -2
  224. package/lib/esm/i18n/template-ru.d.ts +2 -2
  225. package/lib/esm/i18n/template-ru.js +2 -2
  226. package/lib/esm/i18n/template-zh.d.ts +2 -2
  227. package/lib/esm/i18n/template-zh.js +2 -2
  228. package/lib/esm/index.js +0 -1
  229. package/lib/esm/models/cache.d.ts +2 -0
  230. package/lib/esm/models/cache.d.ts.map +1 -1
  231. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
  232. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  233. package/lib/esm/reducers/CaseConstNTypes.js +7 -31
  234. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  235. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  236. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  237. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
  238. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  239. package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
  240. package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
  241. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  242. package/lib/esm/reducers/CaseHelpers.js +17 -92
  243. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  244. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  245. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  246. package/lib/esm/reducers/CaseReducer.d.ts +11 -56
  247. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  248. package/lib/esm/reducers/CaseReducer.js +99 -279
  249. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  250. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  251. package/lib/esm/scss/_main.scss +0 -9
  252. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  253. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  254. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  255. package/package.json +8 -9
  256. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
  257. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  258. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
  259. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
  260. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  261. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
  262. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  263. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  264. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  265. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  266. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  267. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
  268. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  269. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  270. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
  271. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  272. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  273. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
  274. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  275. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  276. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  277. package/lib/esm/graphql/index.d.ts +0 -4
  278. package/lib/esm/graphql/index.d.ts.map +0 -1
  279. package/lib/esm/graphql/index.js +0 -3
  280. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  281. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  282. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  283. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  284. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  285. package/lib/esm/graphql/mutations/index.js +0 -1
  286. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  287. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  288. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
  289. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  290. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  291. package/lib/esm/graphql/queries/getParentId.js +0 -16
  292. package/lib/esm/graphql/queries/index.d.ts +0 -3
  293. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  294. package/lib/esm/graphql/queries/index.js +0 -2
  295. package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
  296. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  297. package/lib/esm/graphql/schemas/escalation.js +0 -1
  298. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  299. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  300. package/lib/esm/graphql/schemas/index.js +0 -1
  301. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  302. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  303. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
  304. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  305. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  306. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  307. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  308. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  309. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  310. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
  311. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  312. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  313. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
  314. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  315. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
  316. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  317. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  318. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  319. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  320. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  321. package/lib/esm/hooks/useCaseHistory.js +0 -98
  322. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
  323. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  324. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  325. package/lib/esm/models/caseHistory.d.ts +0 -80
  326. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  327. package/lib/esm/models/caseHistory.js +0 -1
  328. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  329. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  330. package/lib/esm/utils/TimelineUtils.js +0 -135
  331. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  332. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  333. package/lib/esm/utils/caseHistoryUtils.js +0 -165
  334. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
  335. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
  336. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsPageReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDetailsPageReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACH,iBAAiB,EAKpB,MAAM,mBAAmB,CAAC;AAI3B,KAAK,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACjE,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1E,oBAAY,oBAAoB;IAC5B,WAAW,gBAAgB;CAC9B;AAED,MAAM,WAAW,cAAc;IAC3B,kBAAkB,EAAE,mBAAmB,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IACrE,mBAAmB,EAAE,mBAAmB,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAGjE,0BAA0B,EAAE,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CA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Y,oBAAoB;IAC5B,WAAW,gBAAgB;CAC9B;AAED,MAAM,WAAW,cAAc;IAC3B,kBAAkB,EAAE,mBAAmB,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IACrE,mBAAmB,EAAE,mBAAmB,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjE,0BAA0B,EAAE,mBAAmB,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC;IACnF,eAAe,EAAE,mBAAmB,CAAC,eAAe,EAAE,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,2BAA2B,EAAE,cAKzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,cAAc,EAAE,QAAQ,WAAW,KAAG,GASnF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,UAAU,8BAA8B,EACxC,YAAY,MAAM,EAClB,iBAAiB,OAAO,kBAmB3B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,UAAU,8BAA8B,EAAE,YAAY,MAAM,kBAoBhG,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAU,UAAU,8BAA8B,EAAE,YAAY,MAAM,kBAkBvG,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,UAAU,8BAA8B,EACxC,YAAY,MAAM,EAClB,eAAe,MAAM,EACrB,oBAAiB,kBAwBpB,CAAC"}
@@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { publicApi } from '@cee-eng/hydrajs';
11
- import { buildAccessRestrictionExclusionFilter, fetchCaseAttachmentsViaGraphQL, fetchCaseDetailsByCaseNumber, getApiResourceObject, } from '@rh-support/utils';
12
- import { GET_ESCALATION_DETAILS } from '../graphql';
10
+ import { escalations, kase, publicApi } from '@cee-eng/hydrajs';
11
+ import { getApiResourceObject } from '@rh-support/utils';
12
+ import without from 'lodash/without';
13
13
  export var CaseDetailsConstants;
14
14
  (function (CaseDetailsConstants) {
15
15
  CaseDetailsConstants["updateState"] = "updateState";
@@ -17,8 +17,6 @@ export var CaseDetailsConstants;
17
17
  export const initialCaseDetailsPageState = {
18
18
  caseFeedbacksHydra: getApiResourceObject([]),
19
19
  caseAttachmentHydra: getApiResourceObject([]),
20
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
21
- // caseExternalTrackersUpdate: getApiResourceObject([]),
22
20
  caseExternalTrackersUpdate: getApiResourceObject([]),
23
21
  caseEscalations: getApiResourceObject([]),
24
22
  };
@@ -32,21 +30,13 @@ export const caseDetailsPageReducer = (state, action) => {
32
30
  }
33
31
  }
34
32
  };
35
- export const fetchAttachments = (dispatch_1, caseNumber_1, apolloClient_1, caseSalesforceId_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, apolloClient_1, caseSalesforceId_1, ...args_1], void 0, function* (dispatch, caseNumber, apolloClient, caseSalesforceId, includeSecureSupport = false) {
33
+ export const fetchAttachments = (dispatch, caseNumber, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
36
34
  try {
37
35
  dispatch({
38
36
  type: CaseDetailsConstants.updateState,
39
37
  payload: { caseAttachmentHydra: getApiResourceObject([], true) },
40
38
  });
41
- let resolvedCaseSalesforceId = caseSalesforceId;
42
- if (!resolvedCaseSalesforceId) {
43
- const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
44
- resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
45
- }
46
- if (!resolvedCaseSalesforceId) {
47
- throw new Error('Missing Salesforce case id');
48
- }
49
- const allAttachments = yield fetchCaseAttachmentsViaGraphQL(apolloClient, caseNumber, resolvedCaseSalesforceId);
39
+ const allAttachments = yield kase.getAttachments(caseNumber, false, isSecureSupport);
50
40
  dispatch({
51
41
  type: CaseDetailsConstants.updateState,
52
42
  payload: { caseAttachmentHydra: getApiResourceObject(allAttachments) },
@@ -79,56 +69,34 @@ export const fetchFeedbacks = (dispatch, caseNumber) => __awaiter(void 0, void 0
79
69
  });
80
70
  }
81
71
  });
82
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
83
- // export const fetchExternalTrackers = async (dispatch: CaseDetailsReducerDispatchType, caseNumber: string) => {
84
- // try {
85
- // dispatch({
86
- // type: CaseDetailsConstants.updateState,
87
- // payload: { caseExternalTrackersUpdate: getApiResourceObject([], true) },
88
- // });
89
- // const caseExtUpdates = await publicApi.kase.getExternalUpdates(caseNumber);
90
- //
91
- // dispatch({
92
- // type: CaseDetailsConstants.updateState,
93
- // payload: { caseExternalTrackersUpdate: getApiResourceObject(caseExtUpdates) },
94
- // });
95
- // } catch (e) {
96
- // dispatch({
97
- // type: CaseDetailsConstants.updateState,
98
- // payload: { caseExternalTrackersUpdate: getApiResourceObject([], false, true, e.message) },
99
- // });
100
- // }
101
- // };
102
- export const fetchExternalTrackers = (_dispatch, _caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
103
- // no-op stub until External Trackers has a functioning GraphQL endpoint
72
+ export const fetchExternalTrackers = (dispatch, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
73
+ try {
74
+ dispatch({
75
+ type: CaseDetailsConstants.updateState,
76
+ payload: { caseExternalTrackersUpdate: getApiResourceObject([], true) },
77
+ });
78
+ const caseExtUpdates = yield publicApi.kase.getExternalUpdates(caseNumber);
79
+ dispatch({
80
+ type: CaseDetailsConstants.updateState,
81
+ payload: { caseExternalTrackersUpdate: getApiResourceObject(caseExtUpdates) },
82
+ });
83
+ }
84
+ catch (e) {
85
+ dispatch({
86
+ type: CaseDetailsConstants.updateState,
87
+ payload: { caseExternalTrackersUpdate: getApiResourceObject([], false, true, e.message) },
88
+ });
89
+ }
104
90
  });
105
- export const fetchCaseEscalations = (dispatch_1, parentId_1, apolloClient_1, ...args_1) => __awaiter(void 0, [dispatch_1, parentId_1, apolloClient_1, ...args_1], void 0, function* (dispatch, parentId, apolloClient, setLoading = true, includeSecureSupport = false) {
106
- var _a, _b, _c, _d;
91
+ export const fetchCaseEscalations = (dispatch_1, caseNumber_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, accountNumber_1, ...args_1], void 0, function* (dispatch, caseNumber, accountNumber, setLoading = true) {
107
92
  try {
108
93
  setLoading &&
109
94
  dispatch({
110
95
  type: CaseDetailsConstants.updateState,
111
96
  payload: { caseEscalations: getApiResourceObject([], setLoading) },
112
97
  });
113
- const { data } = yield apolloClient.query({
114
- query: GET_ESCALATION_DETAILS,
115
- variables: {
116
- where: {
117
- and: [{ ParentId: { eq: parentId } }, buildAccessRestrictionExclusionFilter(includeSecureSupport)],
118
- },
119
- },
120
- });
121
- const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportCase) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
122
- const caseEscalations = edges.map(({ node }) => {
123
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
124
- return ({
125
- name: (_b = (_a = node.CaseNumber) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '',
126
- subject: (_d = (_c = node.Subject) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : '',
127
- status: (_f = (_e = node.Status) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : '',
128
- owner: (_j = (_h = (_g = node.Owner) === null || _g === void 0 ? void 0 : _g.Name) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : '',
129
- escalationSource: 'RME Escalation',
130
- });
131
- });
98
+ const res = yield escalations.getEscalations({ caseNumber, accountNumber });
99
+ const caseEscalations = without((res || []).filter((item) => item.escalationSource === 'RME Escalation'), null, undefined);
132
100
  dispatch({
133
101
  type: CaseDetailsConstants.updateState,
134
102
  payload: { caseEscalations: getApiResourceObject(caseEscalations, false) },
@@ -1,15 +1,16 @@
1
- import { ICaseChat, ICaseComment } from '@cee-eng/hydrajs/@types/api/public/case';
1
+ import { ICaseChat, ICaseComment, IExternalTrackerUpdate } from '@cee-eng/hydrajs/@types/api/public/case';
2
2
  import { ICommentFeedback } from '@cee-eng/hydrajs/@types/api/public/commentFeedback';
3
3
  import { IAttachment } from '@cee-eng/hydrajs/@types/models/attachment';
4
4
  import { IAction } from '@rh-support/types/shared';
5
- import { ApolloQueryClient } from '@rh-support/utils';
5
+ import { CaseReducerDispatchType } from './CaseConstNTypes';
6
6
  type IActionType = IAction<DiscussionsConstants, IDiscussionState>;
7
7
  export type DiscussionsReducerDispatchType = (value: IActionType) => void;
8
8
  export interface IDiscussion {
9
- item: Partial<ICaseComment | IAttachment | ICaseChat>;
9
+ item: Partial<ICaseComment | IAttachment | ICaseChat | IExternalTrackerUpdate>;
10
10
  last_modified_date: string;
11
11
  discussionType: string;
12
12
  feedback?: number;
13
+ feedbackReason?: string;
13
14
  }
14
15
  export declare enum DiscussionType {
15
16
  COMMENT = "comment",
@@ -34,10 +35,9 @@ export declare const initDiscussionFiltersListState: IFilter[];
34
35
  export interface IDiscussionState {
35
36
  sort: ISort;
36
37
  allDiscussions: IDiscussion[];
38
+ replyCommentText: string;
39
+ replyCommentCreator: string;
37
40
  discussionFiltersListState: IFilter[];
38
- replyingToAuthor: string | null;
39
- replyingToCommentId: string | null;
40
- replyingToTimestamp: string | null;
41
41
  }
42
42
  export declare const initialDiscussionState: IDiscussionState;
43
43
  export declare enum DiscussionsConstants {
@@ -45,13 +45,14 @@ export declare enum DiscussionsConstants {
45
45
  }
46
46
  export declare const discussionReducer: (state: IDiscussionState, action: IActionType) => IDiscussionState;
47
47
  export declare const setSort: (dispatch: DiscussionsReducerDispatchType, sort: ISort, allDiscussions: IDiscussion[]) => void;
48
- export declare const setReplyingTo: (dispatch: DiscussionsReducerDispatchType, author: string, commentId: string, timestamp: string) => void;
49
- export declare const clearReplyingTo: (dispatch: DiscussionsReducerDispatchType) => void;
50
48
  export declare const setFilter: (dispatch: DiscussionsReducerDispatchType, selected: string[], discussionFiltersListState: IFilter[]) => void;
51
- export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<unknown[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
49
+ export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<IExternalTrackerUpdate[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
52
50
  export declare const updateAttacmentsAfterRemoval: (dispatch: DiscussionsReducerDispatchType, uuid_removed: string, allDiscussions: IDiscussion[], discussionFiltersListState: IFilter[]) => void;
53
- export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[]) => Promise<void>;
51
+ export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[], feedbackReason?: string) => Promise<void>;
54
52
  export declare const updateAttachment: (dispatch: DiscussionsReducerDispatchType, uuid: string, newAttachment: any, allDiscussions: IDiscussion[]) => void;
55
- export declare const updateDiscussionStateAttachments: (dispatch: DiscussionsReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, discussionFiltersListState: IFilter[], dispatchCaseDetailsHydraAttachments: any, apolloClient: ApolloQueryClient, caseSalesforceId?: string, includeSecureSupport?: boolean) => Promise<void>;
53
+ export declare const updateDiscussionStateComments: (dispatch: DiscussionsReducerDispatchType, caseDispatch: CaseReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, feedbacks: ICommentFeedback[], discussionFiltersListState: IFilter[]) => Promise<void>;
54
+ export declare const updateDiscussionStateAttachments: (dispatch: DiscussionsReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, isSecureSupport: boolean, discussionFiltersListState: IFilter[], dispatchCaseDetailsHydraAttachments: any) => Promise<void>;
55
+ export declare const setCommentText: (dispatch: DiscussionsReducerDispatchType, replyCommentText: string, replyCommentCreator: string) => void;
56
+ export declare const clearReplyComment: (dispatch: DiscussionsReducerDispatchType) => void;
56
57
  export {};
57
58
  //# sourceMappingURL=CaseDiscussionTabReducer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDiscussionTabReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDiscussionTabReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EACH,iBAAiB,EAKpB,MAAM,mBAAmB,CAAC;AAQ3B,KAAK,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;AACnE,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1E,MAAM,WAAW,WAAW;IAGxB,IAAI,EAAE,OAAO,CAAC,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC;IACtD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oBAAY,cAAc;IACtB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,gBAAgB,oBAAoB;IACpC,GAAG,QAAQ;C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,EACxC,YAAY,MAAM,EAClB,gBAAgB,WAAW,EAAE,EAC7B,MAAM,KAAK,EACX,iBAAiB,OAAO,EACxB,4BAA4B,OAAO,EAAE,EACrC,wCAAmC,kBA+BtC,CAAC;AAEF,eAAO,MAAM,cAAc,GACvB,UAAU,8BAA8B,EACxC,kBAAkB,MAAM,EACxB,qBAAqB,MAAM,SAG9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,8BAA8B,SAKzE,CAAC"}
@@ -7,11 +7,13 @@ 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 { fetchCaseAttachmentsViaGraphQLWithRetry, fetchCaseDetailsByCaseNumber, getApiResourceObject, mergeAttachmentsByUuid, } from '@rh-support/utils';
10
+ import { kase, publicApi } from '@cee-eng/hydrajs';
11
+ import { getApiResourceObject } from '@rh-support/utils';
11
12
  import filter from 'lodash/filter';
12
13
  import findIndex from 'lodash/findIndex';
13
14
  import isEqual from 'lodash/isEqual';
14
15
  import orderBy from 'lodash/orderBy';
16
+ import { CaseReducerConstants } from './CaseConstNTypes';
15
17
  import { CaseDetailsConstants } from './CaseDetailsPageReducer';
16
18
  export var DiscussionType;
17
19
  (function (DiscussionType) {
@@ -60,22 +62,20 @@ export const initDiscussionFiltersListState = [
60
62
  isSelected: true,
61
63
  canSee: false,
62
64
  },
63
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
64
- // {
65
- // filterLabel: 'External Tracker',
66
- // value: DiscussionType.EXTERNAL_TRACKER,
67
- // isDisabled: false,
68
- // isSelected: true,
69
- // canSee: false,
70
- // },
65
+ {
66
+ filterLabel: 'External Tracker',
67
+ value: DiscussionType.EXTERNAL_TRACKER,
68
+ isDisabled: false,
69
+ isSelected: true,
70
+ canSee: false,
71
+ },
71
72
  ];
72
73
  export const initialDiscussionState = {
73
74
  sort: discussionSortOrderConst[0],
74
75
  allDiscussions: [],
76
+ replyCommentText: '',
77
+ replyCommentCreator: '',
75
78
  discussionFiltersListState: initDiscussionFiltersListState,
76
- replyingToAuthor: null,
77
- replyingToCommentId: null,
78
- replyingToTimestamp: null,
79
79
  };
80
80
  export var DiscussionsConstants;
81
81
  (function (DiscussionsConstants) {
@@ -98,18 +98,6 @@ export const setSort = (dispatch, sort, allDiscussions) => {
98
98
  payload: { sort, allDiscussions: sortedDiscussions },
99
99
  });
100
100
  };
101
- export const setReplyingTo = (dispatch, author, commentId, timestamp) => {
102
- dispatch({
103
- type: DiscussionsConstants.updateDiscussionState,
104
- payload: { replyingToAuthor: author, replyingToCommentId: commentId, replyingToTimestamp: timestamp },
105
- });
106
- };
107
- export const clearReplyingTo = (dispatch) => {
108
- dispatch({
109
- type: DiscussionsConstants.updateDiscussionState,
110
- payload: { replyingToAuthor: null, replyingToCommentId: null, replyingToTimestamp: null },
111
- });
112
- };
113
101
  export const setFilter = (dispatch, selected, discussionFiltersListState) => {
114
102
  const prevSelectedListLength = discussionFiltersListState.filter((filter) => filter.isSelected).length;
115
103
  if (selected.length > prevSelectedListLength &&
@@ -129,13 +117,11 @@ const commputeFeedback = (commentId, feedbacks) => {
129
117
  const feedback = feedbacks.filter((feedback) => feedback.commentId === commentId);
130
118
  return feedback.length === 0 ? undefined : parseInt(feedback[0].feedback);
131
119
  };
132
- export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks,
133
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
134
- // trackerUpdates: Partial<IExternalTrackerUpdate[]>,
135
- trackerUpdates, discussionFiltersListState,
136
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
137
- // canSeeExternalTracker: boolean,
138
- canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
120
+ const computeFeedbackReason = (commentId, feedbacks) => {
121
+ const feedback = (feedbacks || []).find((item) => item.commentId === commentId);
122
+ return feedback === null || feedback === void 0 ? void 0 : feedback.feedbackReason;
123
+ };
124
+ export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks, trackerUpdates, discussionFiltersListState, canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
139
125
  // set all discussions state
140
126
  // we need to transform discussions item because:
141
127
  // - last_modified_date is needed for sort and field name is different in different discussion types
@@ -152,25 +138,19 @@ canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
152
138
  discussionType: DiscussionType.COMMENT,
153
139
  last_modified_date: comment.lastModifiedDate || comment.createdDate,
154
140
  feedback: commputeFeedback(comment.id, feedbacks),
141
+ feedbackReason: computeFeedbackReason(comment.id, feedbacks),
142
+ }));
143
+ const allExternalTrackers = (trackerUpdates || []).map((externalUpdate) => ({
144
+ item: Object.assign(Object.assign({}, externalUpdate), { originating_system_last_updated_at: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate }),
145
+ last_modified_date: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
146
+ discussionType: DiscussionType.EXTERNAL_TRACKER,
155
147
  }));
156
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
157
- // const allExternalTrackers: IDiscussion[] = (trackerUpdates || []).map((externalUpdate) => ({
158
- // item: {
159
- // ...externalUpdate,
160
- // originating_system_last_updated_at:
161
- // externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
162
- // },
163
- // last_modified_date: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
164
- // discussionType: DiscussionType.EXTERNAL_TRACKER,
165
- // }));
166
148
  const allAttachments = attachments.map((attachment) => ({
167
149
  item: Object.assign(Object.assign({}, attachment), { lastModifiedDate: attachment.lastModifiedDate || attachment.createdDate }),
168
150
  last_modified_date: attachment.lastModifiedDate || attachment.createdDate,
169
151
  discussionType: DiscussionType.ATTACHMENT,
170
152
  }));
171
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
172
- // const allDiscussions: IDiscussion[] = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
173
- const allDiscussions = [...allComments, ...allChats, ...allAttachments];
153
+ const allDiscussions = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
174
154
  const sortedAllDiscussions = orderBy(allDiscussions, 'last_modified_date', 'desc');
175
155
  //set filter dropdown state
176
156
  // when we don't have any result for a discussion type, in filter options dropdown list, we make that type disable
@@ -182,10 +162,10 @@ canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
182
162
  else if (filter.value === DiscussionType.CHAT) {
183
163
  filter.isDisabled = allChats.length === 0 ? true : false;
184
164
  filter.canSee = canSeeChat;
185
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
186
- // } else if (filter.value === DiscussionType.EXTERNAL_TRACKER) {
187
- // filter.isDisabled = allExternalTrackers.length === 0 ? true : false;
188
- // filter.canSee = canSeeExternalTracker;
165
+ }
166
+ else if (filter.value === DiscussionType.EXTERNAL_TRACKER) {
167
+ filter.isDisabled = allExternalTrackers.length === 0 ? true : false;
168
+ filter.canSee = canSeeExternalTracker;
189
169
  }
190
170
  else if (filter.value === DiscussionType.COMMENT) {
191
171
  filter.isDisabled = allComments.length === 0 ? true : false;
@@ -218,10 +198,13 @@ export const updateAttacmentsAfterRemoval = (dispatch, uuid_removed, allDiscussi
218
198
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
219
199
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions } });
220
200
  };
221
- export const updateCommentStateFeedback = (dispatch, comment_id, newFeedback, allDiscussions) => __awaiter(void 0, void 0, void 0, function* () {
201
+ export const updateCommentStateFeedback = (dispatch, comment_id, newFeedback, allDiscussions, feedbackReason) => __awaiter(void 0, void 0, void 0, function* () {
222
202
  const updateDiscussions = allDiscussions.map((discussion) => {
223
203
  if (discussion.discussionType === DiscussionType.COMMENT && discussion.item.id === comment_id) {
224
204
  discussion.feedback = newFeedback;
205
+ if (feedbackReason !== undefined) {
206
+ discussion.feedbackReason = feedbackReason;
207
+ }
225
208
  }
226
209
  return discussion;
227
210
  });
@@ -236,21 +219,36 @@ export const updateAttachment = (dispatch, uuid, newAttachment, allDiscussions)
236
219
  });
237
220
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions: updatedDiscussions } });
238
221
  };
239
- export const updateDiscussionStateAttachments = (dispatch_1, caseNumber_1, allDiscussions_1, sort_1, discussionFiltersListState_1, dispatchCaseDetailsHydraAttachments_1, apolloClient_1, caseSalesforceId_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, allDiscussions_1, sort_1, discussionFiltersListState_1, dispatchCaseDetailsHydraAttachments_1, apolloClient_1, caseSalesforceId_1, ...args_1], void 0, function* (dispatch, caseNumber, allDiscussions, sort, discussionFiltersListState, dispatchCaseDetailsHydraAttachments, apolloClient, caseSalesforceId, includeSecureSupport = false) {
222
+ export const updateDiscussionStateComments = (dispatch, caseDispatch, caseNumber, allDiscussions, sort, feedbacks, discussionFiltersListState) => __awaiter(void 0, void 0, void 0, function* () {
240
223
  try {
241
- let resolvedCaseSalesforceId = caseSalesforceId;
242
- if (!resolvedCaseSalesforceId) {
243
- const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
244
- resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
245
- }
246
- if (!resolvedCaseSalesforceId) {
247
- throw new Error('Missing Salesforce case id');
248
- }
249
- const existingAttachments = filter(allDiscussions, (o) => o.discussionType === DiscussionType.ATTACHMENT).map((discussion) => discussion.item);
250
- const fetchedAttachments = yield fetchCaseAttachmentsViaGraphQLWithRetry(apolloClient, caseNumber, resolvedCaseSalesforceId,
251
- // After a successful upload batch we expect at least one new attachment beyond what discussion already shows
252
- { minExpectedCount: existingAttachments.length + 1 });
253
- const attachments = mergeAttachmentsByUuid(existingAttachments, fetchedAttachments);
224
+ const comments = yield publicApi.kase.getComments(caseNumber);
225
+ const allComments = (comments || [])
226
+ .filter((comment) => comment.isDraft === false)
227
+ .map((comment) => ({
228
+ item: Object.assign(Object.assign({}, comment), { isPublic: comment.isPublic === undefined ? true : comment.isPublic, last_modified_date: comment.lastModifiedDate || comment.createdDate }),
229
+ discussionType: DiscussionType.COMMENT,
230
+ last_modified_date: comment.lastModifiedDate || comment.createdDate,
231
+ feedback: commputeFeedback(comment.id, feedbacks),
232
+ feedbackReason: computeFeedbackReason(comment.id, feedbacks),
233
+ }));
234
+ const filteredDiscussion = filter([...allDiscussions], (o) => o.discussionType !== DiscussionType.COMMENT);
235
+ const updatedDiscussions = orderBy([...filteredDiscussion, ...allComments], 'last_modified_date', sort.sortOrder);
236
+ discussionFiltersListState.forEach((filter) => {
237
+ if (filter.value === DiscussionType.COMMENT) {
238
+ filter.isDisabled = false;
239
+ }
240
+ });
241
+ dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
242
+ dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions: updatedDiscussions } });
243
+ caseDispatch({ type: CaseReducerConstants.updateComments, payload: { caseDetails: { comments } } });
244
+ }
245
+ catch (e) {
246
+ console.log(e);
247
+ }
248
+ });
249
+ export const updateDiscussionStateAttachments = (dispatch, caseNumber, allDiscussions, sort, isSecureSupport, discussionFiltersListState, dispatchCaseDetailsHydraAttachments) => __awaiter(void 0, void 0, void 0, function* () {
250
+ try {
251
+ const attachments = yield kase.getAttachments(caseNumber, false, isSecureSupport);
254
252
  const allAttachments = attachments.map((attachment) => ({
255
253
  item: Object.assign(Object.assign({}, attachment), { lastModifiedDate: attachment.lastModifiedDate || attachment.createdDate }),
256
254
  last_modified_date: attachment.lastModifiedDate || attachment.createdDate,
@@ -274,3 +272,12 @@ export const updateDiscussionStateAttachments = (dispatch_1, caseNumber_1, allDi
274
272
  console.log(e);
275
273
  }
276
274
  });
275
+ export const setCommentText = (dispatch, replyCommentText, replyCommentCreator) => {
276
+ dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { replyCommentText, replyCommentCreator } });
277
+ };
278
+ export const clearReplyComment = (dispatch) => {
279
+ dispatch({
280
+ type: DiscussionsConstants.updateDiscussionState,
281
+ payload: { replyCommentText: '', replyCommentCreator: '' },
282
+ });
283
+ };
@@ -6,7 +6,7 @@ import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
6
6
  import { IApiResponseDetails } from '@rh-support/types/shared';
7
7
  import { UserAuth } from '@rh-support/user-permissions';
8
8
  import React from 'react';
9
- import { ICaseState, IGraphQLCasePayload } from './CaseConstNTypes';
9
+ import { ICaseState } from './CaseConstNTypes';
10
10
  export declare const getCaseRecommendations: (docs: ISolrRecommendation[], oldDocs: any) => any[];
11
11
  export declare const getCepCommentFromCepDetails: (cepDetails: ICepDetails) => string;
12
12
  export declare const getRecommendationObject: (doc: ISolrRecommendation, index: number) => ICaseResourceLink;
@@ -21,7 +21,6 @@ export declare const isCaseStateValid: (caseState: ICaseState, loggedInUserRight
21
21
  export declare const isIdeaCaseStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
22
22
  export declare const isCaseManagementStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
23
23
  export declare const isCaseInformationSectionValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
24
- export declare const createCasePayloadGraphQL: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => IGraphQLCasePayload;
25
24
  export declare const createCasePayload: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => Partial<ICasePayload>;
26
25
  export declare const getProcessedEntitlements: (caseEntitlements: IEntitlement[]) => IEntitlement[];
27
26
  export declare const getHasInvalidEntitlements: (caseEntitlements: IEntitlement[]) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,E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dFieldsForCaseCreate, serializeNoClusterIdFieldsToAdditionalCaseInformation, showFtsOnCreateCasePage, stripNoClusterIdFieldsFromDescription, } from '@rh-support/utils';
1
+ import { getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
2
2
  import filter from 'lodash/filter';
3
3
  import forEach from 'lodash/forEach';
4
4
  import isEmpty from 'lodash/isEmpty';
@@ -9,7 +9,7 @@ import uniqBy from 'lodash/uniqBy';
9
9
  import React from 'react';
10
10
  import { isPhoneValid, trimAndReplacePlus } from '../components/shared/utils';
11
11
  import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
12
- import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant, LANGUAGE_MAP, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SeverityDescriptionDetails, TITLE_SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
12
+ import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SeverityDescriptionDetails, TITLE_SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
13
13
  export const getCaseRecommendations = (docs, oldDocs) => {
14
14
  const recs = [];
15
15
  docs.forEach((doc, i) => {
@@ -119,7 +119,8 @@ export const getSeverityDescription = (severity) => {
119
119
  };
120
120
  export const isClusterIDValid = (caseState, allProducts) => {
121
121
  const case_details = caseState.caseDetails;
122
- const productHasClusterID = isClusterIdEnabledForProduct(case_details.product);
122
+ const productHasClusterID = isClusterIdEnabledForProduct(case_details.product, allProducts);
123
+ //if product doesn't have clusterId we don't need to validate value
123
124
  if (!productHasClusterID)
124
125
  return true;
125
126
  const majorVersion = (case_details.version && getVersion(case_details.version).major) || '';
@@ -168,7 +169,9 @@ export const isCaseStateValid = (caseState, loggedInUserRights) => {
168
169
  !isEmpty(case_details.accountNumberRef) &&
169
170
  !isEmpty(case_details.contactSSOName) &&
170
171
  isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
171
- (caseState.selectedAccountDetails.data.requireCGroupOnCreate ? !!case_details.groupNumber : true) &&
172
+ (caseState.selectedAccountDetails.data.requireCGroupOnCreate
173
+ ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
174
+ : true) &&
172
175
  loggedInUserRights.data.canManageCases());
173
176
  };
174
177
  export const isIdeaCaseStateValid = (caseState, loggedInUserRights) => {
@@ -190,14 +193,18 @@ export const isIdeaCaseStateValid = (caseState, loggedInUserRights) => {
190
193
  !isEmpty(case_details.accountNumberRef) &&
191
194
  !isEmpty(case_details.contactSSOName) &&
192
195
  isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
193
- (caseState.selectedAccountDetails.data.requireCGroupOnCreate ? !!case_details.groupNumber : true) &&
196
+ (caseState.selectedAccountDetails.data.requireCGroupOnCreate
197
+ ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
198
+ : true) &&
194
199
  loggedInUserRights.data.canManageCases());
195
200
  };
196
201
  export const isCaseManagementStateValid = (caseState, loggedInUserRights) => {
197
202
  const case_details = caseState.caseDetails;
198
203
  return (isEmpty(case_details.caseNumber) &&
199
204
  !isEmpty(case_details.severity) &&
200
- (caseState.selectedAccountDetails.data.requireCGroupOnCreate ? !!case_details.groupNumber : true) &&
205
+ (caseState.selectedAccountDetails.data.requireCGroupOnCreate
206
+ ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
207
+ : true) &&
201
208
  isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
202
209
  loggedInUserRights.data.canManageCases());
203
210
  };
@@ -218,87 +225,8 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserRights) =>
218
225
  !isEmpty(case_details.accountNumberRef) &&
219
226
  loggedInUserRights.data.canManageCases());
220
227
  };
221
- const assignDescriptionFields = (casePayload, case_details, v3ClusterName) => {
222
- const noClusterFields = resolveNoClusterIdFieldsForCaseCreate(case_details);
223
- if (!isEmpty(case_details.description)) {
224
- casePayload.Description = stripNoClusterIdFieldsFromDescription(case_details.description);
225
- }
226
- if (noClusterFields.noClusterIdReason || noClusterFields.noClusterIdReasonExplanation) {
227
- casePayload.AdditionalCaseInformation__c = serializeNoClusterIdFieldsToAdditionalCaseInformation(noClusterFields, case_details.additionalCaseInformation);
228
- }
229
- if (!isEmpty(case_details.environment) || !isEmpty(v3ClusterName)) {
230
- const clusterPrefix = v3ClusterName ? `OpenShift Cluster Name: ${v3ClusterName}\n` : '';
231
- casePayload.EnvironmentInWhichItOccurs__c = `${clusterPrefix} ${case_details.environment}`;
232
- }
233
- if (!isEmpty(case_details.periodicityOfIssue)) {
234
- casePayload.FrequencyOfIssueOccurrence__c = case_details.periodicityOfIssue;
235
- }
236
- if (!isEmpty(case_details.timeFramesAndUrgency)) {
237
- casePayload.ImpactOnUserOrBusiness__c = case_details.timeFramesAndUrgency;
238
- }
239
- };
240
- const assignOptionalIdentifiers = (casePayload, caseState) => {
241
- var _a, _b, _c, _d;
242
- const case_details = caseState.caseDetails;
243
- const contactId = (_b = (_a = caseState.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id;
244
- const countryCode = (_c = case_details === null || case_details === void 0 ? void 0 : case_details.phoneCountryCode) === null || _c === void 0 ? void 0 : _c.trim();
245
- const phoneLine = (_d = case_details.phoneAreaCodePrefixLineNumber) === null || _d === void 0 ? void 0 : _d.trim();
246
- if (!isEmpty(contactId))
247
- casePayload.ContactId = contactId;
248
- if (!isEmpty(caseState.selectedEntitlementId))
249
- casePayload.EntitlementId = caseState.selectedEntitlementId;
250
- if (!isEmpty(caseState.selectedVersionId))
251
- casePayload.ProductId = caseState.selectedVersionId;
252
- if (caseState.hasUserUpdatedSuppliedPhone && !isEmpty(countryCode) && !isEmpty(phoneLine)) {
253
- casePayload.SuppliedPhone = `${countryCode} ${phoneLine}`;
254
- }
255
- if (!isEmpty(case_details.alternateId))
256
- casePayload.AlternateCaseId__c = case_details.alternateId;
257
- if (!isEmpty(case_details.openshiftClusterID))
258
- casePayload.OpenshiftClusterID__c = case_details.openshiftClusterID;
259
- if (!isEmpty(case_details.openshiftClusterVersion)) {
260
- casePayload.OpenshiftClusterVersion__c = case_details.openshiftClusterVersion;
261
- }
262
- if (case_details.groupNumber)
263
- casePayload.Group__c = case_details.groupNumber;
264
- };
265
- const assignAccountAccessRestriction = (casePayload, caseState) => {
266
- var _a, _b, _c;
267
- const selectedAccount = (_a = caseState.selectedAccountDetails) === null || _a === void 0 ? void 0 : _a.data;
268
- const rawAccessRestriction = (_b = selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accessRestriction) !== null && _b !== void 0 ? _b : (typeof (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.AccessRestrictions__c) === 'string'
269
- ? selectedAccount.AccessRestrictions__c
270
- : (_c = selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.AccessRestrictions__c) === null || _c === void 0 ? void 0 : _c.value);
271
- const accessRestriction = typeof rawAccessRestriction === 'string' ? rawAccessRestriction.trim() : '';
272
- if (accessRestriction != null && !isEmpty(accessRestriction)) {
273
- casePayload.AccessRestrictions__c = accessRestriction;
274
- }
275
- };
276
- export const createCasePayloadGraphQL = (caseState, sessionItem, isCaseCreate = false) => {
277
- var _a;
278
- const casePayload = {};
279
- const case_details = caseState.caseDetails;
280
- if (!isEmpty(case_details.summary))
281
- casePayload.Subject = case_details.summary;
282
- if (!isEmpty(case_details.caseType))
283
- casePayload.Type = case_details.caseType;
284
- if (!isEmpty(case_details.severity))
285
- casePayload.Priority = case_details.severity;
286
- if (!isEmpty(case_details.caseLanguage)) {
287
- casePayload.Language = (_a = LANGUAGE_MAP[case_details.caseLanguage]) !== null && _a !== void 0 ? _a : case_details.caseLanguage;
288
- }
289
- assignDescriptionFields(casePayload, case_details, caseState.v3ClusterName);
290
- casePayload.Origin = 'Web';
291
- casePayload.RecordTypeId = getTechnicalSupportRecordTypeId();
292
- assignOptionalIdentifiers(casePayload, caseState);
293
- assignAccountAccessRestriction(casePayload, caseState);
294
- casePayload.X24x7__c = !!case_details.fts;
295
- if (case_details.fts && !isEmpty(case_details.contactInfo24x7)) {
296
- casePayload.X24x7ContactInformation__c = case_details.contactInfo24x7;
297
- }
298
- return casePayload;
299
- };
300
228
  export const createCasePayload = (caseState, sessionItem, isCaseCreate = false) => {
301
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
229
+ var _a, _b, _c, _d, _e, _f, _g;
302
230
  const casePayload = {};
303
231
  const case_details = caseState.caseDetails;
304
232
  const seSessionId = (_a = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.session) === null || _a === void 0 ? void 0 : _a.id;
@@ -334,10 +262,7 @@ export const createCasePayload = (caseState, sessionItem, isCaseCreate = false)
334
262
  some(caseState.ownersCaseGroups.data, ['groupNum', case_details.groupNumber])) {
335
263
  casePayload.groupNumber = case_details.groupNumber;
336
264
  }
337
- if (showFtsOnCreateCasePage((_e = case_details.entitlementSla) !== null && _e !== void 0 ? _e : '', case_details.severity, {
338
- accountHasPremiumSla: caseState.accountHasPremiumSla,
339
- hasMultipleSlas: !!caseState.productServiceLevel && ((_g = (_f = caseState.otherServiceLevels) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) > 0,
340
- })) {
265
+ if (showFtsOnCreateCasePage((_e = case_details.entitlementSla) !== null && _e !== void 0 ? _e : '', case_details.severity)) {
341
266
  casePayload.fts = !!case_details.fts;
342
267
  if (casePayload.fts) {
343
268
  casePayload.contactInfo24x7 = case_details.contactInfo24x7;
@@ -363,7 +288,7 @@ export const createCasePayload = (caseState, sessionItem, isCaseCreate = false)
363
288
  !isEmpty(case_details.openshiftClusterVersion) &&
364
289
  (casePayload.openshiftClusterVersion = case_details.openshiftClusterVersion);
365
290
  casePayload.userAgent = getUserAgentForCaseMode(isCaseCreate);
366
- casePayload.originatingSystem = (_j = (_h = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.session) === null || _h === void 0 ? void 0 : _h.originatingSystem) !== null && _j !== void 0 ? _j : casePayload.userAgent;
291
+ casePayload.originatingSystem = (_g = (_f = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.session) === null || _f === void 0 ? void 0 : _f.originatingSystem) !== null && _g !== void 0 ? _g : casePayload.userAgent;
367
292
  !isEmpty(case_details.noClusterIdReason) && (casePayload.noClusterIdReason = case_details.noClusterIdReason);
368
293
  !isEmpty(case_details.noClusterIdReasonExplanation) &&
369
294
  (casePayload.noClusterIdReasonExplanation = case_details.noClusterIdReasonExplanation);
@@ -391,7 +316,7 @@ export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber
391
316
  severity: sessionDetails.severity,
392
317
  entitlementSla: sessionDetails.sla,
393
318
  accountNumberRef: sessionDetails.accountNumber || loggedInUserAccountNumber,
394
- groupNumber: sessionDetails.folderNumber || null,
319
+ groupNumber: sessionDetails.folderNumber || '-1',
395
320
  fts: sessionDetails.isFts,
396
321
  contactInfo24x7: sessionDetails.contactInfo24X7,
397
322
  contactSSOName: sessionDetails.contactSsoUsername || loggedInUserSSO,