@rh-support/troubleshoot 2.7.1 → 2.7.11

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 (585) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +23 -33
  3. package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  5. package/lib/esm/components/AccountInfo/OwnerSelector.js +90 -24
  6. package/lib/esm/components/AccountInfo/css/accountSelector.css +3 -2
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +47 -35
  9. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +167 -90
  11. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +7 -0
  12. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
  13. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +12 -0
  14. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/Case.js +103 -37
  16. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +44 -37
  18. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts +1 -0
  19. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +32 -11
  21. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +94 -72
  23. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  24. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +4 -4
  26. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +3 -2
  27. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +24 -11
  29. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +2 -4
  31. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +1 -1
  33. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/CaseOverview/index.js +123 -70
  35. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +240 -121
  37. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  38. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +6 -6
  40. package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.js +3 -3
  41. package/lib/esm/components/CaseEditView/CaseSubscriptionAbuseAlert.js +1 -1
  42. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  43. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  44. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +55 -43
  45. package/lib/esm/components/CaseEditView/PDFContainer.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/PDFContainer.js +19 -15
  47. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +33 -16
  49. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  50. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +31 -33
  51. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  52. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +116 -91
  53. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  54. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +33 -16
  55. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  56. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +114 -89
  57. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +15 -0
  58. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  59. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +47 -0
  60. package/lib/esm/components/CaseEditView/ShareCase/TnC.d.ts.map +1 -1
  61. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  62. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +9 -6
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +54 -48
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +84 -17
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +8 -8
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +4 -3
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftV3Popover.js +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +137 -59
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +6 -9
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +13 -8
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.d.ts.map +1 -1
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.js +3 -1
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +119 -65
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.d.ts.map +1 -1
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.js +3 -4
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  88. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +22 -15
  89. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts +1 -2
  90. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +6 -5
  92. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
  93. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
  94. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +102 -0
  95. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  96. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +44 -28
  97. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseChat.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseChat.js +7 -1
  99. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  101. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +158 -101
  102. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +10 -2
  103. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  104. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +294 -143
  105. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseExternalTrackerUpdate.js +1 -1
  106. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  107. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +16 -16
  108. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  109. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
  110. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  111. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
  112. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
  113. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  114. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
  115. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  116. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  117. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +62 -0
  118. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +1 -2
  119. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  120. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +14 -12
  121. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
  122. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  123. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +223 -277
  124. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  125. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +33 -25
  126. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts +0 -1
  127. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  128. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +8 -4
  129. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +55 -42
  130. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +36 -3
  131. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  132. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +100 -248
  133. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  134. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  135. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +29 -12
  136. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  137. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +32 -18
  138. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.d.ts.map +1 -1
  139. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +5 -7
  140. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  141. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +41 -55
  142. package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.d.ts.map +1 -1
  143. package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +2 -3
  144. package/lib/esm/components/CaseInformation/AISureMessageCard.d.ts +7 -0
  145. package/lib/esm/components/CaseInformation/AISureMessageCard.d.ts.map +1 -0
  146. package/lib/esm/components/CaseInformation/AISureMessageCard.js +15 -0
  147. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  148. package/lib/esm/components/CaseInformation/CaseGroup.js +177 -55
  149. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  150. package/lib/esm/components/CaseInformation/CaseInformation.js +15 -14
  151. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
  152. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
  153. package/lib/esm/components/CaseInformation/CaseLabels.js +108 -0
  154. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  155. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
  156. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
  157. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +3 -3
  158. package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
  159. package/lib/esm/components/CaseInformation/Description.js +25 -7
  160. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  161. package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
  162. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  163. package/lib/esm/components/CaseInformation/Fts.js +41 -27
  164. package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts +1 -0
  165. package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts.map +1 -1
  166. package/lib/esm/components/CaseInformation/OpenCaseIssue.js +8 -3
  167. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  168. package/lib/esm/components/CaseInformation/Severity.js +34 -25
  169. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  170. package/lib/esm/components/CaseInformation/SupportLevel.js +43 -51
  171. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
  172. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
  173. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
  174. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  175. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +14 -17
  176. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  177. package/lib/esm/components/CaseManagement/CaseManagement.js +15 -12
  178. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  179. package/lib/esm/components/CaseManagement/Cep.js +56 -51
  180. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +1 -1
  181. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +50 -42
  182. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
  183. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  184. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +74 -72
  185. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  186. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +14 -9
  187. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +1 -4
  188. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  189. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +136 -84
  190. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  191. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +12 -8
  192. package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.d.ts.map +1 -1
  193. package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.js +8 -8
  194. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
  195. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +19 -21
  196. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  197. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +15 -10
  198. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  199. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +94 -49
  200. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  201. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +17 -34
  202. package/lib/esm/components/ConfirmationModals/PreCaseConfirmationModals.d.ts.map +1 -1
  203. package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.d.ts.map +1 -1
  204. package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.js +1 -1
  205. package/lib/esm/components/Cve/CveItem.d.ts.map +1 -1
  206. package/lib/esm/components/Cve/CveItem.js +14 -11
  207. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  208. package/lib/esm/components/Cve/CveModal.js +12 -11
  209. package/lib/esm/components/Cve/CvePanel.d.ts.map +1 -1
  210. package/lib/esm/components/Cve/CvePanel.js +18 -10
  211. package/lib/esm/components/Cve/CveSidebar.d.ts.map +1 -1
  212. package/lib/esm/components/Cve/CveSidebar.js +9 -8
  213. package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
  214. package/lib/esm/components/EditDescription/EditDescription.js +4 -2
  215. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  216. package/lib/esm/components/IdeaInformation/IdeaInformation.js +30 -24
  217. package/lib/esm/components/ImproveCase/Hostname.d.ts.map +1 -1
  218. package/lib/esm/components/ImproveCase/Hostname.js +2 -2
  219. package/lib/esm/components/ImproveCase/KtQuestions.js +6 -6
  220. package/lib/esm/components/OpenCase/CaseTypeIcons/BugIcon.d.ts.map +1 -1
  221. package/lib/esm/components/OpenCase/CaseTypeIcons/CertificationIcon.d.ts.map +1 -1
  222. package/lib/esm/components/OpenCase/CaseTypeIcons/CustomerServiceIcon.d.ts.map +1 -1
  223. package/lib/esm/components/OpenCase/CaseTypeIcons/DocumentationIcon.d.ts.map +1 -1
  224. package/lib/esm/components/OpenCase/CaseTypeIcons/GearIcon.d.ts.map +1 -1
  225. package/lib/esm/components/OpenCase/CaseTypeIcons/IdeaIcon.d.ts.map +1 -1
  226. package/lib/esm/components/OpenCase/CaseTypeIcons/RcaIcon.d.ts.map +1 -1
  227. package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
  228. package/lib/esm/components/OpenCase/OpenCase.js +2 -8
  229. package/lib/esm/components/OpenCase/SupportTypeIcons/BugIcon.d.ts.map +1 -1
  230. package/lib/esm/components/OpenCase/SupportTypeIcons/CertificationIcon.d.ts.map +1 -1
  231. package/lib/esm/components/OpenCase/SupportTypeIcons/CustomerServiceIcon.d.ts.map +1 -1
  232. package/lib/esm/components/OpenCase/SupportTypeIcons/DocumentationIcon.d.ts.map +1 -1
  233. package/lib/esm/components/OpenCase/SupportTypeIcons/GearIcon.d.ts.map +1 -1
  234. package/lib/esm/components/OpenCase/SupportTypeIcons/IdeaIcon.d.ts.map +1 -1
  235. package/lib/esm/components/OpenCase/SupportTypeIcons/RcaIcon.d.ts.map +1 -1
  236. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  237. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +10 -15
  238. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  239. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  240. package/lib/esm/components/ProductSelector/AllProductsSelector.js +20 -39
  241. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
  242. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  243. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +67 -59
  244. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  245. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +47 -56
  246. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
  247. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
  248. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
  249. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  250. package/lib/esm/components/ProductSelector/ProductSelector.js +7 -16
  251. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  252. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +13 -5
  253. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  254. package/lib/esm/components/Recommendations/AsideResults.js +22 -12
  255. package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts +2 -0
  256. package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
  257. package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +18 -13
  258. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  259. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  260. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  261. package/lib/esm/components/Recommendations/ClusterRecommendations.js +3 -9
  262. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
  263. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +10 -11
  264. package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
  265. package/lib/esm/components/Recommendations/CriticalSolutionsToast.js +1 -1
  266. package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
  267. package/lib/esm/components/Recommendations/EARules/EARule.js +9 -4
  268. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
  269. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +6 -4
  270. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.d.ts.map +1 -1
  271. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +9 -9
  272. package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
  273. package/lib/esm/components/Recommendations/InsightsResults.js +9 -5
  274. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  275. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +25 -16
  276. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
  277. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +7 -7
  278. package/lib/esm/components/Recommendations/RecommendationInfoBox.d.ts.map +1 -1
  279. package/lib/esm/components/Recommendations/RecommendationInfoBox.js +7 -7
  280. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  281. package/lib/esm/components/Recommendations/Recommendations.js +51 -42
  282. package/lib/esm/components/Recommendations/RecommendationsLoader.js +1 -1
  283. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  284. package/lib/esm/components/Recommendations/RulesModal.js +10 -12
  285. package/lib/esm/components/Recommendations/WatsonxAiIcon.d.ts.map +1 -1
  286. package/lib/esm/components/Recommendations/WatsonxAiIcon.js +9 -10
  287. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  288. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
  289. package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
  290. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  291. package/lib/esm/components/Review/Review.js +43 -28
  292. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
  293. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +7 -5
  294. package/lib/esm/components/SessionRestore/SessionRestore.d.ts +2 -0
  295. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  296. package/lib/esm/components/SessionRestore/SessionRestore.js +35 -13
  297. package/lib/esm/components/SessionRestore/SessionRestoreCard.js +1 -1
  298. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  299. package/lib/esm/components/SubmitCase/SubmitCase.js +34 -22
  300. package/lib/esm/components/Suggestions/EmptyTopContentSidebar.d.ts +3 -0
  301. package/lib/esm/components/Suggestions/EmptyTopContentSidebar.d.ts.map +1 -0
  302. package/lib/esm/components/Suggestions/EmptyTopContentSidebar.js +26 -0
  303. package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
  304. package/lib/esm/components/Suggestions/Suggestions.js +31 -25
  305. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  306. package/lib/esm/components/Suggestions/TopContent.js +17 -17
  307. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +9 -0
  308. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -0
  309. package/lib/esm/components/TroubleshootSection/AskRedHat.js +367 -0
  310. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts +9 -0
  311. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts.map +1 -0
  312. package/lib/esm/components/TroubleshootSection/CloseButton.js +5 -0
  313. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts +15 -0
  314. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts.map +1 -0
  315. package/lib/esm/components/TroubleshootSection/QuickResponse.js +26 -0
  316. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts +18 -0
  317. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts.map +1 -0
  318. package/lib/esm/components/TroubleshootSection/ResponseActionButton.js +28 -0
  319. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts +20 -0
  320. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -0
  321. package/lib/esm/components/TroubleshootSection/ResponseActions.js +54 -0
  322. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +20 -0
  323. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  324. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +346 -27
  325. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +13 -0
  326. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -0
  327. package/lib/esm/components/TroubleshootSection/UserFeedback.js +50 -0
  328. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts +10 -0
  329. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts.map +1 -0
  330. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.js +50 -0
  331. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +9 -0
  332. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +1 -0
  333. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +9 -0
  334. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +9 -0
  335. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +1 -0
  336. package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +17 -0
  337. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  338. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +157 -105
  339. package/lib/esm/components/shared/Constants.d.ts +1 -4
  340. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  341. package/lib/esm/components/shared/Constants.js +1 -4
  342. package/lib/esm/components/shared/Rule.d.ts.map +1 -1
  343. package/lib/esm/components/shared/Rule.js +6 -6
  344. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  345. package/lib/esm/components/shared/fileUpload/FileLister.js +11 -14
  346. package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
  347. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  348. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  349. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
  350. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  351. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +13 -10
  352. package/lib/esm/components/shared/fileUpload/common/FileUploaderInfoIcon.js +1 -1
  353. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +2 -0
  354. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  355. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  356. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
  357. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
  358. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +4 -4
  359. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +2 -2
  360. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
  361. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  362. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +311 -60
  363. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
  364. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  365. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
  366. package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
  367. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  368. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  369. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  370. package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
  371. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +16 -6
  372. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  373. package/lib/esm/components/shared/input/ContactSelectorInternal.js +133 -23
  374. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  375. package/lib/esm/components/shared/useIsSectionValid.js +70 -91
  376. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  377. package/lib/esm/components/shared/usePostComment.js +16 -28
  378. package/lib/esm/components/shared/utils.d.ts +1 -0
  379. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  380. package/lib/esm/components/shared/utils.js +9 -3
  381. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  382. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +187 -37
  383. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  384. package/lib/esm/components/wizardLayout/MainSection.js +5 -4
  385. package/lib/esm/components/wizardLayout/NewFeatureModal.d.ts.map +1 -1
  386. package/lib/esm/components/wizardLayout/NewFeatureModal.js +6 -6
  387. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  388. package/lib/esm/components/wizardLayout/WizardAside.js +35 -15
  389. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  390. package/lib/esm/components/wizardLayout/WizardLayout.js +17 -46
  391. package/lib/esm/components/wizardLayout/WizardMain.d.ts +10 -1
  392. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  393. package/lib/esm/components/wizardLayout/WizardMain.js +361 -22
  394. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +8 -2
  395. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  396. package/lib/esm/components/wizardLayout/WizardNavigation.js +118 -75
  397. package/lib/esm/components/wizardLayout/index.d.ts +1 -0
  398. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  399. package/lib/esm/components/wizardLayout/index.js +1 -0
  400. package/lib/esm/constants/askRedHatMessages.d.ts +35 -0
  401. package/lib/esm/constants/askRedHatMessages.d.ts.map +1 -0
  402. package/lib/esm/constants/askRedHatMessages.js +61 -0
  403. package/lib/esm/constants/caseDetailsConstants.d.ts +15 -11
  404. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  405. package/lib/esm/constants/caseDetailsConstants.js +32 -12
  406. package/lib/esm/context/AIResponseContext.d.ts +10 -0
  407. package/lib/esm/context/AIResponseContext.d.ts.map +1 -0
  408. package/lib/esm/context/AIResponseContext.js +26 -0
  409. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  410. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  411. package/lib/esm/context/RootTroubleshootProvider.js +8 -6
  412. package/lib/esm/css/AskRedHat.css +495 -0
  413. package/lib/esm/css/app.css +54 -17
  414. package/lib/esm/css/case.css +499 -37
  415. package/lib/esm/css/productSelector.css +5 -1
  416. package/lib/esm/css/results.css +2 -2
  417. package/lib/esm/graphql/index.d.ts +4 -0
  418. package/lib/esm/graphql/index.d.ts.map +1 -0
  419. package/lib/esm/graphql/index.js +3 -0
  420. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  421. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  422. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  423. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  424. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  425. package/lib/esm/graphql/mutations/index.js +1 -0
  426. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  427. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  428. package/lib/esm/graphql/queries/getEscalationDetails.js +36 -0
  429. package/lib/esm/graphql/queries/index.d.ts +2 -0
  430. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  431. package/lib/esm/graphql/queries/index.js +1 -0
  432. package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
  433. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  434. package/lib/esm/graphql/schemas/escalation.js +1 -0
  435. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  436. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  437. package/lib/esm/graphql/schemas/index.js +1 -0
  438. package/lib/esm/hooks/useAB.d.ts +23 -0
  439. package/lib/esm/hooks/useAB.d.ts.map +1 -0
  440. package/lib/esm/hooks/useAB.js +75 -0
  441. package/lib/esm/hooks/useARHResponse.d.ts +15 -0
  442. package/lib/esm/hooks/useARHResponse.d.ts.map +1 -0
  443. package/lib/esm/hooks/useARHResponse.js +103 -0
  444. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  445. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  446. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +57 -0
  447. package/lib/esm/hooks/useCaseComments/index.d.ts +8 -0
  448. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  449. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  450. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  451. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  452. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
  453. package/lib/esm/hooks/useCaseComments/types.d.ts +93 -0
  454. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  455. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  456. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +26 -0
  457. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  458. package/lib/esm/hooks/useCaseComments/useCaseComments.js +116 -0
  459. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  460. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  461. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  462. package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
  463. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
  464. package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
  465. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  466. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  467. package/lib/esm/hooks/useCaseHistory.js +107 -0
  468. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
  469. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
  470. package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
  471. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +9 -1
  472. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  473. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +108 -11
  474. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  475. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  476. package/lib/esm/hooks/useS3Upload.d.ts +5 -4
  477. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  478. package/lib/esm/hooks/useS3Upload.js +28 -30
  479. package/lib/esm/hooks/useWizard.d.ts +14 -0
  480. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  481. package/lib/esm/hooks/useWizard.js +33 -11
  482. package/lib/esm/i18n/template-de.d.ts +82 -4
  483. package/lib/esm/i18n/template-de.d.ts.map +1 -1
  484. package/lib/esm/i18n/template-de.js +82 -4
  485. package/lib/esm/i18n/template-es.d.ts +81 -3
  486. package/lib/esm/i18n/template-es.d.ts.map +1 -1
  487. package/lib/esm/i18n/template-es.js +81 -3
  488. package/lib/esm/i18n/template-fr.d.ts +81 -3
  489. package/lib/esm/i18n/template-fr.d.ts.map +1 -1
  490. package/lib/esm/i18n/template-fr.js +81 -3
  491. package/lib/esm/i18n/template-it.d.ts +81 -3
  492. package/lib/esm/i18n/template-it.d.ts.map +1 -1
  493. package/lib/esm/i18n/template-it.js +81 -3
  494. package/lib/esm/i18n/template-jp.d.ts +81 -3
  495. package/lib/esm/i18n/template-jp.d.ts.map +1 -1
  496. package/lib/esm/i18n/template-jp.js +81 -3
  497. package/lib/esm/i18n/template-ko.d.ts +81 -3
  498. package/lib/esm/i18n/template-ko.d.ts.map +1 -1
  499. package/lib/esm/i18n/template-ko.js +81 -3
  500. package/lib/esm/i18n/template-pt.d.ts +81 -3
  501. package/lib/esm/i18n/template-pt.d.ts.map +1 -1
  502. package/lib/esm/i18n/template-pt.js +81 -3
  503. package/lib/esm/i18n/template-ru.d.ts +47 -3
  504. package/lib/esm/i18n/template-ru.d.ts.map +1 -1
  505. package/lib/esm/i18n/template-ru.js +47 -3
  506. package/lib/esm/i18n/template-zh.d.ts +59 -3
  507. package/lib/esm/i18n/template-zh.d.ts.map +1 -1
  508. package/lib/esm/i18n/template-zh.js +59 -3
  509. package/lib/esm/index.d.ts.map +1 -1
  510. package/lib/esm/index.js +2 -0
  511. package/lib/esm/models/cache.d.ts +0 -2
  512. package/lib/esm/models/cache.d.ts.map +1 -1
  513. package/lib/esm/models/caseHistory.d.ts +86 -0
  514. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  515. package/lib/esm/models/caseHistory.js +1 -0
  516. package/lib/esm/reducers/AIResponseConstNTypes.d.ts +90 -0
  517. package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -0
  518. package/lib/esm/reducers/AIResponseConstNTypes.js +33 -0
  519. package/lib/esm/reducers/AIResponseReducer.d.ts +14 -0
  520. package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -0
  521. package/lib/esm/reducers/AIResponseReducer.js +80 -0
  522. package/lib/esm/reducers/CaseConstNTypes.d.ts +129 -9
  523. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  524. package/lib/esm/reducers/CaseConstNTypes.js +39 -10
  525. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
  526. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  527. package/lib/esm/reducers/CaseDetailsPageReducer.js +61 -26
  528. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -10
  529. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  530. package/lib/esm/reducers/CaseDiscussionTabReducer.js +95 -64
  531. package/lib/esm/reducers/CaseHelpers.d.ts +26 -7
  532. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  533. package/lib/esm/reducers/CaseHelpers.js +150 -27
  534. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  535. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  536. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  537. package/lib/esm/reducers/CaseReducer.d.ts +59 -12
  538. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  539. package/lib/esm/reducers/CaseReducer.js +311 -95
  540. package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts.map +1 -1
  541. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  542. package/lib/esm/reducers/RecommendationsReducer.js +16 -19
  543. package/lib/esm/reducers/RouteConstNTypes.d.ts +1 -2
  544. package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
  545. package/lib/esm/reducers/RouteConstNTypes.js +4 -1
  546. package/lib/esm/reducers/RouteReducer.d.ts +2 -2
  547. package/lib/esm/reducers/RouteReducer.d.ts.map +1 -1
  548. package/lib/esm/reducers/RouteReducer.js +1 -1
  549. package/lib/esm/reducers/RulesReducer.d.ts +11 -4
  550. package/lib/esm/reducers/RulesReducer.d.ts.map +1 -1
  551. package/lib/esm/reducers/RulesReducer.js +6 -1
  552. package/lib/esm/reducers/SessionRestoreReducer.d.ts +4 -3
  553. package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
  554. package/lib/esm/reducers/SessionRestoreReducer.js +51 -17
  555. package/lib/esm/reducers/TopContentReducer.d.ts.map +1 -1
  556. package/lib/esm/reducers/TopContentReducer.js +1 -1
  557. package/lib/esm/scss/_main.scss +295 -117
  558. package/lib/esm/scss/_pf-overrides.scss +269 -162
  559. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  560. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  561. package/lib/esm/utils/TimelineUtils.js +135 -0
  562. package/lib/esm/utils/caseDetailsCacheUtils.d.ts.map +1 -1
  563. package/lib/esm/utils/caseDetailsCacheUtils.js +1 -0
  564. package/lib/esm/utils/caseHistoryUtils.d.ts +85 -0
  565. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  566. package/lib/esm/utils/caseHistoryUtils.js +200 -0
  567. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  568. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  569. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  570. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
  571. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
  572. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
  573. package/lib/esm/utils/caseUtils.d.ts.map +1 -1
  574. package/lib/esm/utils/engagementUtils.d.ts +3 -0
  575. package/lib/esm/utils/engagementUtils.d.ts.map +1 -0
  576. package/lib/esm/utils/engagementUtils.js +16 -0
  577. package/lib/esm/utils/linkifyHtmlTextNodes.d.ts +8 -0
  578. package/lib/esm/utils/linkifyHtmlTextNodes.d.ts.map +1 -0
  579. package/lib/esm/utils/linkifyHtmlTextNodes.js +37 -0
  580. package/lib/esm/utils/remoteRiderUtils.d.ts.map +1 -1
  581. package/lib/esm/utils/visitedResourcesUtils.d.ts +31 -0
  582. package/lib/esm/utils/visitedResourcesUtils.d.ts.map +1 -0
  583. package/lib/esm/utils/visitedResourcesUtils.js +99 -0
  584. package/package.json +21 -26
  585. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.css +0 -0
