@rh-support/troubleshoot 2.6.355 → 2.6.358

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 (349) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
  9. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
  10. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
  11. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
  12. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Case.js +60 -33
  14. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
  16. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
  18. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  23. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
  24. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
  26. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
  30. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  31. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  33. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  34. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  35. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
  40. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  41. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
  42. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
  43. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  44. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
  88. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
  90. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
  92. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  93. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
  94. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  95. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
  96. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  97. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
  99. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
  101. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  102. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
  103. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  104. package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
  105. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  106. package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
  107. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
  108. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
  109. package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
  110. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  111. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
  112. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  113. package/lib/esm/components/CaseInformation/Description.js +1 -1
  114. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  115. package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
  116. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  117. package/lib/esm/components/CaseInformation/Fts.js +31 -17
  118. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  119. package/lib/esm/components/CaseInformation/Severity.js +33 -24
  120. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  121. package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
  122. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
  123. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
  124. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
  125. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  126. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
  127. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  128. package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
  129. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  130. package/lib/esm/components/CaseManagement/Cep.js +11 -9
  131. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
  132. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  133. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
  134. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  135. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  136. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
  137. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  138. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
  139. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  140. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
  141. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  142. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
  143. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  144. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  145. package/lib/esm/components/IdeaInformation/IdeaInformation.js +23 -17
  146. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  147. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  148. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  149. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  150. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  151. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  152. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  153. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  154. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
  155. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
  156. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
  157. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
  158. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  159. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  160. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  161. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
  162. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  163. package/lib/esm/components/Recommendations/AsideResults.js +4 -3
  164. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  165. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  166. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  167. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
  168. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  169. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  170. package/lib/esm/components/Recommendations/Recommendations.js +3 -9
  171. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  172. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
  173. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  174. package/lib/esm/components/Review/Review.js +25 -19
  175. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  176. package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
  177. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  178. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  179. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  180. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  181. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +139 -91
  182. package/lib/esm/components/shared/Constants.d.ts +5 -0
  183. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  184. package/lib/esm/components/shared/Constants.js +5 -0
  185. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  186. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  187. package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
  188. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  189. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  190. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
  191. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  192. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
  193. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  194. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  195. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
  196. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  197. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
  198. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
  199. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  200. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
  201. package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
  202. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  203. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  204. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  205. package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
  206. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  207. package/lib/esm/components/shared/useIsSectionValid.js +22 -57
  208. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  209. package/lib/esm/components/shared/usePostComment.js +16 -28
  210. package/lib/esm/components/shared/utils.d.ts +1 -0
  211. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  212. package/lib/esm/components/shared/utils.js +9 -3
  213. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  214. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
  215. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  216. package/lib/esm/components/wizardLayout/MainSection.js +2 -1
  217. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  218. package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
  219. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  220. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
  221. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  222. package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
  223. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  224. package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
  225. package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
  226. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  227. package/lib/esm/constants/caseDetailsConstants.js +5 -0
  228. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  229. package/lib/esm/css/app.css +28 -0
  230. package/lib/esm/css/case.css +60 -209
  231. package/lib/esm/graphql/index.d.ts +4 -0
  232. package/lib/esm/graphql/index.d.ts.map +1 -0
  233. package/lib/esm/graphql/index.js +3 -0
  234. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  235. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  236. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  237. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  238. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  239. package/lib/esm/graphql/mutations/index.js +1 -0
  240. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  241. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  242. package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
  243. package/lib/esm/graphql/queries/index.d.ts +2 -0
  244. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  245. package/lib/esm/graphql/queries/index.js +1 -0
  246. package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
  247. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  248. package/lib/esm/graphql/schemas/escalation.js +1 -0
  249. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  250. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  251. package/lib/esm/graphql/schemas/index.js +1 -0
  252. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  253. package/lib/esm/hooks/useAB.js +45 -23
  254. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  255. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  256. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
  257. package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
  258. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  259. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  260. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  261. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  262. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
  263. package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
  264. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  265. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  266. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
  267. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  268. package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
  269. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  270. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  271. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  272. package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
  273. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
  274. package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
  275. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  276. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  277. package/lib/esm/hooks/useCaseHistory.js +98 -0
  278. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
  279. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
  280. package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
  281. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  282. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  283. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
  284. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  285. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  286. package/lib/esm/hooks/useS3Upload.d.ts +5 -4
  287. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  288. package/lib/esm/hooks/useS3Upload.js +28 -30
  289. package/lib/esm/i18n/template-de.d.ts +2 -2
  290. package/lib/esm/i18n/template-de.js +2 -2
  291. package/lib/esm/i18n/template-es.d.ts +2 -2
  292. package/lib/esm/i18n/template-es.js +2 -2
  293. package/lib/esm/i18n/template-fr.d.ts +2 -2
  294. package/lib/esm/i18n/template-fr.js +2 -2
  295. package/lib/esm/i18n/template-it.d.ts +2 -2
  296. package/lib/esm/i18n/template-it.js +2 -2
  297. package/lib/esm/i18n/template-jp.d.ts +2 -2
  298. package/lib/esm/i18n/template-jp.js +2 -2
  299. package/lib/esm/i18n/template-ko.d.ts +2 -2
  300. package/lib/esm/i18n/template-ko.js +2 -2
  301. package/lib/esm/i18n/template-pt.d.ts +2 -2
  302. package/lib/esm/i18n/template-pt.js +2 -2
  303. package/lib/esm/i18n/template-ru.d.ts +2 -2
  304. package/lib/esm/i18n/template-ru.js +2 -2
  305. package/lib/esm/i18n/template-zh.d.ts +2 -2
  306. package/lib/esm/i18n/template-zh.js +2 -2
  307. package/lib/esm/index.js +1 -0
  308. package/lib/esm/models/cache.d.ts +0 -2
  309. package/lib/esm/models/cache.d.ts.map +1 -1
  310. package/lib/esm/models/caseHistory.d.ts +80 -0
  311. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  312. package/lib/esm/models/caseHistory.js +1 -0
  313. package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
  314. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  315. package/lib/esm/reducers/CaseConstNTypes.js +31 -7
  316. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
  317. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  318. package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
  319. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
  320. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  321. package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
  322. package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
  323. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  324. package/lib/esm/reducers/CaseHelpers.js +119 -17
  325. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  326. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  327. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  328. package/lib/esm/reducers/CaseReducer.d.ts +56 -11
  329. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  330. package/lib/esm/reducers/CaseReducer.js +284 -100
  331. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  332. package/lib/esm/reducers/RecommendationsReducer.js +15 -18
  333. package/lib/esm/scss/_main.scss +9 -0
  334. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  335. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  336. package/lib/esm/utils/TimelineUtils.js +135 -0
  337. package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
  338. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  339. package/lib/esm/utils/caseHistoryUtils.js +165 -0
  340. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  341. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  342. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  343. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
  344. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
  345. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
  346. package/package.json +9 -8
  347. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
  348. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
  349. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
