@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -7,108 +7,37 @@ 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 {
|
|
11
|
-
import { sessionAttachments } from '@cee-eng/hydrajs';
|
|
10
|
+
import { caseAttachments, sessionAttachments } from '@cee-eng/hydrajs';
|
|
12
11
|
import { useFetch, usePrevious } from '@rh-support/components';
|
|
13
12
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
|
-
import {
|
|
13
|
+
import { getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
|
|
15
14
|
import debounce from 'lodash/debounce';
|
|
16
15
|
import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
|
|
17
16
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
|
|
18
17
|
import { SESSION_REFERRER_URL_LIMIT } from '../../../reducers/CaseConstNTypes';
|
|
19
18
|
import { getSessionDetailsFromCase } from '../../../reducers/CaseHelpers';
|
|
20
19
|
import { createSession } from '../../../reducers/SessionRestoreReducer';
|
|
21
|
-
import { doSosReportAnalysisForFile,
|
|
22
|
-
import { onFileEdit, onFileRemove,
|
|
20
|
+
import { doSosReportAnalysisForFile, isAnalysingAnyAttachment, isUploadedSuccessfully, isUploadingAttachment, updateUploadMetadata, uploadAllFiles, uploadFile, } from './reducer/AttachmentHelper';
|
|
21
|
+
import { onFileEdit, onFileRemove, UploadStatusConstants } from './reducer/AttachmentReducer';
|
|
23
22
|
import { AttachmentDispatchContext, AttachmentStateContext } from './reducer/AttachmentReducerContext';
|
|
24
|
-
/** Wait for staggered onDrop dispatches before auto-uploading. */
|
|
25
|
-
const AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS = 300;
|
|
26
23
|
export function useFileUploader(props) {
|
|
27
|
-
var _a;
|
|
28
24
|
const { attachmentState, attachmentState: { caseFiles }, } = useContext(AttachmentStateContext);
|
|
29
25
|
const dispatch = useContext(AttachmentDispatchContext);
|
|
30
|
-
const apolloClient = useApolloClient();
|
|
31
|
-
const caseSalesforceIdRef = useRef();
|
|
32
26
|
const { request: deleteSessionAttachment } = useFetch(sessionAttachments.deleteSesionAttachment);
|
|
33
|
-
const { request:
|
|
34
|
-
const { idToUploadTo,
|
|
35
|
-
|
|
36
|
-
if (caseSalesforceId) {
|
|
37
|
-
caseSalesforceIdRef.current = caseSalesforceId;
|
|
38
|
-
}
|
|
39
|
-
}, [caseSalesforceId]);
|
|
40
|
-
const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
27
|
+
const { request: deleteCaseAttachment } = useFetch(caseAttachments.deleteAttachment);
|
|
28
|
+
const { idToUploadTo, needsAnalyzing, isSecureSupport, isSessionId, autoUploadOnSelect, onUploadClick } = props;
|
|
29
|
+
const { globalMetadataState: { pcmConfig, referrerUrl, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
41
30
|
const { sessionRestore } = useContext(SessionRestoreStateContext);
|
|
42
31
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
43
32
|
const checkForS3SlowUploads = getConfigField(pcmConfig.data, 'checkForS3SlowUploads', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
44
33
|
const useBrowserAPIForDetection = getConfigField(pcmConfig.data, 'useBrowserAPIForSpeedDetection', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
45
|
-
const slowUploadConfig =
|
|
34
|
+
const slowUploadConfig = {
|
|
46
35
|
checkForS3SlowUploads,
|
|
47
36
|
useBrowserAPIForDetection,
|
|
48
|
-
}
|
|
37
|
+
};
|
|
49
38
|
const isInitialMountRef = useRef(true);
|
|
50
39
|
const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
|
|
51
40
|
const prevSelectedFiles = usePrevious(selectedLocalFiles);
|
|
52
|
-
const resolveCaseSalesforceId = useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
var _a;
|
|
54
|
-
if (caseSalesforceIdRef.current || isSessionId || !idToUploadTo || !apolloClient) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
try {
|
|
58
|
-
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));
|
|
59
|
-
caseSalesforceIdRef.current = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
|
|
60
|
-
}
|
|
61
|
-
catch (_b) {
|
|
62
|
-
caseSalesforceIdRef.current = undefined;
|
|
63
|
-
}
|
|
64
|
-
}), [apolloClient, idToUploadTo, isSessionId, (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport]);
|
|
65
|
-
const onUploadAll = useCallback((event) => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
onUploadClick && onUploadClick();
|
|
67
|
-
yield resolveCaseSalesforceId();
|
|
68
|
-
// on truobleshoot flow, user can upload a file while no data has added therefore no sessionId is available
|
|
69
|
-
let sessionId = '';
|
|
70
|
-
if (!idToUploadTo) {
|
|
71
|
-
const userAgent = getUserAgentForCaseMode(true);
|
|
72
|
-
const session = {
|
|
73
|
-
userAgent,
|
|
74
|
-
originatingSystem: userAgent,
|
|
75
|
-
referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
|
|
76
|
-
isInternal: loggedInUserRights.data.isInternal(),
|
|
77
|
-
};
|
|
78
|
-
if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
|
|
79
|
-
sessionId = yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase({}, []), session);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
uploadAllFiles({
|
|
83
|
-
dispatch,
|
|
84
|
-
idToUploadTo: idToUploadTo || sessionId,
|
|
85
|
-
caseFiles,
|
|
86
|
-
needsAnalyzing,
|
|
87
|
-
isSessionId,
|
|
88
|
-
slowUploadConfig,
|
|
89
|
-
apolloClient: !isSessionId ? apolloClient : undefined,
|
|
90
|
-
caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
|
|
91
|
-
onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
|
|
92
|
-
});
|
|
93
|
-
}), [
|
|
94
|
-
apolloClient,
|
|
95
|
-
caseFiles,
|
|
96
|
-
dispatch,
|
|
97
|
-
idToUploadTo,
|
|
98
|
-
isSessionId,
|
|
99
|
-
loggedInUserRights.data,
|
|
100
|
-
needsAnalyzing,
|
|
101
|
-
onCaseFileUploaded,
|
|
102
|
-
onUploadClick,
|
|
103
|
-
referrerUrl,
|
|
104
|
-
resolveCaseSalesforceId,
|
|
105
|
-
sessionRestore.sessionCreationStatus.isCreating,
|
|
106
|
-
sessionRestore.sessionCreationStatus.isError,
|
|
107
|
-
sessionRestoreDispatch,
|
|
108
|
-
slowUploadConfig,
|
|
109
|
-
]);
|
|
110
|
-
const debouncedAutoUploadOnSelect = useMemo(() => debounce(() => void onUploadAll(), AUTO_UPLOAD_ON_SELECT_DEBOUNCE_MS), [onUploadAll]);
|
|
111
|
-
useEffect(() => () => debouncedAutoUploadOnSelect.cancel(), [debouncedAutoUploadOnSelect]);
|
|
112
41
|
useEffect(() => {
|
|
113
42
|
if (isInitialMountRef.current) {
|
|
114
43
|
isInitialMountRef.current = false;
|
|
@@ -118,18 +47,19 @@ export function useFileUploader(props) {
|
|
|
118
47
|
prevSelectedFiles &&
|
|
119
48
|
selectedLocalFiles &&
|
|
120
49
|
selectedLocalFiles.length > prevSelectedFiles.length) {
|
|
121
|
-
|
|
50
|
+
onUploadAll();
|
|
122
51
|
}
|
|
123
|
-
|
|
52
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
+
}, [selectedLocalFiles]);
|
|
124
54
|
const updateSessionAttachmentMetadata = useCallback((file, changes) => __awaiter(this, void 0, void 0, function* () {
|
|
125
55
|
sessionAttachments.updateSessionAttachmentMetadata(idToUploadTo, [Object.assign({ id: file.attachmentId }, changes)]);
|
|
126
56
|
}), [idToUploadTo]);
|
|
127
57
|
const debounceSessionMetadataUpdate = useMemo(() => debounce(updateSessionAttachmentMetadata, 800), [updateSessionAttachmentMetadata]);
|
|
128
|
-
const onRetryLocal = (indexToRetry) =>
|
|
58
|
+
const onRetryLocal = (indexToRetry) => {
|
|
129
59
|
if (idToUploadTo && attachmentState.caseFiles.selectedLocalFiles[indexToRetry]) {
|
|
130
|
-
|
|
60
|
+
onUploadFile(indexToRetry);
|
|
131
61
|
}
|
|
132
|
-
}
|
|
62
|
+
};
|
|
133
63
|
const onRetryAnalysis = (indexToRetry) => {
|
|
134
64
|
const file = attachmentState.caseFiles.selectedLocalFiles[indexToRetry];
|
|
135
65
|
if (idToUploadTo && file && file.attachmentId) {
|
|
@@ -145,58 +75,59 @@ export function useFileUploader(props) {
|
|
|
145
75
|
debounceSessionMetadataUpdate(editedLocalFile, changes);
|
|
146
76
|
});
|
|
147
77
|
const onFileRemoveLocal = (fileIndexToRemove, file) => __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
var _a, _b, _c;
|
|
149
|
-
// Stop in-flight S3 transfer if Remove is used while upload/verify is still active
|
|
150
|
-
(_b = (_a = file.uploadProgress).onAbort) === null || _b === void 0 ? void 0 : _b.call(_a, fileIndexToRemove);
|
|
151
|
-
const attachmentIdToDelete = file.attachmentId || ((_c = file.uploadProgress.multipartResumeState) === null || _c === void 0 ? void 0 : _c.attachmentId);
|
|
152
78
|
const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
|
|
153
|
-
|
|
154
|
-
let nextLocalFiles;
|
|
155
|
-
if (!isBusy) {
|
|
79
|
+
if (!isUploadingAttachment(selectedLocalFiles) && !isAnalysingAnyAttachment(selectedLocalFiles)) {
|
|
156
80
|
onFileRemove(dispatch, fileIndexToRemove);
|
|
157
|
-
nextLocalFiles = selectedLocalFiles.filter((_, index) => index !== fileIndexToRemove);
|
|
158
81
|
}
|
|
159
82
|
else {
|
|
160
83
|
updateUploadMetadata(dispatch, fileIndexToRemove, {
|
|
161
84
|
uploadStatus: UploadStatusConstants.deleted,
|
|
162
|
-
onAbort: undefined,
|
|
163
85
|
});
|
|
164
|
-
nextLocalFiles = selectedLocalFiles.map((localFile, index) => index === fileIndexToRemove
|
|
165
|
-
? Object.assign(Object.assign({}, localFile), { uploadProgress: Object.assign(Object.assign({}, localFile.uploadProgress), { uploadStatus: UploadStatusConstants.deleted, onAbort: undefined }) }) : localFile);
|
|
166
|
-
}
|
|
167
|
-
// Drop soft-deleted stubs so "Uploading attachment(s)" / Upload new file do not linger
|
|
168
|
-
if (!hasSomeSelectedFiles(nextLocalFiles)) {
|
|
169
|
-
resetAttachment(dispatch);
|
|
170
86
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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);
|
|
181
106
|
}
|
|
182
107
|
}
|
|
108
|
+
uploadAllFiles({
|
|
109
|
+
dispatch,
|
|
110
|
+
idToUploadTo: idToUploadTo || sessionId,
|
|
111
|
+
caseFiles,
|
|
112
|
+
isSecureSupport,
|
|
113
|
+
needsAnalyzing,
|
|
114
|
+
isSessionId,
|
|
115
|
+
slowUploadConfig,
|
|
116
|
+
});
|
|
183
117
|
});
|
|
184
|
-
const onUploadFile = (fileIndex) =>
|
|
185
|
-
yield resolveCaseSalesforceId();
|
|
118
|
+
const onUploadFile = (fileIndex) => {
|
|
186
119
|
uploadFile({
|
|
187
120
|
dispatch,
|
|
188
121
|
idToUploadTo,
|
|
189
122
|
localFile: attachmentState.caseFiles.selectedLocalFiles[fileIndex],
|
|
190
123
|
originalFile: attachmentState.caseFiles.selectedOriginalFiles[fileIndex],
|
|
191
124
|
index: fileIndex,
|
|
125
|
+
isSecureSupport,
|
|
192
126
|
needsAnalyzing,
|
|
193
127
|
isSessionId,
|
|
194
128
|
slowUploadConfig,
|
|
195
|
-
apolloClient: !isSessionId ? apolloClient : undefined,
|
|
196
|
-
caseSalesforceId: !isSessionId ? caseSalesforceIdRef.current : undefined,
|
|
197
|
-
onCaseFileUploaded: !isSessionId ? onCaseFileUploaded : undefined,
|
|
198
129
|
});
|
|
199
|
-
}
|
|
130
|
+
};
|
|
200
131
|
return {
|
|
201
132
|
retryUpload: onRetryLocal,
|
|
202
133
|
editFile: onFileEditLocal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"
|
|
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,7 +1,18 @@
|
|
|
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';
|
|
1
11
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
12
|
+
import find from 'lodash/find';
|
|
2
13
|
import isEmpty from 'lodash/isEmpty';
|
|
3
14
|
import isEqual from 'lodash/isEqual';
|
|
4
|
-
import React, { useContext, useEffect } from 'react';
|
|
15
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
5
16
|
import { Trans } from 'react-i18next';
|
|
6
17
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
7
18
|
import { RouteContext, useRouteDispatchContext } from '../../context/RouteContext';
|
|
@@ -13,8 +24,9 @@ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
|
13
24
|
import { setNoValidEntitlement } from '../../reducers/RouteReducer';
|
|
14
25
|
import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
|
|
15
26
|
export function useIsSectionValid(sectionName) {
|
|
27
|
+
var _a, _b;
|
|
16
28
|
const { isVariationA } = useAB();
|
|
17
|
-
const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, manageSupportCases, } = useCaseSelector((state) => ({
|
|
29
|
+
const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ssoUsername, manageSupportCases, } = useCaseSelector((state) => ({
|
|
18
30
|
caseState: state,
|
|
19
31
|
caseType: state.caseDetails.caseType,
|
|
20
32
|
product: state.caseDetails.product,
|
|
@@ -30,19 +42,35 @@ export function useIsSectionValid(sectionName) {
|
|
|
30
42
|
environment: state.caseDetails.environment,
|
|
31
43
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
32
44
|
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
33
|
-
|
|
45
|
+
ssoUsername: state.selectedOwner.data.ssoUsername,
|
|
34
46
|
manageSupportCases: state.selectedOwner.data.manageSupportCases,
|
|
35
47
|
}), isEqual);
|
|
36
48
|
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
|
|
37
69
|
const { routeState: { isCaseCreate }, } = useContext(RouteContext);
|
|
38
70
|
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]);
|
|
44
71
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
45
|
-
const
|
|
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);
|
|
46
74
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
47
75
|
const selectedLocalFiles = attachmentState.caseFiles.selectedLocalFiles;
|
|
48
76
|
const allowedTypesIdea = ['image/jpeg', 'image/png', 'image/jpg', 'image/gif'];
|
|
@@ -83,6 +111,8 @@ export function useIsSectionValid(sectionName) {
|
|
|
83
111
|
}
|
|
84
112
|
return (!isEmpty(product) &&
|
|
85
113
|
!isEmpty(version) &&
|
|
114
|
+
!isEmpty(accountNumber) &&
|
|
115
|
+
!isEmpty(contactSSOName) &&
|
|
86
116
|
!isEmpty(summary) &&
|
|
87
117
|
(summary === null || summary === void 0 ? void 0 : summary.length) <= TITLE_SUMMARY_LENGTH_LIMIT &&
|
|
88
118
|
!isEmpty(issue) &&
|
|
@@ -99,29 +129,30 @@ export function useIsSectionValid(sectionName) {
|
|
|
99
129
|
};
|
|
100
130
|
const isResourcesSectionValid = () => {
|
|
101
131
|
var _a;
|
|
102
|
-
//
|
|
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
|
|
103
135
|
const clusterIdValid = isVariationA ? true : isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
|
|
104
|
-
return clusterIdValid;
|
|
136
|
+
return isEntitledProductLocal && clusterIdValid;
|
|
105
137
|
};
|
|
106
138
|
const isReviewSectionValid = () => {
|
|
107
139
|
var _a;
|
|
108
|
-
return (
|
|
109
|
-
|
|
110
|
-
isCaseStateValid(caseState, loggedInUserRights) &&
|
|
140
|
+
return (isEntitledProduct &&
|
|
141
|
+
isCaseStateValid(caseState, loggedInUserRights) &&
|
|
111
142
|
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
|
|
112
143
|
isSummarizeSectionValid() &&
|
|
113
144
|
isAdditionalInformationSectionValidLocal());
|
|
114
145
|
};
|
|
115
146
|
const isDescribeIdeaSectionValid = () => {
|
|
116
147
|
return (isCaseManagementStateValid(caseState, loggedInUserRights) &&
|
|
117
|
-
|
|
148
|
+
isEntitledProduct &&
|
|
118
149
|
isIdeaCaseStateValid(caseState, loggedInUserRights) &&
|
|
119
150
|
checkUnallowedFiles());
|
|
120
151
|
};
|
|
121
152
|
const isAdditionalInformationSectionValidLocal = () => {
|
|
122
153
|
var _a;
|
|
123
154
|
const hostnameIsValid = hostname ? (hostname === null || hostname === void 0 ? void 0 : hostname.length) <= HOSTNAME_LENGTH_LIMIT : true;
|
|
124
|
-
return (
|
|
155
|
+
return (!caseState.hasInvalidEntitlements &&
|
|
125
156
|
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
|
|
126
157
|
isCaseInformationSectionValid(caseState, loggedInUserRights) &&
|
|
127
158
|
hostnameIsValid &&
|
|
@@ -154,10 +185,16 @@ export function useIsSectionValid(sectionName) {
|
|
|
154
185
|
}
|
|
155
186
|
};
|
|
156
187
|
const recommendationSectionError = () => {
|
|
157
|
-
|
|
158
|
-
|
|
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.")) : ('');
|
|
159
196
|
};
|
|
160
|
-
const
|
|
197
|
+
const getSupportSectionError = () => {
|
|
161
198
|
if (manageSupportCases === false) {
|
|
162
199
|
return (React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
|
|
163
200
|
"You need additional access to manage cases.\u00A0 Please contact",
|
|
@@ -181,9 +218,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
181
218
|
case AppRouteSections.RESOURCES:
|
|
182
219
|
return recommendationSectionError();
|
|
183
220
|
case AppRouteSections.GET_SUPPORT:
|
|
184
|
-
|
|
185
|
-
case AppRouteSections.TROUBLESHOOT:
|
|
186
|
-
return getEntitlementSectionError();
|
|
221
|
+
return getSupportSectionError();
|
|
187
222
|
default:
|
|
188
223
|
return '';
|
|
189
224
|
}
|
|
@@ -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;
|
|
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"}
|
|
@@ -7,24 +7,36 @@ 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 {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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';
|
|
14
16
|
export function usePostComment({ caseNumber }) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
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)
|
|
20
27
|
return;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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;
|
|
28
40
|
}
|
|
29
41
|
});
|
|
30
42
|
return { postComment, isPostingComment };
|
|
@@ -16,5 +16,4 @@ 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>;
|
|
20
19
|
//# 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"}
|
|
@@ -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,
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
React.createElement(Trans, null,
|
|
18
|
+
valueNameCb(currentValue, previousValue),
|
|
19
|
+
" changed from"),
|
|
20
20
|
React.createElement("b", null,
|
|
21
21
|
" ",
|
|
22
22
|
accessor ? accessor(previousValue, currentValue) : previousValue,
|
|
@@ -59,9 +59,3 @@ 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":"
|
|
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"}
|