@@ -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 { useApolloClient } from '@apollo/client/react';
10
11
  import { Grid, GridItem } from '@patternfly/react-core';
11
12
  import { SupportFeedbackForm } from '@rh-support/components';
12
13
  import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
13
- import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { ABTestSplitBasedOnAccountNumber, getConfigField, getVersionIfOnlyVersion, PCM_CONFIG_FIELD_TYPE, pendoTrackEvent, PreviousCaseTypes, } from '@rh-support/utils';
14
+ import { getVersionIfOnlyVersion, hasTraditionalSupportSessionAgreed, PreviousCaseTypes } from '@rh-support/utils';
15
15
  import findIndex from 'lodash/findIndex';
16
16
  import isEmpty from 'lodash/isEmpty';
17
17
  import isEqual from 'lodash/isEqual';
@@ -20,35 +20,35 @@ import { Trans } from 'react-i18next';
20
20
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
21
21
  import { RouteContext } from '../../context/RouteContext';
22
22
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
23
- import { setABTestVariation, submitCase } from '../../reducers/CaseReducer';
23
+ import { submitCase } from '../../reducers/CaseReducer';
24
24
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
25
25
  import { useMetadata } from '../../utils/metadataUtil';
26
26
  import RouteUtils from '../../utils/routeUtils';