@@ -1,10 +1,14 @@
1
1
  export interface IFileUploaderCommonProps {
2
- isSecureSupport: boolean;
2
+ isSecureSupport?: boolean;
3
3
  idToUploadTo: string;
4
+ /** Salesforce case Id from caseDetails.state — avoids an extra GetCaseByCaseNumber on upload. */
5
+ caseSalesforceId?: string;
4
6
  needsAnalyzing?: boolean;
5
7
  isSessionId: boolean;
6
8
  autoUploadOnSelect?: boolean;
7
9
  isPrivate?: boolean;
8
10
  onUploadClick?: () => void;
11
+ /** Fired after each successful case attachment upload so discussion can refresh immediately. */
12
+ onCaseFileUploaded?: () => void;
9
13
  }
10
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACrC,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gGAAgG;IAChG,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import { IFileLocal } from './reducer/AttachmentReducer';
3
3
  import { IFileUploaderCommonProps } from './types';
4
4
  export declare function useFileUploader(props: IFileUploaderCommonProps): {
5
- retryUpload: (indexToRetry: number) => void;
5
+ retryUpload: (indexToRetry: number) => Promise<void>;
6
6
  editFile: (editedLocalFile: IFileLocal, fileIndexToEdit: number, changes: IFileLocal) => Promise<void>;
7
7
  removeFile: (fileIndexToRemove: number, file: IFileLocal) => Promise<void>;
8
8
  uploadAll: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => Promise<void>;
9
- uploadFile: (fileIndex: number) => void;
9
+ uploadFile: (fileIndex: number) => Promise<void>;
10
10
  retryAnalysis: (indexToRetry: number) => void;
11
11
  };
