@rh-support/troubleshoot 2.6.340 → 2.6.349
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +33 -60
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +1 -2
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +9 -11
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -9
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +18 -13
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +3 -4
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.js +2 -2
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +16 -20
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -135
- package/lib/esm/components/shared/Constants.d.ts +0 -5
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +0 -5
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +57 -22
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +28 -16
- package/lib/esm/components/shared/utils.d.ts +0 -1
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +3 -9
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -160
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +0 -5
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/case.css +202 -60
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +11 -18
- package/lib/esm/hooks/useS3Upload.d.ts +4 -5
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +30 -28
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +0 -1
- package/lib/esm/models/cache.d.ts +2 -0
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -121
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +7 -30
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
- package/lib/esm/reducers/CaseHelpers.d.ts +2 -3
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +15 -98
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
- package/lib/esm/reducers/CaseReducer.d.ts +11 -50
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +99 -270
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +18 -15
- package/lib/esm/scss/_main.scss +0 -9
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/package.json +8 -9
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
- package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
- package/lib/esm/graphql/index.d.ts +0 -4
- package/lib/esm/graphql/index.d.ts.map +0 -1
- package/lib/esm/graphql/index.js +0 -3
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
- package/lib/esm/graphql/mutations/index.d.ts +0 -2
- package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/index.js +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
- package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
- package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getParentId.js +0 -16
- package/lib/esm/graphql/queries/index.d.ts +0 -3
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -2
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
- package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/escalation.js +0 -1
- package/lib/esm/graphql/schemas/index.d.ts +0 -2
- package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/index.js +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/index.js +0 -5
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
- package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/types.js +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
- package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
- package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseHistory.js +0 -98
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
- package/lib/esm/models/caseHistory.d.ts +0 -80
- package/lib/esm/models/caseHistory.d.ts.map +0 -1
- package/lib/esm/models/caseHistory.js +0 -1
- package/lib/esm/utils/TimelineUtils.d.ts +0 -41
- package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
- package/lib/esm/utils/TimelineUtils.js +0 -135
- package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -165
|
@@ -7,12 +7,12 @@ 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 {
|
|
10
|
+
import { caseAttachments } from '@cee-eng/hydrajs';
|
|
11
11
|
import { MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
|
|
12
12
|
import { AlertMessage, AlertType, ErrorBoundary, LoadingIndicator, ToastNotification } from '@rh-support/components';
|
|
13
13
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
14
14
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
15
|
-
import {
|
|
15
|
+
import { dtmTrackEventCaseStepEncountered, getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView, } from '@rh-support/utils';
|
|
16
16
|
import cloneDeep from 'lodash/cloneDeep';
|
|
17
17
|
import filter from 'lodash/filter';
|
|
18
18
|
import findIndex from 'lodash/findIndex';
|
|
@@ -26,16 +26,16 @@ import { AutoSizer, CellMeasurer, CellMeasurerCache, List, WindowScroller } from
|
|
|
26
26
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
27
27
|
import { useCaseDetailsPageDispatchContext, useCaseDetailsPageStateContext, } from '../../../../context/CaseDetailsPageContext';
|
|
28
28
|
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../../context/CaseDiscussionTabContext';
|
|
29
|
-
import {
|
|
29
|
+
import { clearReplyComment, discussionSortOrderConst, DiscussionType, setCommentText, setDiscussions, setFilter, setSort, updateAttachment, updateAttacmentsAfterRemoval, updateCommentStateFeedback, updateDiscussionStateAttachments, updateDiscussionStateComments, } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
30
30
|
import { setCaseState } from '../../../../reducers/CaseReducer';
|
|
31
31
|
import { AttachmentContextProvider } from '../../../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
32
32
|
import { PDFContext } from '../../PDFContainer';
|
|
33
33
|
import CaseAttachment from './CaseAttachment';
|
|
34
|
+
import CaseChat from './CaseChat';
|
|
34
35
|
import CaseComments from './CaseComments';
|
|
35
|
-
|
|
36
|
+
import CaseExternalTrackerUpdate from './CaseExternalTrackerUpdate';
|
|
36
37
|
import { CommentSearch } from './CommentSearch';
|
|
37
38
|
import { PostComment } from './PostComment';
|
|
38
|
-
/** Threshold above which comments render in a virtualized (windowed) list for performance. */
|
|
39
39
|
const VC_MINIMUM_COMMENT = 150;
|
|
40
40
|
let cellMeasureCache = new CellMeasurerCache({
|
|
41
41
|
fixedWidth: true,
|
|
@@ -43,26 +43,30 @@ let cellMeasureCache = new CellMeasurerCache({
|
|
|
43
43
|
});
|
|
44
44
|
export default function CaseDiscussion(props) {
|
|
45
45
|
const { t } = useTranslation();
|
|
46
|
-
const { isPostingRemoteRequestCommentCompleted, product, version
|
|
46
|
+
const { isPostingRemoteRequestCommentCompleted, screenSessionRequested, product, version } = useCaseSelector((state) => ({
|
|
47
47
|
isPostingRemoteRequestCommentCompleted: state.isPostingRemoteRequestCommentCompleted,
|
|
48
|
+
screenSessionRequested: state.caseDetails.screenSessionRequested,
|
|
48
49
|
product: state.caseDetails.product,
|
|
49
50
|
version: state.caseDetails.version,
|
|
50
|
-
caseSalesforceId: state.caseDetails.id,
|
|
51
51
|
}), isEqual);
|
|
52
52
|
const urlSearchParams = getUrlParsedParams(useLocation().search);
|
|
53
|
-
const discussionIdFromUrl = ((urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.commentId) ||
|
|
53
|
+
const discussionIdFromUrl = ((urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.commentId) ||
|
|
54
|
+
(urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.externalTrackerId) ||
|
|
55
|
+
(urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.attachmentId) ||
|
|
56
|
+
(urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.chatId));
|
|
54
57
|
const activeDiscussionElementRef = useRef(null);
|
|
55
|
-
const { sort, discussionFiltersListState, allDiscussions,
|
|
56
|
-
const { globalMetadataState: {
|
|
58
|
+
const { sort, discussionFiltersListState, allDiscussions, replyCommentText, replyCommentCreator } = useCaseDiscussionTabStateContext();
|
|
59
|
+
const { globalMetadataState: { loggedInUsersAccount, navBarRef }, } = useGlobalStateContext();
|
|
57
60
|
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
58
|
-
const { caseDetailsPageState: { caseAttachmentHydra }, } = useCaseDetailsPageStateContext();
|
|
59
|
-
const dispatchCaseDetailsHydraAttachments = useCaseDetailsPageDispatchContext();
|
|
60
61
|
const caseDispatch = useCaseDispatch();
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const canSeeAttachments = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEE_ATTACHMENTS);
|
|
62
|
+
const { caseDetailsPageState: { caseFeedbacksHydra, caseAttachmentHydra, caseExternalTrackersUpdate }, } = useCaseDetailsPageStateContext();
|
|
63
|
+
const dispatchCaseDetailsHydraAttachments = useCaseDetailsPageDispatchContext();
|
|
64
64
|
const { caseNumber } = props;
|
|
65
65
|
const activeElementId = useRef(null);
|
|
66
|
+
const ability = useContext(AbilityContext);
|
|
67
|
+
const canSeeExternalTracker = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_EXTERNAL_TRACKER);
|
|
68
|
+
const canSeeChat = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_CHAT);
|
|
69
|
+
const canSeeAttachments = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEE_ATTACHMENTS);
|
|
66
70
|
const listRef = React.useRef(null);
|
|
67
71
|
const windowScrollerRef = React.useRef(null);
|
|
68
72
|
const commentRef = React.useRef(null);
|
|
@@ -73,7 +77,11 @@ export default function CaseDiscussion(props) {
|
|
|
73
77
|
const [isCommentSearchCleared, setIsCommentSearchCleared] = useState(false);
|
|
74
78
|
const [isJumpToCommentClicked, setJumpToCommentClicked] = useState(false);
|
|
75
79
|
const [canUpdateScrollTop, setCanUpdateScrollTop] = useState(true);
|
|
80
|
+
const [replyingToPrivateComment, setReplyingToPrivateComment] = useState(null);
|
|
81
|
+
// used for tracking comment section width changes
|
|
76
82
|
const [discussionSectionWidth, setDiscussionSectionWidth] = useState(null);
|
|
83
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
84
|
+
const [selectedFilterItems, setSelectedFilterItems] = useState([]);
|
|
77
85
|
const [isSortOpen, setIsSortOpen] = useState(false);
|
|
78
86
|
const [sortSelected, setSortSelected] = useState('Select a value');
|
|
79
87
|
if (props.isDiscussionTab) {
|
|
@@ -82,10 +90,18 @@ export default function CaseDiscussion(props) {
|
|
|
82
90
|
defaultHeight: 100,
|
|
83
91
|
});
|
|
84
92
|
}
|
|
93
|
+
const computeFilterComment = () => {
|
|
94
|
+
return filter(allDiscussions, (discussion) => {
|
|
95
|
+
const activeFilter = discussionFiltersListState.filter((filter) => filter.value === discussion.discussionType && filter.isSelected);
|
|
96
|
+
return activeFilter.length === 1 ? discussion : null;
|
|
97
|
+
});
|
|
98
|
+
};
|
|
85
99
|
const shouldRenderRVComponent = !isExportingPDF && allDiscussions.length > VC_MINIMUM_COMMENT;
|
|
100
|
+
// filter comments on the basis of filterBy and search api
|
|
101
|
+
const computeFilteredComments = computeFilterComment();
|
|
86
102
|
const comuteSearchedComments = searchResult.length === 0
|
|
87
|
-
? cloneDeep(
|
|
88
|
-
: filter([...
|
|
103
|
+
? cloneDeep(computeFilteredComments)
|
|
104
|
+
: filter([...computeFilteredComments], (o) => { var _a; return searchResult.indexOf((_a = o === null || o === void 0 ? void 0 : o.item) === null || _a === void 0 ? void 0 : _a.id) !== -1; });
|
|
89
105
|
const isSearchResultEmpty = !isEmpty(searchCommentText) && (searchResult.length === 0 || comuteSearchedComments.length === 0);
|
|
90
106
|
const setVRCommentIndex = (cId) => {
|
|
91
107
|
setCommentIndex(cId < 0 ? 0 : cId);
|
|
@@ -104,6 +120,8 @@ export default function CaseDiscussion(props) {
|
|
|
104
120
|
if (allDiscussions.length > VC_MINIMUM_COMMENT) {
|
|
105
121
|
const commentIndex = findIndex([...comuteSearchedComments], (discussion) => discussion.item.id === discussionIdFromUrl);
|
|
106
122
|
setVRCommentIndex(commentIndex);
|
|
123
|
+
// to fix scrolling to comment index when scrollTop value from window scroller is 0
|
|
124
|
+
// initial list items
|
|
107
125
|
if (0 <= commentIndex && commentIndex <= 3) {
|
|
108
126
|
const offset = 80;
|
|
109
127
|
const scrollTopValue = ((_a = windowScrollerRef === null || windowScrollerRef === void 0 ? void 0 : windowScrollerRef.current) === null || _a === void 0 ? void 0 : _a._positionFromTop) - offset;
|
|
@@ -127,38 +145,57 @@ export default function CaseDiscussion(props) {
|
|
|
127
145
|
}
|
|
128
146
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
129
147
|
}, [discussionIdFromUrl, allDiscussions, activeElementId.current]);
|
|
130
|
-
useEffect(() => {
|
|
131
|
-
if (!isExportingPDF) {
|
|
132
|
-
setDiscussions(dispatchDiscussion, props.caseComments, [], caseAttachmentHydra.data, [], [], discussionFiltersListState, false, false, canSeeAttachments);
|
|
133
|
-
}
|
|
134
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
135
|
-
}, [props.caseComments, caseAttachmentHydra, canSeeAttachments]);
|
|
136
148
|
useEffect(() => {
|
|
137
149
|
if (!caseAttachmentHydra.isFetching && caseAttachmentHydra.isError) {
|
|
138
|
-
ToastNotification.addDangerMessage(t(
|
|
150
|
+
ToastNotification.addDangerMessage(t(`There was an error loading attachments.`));
|
|
139
151
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
try {
|
|
143
|
-
yield props.refetchComments();
|
|
152
|
+
if (!caseExternalTrackersUpdate.isFetching && caseExternalTrackersUpdate.isError) {
|
|
153
|
+
ToastNotification.addDangerMessage(t(`There was an error loading external trackers.`));
|
|
144
154
|
}
|
|
145
|
-
|
|
146
|
-
console.
|
|
155
|
+
if (!caseFeedbacksHydra.isFetching && caseFeedbacksHydra.isError) {
|
|
156
|
+
console.log(`There was an error loading feedback.`);
|
|
147
157
|
}
|
|
158
|
+
// Attachments, feedbacks and external tracker updates apis are called in advance
|
|
159
|
+
if (!isExportingPDF &&
|
|
160
|
+
!caseAttachmentHydra.isFetching &&
|
|
161
|
+
!caseFeedbacksHydra.isFetching &&
|
|
162
|
+
!caseExternalTrackersUpdate.isFetching) {
|
|
163
|
+
setDiscussions(dispatchDiscussion, props.caseComments, props.caseChats, caseAttachmentHydra.data, caseFeedbacksHydra.data, caseExternalTrackersUpdate.data, discussionFiltersListState, canSeeExternalTracker, canSeeChat, canSeeAttachments);
|
|
164
|
+
}
|
|
165
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
166
|
+
}, [props.caseComments, caseAttachmentHydra, props.caseChats, caseFeedbacksHydra, caseExternalTrackersUpdate]);
|
|
167
|
+
const onAttachmentRemove = (uuid_removed) => {
|
|
168
|
+
updateAttacmentsAfterRemoval(dispatchDiscussion, uuid_removed, allDiscussions, discussionFiltersListState);
|
|
169
|
+
};
|
|
170
|
+
const onFeedbackUpdate = (comment_id, feedback, feedbackReason) => {
|
|
171
|
+
updateCommentStateFeedback(dispatchDiscussion, comment_id, feedback, allDiscussions, feedbackReason);
|
|
172
|
+
};
|
|
173
|
+
const onCommentAdded = () => __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
yield updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
148
175
|
dtmTrackEventCaseStepEncountered('comment', caseNumber, product, version);
|
|
149
176
|
});
|
|
150
|
-
const
|
|
151
|
-
|
|
177
|
+
const onAttachmentAdded = () => __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
ToastNotification.addSuccessMessage(t('Attachment(s) uploaded successfully'));
|
|
179
|
+
yield updateDiscussionStateAttachments(dispatchDiscussion, caseNumber, allDiscussions, sort, loggedInUsersAccount.data.secureSupport, discussionFiltersListState, dispatchCaseDetailsHydraAttachments);
|
|
180
|
+
});
|
|
181
|
+
const onReply = (commentText, commentCreator, isPublic) => {
|
|
182
|
+
var _a;
|
|
183
|
+
setReplyingToPrivateComment(!isPublic);
|
|
184
|
+
setCommentText(dispatchDiscussion, commentText, commentCreator);
|
|
152
185
|
scrollIntoView(props.tabRef, { navBarRef, timeout: 0, onlyIfNotInViewport: true, offset: 30 });
|
|
186
|
+
commentIndex !== -1 && setCommentIndex(-1);
|
|
187
|
+
isCommentSearchCleared && setIsCommentSearchCleared(false);
|
|
188
|
+
(_a = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _a === void 0 ? void 0 : _a.scrollToPosition(0);
|
|
153
189
|
};
|
|
154
|
-
const
|
|
155
|
-
|
|
190
|
+
const resetReplyComment = () => {
|
|
191
|
+
clearReplyComment(dispatchDiscussion);
|
|
192
|
+
setReplyingToPrivateComment(null);
|
|
156
193
|
};
|
|
157
|
-
/** Strips special chars to prevent regex injection, then HTML-escapes via DOM round-trip to prevent XSS. */
|
|
158
194
|
const sanitizedSearchInput = (value) => {
|
|
159
195
|
if (!value)
|
|
160
196
|
return '';
|
|
161
197
|
const sanitizedValue = value.replace(/[^a-zA-Z0-9]/g, '');
|
|
198
|
+
// To escape HTML-like characters (e.g., <, >, &) in sanitizedValue
|
|
162
199
|
const div = document.createElement('div');
|
|
163
200
|
div.textContent = sanitizedValue;
|
|
164
201
|
return div.innerHTML;
|
|
@@ -172,10 +209,10 @@ export default function CaseDiscussion(props) {
|
|
|
172
209
|
isCommentSearchCleared && setIsCommentSearchCleared(false);
|
|
173
210
|
};
|
|
174
211
|
const highlightSearchResults = (searchTerm) => {
|
|
175
|
-
// Delay allows the DOM (especially virtualized rows) to finish rendering before mark.js can highlight matches.
|
|
176
212
|
setTimeout(() => {
|
|
213
|
+
// to mark attachment link button text
|
|
177
214
|
if (!isEmpty(sanitizedSearchInput(searchTerm))) {
|
|
178
|
-
const sanitizedSearchTerm = sanitizedSearchInput(searchTerm);
|
|
215
|
+
const sanitizedSearchTerm = sanitizedSearchInput(searchTerm); // Sanitize the search term
|
|
179
216
|
document.querySelectorAll('button.attachment-download-btn').forEach((button) => {
|
|
180
217
|
var _a, _b;
|
|
181
218
|
if ((_a = button === null || button === void 0 ? void 0 : button.textContent) === null || _a === void 0 ? void 0 : _a.includes(sanitizedSearchTerm)) {
|
|
@@ -189,6 +226,9 @@ export default function CaseDiscussion(props) {
|
|
|
189
226
|
done: () => {
|
|
190
227
|
if (isEmpty(searchTerm))
|
|
191
228
|
return;
|
|
229
|
+
// removed { separateWordSearch: false }
|
|
230
|
+
// so the search term is split into individual words, and each word is matched separately.
|
|
231
|
+
// Search Term: "frontend developer" Matches: Text containing "frontend" or "developer".
|
|
192
232
|
markInstance.mark(searchTerm);
|
|
193
233
|
},
|
|
194
234
|
});
|
|
@@ -200,26 +240,22 @@ export default function CaseDiscussion(props) {
|
|
|
200
240
|
highlightSearchResults('');
|
|
201
241
|
setSearchResult([]);
|
|
202
242
|
if (cId === discussionIdFromUrl) {
|
|
243
|
+
// reason to reset activeElementId if comment id is same in the url on click jump to comment button
|
|
244
|
+
// we need to re compute filtered comments after clear search results.
|
|
245
|
+
// it will call useEffect and will set virtual comment Index(setVRCommentIndex())
|
|
203
246
|
activeElementId.current = '';
|
|
204
247
|
}
|
|
205
248
|
};
|
|
206
|
-
const onAttachmentRemove = (uuid_removed) => {
|
|
207
|
-
updateAttacmentsAfterRemoval(dispatchDiscussion, uuid_removed, allDiscussions, discussionFiltersListState);
|
|
208
|
-
};
|
|
209
|
-
const onAttachmentAdded = () => __awaiter(this, void 0, void 0, function* () {
|
|
210
|
-
var _a;
|
|
211
|
-
yield updateDiscussionStateAttachments(dispatchDiscussion, caseNumber, allDiscussions, sort, discussionFiltersListState, dispatchCaseDetailsHydraAttachments, apolloClient, caseSalesforceId, Boolean((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport));
|
|
212
|
-
});
|
|
213
249
|
const onMetadataUpdate = (attachmentId, updatedAttachment) => {
|
|
214
250
|
updateAttachment(dispatchDiscussion, attachmentId, updatedAttachment, allDiscussions);
|
|
215
251
|
};
|
|
216
|
-
const downloadAttachment = ({ caseNumber
|
|
252
|
+
const downloadAttachment = (_a) => __awaiter(this, [_a], void 0, function* ({ caseNumber, uuid, name }) {
|
|
217
253
|
const tempToastId = ToastNotification.addInfoMessage(t('Starting file download'));
|
|
218
254
|
try {
|
|
219
|
-
|
|
255
|
+
yield caseAttachments.downloadAttachmentS3(caseNumber, uuid, name, false, loggedInUsersAccount.data.secureSupport);
|
|
220
256
|
}
|
|
221
257
|
catch (e) {
|
|
222
|
-
ToastNotification.addDangerMessage(t(
|
|
258
|
+
ToastNotification.addDangerMessage(t(`Could not download {{filename}}: {{error}}`, {
|
|
223
259
|
filename: name,
|
|
224
260
|
error: e === null || e === void 0 ? void 0 : e.message,
|
|
225
261
|
}));
|
|
@@ -227,7 +263,11 @@ export default function CaseDiscussion(props) {
|
|
|
227
263
|
finally {
|
|
228
264
|
tempToastId && ToastNotification.clearToast(tempToastId);
|
|
229
265
|
}
|
|
230
|
-
};
|
|
266
|
+
});
|
|
267
|
+
/**
|
|
268
|
+
* We need to clear the cell measurer cache if user resizes the window or discussion section width is changed
|
|
269
|
+
* so that the height of the rows are re-calculated
|
|
270
|
+
*/
|
|
231
271
|
useEffect(() => {
|
|
232
272
|
if (discussionSectionWidth && shouldRenderRVComponent) {
|
|
233
273
|
cellMeasureCache && cellMeasureCache.clearAll();
|
|
@@ -242,6 +282,7 @@ export default function CaseDiscussion(props) {
|
|
|
242
282
|
return (React.createElement(WindowScroller, { ref: windowScrollerRef, onScroll: handleScroll }, ({ height, registerChild, onChildScroll, isScrolling, scrollTop }) => {
|
|
243
283
|
return (React.createElement("div", { ref: commentRef, "data-tracking-id": "vr-case-comments" },
|
|
244
284
|
React.createElement(AutoSizer, { disableHeight: true }, ({ width }) => {
|
|
285
|
+
// setTimeout to update state in the next tick and avoid bad setState warnings
|
|
245
286
|
discussionSectionWidth !== width &&
|
|
246
287
|
setTimeout(() => setDiscussionSectionWidth(width), 0);
|
|
247
288
|
return (React.createElement("div", { ref: registerChild },
|
|
@@ -255,19 +296,16 @@ export default function CaseDiscussion(props) {
|
|
|
255
296
|
if (isEmpty(discussion) || isEmpty(discussion.item))
|
|
256
297
|
return null;
|
|
257
298
|
return (React.createElement("div", { "data-tracking-id": "discussion-elements", key: discussion.item.id },
|
|
258
|
-
discussion.discussionType === DiscussionType.COMMENT && (React.createElement(CaseComments, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, comment: discussion.item, onFeedBackUpdate:
|
|
259
|
-
discussion.discussionType === DiscussionType.ATTACHMENT && (React.createElement(CaseAttachment, { attachment: discussion.item, onAttachmentRemove: onAttachmentRemove, onMetadataUpdate: onMetadataUpdate, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null }))
|
|
299
|
+
discussion.discussionType === DiscussionType.COMMENT && (React.createElement(CaseComments, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, comment: discussion.item, onFeedBackUpdate: onFeedbackUpdate, feedback: discussion.feedback, feedbackReason: discussion.feedbackReason, accountNumber: props.accountNumber, onReply: onReply, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment })),
|
|
300
|
+
discussion.discussionType === DiscussionType.ATTACHMENT && (React.createElement(CaseAttachment, { attachment: discussion.item, onAttachmentRemove: onAttachmentRemove, onMetadataUpdate: onMetadataUpdate, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment, downloadAttachment: downloadAttachment, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null })),
|
|
301
|
+
discussion.discussionType === DiscussionType.CHAT && (React.createElement(CaseChat, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, chat: discussion.item, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment })),
|
|
302
|
+
discussion.discussionType === DiscussionType.EXTERNAL_TRACKER && (React.createElement(CaseExternalTrackerUpdate, { caseNumber: caseNumber, ref: discussionIdFromUrl === discussion.item.id ? activeDiscussionElementRef : null, trackerUpdate: discussion.item, showJumpToComment: !isEmpty(searchCommentText), onJumpToComment: onJumpToComment }))));
|
|
260
303
|
};
|
|
261
|
-
const rowRenderer = ({ index, parent, key, style
|
|
304
|
+
const rowRenderer = ({ index, parent, key, style }) => {
|
|
262
305
|
const discussion = comuteSearchedComments[index];
|
|
263
306
|
return (React.createElement(CellMeasurer, { key: key, cache: cellMeasureCache, parent: parent, columnIndex: 0, rowIndex: index },
|
|
264
307
|
React.createElement("div", { className: "comment-virtualized-row", key: key, style: style }, renderCaseCommentElement(discussion))));
|
|
265
308
|
};
|
|
266
|
-
/**
|
|
267
|
-
* One-shot scroll override used after search/filter changes.
|
|
268
|
-
* Resets the virtualized list to the top, then yields control back to
|
|
269
|
-
* WindowScroller's default onChildScroll for subsequent scroll events.
|
|
270
|
-
*/
|
|
271
309
|
const customChildScroll = ({ scrollTop }) => {
|
|
272
310
|
var _a;
|
|
273
311
|
if (!canUpdateScrollTop) {
|
|
@@ -280,25 +318,23 @@ export default function CaseDiscussion(props) {
|
|
|
280
318
|
};
|
|
281
319
|
const handleScroll = ({ scrollTop }) => {
|
|
282
320
|
var _a, _b, _c, _d, _e, _f;
|
|
321
|
+
// here we are doing couple of things
|
|
322
|
+
// 1. check scroll position on the first comment, 2. set scrollposition as par window top
|
|
323
|
+
// 3. if user click on jump to comment button then select row as per commentid and adding css class.
|
|
283
324
|
isCommentSearchCleared && setIsCommentSearchCleared(false);
|
|
284
325
|
if (listRef && commentRef) {
|
|
285
|
-
// Skip one scroll cycle after a search/filter reset to let customChildScroll re-sync
|
|
286
326
|
if (!canUpdateScrollTop) {
|
|
287
327
|
setCanUpdateScrollTop(true);
|
|
288
328
|
return;
|
|
289
329
|
}
|
|
290
330
|
const commentTop = (_b = (_a = commentRef === null || commentRef === void 0 ? void 0 : commentRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.top;
|
|
291
|
-
// Re-apply search highlights on scroll since virtualized rows re-mount
|
|
292
331
|
!isEmpty(searchCommentText) && highlightSearchResults(searchCommentText);
|
|
293
|
-
// Normal browsing or comment section visible above viewport — sync list position
|
|
294
332
|
if (isEmpty(discussionIdFromUrl) || commentTop > 0) {
|
|
295
333
|
(_c = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _c === void 0 ? void 0 : _c.scrollToPosition(commentTop > 0 ? 0 : Math.abs(commentTop));
|
|
296
334
|
}
|
|
297
335
|
else if (commentTop < 0 && !isEmpty(discussionIdFromUrl) && !isJumpToCommentClicked) {
|
|
298
|
-
// Deep-link navigation: let WindowScroller drive the list scroll position
|
|
299
336
|
(_d = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _d === void 0 ? void 0 : _d.scrollToPosition(scrollTop);
|
|
300
337
|
}
|
|
301
|
-
// After a "jump to comment" click, scroll the virtualized list to the target row
|
|
302
338
|
if (isJumpToCommentClicked) {
|
|
303
339
|
(_e = listRef === null || listRef === void 0 ? void 0 : listRef.current) === null || _e === void 0 ? void 0 : _e.scrollToRow(commentIndex);
|
|
304
340
|
(_f = windowScrollerRef === null || windowScrollerRef === void 0 ? void 0 : windowScrollerRef.current) === null || _f === void 0 ? void 0 : _f.updatePosition();
|
|
@@ -306,6 +342,7 @@ export default function CaseDiscussion(props) {
|
|
|
306
342
|
}
|
|
307
343
|
}
|
|
308
344
|
};
|
|
345
|
+
const list = discussionFiltersListState.filter((filter) => filter.canSee);
|
|
309
346
|
useEffect(() => {
|
|
310
347
|
if (isPostingRemoteRequestCommentCompleted) {
|
|
311
348
|
onCommentAdded();
|
|
@@ -313,33 +350,59 @@ export default function CaseDiscussion(props) {
|
|
|
313
350
|
}
|
|
314
351
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
315
352
|
}, [isPostingRemoteRequestCommentCompleted]);
|
|
353
|
+
const onToggleClick = (e) => {
|
|
354
|
+
e.stopPropagation();
|
|
355
|
+
setIsOpen(!isOpen);
|
|
356
|
+
};
|
|
316
357
|
const onSortToggleClick = (e) => {
|
|
317
358
|
e.stopPropagation();
|
|
318
359
|
setIsSortOpen(!isSortOpen);
|
|
319
360
|
};
|
|
320
|
-
const
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
361
|
+
const onFilterSelect = (_event, prevOption) => {
|
|
362
|
+
const isFilterSelected = !prevOption.isSelected; // to get updated state of changed filter
|
|
363
|
+
const prevSelectedFilters = list.filter((option) => option.isSelected && option.value !== prevOption.value); // to get previously selected filters
|
|
364
|
+
const prevSelectedFiltersValue = prevSelectedFilters.map((option) => option.value);
|
|
365
|
+
const newSelectedFilters = isFilterSelected // has all the selected values of filter with the updated selected filter state
|
|
366
|
+
? [...prevSelectedFiltersValue, prevOption.value]
|
|
367
|
+
: prevSelectedFiltersValue;
|
|
368
|
+
setFilter(dispatchDiscussion, newSelectedFilters, discussionFiltersListState);
|
|
369
|
+
shouldRenderRVComponent && setCanUpdateScrollTop(false);
|
|
370
|
+
setSelectedFilterItems(prevSelectedFiltersValue);
|
|
371
|
+
};
|
|
372
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true }, getDropdownBtnPlaceholder(t('Select a filter'), list.filter((i) => i.isSelected).map((i) => i.filterLabel), ' ', list.length, t('All comments'))));
|
|
373
|
+
const onSortSelect = (_event, selectedSort) => {
|
|
374
|
+
setSort(dispatchDiscussion, selectedSort, allDiscussions);
|
|
375
|
+
setSortSelected(selectedSort.value);
|
|
326
376
|
setIsSortOpen(false);
|
|
327
377
|
};
|
|
328
378
|
const onSortToggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onSortToggleClick, isExpanded: isSortOpen, isFullWidth: true }, sort.name));
|
|
329
379
|
return (React.createElement(React.Fragment, null,
|
|
330
380
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading post comment section') } },
|
|
331
381
|
React.createElement(AttachmentContextProvider, null,
|
|
332
|
-
React.createElement(PostComment, { caseNumber: caseNumber, allDiscussions: allDiscussions, onCommentAdded: onCommentAdded, onAttachmentAdded: onAttachmentAdded,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
382
|
+
React.createElement(PostComment, { caseNumber: caseNumber, allDiscussions: allDiscussions, onCommentAdded: onCommentAdded, onAttachmentAdded: onAttachmentAdded, commentText: replyCommentText, onCommentClear: resetReplyComment, commentCreator: replyCommentCreator, defaultIsPublic: replyingToPrivateComment === null ? replyingToPrivateComment : !replyingToPrivateComment }))),
|
|
383
|
+
React.createElement(LoadingIndicator, { className: "text-center", isInline: true, show: caseAttachmentHydra.isFetching ||
|
|
384
|
+
caseExternalTrackersUpdate.isFetching ||
|
|
385
|
+
caseFeedbacksHydra.isFetching ||
|
|
386
|
+
(screenSessionRequested && allDiscussions.length === 0) }),
|
|
387
|
+
!caseAttachmentHydra.isFetching &&
|
|
388
|
+
!caseFeedbacksHydra.isFetching &&
|
|
389
|
+
!caseExternalTrackersUpdate.isFetching &&
|
|
390
|
+
!screenSessionRequested &&
|
|
391
|
+
allDiscussions.length === 0 && React.createElement(Trans, null, "No comments"),
|
|
392
|
+
!caseAttachmentHydra.isFetching &&
|
|
393
|
+
!caseFeedbacksHydra.isFetching &&
|
|
394
|
+
!caseExternalTrackersUpdate.isFetching &&
|
|
395
|
+
allDiscussions.length !== 0 && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading comments. Try refreshing.') } },
|
|
337
396
|
React.createElement("div", { className: `pfe-l-grid pfe-m-all-6-col pfe-m-gutters push-bottom ${isExportingPDF ? 'hide-in-pdf' : ''}` },
|
|
338
|
-
React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions:
|
|
397
|
+
React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions: computeFilteredComments || [], onCommentSearch: onCaseCommentSearch, isCommentSearchCleared: isCommentSearchCleared }))),
|
|
398
|
+
React.createElement("span", { className: "push-top-narrow" },
|
|
399
|
+
React.createElement("label", { htmlFor: "case-list-comments-dropdown", className: "pf-v6-u-mb-sm" }, t('Filter by')),
|
|
400
|
+
React.createElement(Select, { "data-tracking-id": "discussions-filter-comments-dropdown", id: "case-list-comments-dropdown", role: "menu", isOpen: isOpen, selected: selectedFilterItems, onSelect: onFilterSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, popperProps: { direction: 'down', enableFlip: false }, zIndex: 9 },
|
|
401
|
+
React.createElement(SelectList, null, list.map((option) => (React.createElement(SelectOption, { hasCheckbox: true, value: option, isSelected: option.isSelected, isDisabled: option.isDisabled }, option.filterLabel)))))),
|
|
339
402
|
React.createElement("span", { className: "push-top-narrow" },
|
|
340
403
|
React.createElement("label", { htmlFor: "se-discussion-sort", className: "pf-v6-u-mb-sm" }, t('Sort by')),
|
|
341
404
|
React.createElement(Select, { id: "se-discussion-sort", "data-tracking-id": "discussions-sort-dropdown", isOpen: isSortOpen, selected: sortSelected, onSelect: onSortSelect, onOpenChange: (isSortOpen) => setIsSortOpen(isSortOpen), toggle: onSortToggle, shouldFocusToggleOnSelect: true, popperProps: { direction: 'down', enableFlip: false }, zIndex: 9 },
|
|
342
|
-
React.createElement(SelectList, null, discussionSortOrderConst.map((option) => (React.createElement(SelectOption, { value: option
|
|
405
|
+
React.createElement(SelectList, null, discussionSortOrderConst.map((option) => (React.createElement(SelectOption, { value: option, isSelected: isEqual(sort.name, option.name) }, option.name))))))),
|
|
343
406
|
React.createElement("div", { className: "support-comment-section" }, !shouldRenderRVComponent &&
|
|
344
407
|
!isSearchResultEmpty &&
|
|
345
408
|
comuteSearchedComments.map((discussion, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommentSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5F,UAAU,MAAM;IACZ,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,qBAgG1C"}
|
|
@@ -46,24 +46,18 @@ export function CommentSearch(props) {
|
|
|
46
46
|
}
|
|
47
47
|
else if (discussion.discussionType === DiscussionType.ATTACHMENT) {
|
|
48
48
|
const caseAttachment = discussion.item;
|
|
49
|
-
const
|
|
50
|
-
? caseAttachment.size
|
|
51
|
-
: caseAttachment.sizeKB > 0
|
|
52
|
-
? caseAttachment.sizeKB * 1024
|
|
53
|
-
: 0;
|
|
54
|
-
const attachmentSizeText = attachmentSizeBytes > 0 ? humanizeSize(attachmentSizeBytes) : '';
|
|
55
|
-
const caseAttachmentText = `delete ${caseAttachment.modifiedBy} ${caseAttachment.description || ''} ${caseAttachment.lastModifiedDate} ${caseAttachment.checksum || ''} Attached file ${caseAttachment.fileName}${attachmentSizeText ? ` ${attachmentSizeText}` : ''} to this case.`;
|
|
49
|
+
const caseAttachmentText = `delete ${caseAttachment.modifiedBy} ${caseAttachment.description || ''} ${caseAttachment.lastModifiedDate} ${caseAttachment.checksum || ''} Attached file ${caseAttachment.fileName} ${humanizeSize(caseAttachment.size)} to this case.`;
|
|
56
50
|
searchApi.indexDocument(discussion.item.id, caseAttachmentText || '');
|
|
57
51
|
}
|
|
58
52
|
else if (discussion.discussionType === DiscussionType.CHAT) {
|
|
59
53
|
const caseChat = discussion.item;
|
|
60
54
|
const caseChatText = `Chat transcript ${caseChat.startTime} Between ${caseChat.agentName} and ${caseChat.visitorName} ${caseChat.body}`;
|
|
61
55
|
searchApi.indexDocument(discussion.item.id, caseChatText || '');
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
}
|
|
57
|
+
else if (discussion.discussionType === DiscussionType.EXTERNAL_TRACKER) {
|
|
58
|
+
const externalTracker = discussion.item;
|
|
59
|
+
const externalTrackerText = `${externalTracker.updateBy} ${externalTracker.createdDate} ${externalTracker.originatingSystem} ${externalTracker.body}`;
|
|
60
|
+
searchApi.indexDocument(discussion.item.id, externalTrackerText || '');
|
|
67
61
|
}
|
|
68
62
|
});
|
|
69
63
|
try {
|
|
@@ -75,22 +69,15 @@ export function CommentSearch(props) {
|
|
|
75
69
|
}
|
|
76
70
|
});
|
|
77
71
|
const computeCommentFooter = (comment) => {
|
|
78
|
-
if (!comment.isPublic
|
|
79
|
-
return 'Private automated comment';
|
|
80
|
-
}
|
|
81
|
-
else if (!comment.isPublic) {
|
|
72
|
+
if (!comment.isPublic) {
|
|
82
73
|
return 'Private comment';
|
|
83
74
|
}
|
|
84
|
-
else if (comment.createdBy === 'Automated Support Assistant') {
|
|
85
|
-
return 'Automated comment';
|
|
86
|
-
}
|
|
87
75
|
};
|
|
88
76
|
props.isCommentSearchCleared && !isEmpty(searchValue) && setSearchValue('');
|
|
89
77
|
return (React.createElement("form", { onSubmit: handleSubmit },
|
|
90
78
|
React.createElement("div", { className: "case-comment-input-container", "data-tracking-id": "case-comment-search" },
|
|
91
|
-
React.createElement("
|
|
92
|
-
|
|
93
|
-
searchValue && (React.createElement(Button, { icon: React.createElement(TimesIcon, null), onClick: clearSearchVal, className: "clear-btn", variant: "plain", "data-tracking-id": "case-comment-search-clear-button", "aria-label": t('Clear this search') }))),
|
|
79
|
+
React.createElement(TextInput, { type: "search", value: searchValue, className: "pf-v6-u-mr-lg", placeholder: t('Search for a comment'), id: "case-comment-search", "aria-label": t('Search for a comment'), onChange: (_event, value) => onSearchValChange(value), "data-tracking-id": "case-comment-search-input" }),
|
|
80
|
+
searchValue && (React.createElement(Button, { icon: React.createElement(TimesIcon, null), onClick: clearSearchVal, className: "clear-btn", variant: "plain", "data-tracking-id": "case-comment-search-clear-button", "aria-label": t('Clear this search') })),
|
|
94
81
|
React.createElement(Button, { variant: "secondary", type: "submit", "data-tracking-id": "case-comment-search-button" },
|
|
95
82
|
React.createElement(Trans, null, "Search")))));
|
|
96
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscussionItemLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAE/E,UAAU,MAAM;IACZ,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"DiscussionItemLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAE/E,UAAU,MAAM;IACZ,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AASD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA0B/C"}
|
|
@@ -7,8 +7,7 @@ const trackingIdMap = {
|
|
|
7
7
|
[DiscussionType.CHAT]: 'chatid-link',
|
|
8
8
|
[DiscussionType.ATTACHMENT]: 'attachmentid-link',
|
|
9
9
|
[DiscussionType.COMMENT]: 'public-private-comment-link',
|
|
10
|
-
|
|
11
|
-
// [DiscussionType.EXTERNAL_TRACKER]: 'externaltrackerid-link',
|
|
10
|
+
[DiscussionType.EXTERNAL_TRACKER]: 'externaltrackerid-link',
|
|
12
11
|
};
|
|
13
12
|
export function DiscussionItemLink(props) {
|
|
14
13
|
const currentQuery = getUrlParsedParams(useLocation().search);
|
|
@@ -19,14 +18,8 @@ export function DiscussionItemLink(props) {
|
|
|
19
18
|
};
|
|
20
19
|
return getStringifiedParams(Object.assign(Object.assign({}, requiredQueries), newQueryObj));
|
|
21
20
|
};
|
|
22
|
-
const handleClick = (e) => {
|
|
23
|
-
if (props.isCopyLink) {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
}
|
|
26
|
-
props.onClick();
|
|
27
|
-
};
|
|
28
21
|
return (React.createElement(Link, { replace: true, to: {
|
|
29
22
|
pathname: `/case/${props.caseNumber}/discussion`,
|
|
30
23
|
search: getQueryString(),
|
|
31
|
-
}, className: "case-public-private-link", onClick:
|
|
24
|
+
}, className: "case-public-private-link", onClick: props.onClick, "data-tracking-id": `${!props.isCopyLink ? 'jumptocomment-' : 'case-'}${trackingIdMap[props.discussionType]}` }, props.children));
|
|
32
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JumpAndCopyLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAG/E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;CAClC;
|
|
1
|
+
{"version":3,"file":"JumpAndCopyLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAG/E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;CAClC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBA8BrC;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -4,20 +4,13 @@ import { useCopyToClipboard } from '@rh-support/components';
|
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { DiscussionItemLink } from './DiscussionItemLink';
|
|
7
|
-
function getAppBasePath() {
|
|
8
|
-
const path = window.location.pathname;
|
|
9
|
-
if (path.startsWith('/support-beta'))
|
|
10
|
-
return '/support-beta';
|
|
11
|
-
return '/support/cases';
|
|
12
|
-
}
|
|
13
7
|
function JumpAndCopyLink(props) {
|
|
14
8
|
const { t } = useTranslation();
|
|
15
9
|
const clipboardRefLink = useRef(null);
|
|
16
10
|
const queryString = `${props.discussionType}Id=${props.cardId}`;
|
|
17
|
-
const basePath = getAppBasePath();
|
|
18
11
|
const { clipboardText, copyToClipboard } = useCopyToClipboard(clipboardRefLink);
|
|
19
12
|
return (React.createElement(React.Fragment, null,
|
|
20
|
-
React.createElement("div", { ref: clipboardRefLink, style: { position: 'absolute', left: '-9999px' } }, `https://${window.location.host}
|
|
13
|
+
React.createElement("div", { ref: clipboardRefLink, style: { position: 'absolute', left: '-9999px' } }, `https://${window.location.host}/support/cases/#/case/${props.caseNumber}/discussion?${queryString}`),
|
|
21
14
|
React.createElement(DiscussionItemLink, { onClick: copyToClipboard, caseNumber: props.caseNumber, discussionType: props.discussionType, itemId: props.cardId, isCopyLink: true },
|
|
22
15
|
React.createElement(Popover, { position: PopoverPosition.top, bodyContent: (hide) => React.createElement("div", null, clipboardText), hasAutoWidth: true, showClose: false },
|
|
23
16
|
React.createElement(LinkIcon, { title: t('Copy link') })))));
|
package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { IAttachment } from '@cee-eng/hydrajs/@types/models/attachment';
|
|
|
2
2
|
interface IProps {
|
|
3
3
|
onAttachmentAdded: () => void;
|
|
4
4
|
caseNumber: string;
|
|
5
|
+
secureSupport: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const FILE_SIZE_LIMIT: number;
|
|
7
|
-
export declare function useMarkdownFileUploader({ caseNumber, onAttachmentAdded }: IProps): {
|
|
8
|
+
export declare function useMarkdownFileUploader({ caseNumber, secureSupport, onAttachmentAdded }: IProps): {
|
|
8
9
|
isMarkdownFileUploadInProgress: boolean;
|
|
9
10
|
isDeletingFile: boolean;
|
|
10
11
|
isUploadingFile: boolean;
|
|
11
|
-
onFileSelect: (selectedImage: any) => void;
|
|
12
12
|
onFileAttach: (files: any, isPublic: any) => Promise<void>;
|
|
13
13
|
onFileDelete: (attachment: Partial<IAttachment>) => Promise<void>;
|
|
14
14
|
cancelFileUpload: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMarkdownFileUploader.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"useMarkdownFileUploader.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAYxE,UAAU,MAAM;IACZ,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,QAAkB,CAAC;AAE/C,wBAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,MAAM;;;;;+BAqDpD,OAAO,CAAC,WAAW,CAAC;;EA0C/D"}
|