27
27
  import PreCaseConfirmationModals, { PreCaseConfirmationModalsEnum, } from '../ConfirmationModals/PreCaseConfirmationModals';
28
28
  import AlertToastWrapper from '../Recommendations/AlertToastWrapper';
29
- import { preferredSSModalOpenPendoEvent } from '../shared/Constants';
30
29
  import { AttachmentStateContext } from '../shared/fileUpload';
31
30
  import { isAnyFileAttached } from '../shared/fileUpload/reducer/AttachmentHelper';
32
31
  import { GlobalTroubleshootEffects } from './GlobalTroubleshootEffects';
33
32
  import WizardAside from './WizardAside';
34
33
  import WizardMain from './WizardMain';
35
34
  export function WizardLayout(props) {
35
+ var _a, _b, _c, _d;
36
36
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
37
37
  const { getMetadata } = useMetadata();
38
- const { caseCreationError, contactSSOName, caseType, product, caseState, ABTestVariation } = useCaseSelector((state) => ({
38
+ const [isAIChatMode, setIsAIChatMode] = useState(false);
39
+ const { caseCreationError, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
39
40
  caseState: state,
40
41
  caseCreationError: state.caseCreationError,
41
- contactSSOName: state.caseDetails.contactSSOName,
42
42
  caseType: state.caseDetails.caseType,
43
43
  product: state.caseDetails.product,
44
- ABTestVariation: state.ABTestVariation,
44
+ hasInvalidEntitlements: state.hasInvalidEntitlements,
45
45
  }), isEqual);
46
46
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
47
47
  const caseDispatch = useCaseDispatch();
48
48
  const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
49
- const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
49
+ const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, loggedInUserRights, caseListTraditionalSupportAgreed, troubleshootTraditionalSupportAgreed, }, } = useContext(GlobalMetadataStateContext);
50
50
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
51
- const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
51
+ const apolloClient = useApolloClient();
52
52
  const { attachmentState } = useContext(AttachmentStateContext);