12
12
  //# sourceMappingURL=useFileUploader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAenF,OAAO,EAAE,UAAU,EAAmD,MAAM,6BAA6B,CAAC;AAE1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCA8DvB,MAAM;gCAYM,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBAczC,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BA4BjD,MAAM;kCAxDA,MAAM;EA8EhD"}
1
+ {"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAgBnF,OAAO,EACH,UAAU,EAKb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCA8JjB,MAAM;gCAYA,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBAxGzD,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BAwJ3B,MAAM;kCA9DN,MAAM;EAwFhD"}
@@ -7,37 +7,111 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { caseAttachments, sessionAttachments } from '@cee-eng/hydrajs';
10
+ import { useApolloClient } from '@apollo/client/react';
11
+ import { sessionAttachments } from '@cee-eng/hydrajs';
11
12
  import { useFetch, usePrevious } from '@rh-support/components';
12
13
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
- import { getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
14
+ import { deleteCaseAttachment, fetchCaseDetailsByCaseNumber, getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE, } from '@rh-support/utils';
14
15
  import debounce from 'lodash/debounce';
15
16
  import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
16
17
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
17
18
  import { SESSION_REFERRER_URL_LIMIT } from '../../../reducers/CaseConstNTypes';
18
19
  import { getSessionDetailsFromCase } from '../../../reducers/CaseHelpers';
19
20
  import { createSession } from '../../../reducers/SessionRestoreReducer';
20
- import { doSosReportAnalysisForFile, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
21
- import { onFileEdit, onFileRemove, UploadStatusConstants } from './reducer/AttachmentReducer';
21
+ import { doSosReportAnalysisForFile, hasSomeSelectedFiles, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
22
+ import { onFileEdit, onFileRemove, resetAttachment, UploadStatusConstants, } from './reducer/AttachmentReducer';
22
23
  import { AttachmentDispatchContext, AttachmentStateContext } from './reducer/AttachmentReducerContext';
24
+ /** Wait for staggered onDrop dispatches before auto-uploading. */
25
+ const AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS = 300;
23
26
  export function useFileUploader(props) {
27
+ var _a;
24
28
  const { attachmentState, attachmentState: { caseFiles }, } = useContext(AttachmentStateContext);
25
29
  const dispatch = useContext(AttachmentDispatchContext);
30
+ const apolloClient = useApolloClient();
31
+ const caseSalesforceIdRef = useRef();
26
32
  const { request: deleteSessionAttachment } = useFetch(sessionAttachments.deleteSesionAttachment);
27
- const { request: deleteCaseAttachment } = useFetch(caseAttachments.deleteAttachment);
28
- const { idToUploadTo, needsAnalyzing, isSecureSupport, isSessionId, autoUploadOnSelect, onUploadClick } = props;
29
- const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
33
+ const { request: deleteCaseAttachmentRequest } = useFetch(deleteCaseAttachment);
34
+ const { idToUploadTo, caseSalesforceId, needsAnalyzing, isSessionId, autoUploadOnSelect, onUploadClick, onCaseFileUploaded, } = props;
35
+ useEffect(() => {
36
+ if (caseSalesforceId) {
37
+ caseSalesforceIdRef.current = caseSalesforceId;
38
+ }
39
+ }, [caseSalesforceId]);
40
+ const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
30
41
  const { sessionRestore } = useContext(SessionRestoreStateContext);
31
42
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
32
43
  const checkForS3SlowUploads = getConfigField(pcmConfig.data, 'checkForS3SlowUploads', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
33
44
  const useBrowserAPIForDetection = getConfigField(pcmConfig.data, 'useBrowserAPIForSpeedDetection', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
34
- const slowUploadConfig = {
45
+ const slowUploadConfig = useMemo(() => ({
35
46
  checkForS3SlowUploads,
36
47
  useBrowserAPIForDetection,
37
- };
48
+ }), [checkForS3SlowUploads, useBrowserAPIForDetection]);
38
49
  const isInitialMountRef = useRef(true);
50
+ const caseFilesRef = useRef(caseFiles);
51
+ caseFilesRef.current = caseFiles;
39
52
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
40
53
  const prevSelectedFiles = usePrevious(selectedLocalFiles);
54
+ const resolveCaseSalesforceId = useCallback(() => __awaiter(this, void 0, void 0, function* () {
55
+ var _a;
56
+ if (caseSalesforceIdRef.current || isSessionId || !idToUploadTo || !apolloClient) {
57
+ return;
58
+ }
59
+ try {
60
+ const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, idToUploadTo, Boolean((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport));
61
+ caseSalesforceIdRef.current = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
62
+ }
63
+ catch (_b) {
64
+ caseSalesforceIdRef.current = undefined;
65
+ }
66
+ }), [apolloClient, idToUploadTo, isSessionId, (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport]);
67
+ const onUploadAll = useCallback((event) => __awaiter(this, void 0, void 0, function* () {
68
+ onUploadClick && onUploadClick();
69
+ yield resolveCaseSalesforceId();
70
+ // on truobleshoot flow, user can upload a file while no data has added therefore no sessionId is available
71
+ let sessionId = '';
72
+ if (!idToUploadTo) {
73
+ const userAgent = getUserAgentForCaseMode(true);
74
+ const session = {
75
+ userAgent,
76
+ originatingSystem: userAgent,
77
+ referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
78
+ isInternal: loggedInUserRights.data.isInternal(),
79
+ };
80
+ if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
81
+ sessionId = yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase({}, []), session);
82
+ }
83
+ }
84
+ uploadAllFiles({
85
+ dispatch,
86
+ idToUploadTo: idToUploadTo || sessionId,
87
+ caseFiles: caseFilesRef.current,
88
+ needsAnalyzing,
89
+ isSessionId,
90
+ slowUploadConfig,
91
+ apolloClient: !isSessionId ? apolloClient : undefined,
92
+ caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
93
+ onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
94
+ });
95
+ }), [
96
+ apolloClient,
97
+ dispatch,
98
+ idToUploadTo,
99
+ isSessionId,
100
+ loggedInUserRights.data,
101
+ needsAnalyzing,
102
+ onCaseFileUploaded,
103
+ onUploadClick,
104
+ referrerUrl,
105
+ resolveCaseSalesforceId,
106
+ sessionRestore.sessionCreationStatus.isCreating,
107
+ sessionRestore.sessionCreationStatus.isError,
108
+ sessionRestoreDispatch,
109
+ slowUploadConfig,
110
+ ]);
111
+ const onUploadAllRef = useRef(onUploadAll);
112
+ onUploadAllRef.current = onUploadAll;
113
+ const debouncedAutoUploadOnSelect = useMemo(() => debounce(() => void onUploadAllRef.current(), AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS), []);
114
+ useEffect(() => () => debouncedAutoUploadOnSelect.cancel(), [debouncedAutoUploadOnSelect]);
41
115
  useEffect(() => {
42
116
  if (isInitialMountRef.current) {
43
117
  isInitialMountRef.current = false;
@@ -47,19 +121,18 @@ export function useFileUploader(props) {
47
121
  prevSelectedFiles &&
48
122
  selectedLocalFiles &&
49
123
  selectedLocalFiles.length > prevSelectedFiles.length) {
50
- onUploadAll();
124
+ debouncedAutoUploadOnSelect();
51
125
  }
52
- // eslint-disable-next-line react-hooks/exhaustive-deps
53
- }, [selectedLocalFiles]);
126
+ }, [autoUploadOnSelect, debouncedAutoUploadOnSelect, prevSelectedFiles, selectedLocalFiles]);
54
127
  const updateSessionAttachmentMetadata = useCallback((file, changes) => __awaiter(this, void 0, void 0, function* () {
55
128
  sessionAttachments.updateSessionAttachmentMetadata(idToUploadTo, [Object.assign({ id: file.attachmentId }, changes)]);
56
129
  }), [idToUploadTo]);
57
130
  const debounceSessionMetadataUpdate = useMemo(() => debounce(updateSessionAttachmentMetadata, 800), [updateSessionAttachmentMetadata]);
58
- const onRetryLocal = (indexToRetry) => {
131
+ const onRetryLocal = (indexToRetry) => __awaiter(this, void 0, void 0, function* () {
59
132
  if (idToUploadTo && attachmentState.caseFiles.selectedLocalFiles[indexToRetry]) {
60
- onUploadFile(indexToRetry);
133
+ yield onUploadFile(indexToRetry);
61
134
  }
62
- };
135
+ });
63
136
  const onRetryAnalysis = (indexToRetry) => {
64
137
  const file = attachmentState.caseFiles.selectedLocalFiles[indexToRetry];
65
138
  if (idToUploadTo && file && file.attachmentId) {
@@ -75,59 +148,58 @@ export function useFileUploader(props) {
75
148
  debounceSessionMetadataUpdate(editedLocalFile, changes);
76
149
  });
77
150
  const onFileRemoveLocal = (fileIndexToRemove, file) => __awaiter(this, void 0, void 0, function* () {
151
+ var _a, _b, _c;
152
+ // Stop in-flight S3 transfer if Remove is used while upload/verify is still active
153
+ (_b = (_a = file.uploadProgress).onAbort) === null || _b === void 0 ? void 0 : _b.call(_a, fileIndexToRemove);
154
+ const attachmentIdToDelete = file.attachmentId || ((_c = file.uploadProgress.multipartResumeState) === null || _c === void 0 ? void 0 : _c.attachmentId);
78
155
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
79
- if (!isUploadingAttachment(selectedLocalFiles) && !isAnalysingAnyAttachment(selectedLocalFiles)) {
156
+ const isBusy = isUploadingAttachment(selectedLocalFiles) || isAnalysingAnyAttachment(selectedLocalFiles);
157
+ let nextLocalFiles;
158
+ if (!isBusy) {
80
159
  onFileRemove(dispatch, fileIndexToRemove);
160
+ nextLocalFiles = selectedLocalFiles.filter((_, index) => index !== fileIndexToRemove);
81
161
  }
82
162
  else {
83
163
  updateUploadMetadata(dispatch, fileIndexToRemove, {
84
164
  uploadStatus: UploadStatusConstants.deleted,
165
+ onAbort: undefined,
85
166
  });
167
+ nextLocalFiles = selectedLocalFiles.map((localFile, index) => index === fileIndexToRemove
168
+ ? Object.assign(Object.assign({}, localFile), { uploadProgress: Object.assign(Object.assign({}, localFile.uploadProgress), { uploadStatus: UploadStatusConstants.deleted, onAbort: undefined }) }) : localFile);
86
169
  }
87
- isUploadedSuccessfully(file) && isSessionId && deleteSessionAttachment(idToUploadTo, file.attachmentId);
88
- isUploadedSuccessfully(file) &&
89
- !isSessionId &&
90
- deleteCaseAttachment(idToUploadTo, file.attachmentId, isSecureSupport);
91
- });
92
- const onUploadAll = (event) => __awaiter(this, void 0, void 0, function* () {
93
- onUploadClick && onUploadClick();
94
- // on truobleshoot flow, user can upload a file while no data has added therefore no sessionId is available
95
- let sessionId = '';
96
- if (!idToUploadTo) {
97
- const userAgent = getUserAgentForCaseMode(true);
98
- let session = {
99
- userAgent,
100
- originatingSystem: userAgent,
101
- referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
102
- isInternal: loggedInUserRights.data.isInternal(),
103
- };
104
- if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
105
- sessionId = yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase({}, []), session);
170
+ // Drop soft-deleted stubs so "Uploading attachment(s)" / Upload new file do not linger
171
+ if (!hasSomeSelectedFiles(nextLocalFiles)) {
172
+ resetAttachment(dispatch);
173
+ }
174
+ if (attachmentIdToDelete && isSessionId && isUploadedSuccessfully(file)) {
175
+ deleteSessionAttachment(idToUploadTo, attachmentIdToDelete);
176
+ }
177
+ // Abort/fail after Hydra init still has an attachmentId clean up SFDC "In Progress" on Remove only
178
+ if (attachmentIdToDelete && !isSessionId) {
179
+ try {
180
+ yield deleteCaseAttachmentRequest(idToUploadTo, attachmentIdToDelete);
181
+ }
182
+ catch (_d) {
183
+ // Best-effort: row is already removed from the PCM queue
106
184
  }
107
185
  }
108
- uploadAllFiles({
109
- dispatch,
110
- idToUploadTo: idToUploadTo || sessionId,
111
- caseFiles,
112
- isSecureSupport,
113
- needsAnalyzing,
114
- isSessionId,
115
- slowUploadConfig,
116
- });
117
186
  });
118
- const onUploadFile = (fileIndex) => {
187
+ const onUploadFile = (fileIndex) => __awaiter(this, void 0, void 0, function* () {
188
+ yield resolveCaseSalesforceId();
119
189
  uploadFile({
120
190
  dispatch,
121
191
  idToUploadTo,
122
192
  localFile: attachmentState.caseFiles.selectedLocalFiles[fileIndex],
123
193
  originalFile: attachmentState.caseFiles.selectedOriginalFiles[fileIndex],
124
194
  index: fileIndex,
125
- isSecureSupport,
126
195
  needsAnalyzing,
127
196
  isSessionId,
128
197
  slowUploadConfig,
198
+ apolloClient: !isSessionId ? apolloClient : undefined,
199
+ caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
200
+ onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
129
201
  });
130
- };
202
+ });
131
203
  return {
132
204
  retryUpload: onRetryLocal,
133
205
  editFile: onFileEditLocal,
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAMnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAkR9D"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAuBrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAoP9D"}
@@ -1,18 +1,7 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { contacts } from '@cee-eng/hydrajs';
11
1
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
- import find from 'lodash/find';
13
2
  import isEmpty from 'lodash/isEmpty';
14
3
  import isEqual from 'lodash/isEqual';
15
- import React, { useContext, useEffect, useState } from 'react';
4
+ import React, { useContext, useEffect } from 'react';
16
5
  import { Trans } from 'react-i18next';
17
6
  import { useCaseSelector } from '../../context/CaseContext';
18
7
  import { RouteContext, useRouteDispatchContext } from '../../context/RouteContext';
@@ -24,9 +13,8 @@ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
24
13
  import { setNoValidEntitlement } from '../../reducers/RouteReducer';
25
14
  import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
26
15
  export function useIsSectionValid(sectionName) {
27
- var _a, _b;
28
16
  const { isVariationA } = useAB();
29
- const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ssoUsername, manageSupportCases, } = useCaseSelector((state) => ({
17
+ const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, manageSupportCases, } = useCaseSelector((state) => ({
30
18
  caseState: state,
31
19
  caseType: state.caseDetails.caseType,
32
20
  product: state.caseDetails.product,
@@ -42,35 +30,19 @@ export function useIsSectionValid(sectionName) {
42
30
  environment: state.caseDetails.environment,
43
31
  timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
44
32
  periodicityOfIssue: state.caseDetails.periodicityOfIssue,
45
- ssoUsername: state.selectedOwner.data.ssoUsername,
33
+ // ssoUsername: state.selectedOwner.data.ssoUsername,
46
34
  manageSupportCases: state.selectedOwner.data.manageSupportCases,
47
35
  }), isEqual);
48
36
  const routeDispatch = useRouteDispatchContext();
49
- const [isEntitlement, setIsEntitlement] = useState(null);
50
- useEffect(() => {
51
- const fetchContactDetails = () => __awaiter(this, void 0, void 0, function* () {
52
- var _a;
53
- if (ssoUsername) {
54
- try {
55
- const response = yield contacts.getSFDCContactBySso(ssoUsername);
56
- setIsEntitlement((_a = response === null || response === void 0 ? void 0 : response.isEntitled) !== null && _a !== void 0 ? _a : null);
57
- setNoValidEntitlement(routeDispatch, !(response === null || response === void 0 ? void 0 : response.isEntitled));
58
- }
59
- catch (error) {
60
- console.error('Error fetching contact details:', error);
61
- setIsEntitlement(null);
62
- setNoValidEntitlement(routeDispatch, null);
63
- }
64
- }
65
- });
66
- fetchContactDetails();
67
- }, [ssoUsername, routeDispatch]);
68
- //&seSessionId=8e8960ac-680b-443e-bf67-9e13f2acd64e
69
37
  const { routeState: { isCaseCreate }, } = useContext(RouteContext);
70
38
  const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
39
+ // Global entitlement from subscription GraphQL → loggedInUser.isEntitled → UserAuth.isEntitled()
40
+ const isEntitlement = loggedInUserRights.data.isEntitled();
41
+ useEffect(() => {
42
+ setNoValidEntitlement(routeDispatch, !isEntitlement);
43
+ }, [isEntitlement, routeDispatch]);
71
44
  const { topContentState: { topContent }, } = useContext(TCStateContext);
72
- const isEntitledProduct = (_b = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === caseState.caseDetails.product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
73
- const { routeState: { activeSection, isSearchIntent }, } = useContext(RouteContext);
45
+ const { routeState: { activeSection }, } = useContext(RouteContext);
74
46
  const { attachmentState } = useContext(AttachmentStateContext);
75
47
  const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
76
48
  const allowedTypesIdea = ['image/jpeg', 'image/png', 'image/jpg', 'image/gif'];
@@ -111,8 +83,6 @@ export function useIsSectionValid(sectionName) {
111
83
  }
112
84
  return (!isEmpty(product) &&
113
85
  !isEmpty(version) &&
114
- !isEmpty(accountNumber) &&
115
- !isEmpty(contactSSOName) &&
116
86
  !isEmpty(summary) &&
117
87
  (summary === null || summary === void 0 ? void 0 : summary.length) <= TITLE_SUMMARY_LENGTH_LIMIT &&
118
88
  !isEmpty(issue) &&
@@ -129,30 +99,29 @@ export function useIsSectionValid(sectionName) {
129
99
  };
130
100
  const isResourcesSectionValid = () => {
131
101
  var _a;
132
- // don't check for entitled product if user is on search intent flow
133
- const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
134
- // Skip cluster ID validation for Variant A
102
+ // isEntitledProduct check removed product-level entitlement now resolved from SFDCProductJSON__c
135
103
  const clusterIdValid = isVariationA ? true : isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
136
- return isEntitledProductLocal && clusterIdValid;
104
+ return clusterIdValid;
137
105
  };
138
106
  const isReviewSectionValid = () => {
139
107
  var _a;
140
- return (isEntitledProduct &&
141
- isCaseStateValid(caseState, loggedInUserRights) &&
108
+ return (
109
+ // isEntitledProduct — product-level entitlement now resolved from SFDCProductJSON__c
110
+ isCaseStateValid(caseState, loggedInUserRights) &&
142
111
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
143
112
  isSummarizeSectionValid() &&
144
113
  isAdditionalInformationSectionValidLocal());
145
114
  };
146
115
  const isDescribeIdeaSectionValid = () => {
147
116
  return (isCaseManagementStateValid(caseState, loggedInUserRights) &&
148
- isEntitledProduct &&
117
+ // isEntitledProduct — product-level entitlement now resolved from SFDCProductJSON__c
149
118
  isIdeaCaseStateValid(caseState, loggedInUserRights) &&
150
119
  checkUnallowedFiles());
151
120
  };
152
121
  const isAdditionalInformationSectionValidLocal = () => {
153
122
  var _a;
154
123
  const hostnameIsValid = hostname ? (hostname === null || hostname === void 0 ? void 0 : hostname.length) <= HOSTNAME_LENGTH_LIMIT : true;
155
- return (!caseState.hasInvalidEntitlements &&
124
+ return (isEntitlement &&
156
125
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
157
126
  isCaseInformationSectionValid(caseState, loggedInUserRights) &&
158
127
  hostnameIsValid &&
@@ -185,16 +154,10 @@ export function useIsSectionValid(sectionName) {
185
154
  }
186
155
  };
187
156
  const recommendationSectionError = () => {
188
- if (!product)
189
- return '';
190
- const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
191
- return !isEntitledProductLocal ? (React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
192
- "You need a valid entitlement to create a case.\u00A0 Please contact",
193
- ' ',
194
- React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
195
- " for assistance.")) : ('');
157
+ // isEntitledProduct check removed — product-level entitlement now resolved from SFDCProductJSON__c
158
+ return '';
196
159
  };
197
- const getSupportSectionError = () => {
160
+ const getEntitlementSectionError = () => {
198
161
  if (manageSupportCases === false) {
199
162
  return (React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
200
163
  "You need additional access to manage cases.\u00A0 Please contact",
@@ -218,7 +181,9 @@ export function useIsSectionValid(sectionName) {
218
181
  case AppRouteSections.RESOURCES:
219
182
  return recommendationSectionError();
220
183
  case AppRouteSections.GET_SUPPORT:
221
- return getSupportSectionError();
184
+ case AppRouteSections.SUMMARIZE:
185
+ case AppRouteSections.TROUBLESHOOT:
186
+ return getEntitlementSectionError();
222
187
  default:
223
188
  return '';
224
189
  }
@@ -1 +1 @@
1
- {"version":3,"file":"usePostComment.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/usePostComment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAW9E,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE;;CAAA;2FAgBtC,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,aAAa,GAAG,mBAAmB,CAAC,GAAG;QAChF,qBAAqB,EAAE,OAAO,CAAC;KAClC;;EAwBJ"}
1
+ {"version":3,"file":"usePostComment.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/usePostComment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAM9E,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE;;CAAA;2FAUtC,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,aAAa,GAAG,mBAAmB,CAAC,GAAG;QAChF,qBAAqB,EAAE,OAAO,CAAC;KAClC;;EAYJ"}
@@ -7,36 +7,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { publicApi } from '@cee-eng/hydrajs';
11
- import { useFetch } from '@rh-support/components';
12
- import { useCaseDispatch } from '../../context/CaseContext';
13
- import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
14
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
15
- import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
10
+ import { useApolloClient } from '@apollo/client/react';
11
+ import isEqual from 'lodash/isEqual';
12
+ import { useCaseSelector } from '../../context/CaseContext';
13
+ import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../hooks/useCaseComments';
16
14
  export function usePostComment({ caseNumber }) {
17
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
18
- propgateErrors: true,
19
- });
20
- const caseDispatch = useCaseDispatch();
21
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
22
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
23
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
24
- const defaultContentType = 'plaintext';
25
- const postComment = (_a) => __awaiter(this, [_a], void 0, function* ({ commentBody, contentType = defaultContentType, updateDiscussionState = true, doNotChangeStatus = false, }) {
26
- if (!commentBody)
15
+ const client = useApolloClient();
16
+ const { createComment, loading: isPostingComment } = useCreateCaseComment();
17
+ const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
18
+ const postComment = (_a) => __awaiter(this, [_a], void 0, function* ({ commentBody, contentType, updateDiscussionState = true, doNotChangeStatus = false, }) {
19
+ if (!commentBody || !caseSalesforceId)
27
20
  return;
28
- try {
29
- yield postCommentRequest({
30
- caseNumber,
31
- commentBody,
32
- contentType,
33
- doNotChangeStatus,
34
- });
35
- updateDiscussionState &&
36
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
37
- }
38
- catch (e) {
39
- throw e;
21
+ yield createComment({
22
+ caseId: caseSalesforceId,
23
+ body: commentBody,
24
+ isPublic: true,
25
+ });
26
+ if (updateDiscussionState) {
27
+ yield client.refetchQueries({ include: [GET_CASE_COMMENTS] });
40
28
  }
41
29
  });
42
30
  return { postComment, isPostingComment };
@@ -16,4 +16,5 @@ export declare const trimAndReplacePlus: (value: string) => string;
16
16
  export declare const removeAllSpaces: (value: string) => string;
17
17
  export declare const removeAllChars: (value: string) => string;
18
18
  export declare const getProductObj: (products: Partial<ISEProduct>[], product: string) => Partial<ISEProduct>;
19
+ export declare const getProductObjById: (products: Partial<ISEProduct>[], productId?: string) => Partial<ISEProduct>;
19
20
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,IAEnC,cAAc,CAAC,EAAE,eAAe,CAAC,uBAQ5C;AAED,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,EAAE,WAAW,MAAM,KAAG,OAarE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,WAG/C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,WAI5C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,WAI3C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,MAAM,wBAG7E,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,IAEnC,cAAc,CAAC,EAAE,eAAe,CAAC,uBAQ5C;AAED,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,EAAE,WAAW,MAAM,KAAG,OAarE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,WAG/C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,WAI5C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,WAI3C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,MAAM,wBAG7E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,YAAY,MAAM,wBAIpF,CAAC"}
@@ -14,9 +14,9 @@ import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
14
14
  */
15
15
  export function getChangedValueTooltip(valueNameCb, accessor) {
16
16
  return (currentValue, previousValue) => (React.createElement(React.Fragment, null,
17
- React.createElement(Trans, null,
18
- valueNameCb(currentValue, previousValue),
19
- " changed from"),
17
+ React.createElement(Trans, { i18nKey: valueNameCb(currentValue, previousValue) }),
18
+ " ",
19
+ React.createElement(Trans, null, "changed from"),
20
20
  React.createElement("b", null,
21
21
  " ",
22
22
  accessor ? accessor(previousValue, currentValue) : previousValue,
@@ -59,3 +59,9 @@ export const getProductObj = (products, product) => {
59
59
  const productIndex = findIndex(products, (p) => p.product === product);
60
60
  return productIndex === -1 ? {} : products[productIndex];
61
61
  };
62
+ export const getProductObjById = (products, productId) => {
63
+ if (!productId)
64
+ return {};
65
+ const productIndex = findIndex(products, (p) => p.productId === productId);
66
+ return productIndex === -1 ? {} : products[productIndex];
67
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAgUtD"}
1
+ {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAiBvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAoetD"}