53
53
  const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
54
54
  const [confirmationModalType, setConfirmationModalType] = useState(null);
@@ -74,8 +74,7 @@ export function WizardLayout(props) {
74
74
  viewedConfirmationModalsList.current.push(PreCaseConfirmationModalsEnum.ROCM_MODAL);
75
75
  isModalPresent = true;
76
76
  }
77
- else if (canAddAttachments &&
78
- !isAnyFileAttachedLocal &&
77
+ else if (!isAnyFileAttachedLocal &&
79
78
  !viewedConfirmationModalsList.current.includes(PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL)) {
80
79
  setConfirmationModalType(PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL);
81
80
  viewedConfirmationModalsList.current.push(PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL);
@@ -99,7 +98,7 @@ export function WizardLayout(props) {
99
98
  "Try submitting again after a minute. Please ",
100
99
  React.createElement(SupportFeedbackForm, { isInline: true }),
101
100
  " if you continue to see this message.")));
102
- submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem);
101
+ submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem, apolloClient, hasTraditionalSupportSessionAgreed(caseListTraditionalSupportAgreed, troubleshootTraditionalSupportAgreed));
103
102
  // reset viewedModals on case submit
104
103
  viewedConfirmationModalsList.current = [];
105
104
  !isReSubmitting &&
@@ -109,7 +108,6 @@ export function WizardLayout(props) {
109
108
  if (hasPreferredSecureSupportAccount) {
110
109
  setConfirmationModalType(PreCaseConfirmationModalsEnum.PREFERRED_GS4_Modal);
111
110
  // track pendo event
112
- pendoTrackEvent(preferredSSModalOpenPendoEvent);
113
111
  }
114
112
  };
115
113
  const onModalClose = () => {
@@ -118,43 +116,16 @@ export function WizardLayout(props) {
118
116
  }
119
117
  setConfirmationModalType(null);
120
118
  };
121
- // A/B test
122
119
  useEffect(() => {
123
- var _a, _b;
124
- if (isEmpty(loggedInUsersAccount.data.accountNumber))
125
- return;
126
- const urlParams = new URLSearchParams(window.location.search);
127
- const useflowFromUrl = urlParams.get('useflow');
128
- // if useflow was added in url, we force the selection
129
- if (useflowFromUrl &&
130
- (((_a = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'a' || ((_b = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'b')) {
131
- // set state for PCM to show A or B
132
- setABTestVariation(caseDispatch, useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase());
133
- return;
134
- }
135
- const appABTestConfig = getConfigField(pcmConfig.data, 'testVariationWeightZeroToTen', PCM_CONFIG_FIELD_TYPE.STRING);
136
- if (isEmpty(loggedInUsersAccount.data.accountNumber) || isEmpty(appABTestConfig))
137
- return;
138
- const appTestWeight = parseInt(appABTestConfig, 10);
139
- const newABTestVariation = ABTestSplitBasedOnAccountNumber(appTestWeight, loggedInUsersAccount.data.accountNumber);
140
- if (newABTestVariation !== ABTestVariation) {
141
- // set state for PCM to show A or B
142
- setABTestVariation(caseDispatch, newABTestVariation);
143
- }
144
- // eslint-disable-next-line react-hooks/exhaustive-deps
145
- }, [loggedInUsersAccount.data.accountNumber, ABTestVariation]);
146
- // Loading app metadata
147
- useEffect(() => {
148
- fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
149
- // eslint-disable-next-line react-hooks/exhaustive-deps
150
- }, [contactSSOName, dispatchToGlobalMetadataReducer]);
120
+ fetchProducts(dispatchToGlobalMetadataReducer, apolloClient);
121
+ }, [dispatchToGlobalMetadataReducer, apolloClient]);
151
122
  return (React.createElement(React.Fragment, null,
152
123
  React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
153
124
  activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseCreationError) })),
154
125
  React.createElement(Grid, { style: { height: '100%' } },
155
- React.createElement(GridItem, { sm: 12, md: 12, lg: 8, xl2: 8 },
156
- React.createElement(WizardMain, { routeProps: props.routeProps, submitCaseAndNavigate: submitCaseAndNavigate, confirmSupportModal: confirmSupportModal })),
157
- React.createElement(GridItem, { span: 4, className: "grid-wizard-aside-content" },
158
- React.createElement(WizardAside, { isAttachmentUploadModalOpen: confirmationModalType === PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL, routeProps: props.routeProps }))),
126
+ React.createElement(GridItem, { sm: 12, md: 12, lg: isAIChatMode ? 12 : 8, xl2: isAIChatMode ? 12 : 8 },
127
+ React.createElement(WizardMain, { routeProps: props.routeProps, submitCaseAndNavigate: submitCaseAndNavigate, confirmSupportModal: confirmSupportModal, isAIChatMode: isAIChatMode, setIsAIChatMode: setIsAIChatMode, isSecureSupport: (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport, hasConfirmedStatesideSupport: (_b = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.hasConfirmedStatesideSupport, isUserExternal: (_d = (_c = loggedInUserRights === null || loggedInUserRights === void 0 ? void 0 : loggedInUserRights.data) === null || _c === void 0 ? void 0 : _c.isExternal()) !== null && _d !== void 0 ? _d : false, hasInvalidEntitlements: hasInvalidEntitlements })),
128
+ !isAIChatMode && (React.createElement(GridItem, { span: 4, className: "grid-wizard-aside-content" },
129
+ React.createElement(WizardAside, { isAttachmentUploadModalOpen: confirmationModalType === PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL, routeProps: props.routeProps })))),
159
130
  React.createElement(AlertToastWrapper, { submitCaseAndNavigate: submitCaseAndNavigate, routeProps: props.routeProps })));
160
131
  }
@@ -1,10 +1,19 @@
1
- import React from 'react';
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
2
  import { RouteComponentProps } from 'react-router-dom';
3
3
  import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
4
+ export declare const getCaseTypeAIText: (caseType: string) => string;
5
+ export declare const generateCaseTypePrefix: (activeSection: string, caseType: string, lang: string) => string;
6
+ export declare const generateAIQuestion: (activeSection: string, product: string | undefined, version: string | undefined, summary: string | undefined, issue: string | undefined, caseType: string, lang: string) => string;
4
7
  interface IProps {
5
8
  routeProps: RouteComponentProps<IRouteUrlParams>;
6
9
  submitCaseAndNavigate: (isReSubmitting: boolean) => void;
7
10
  confirmSupportModal: (hasPreferredSecureSupportAccount: boolean) => void;
11
+ isAIChatMode: boolean;
12
+ setIsAIChatMode: Dispatch<SetStateAction<boolean>>;
13
+ isSecureSupport?: boolean;
14
+ hasConfirmedStatesideSupport?: boolean;
15
+ isUserExternal?: boolean;
16
+ hasInvalidEntitlements?: boolean;
8
17
  }
9
18
  declare function WizardMain(props: IProps): React.JSX.Element;
10
19
  export default WizardMain;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgJhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAkE,MAAM,OAAO,CAAC;AAExH,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAY9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcpF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,MAEpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,eAAe,MAAM,EAAE,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MAqB9F,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAC3B,eAAe,MAAM,EACrB,SAAS,MAAM,GAAG,SAAS,EAC3B,SAAS,MAAM,GAAG,SAAS,EAC3B,SAAS,MAAM,GAAG,SAAS,EAC3B,OAAO,MAAM,GAAG,SAAS,EACzB,UAAU,MAAM,EAChB,MAAM,MAAM,KACb,MAwCF,CAAC;AACF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAoehC;AACD,eAAe,UAAU,CAAC"}
@@ -1,32 +1,211 @@
1
- import { Wizard, WizardContextConsumer, WizardFooter } from '@patternfly/react-core/deprecated';
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __rest = (this && this.__rest) || function (s, e) {
11
+ var t = {};
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
+ t[p] = s[p];
14
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
+ t[p[i]] = s[p[i]];
18
+ }
19
+ return t;
20
+ };
21
+ import { Env } from '@cee-eng/hydrajs';
22
+ import { getRHDirectHealthCheck, getRHDirectStatusCheck, } from '@ifd-ui/ask-redhat-core';
23
+ import { Wizard, WizardNav, WizardNavItem, WizardStep, } from '@patternfly/react-core';
2
24
  import { LoadingIndicator } from '@rh-support/components';
25
+ import { CSSUserModal, GlobalMetadataStateContext, setTraditionalSupportSessionAgreed, useGlobalDispatchContext, } from '@rh-support/react-context';
26
+ import isEmpty from 'lodash/isEmpty';
3
27
  import isEqual from 'lodash/isEqual';
4
- import React, { Suspense, useContext, useRef, useState } from 'react';
28
+ import trim from 'lodash/trim';
29
+ import React, { Suspense, useCallback, useContext, useEffect, useRef, useState } from 'react';
5
30
  import { useTranslation } from 'react-i18next';
6
31
  import { Route } from 'react-router-dom';
32
+ import { useAIResponseState } from '../../context/AIResponseContext';
7
33
  import { useCaseSelector } from '../../context/CaseContext';
8
34
  import { RecommendationDispatchContext } from '../../context/RecommendationContext';
9
- import { RouteDispatchContext } from '../../context/RouteContext';
35
+ import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
36
+ import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
37
+ import { useAB } from '../../hooks/useAB';
38
+ import { useARHResponse } from '../../hooks/useARHResponse';
10
39
  import { useWizard } from '../../hooks/useWizard';
40
+ import { appSourceId_ARH, excludedCaseTypesforARH } from '../../reducers/CaseConstNTypes';
11
41
  import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
12
42
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
13
43
  import { setActiveSectionChanged, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
44
+ import { updateSession } from '../../reducers/SessionRestoreReducer';
14
45
  import RouteUtils from '../../utils/routeUtils';
15
46
  import SubmitCase from '../SubmitCase/SubmitCase';
16
47
  import MainSection from './MainSection';
17
48
  import NewFeatureModal from './NewFeatureModal';
18
49
  import WizardNavigation from './WizardNavigation';
50
+ // Mapping for case type display text in AI questions
51
+ const CASE_TYPE_AI_TEXT_MAP = {
52
+ Other: 'Something',
53
+ };
54
+ export const getCaseTypeAIText = (caseType) => {
55
+ return CASE_TYPE_AI_TEXT_MAP[caseType] || caseType;
56
+ };
57
+ export const generateCaseTypePrefix = (activeSection, caseType, lang) => {
58
+ if (activeSection === AppRouteSections.TROUBLESHOOT) {
59
+ return '';
60
+ }
61
+ const helpWith = getCaseTypeAIText(caseType);
62
+ const helpWithMap = {
63
+ en: `I want help with ${helpWith}.`,
64
+ de: `Ich benoetige Hilfe bei ${helpWith}.`,
65
+ zh: `我需要 ${helpWith} 方面的帮助。`,
66
+ pt: `Eu quero ajuda com ${helpWith}.`,
67
+ fr: `Je souhaite obtenir de l'aide pour ${helpWith}.`,
68
+ ko: `${helpWith}에 대한 도움이 필요합니다.`,
69
+ it: `Vorrei aiuto con un ${helpWith}.`,
70
+ ja: `${helpWith}のサポートを希望します。`,
71
+ ru: `Я хочу помощь с ${helpWith}.`,
72
+ es: `Quiero ayuda con ${helpWith}.`,
73
+ };
74
+ return helpWithMap[lang] || helpWithMap.en;
75
+ };
76
+ // Generate AI question based on case details
77
+ export const generateAIQuestion = (activeSection, product, version, summary, issue, caseType, lang) => {
78
+ const baseMessageMap = {
79
+ en: `My issue is primarily related to ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. I would title my problem: ${summary !== null && summary !== void 0 ? summary : ''}. More details are as follows: ${issue !== null && issue !== void 0 ? issue : ''}.`,
80
+ de: `Mein Problem hängt hauptsächlich mit ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''} zusammen. Ich würde mein Problem so betiteln: ${summary !== null && summary !== void 0 ? summary : ''}. Weitere Details sind wie folgt: ${issue !== null && issue !== void 0 ? issue : ''}.`,
81
+ zh: `我的问题主要与${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}有关。我会将我的问题命名为:${summary !== null && summary !== void 0 ? summary : ''}。更多细节如下:${issue !== null && issue !== void 0 ? issue : ''}。`,
82
+ pt: `Meu problema está principalmente relacionado a ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. Eu daria ao meu problema o título: ${summary !== null && summary !== void 0 ? summary : ''}. Mais detalhes são os seguintes: ${issue !== null && issue !== void 0 ? issue : ''}.`,
83
+ fr: `Mon problème est principalement lié à ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. Je donnerais à mon problème le titre : ${summary !== null && summary !== void 0 ? summary : ''}. Plus de détails sont les suivants : ${issue !== null && issue !== void 0 ? issue : ''}.`,
84
+ ko: `내 문제는 주로 ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}과(와) 관련이 있습니다. 내 문제의 제목은 ${summary !== null && summary !== void 0 ? summary : ''}입니다. 자세한 내용은 다음과 같습니다: ${issue !== null && issue !== void 0 ? issue : ''}.`,
85
+ it: `Il mio problema è principalmente legato a ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. Intitolerei il mio problema: ${summary !== null && summary !== void 0 ? summary : ''}. Ulteriori dettagli sono i seguenti: ${issue !== null && issue !== void 0 ? issue : ''}`,
86
+ ja: `私の問題は主に${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}に関係しています。問題のタイトルは: ${summary !== null && summary !== void 0 ? summary : ''}です。詳細は次のとおりです: ${issue !== null && issue !== void 0 ? issue : ''}。`,
87
+ ru: `Моя проблема в основном связана с ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. Я бы назвал свою проблему: ${summary !== null && summary !== void 0 ? summary : ''}. Дополнительные подробности следующие: ${issue !== null && issue !== void 0 ? issue : ''}.`,
88
+ es: `Mi problema está principalmente relacionado con ${product !== null && product !== void 0 ? product : ''} ${version !== null && version !== void 0 ? version : ''}. Titularía mi problema: ${summary !== null && summary !== void 0 ? summary : ''}. Más detalles son los siguientes: ${issue !== null && issue !== void 0 ? issue : ''}.`,
89
+ };
90
+ const prefix = generateCaseTypePrefix(activeSection, caseType, lang);
91
+ return `${prefix} ${baseMessageMap[lang] || baseMessageMap.en}`;
92
+ };
19
93
  function WizardMain(props) {
94
+ var _a, _b, _c, _d;
95
+ const { isVariationA } = useAB();
96
+ const globalDispatchContext = useGlobalDispatchContext();
97
+ const { globalMetadataState: { troubleshootTraditionalSupportAgreed }, } = useContext(GlobalMetadataStateContext);
98
+ const onConfirmTraditionalSupportAgreement = () => {
99
+ setTraditionalSupportSessionAgreed(globalDispatchContext, true);
100
+ };
20
101
  const [showRestFlag, setShowRestFlag] = useState(false);
102
+ const [aiServicesAvailable, setAIServicesAvailable] = useState(false); // default to false until services are confirmed available
21
103
  const recommendationDispatch = useContext(RecommendationDispatchContext);
22
- const { isCreatingCase } = useCaseSelector((state) => ({
104
+ const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
105
+ const { sessionRestore } = useContext(SessionRestoreStateContext);
106
+ const { isCreatingCase, caseDetails } = useCaseSelector((state) => ({
23
107
  isCreatingCase: state.isCreatingCase,
108
+ caseDetails: state.caseDetails,
109
+ selectedNotificationContacts: state.selectedNotificationContacts,
24
110
  }), isEqual);
111
+ const { routeState: { isCaseCreate, activeSection }, } = useContext(RouteContext);
112
+ const aiResponseState = useAIResponseState();
25
113
  const [userSeenRecommendations, setUserSeenRecommendations] = useState(false);
26
114
  const [userClickedNextonRecommendations, setUserClickedNextonRecommendations] = useState(false);
27
115
  const [userScrolledLabel, setUserScrolledLabel] = useState(false);
28
116
  const [userCanNavigateToTroubleshoot, setUserCanNavigateToTroubleshoot] = useState(false);
117
+ const [isNextButtonClicked, setIsNextButtonClicked] = useState(false);
118
+ const isNextButtonClickedRef = useRef(false);
119
+ const isBackButtonClickedRef = useRef(false);
29
120
  const resultsRowRef = useRef(null);
121
+ const goToPrevStepRef = useRef(null);
122
+ const goToNextStepRef = useRef(null);
123
+ const activeStepRef = useRef(null);
124
+ //to track the previous ARH fields
125
+ const previousARHFieldsRef = useRef({
126
+ product: '',
127
+ version: '',
128
+ summary: '',
129
+ issue: '',
130
+ caseType: '',
131
+ });
132
+ const haveARHFieldsChangedRef = useRef(false);
133
+ const haveNewARHFieldsChangedRef = useRef(false);
134
+ const haveARHFieldsChangedForBRef = useRef(false);
135
+ const handleChatWithAIClick = () => {
136
+ props.setIsAIChatMode(true);
137
+ };
138
+ const handleOnBackForExpandedARH = (e) => {
139
+ if (goToPrevStepRef.current) {
140
+ isBackButtonClickedRef.current = true;
141
+ goToPrevStepRef.current(e);
142
+ focusWizardMainPanel();
143
+ }
144
+ };
145
+ // Callback for TroubleshootSection to reset the flag on unmount
146
+ const resetARHFieldsChanged = useCallback(() => {
147
+ haveARHFieldsChangedRef.current = false;
148
+ }, []);
149
+ // Callback for TroubleshootSection to reset the B variation flag (only when needed)
150
+ const resetARHFieldsChangedForB = useCallback(() => {
151
+ haveARHFieldsChangedForBRef.current = false;
152
+ }, []);
153
+ const handleSeeMoreResources = () => __awaiter(this, void 0, void 0, function* () {
154
+ var _a;
155
+ props.setIsAIChatMode(false);
156
+ if (sessionRestore.activeSessionId) {
157
+ const sessionDetails = (_a = sessionRestore.previousSessions.data[sessionRestore.activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
158
+ const newSession = {
159
+ returnToCase: true,
160
+ };
161
+ yield updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, sessionDetails, newSession);
162
+ }
163
+ });
164
+ // Check if any of the ARH-related fields have changed
165
+ useEffect(() => {
166
+ var _a;
167
+ const prev = previousARHFieldsRef.current;
168
+ const curr = {
169
+ product: caseDetails.product,
170
+ version: caseDetails.version,
171
+ summary: trim(caseDetails.summary),
172
+ issue: trim(caseDetails.issue),
173
+ caseType: caseDetails.caseType,
174
+ };
175
+ const hasChanged = prev.product !== curr.product ||
176
+ prev.version !== curr.version ||
177
+ prev.summary !== curr.summary ||
178
+ prev.issue !== curr.issue ||
179
+ prev.caseType !== curr.caseType;
180
+ if (hasChanged) {
181
+ const previousHadValues = !isEmpty(prev.product) || !isEmpty(prev.version) || !isEmpty(prev.summary) || !isEmpty(prev.issue);
182
+ const hasExistingConversation = !isEmpty((_a = aiResponseState.aiResponse) === null || _a === void 0 ? void 0 : _a.conversationId);
183
+ if (previousHadValues && hasExistingConversation) {
184
+ haveARHFieldsChangedRef.current = true;
185
+ }
186
+ if (previousHadValues && hasExistingConversation && !isVariationA) {
187
+ haveARHFieldsChangedForBRef.current = true;
188
+ }
189
+ if (previousHadValues) {
190
+ haveNewARHFieldsChangedRef.current = true;
191
+ }
192
+ previousARHFieldsRef.current = {
193
+ product: curr.product,
194
+ version: curr.version,
195
+ summary: curr.summary,
196
+ issue: curr.issue,
197
+ caseType: curr.caseType,
198
+ };
199
+ }
200
+ // eslint-disable-next-line react-hooks/exhaustive-deps
201
+ }, [
202
+ caseDetails.product,
203
+ caseDetails.version,
204
+ caseDetails.summary,
205
+ caseDetails.issue,
206
+ caseDetails.caseType,
207
+ (_a = aiResponseState.aiResponse) === null || _a === void 0 ? void 0 : _a.conversationId,
208
+ ]);
30
209
  const { getStepsSequece } = useWizard(props.routeProps, {
31
210
  userSeenRecommendationsfn: setUserSeenRecommendations,
32
211
  userSeenRecommendationsValue: userSeenRecommendations,
@@ -34,9 +213,66 @@ function WizardMain(props) {
34
213
  userClickedNextonRecommendationsValue: userClickedNextonRecommendations,
35
214
  resultsRowRef: resultsRowRef,
36
215
  userScrolledLabel: userScrolledLabel,
216
+ isAIChatMode: props.isAIChatMode,
217
+ setIsAIChatMode: props.setIsAIChatMode,
218
+ onChatWithAIClick: handleChatWithAIClick,
219
+ aiServicesAvailable: aiServicesAvailable,
220
+ isSecureSupport: props.isSecureSupport,
221
+ hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport,
222
+ onBack: handleOnBackForExpandedARH,
223
+ haveARHFieldsChanged: haveARHFieldsChangedRef.current,
224
+ haveARHFieldsChangedForBRef,
225
+ haveNewARHFieldsChangedRef,
226
+ resetARHFieldsChanged,
227
+ resetARHFieldsChangedForB,
228
+ onSeeMoreResources: handleSeeMoreResources,
37
229
  });
38
230
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
39
231
  const { t } = useTranslation();
232
+ useEffect(() => {
233
+ setActiveSectionChanged(dispatchToRouteReducer, isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT, '');
234
+ }, [isCaseCreate, dispatchToRouteReducer]);
235
+ useEffect(() => {
236
+ if (!activeSection) {
237
+ return;
238
+ }
239
+ //todo - need to revisit this logic
240
+ // if (!shouldEnableARHServices()) {
241
+ // if (aiServicesAvailable) {
242
+ // setAIServicesAvailable(false);
243
+ // }
244
+ // return;
245
+ // }
246
+ // check if ARH services are available
247
+ if (!aiServicesAvailable) {
248
+ const checkAIServices = () => __awaiter(this, void 0, void 0, function* () {
249
+ var _a, _b, _c;
250
+ const config = {
251
+ appSourceId: appSourceId_ARH,
252
+ authToken: (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.getEncodedToken()) !== null && _b !== void 0 ? _b : '',
253
+ packageVersion: (_c = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _c === void 0 ? void 0 : _c.packageVersion,
254
+ appEnv: Env.getEnvName(),
255
+ };
256
+ try {
257
+ yield getRHDirectHealthCheck(config);
258
+ yield getRHDirectStatusCheck(config);
259
+ setAIServicesAvailable(true);
260
+ }
261
+ catch (error) {
262
+ setAIServicesAvailable(false);
263
+ }
264
+ });
265
+ checkAIServices();
266
+ }
267
+ // eslint-disable-next-line react-hooks/exhaustive-deps
268
+ }, [
269
+ activeSection,
270
+ caseDetails.caseType,
271
+ isCaseCreate,
272
+ aiServicesAvailable,
273
+ props.isSecureSupport,
274
+ props.hasConfirmedStatesideSupport,
275
+ ]);
40
276
  const renderSubmitCasePage = () => (React.createElement(MainSection, { section: AppRouteSections.SUBMIT_CASE, title: t('Case has been submitted'), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case."), className: "case-submit-page" },
41
277
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
42
278
  React.createElement(SubmitCase, { routeProps: props.routeProps }))));
@@ -51,16 +287,16 @@ function WizardMain(props) {
51
287
  RouteUtils.navigateToSection(props.routeProps, `${props.routeProps.location.pathname}/${step.id}`, false);
52
288
  };
53
289
  const onBack = (step, prevStep) => {
54
- // isLoadingRecommendations needs to be set to false on back when the previous step is the summary
55
- // step because it can cause the next button to be permanently disabled if the debounce is not called
290
+ // isLoadingRecommendations needs to be set to false when going back TO the summary/troubleshoot step
291
+ // because it can cause the next button to be permanently disabled if the debounce is not called
56
292
  // before going back a step. This can be caused if navigating quickly to then away from the recommendations page.
57
- if (prevStep.prevId === AppRouteSections.SUMMARIZE) {
293
+ if (step.id === AppRouteSections.SUMMARIZE || step.id === AppRouteSections.TROUBLESHOOT) {
58
294
  recommendationDispatch({
59
295
  type: RecommendationsConstants.setIsLoadingRecommendations,
60
296
  payload: { isLoadingRecommendations: false },
61
297
  });
62
298
  }
63
- var regex = new RegExp('/' + prevStep.prevId + '$');
299
+ var regex = new RegExp('/' + prevStep.id + '$');
64
300
  RouteUtils.navigateToSection(props.routeProps, props.routeProps.location.pathname.replace(regex, ''), false);
65
301
  };
66
302
  const onSubmit = () => {
@@ -68,26 +304,129 @@ function WizardMain(props) {
68
304
  props.submitCaseAndNavigate(false);
69
305
  return;
70
306
  };
71
- const onCurrentStepChanged = (step) => {
72
- setActiveSectionChanged(dispatchToRouteReducer, step.id, step.name);
307
+ const config = {
308
+ appSourceId: appSourceId_ARH,
309
+ authToken: (_c = (_b = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _b === void 0 ? void 0 : _b.getEncodedToken()) !== null && _c !== void 0 ? _c : '',
310
+ packageVersion: (_d = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _d === void 0 ? void 0 : _d.packageVersion,
311
+ appEnv: Env.getEnvName(),
312
+ };
313
+ const { fetchARHResponse } = useARHResponse({
314
+ activeSection,
315
+ product: caseDetails.product,
316
+ version: caseDetails.version,
317
+ summary: caseDetails.summary,
318
+ issue: caseDetails.issue,
319
+ caseType: caseDetails.caseType,
320
+ config,
321
+ });
322
+ const isTroubleshootSection = activeSection === AppRouteSections.TROUBLESHOOT;
323
+ const isResourcesSection = activeSection === AppRouteSections.RESOURCES;
324
+ const isSummarizeSection = activeSection === AppRouteSections.SUMMARIZE;
325
+ const shouldEnableARHServices = () => {
326
+ var _a;
327
+ // Check if the current section is relevant for AI services
328
+ const isRelevantSection = isTroubleshootSection || isSummarizeSection || isResourcesSection;
329
+ // Check if the case type is allowed (not in the excluded list)
330
+ const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseDetails.caseType || '');
331
+ // Check if user is not a secure support or confirmed stateside support user
332
+ const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
333
+ // Check if the ARH fields have changed
334
+ const isARHFieldsChanged = haveARHFieldsChangedRef.current;
335
+ // Check if user is external and has invalid entitlements
336
+ const isNotUnentitledExternalUser = !(props.isUserExternal && props.hasInvalidEntitlements);
337
+ // For variation B, check if we have valid fields AND (no existing conversation OR fields have changed)
338
+ const hasExistingConversation = !isEmpty((_a = aiResponseState.aiResponse) === null || _a === void 0 ? void 0 : _a.conversationId);
339
+ const hasValidFieldsForVariationB = !isVariationA &&
340
+ !isEmpty(caseDetails.product) &&
341
+ !isEmpty(caseDetails.version) &&
342
+ !isEmpty(trim(caseDetails.summary)) &&
343
+ !isEmpty(trim(caseDetails.issue)) &&
344
+ (!hasExistingConversation || haveNewARHFieldsChangedRef.current);
345
+ return (isRelevantSection &&
346
+ isCaseTypeAllowed &&
347
+ isNotSecureOrStatesideUser &&
348
+ (isARHFieldsChanged || hasValidFieldsForVariationB) &&
349
+ isNotUnentitledExternalUser);
350
+ };
351
+ const onCurrentStepChanged = (event, currentStep, prevStep, scope) => {
352
+ if (isNextButtonClickedRef.current) {
353
+ onNext(currentStep);
354
+ }
355
+ if (isBackButtonClickedRef.current) {
356
+ onBack(currentStep, prevStep);
357
+ }
358
+ // Reset isLoadingRecommendations when navigating to summarize/troubleshoot step
359
+ const isWizardNavClick = !isNextButtonClickedRef.current && !isBackButtonClickedRef.current;
360
+ const isBackNavigation = isBackButtonClickedRef.current;
361
+ if ((isWizardNavClick || isBackNavigation) &&
362
+ (currentStep.id === AppRouteSections.SUMMARIZE ||
363
+ currentStep.id === AppRouteSections.TROUBLESHOOT ||
364
+ currentStep.id === AppRouteSections.GET_SUPPORT)) {
365
+ recommendationDispatch({
366
+ type: RecommendationsConstants.setIsLoadingRecommendations,
367
+ payload: { isLoadingRecommendations: false },
368
+ });
369
+ }
370
+ setActiveSectionChanged(dispatchToRouteReducer, currentStep.id, currentStep.name);
73
371
  updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
372
+ isNextButtonClickedRef.current = false;
373
+ isBackButtonClickedRef.current = false;
374
+ setIsNextButtonClicked(false);
375
+ };
376
+ const handleReturnToCaseCreation = () => __awaiter(this, void 0, void 0, function* () {
377
+ var _a;
378
+ props.setIsAIChatMode(false);
379
+ if (sessionRestore.activeSessionId) {
380
+ const sessionDetails = (_a = sessionRestore.previousSessions.data[sessionRestore.activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
381
+ const newSession = {
382
+ returnToCase: true,
383
+ };
384
+ yield updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, sessionDetails, newSession);
385
+ }
386
+ });
387
+ const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
388
+ return (React.createElement(WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: activeStep.id === step.id, isDisabled: !step.canJumpTo, stepIndex: step.index, onClick: () => goToStepByIndex(step.index) }));
389
+ })));
390
+ const CustomFooter = (activeStep, goToNextStep, goToPrevStep) => {
391
+ goToPrevStepRef.current = goToPrevStep;
392
+ goToNextStepRef.current = goToNextStep;
393
+ activeStepRef.current = activeStep;
394
+ const handleContinueClick = () => __awaiter(this, void 0, void 0, function* () {
395
+ // Navigate to next step first
396
+ isNextButtonClickedRef.current = true;
397
+ setIsNextButtonClicked(true);
398
+ goToNextStep({});
399
+ focusWizardMainPanel();
400
+ // Fetch ARH response if conditions are met
401
+ if (shouldEnableARHServices() && aiServicesAvailable && !isVariationA) {
402
+ yield fetchARHResponse();
403
+ haveARHFieldsChangedRef.current = false;
404
+ }
405
+ });
406
+ return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: handleContinueClick, onBack: () => {
407
+ isBackButtonClickedRef.current = true;
408
+ goToPrevStep({});
409
+ focusWizardMainPanel();
410
+ }, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel, isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onReturnToCaseCreation: handleReturnToCaseCreation, onSeeMoreResources: handleSeeMoreResources, isLoadingARH: aiResponseState.isStreaming && aiResponseState.accumulatedResponse === '', aiServicesAvailable: aiServicesAvailable }));
74
411
  };
75
- const CustomFooter = (React.createElement(WizardFooter, null,
76
- React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
77
- return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: () => {
78
- onNext();
79
- focusWizardMainPanel();
80
- }, onBack: () => {
81
- onBack();
82
- focusWizardMainPanel();
83
- }, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel }));
84
- })));
412
+ const steps = getStepsSequece(showRestFlag);
413
+ const wizardSteps = steps.map((step) => {
414
+ const { component } = step, rest = __rest(step, ["component"]);
415
+ return (React.createElement(WizardStep, Object.assign({ key: step.id }, rest), component));
416
+ });
417
+ // moved from CustomFooter to comply with React Rules of Hooks
418
+ useEffect(() => {
419
+ var _a;
420
+ if (steps.length > 2 && ((_a = activeStepRef.current) === null || _a === void 0 ? void 0 : _a.index) === 2 && isNextButtonClicked && goToNextStepRef.current) {
421
+ goToNextStepRef.current({});
422
+ }
423
+ }, [steps.length, isNextButtonClicked]);
85
424
  // To add a new step to wizard first need to add the component to appRouteConfugurations
86
425
  // in useWizard file then add it to step squences in RouteConstNTypes
87
- const steps = getStepsSequece(showRestFlag);
88
426
  return (React.createElement(React.Fragment, null,
427
+ React.createElement(CSSUserModal, { onConfirmTraditionalSupportAgreement: onConfirmTraditionalSupportAgreement, display: !troubleshootTraditionalSupportAgreed }),
89
428
  React.createElement(NewFeatureModal, null),
90
- steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { navAriaLabel: ` navAriaLabel steps `, mainAriaLabel: ` mainAriaLabel content `, steps: steps, footer: CustomFooter, onNext: onNext, onBack: onBack, hideClose: true, backButtonText: t('Go back'), onCurrentStepChanged: onCurrentStepChanged })) })),
429
+ steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { isVisitRequired: true, nav: customNav, navAriaLabel: ` navAriaLabel steps `, footer: CustomFooter, onStepChange: onCurrentStepChanged }, wizardSteps)) })),
91
430
  React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
92
431
  }
93
432
  export default WizardMain;
@@ -3,8 +3,8 @@ import { RouteComponentProps } from 'react-router-dom';
3
3
  import { IRouteUrlParams, ISectionConfiguration } from '../../reducers/RouteConstNTypes';
4
4
  interface IProps {
5
5
  routeProps: RouteComponentProps<IRouteUrlParams>;
6
- onNext: () => void;
7
- onBack: () => void;
6
+ onNext: (e: React.MouseEvent<HTMLButtonElement>) => void;
7
+ onBack: (e: React.MouseEvent<HTMLButtonElement>) => void;
8
8
  activeStep: Partial<ISectionConfiguration>;
9
9
  onSubmit: () => void;
10
10
  confirmSupportModal: (hasPreferredSecureSupportAccount: boolean) => void;
@@ -16,6 +16,12 @@ interface IProps {
16
16
  setUserCanNavigateToTroubleshoot: (value: React.SetStateAction<boolean>) => void;
17
17
  resultsRowRef?: any;
18
18
  setUserScrolledLabel: (value: React.SetStateAction<boolean>) => void;
19
+ isAIChatMode?: boolean;
20
+ setIsAIChatMode?: (value: boolean) => void;
21
+ onReturnToCaseCreation?: () => void;
22
+ onSeeMoreResources?: () => void;
23
+ isLoadingARH?: boolean;
24
+ aiServicesAvailable?: boolean;
19
25
  }
20
26
  declare function WizardNavigation(props: IProps): React.JSX.Element;
21
27
  declare namespace WizardNavigation {