@rh-support/troubleshoot 2.6.355 → 2.6.358
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +60 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
- 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 +1 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
- 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 +1 -3
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
- 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 +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
- 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 +18 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
- package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +31 -17
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +33 -24
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +11 -9
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
- 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 +23 -17
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +4 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +3 -9
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +25 -19
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- 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 +139 -91
- package/lib/esm/components/shared/Constants.d.ts +5 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +5 -0
- 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 +2 -3
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
- 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 +22 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
- 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 +119 -47
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +22 -57
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/shared/utils.d.ts +1 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +9 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +2 -1
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/app.css +28 -0
- package/lib/esm/css/case.css +60 -209
- package/lib/esm/graphql/index.d.ts +4 -0
- package/lib/esm/graphql/index.d.ts.map +1 -0
- package/lib/esm/graphql/index.js +3 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
- package/lib/esm/graphql/mutations/index.d.ts +2 -0
- package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/index.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
- package/lib/esm/graphql/queries/index.d.ts +2 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +1 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/escalation.js +1 -0
- package/lib/esm/graphql/schemas/index.d.ts +2 -0
- package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/index.js +1 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +45 -23
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/index.js +5 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/types.js +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
- package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseHistory.js +98 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
- 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 +21 -11
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/hooks/useS3Upload.d.ts +5 -4
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +28 -30
- 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 +1 -0
- package/lib/esm/models/cache.d.ts +0 -2
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/models/caseHistory.d.ts +80 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -0
- package/lib/esm/models/caseHistory.js +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +31 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
- package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +119 -17
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +56 -11
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +284 -100
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +15 -18
- package/lib/esm/scss/_main.scss +9 -0
- package/lib/esm/utils/TimelineUtils.d.ts +41 -0
- package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
- package/lib/esm/utils/TimelineUtils.js +135 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseHistoryUtils.js +165 -0
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
- package/package.json +9 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
|
@@ -7,49 +7,66 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
10
11
|
import { Alert, AlertVariant, Button, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
11
12
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
12
13
|
import { AlertMessage, AlertType, SingleSelectDropdown, ToastNotification, useSelectKeyboardNavigator, } from '@rh-support/components';
|
|
13
14
|
import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
|
|
14
|
-
import { getUniqueSortedVersions, haventLoadedMetadata, toOption, } from '@rh-support/utils';
|
|
15
|
-
import filter from 'lodash/filter';
|
|
15
|
+
import { getUniqueSortedVersions, haventLoadedMetadata, resolveProductServiceLevelsForAccount, toOption, } from '@rh-support/utils';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import isEqual from 'lodash/isEqual';
|
|
18
18
|
import isUndefined from 'lodash/isUndefined';
|
|
19
19
|
import map from 'lodash/map';
|
|
20
|
-
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
20
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
21
21
|
import { Trans, useTranslation } from 'react-i18next';
|
|
22
22
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
23
23
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
24
|
+
import { getVersionsDetails, setCaseDetails, setCaseState, updateCaseDetailsGraphQL, } from '../../../../reducers/CaseReducer';
|
|
25
|
+
import { ProductNotEntitledWarning } from '../../../ProductSelector/ProductNotEntitledWarning';
|
|
26
|
+
import { getProductObj, getProductObjById } from '../../../shared/utils';
|
|
26
27
|
import { PDFContext } from '../../PDFContainer';
|
|
27
28
|
function ProductNVersion(props) {
|
|
29
|
+
var _a;
|
|
28
30
|
const { t } = useTranslation();
|
|
29
31
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
30
|
-
const [versions, setVersions] = useState([]);
|
|
31
32
|
const [isProductUpdating, setIsProductUpdating] = useState(false);
|
|
32
33
|
const [isVersionUpdating, setIsVersionUpdating] = useState(false);
|
|
33
34
|
const [isOpen, setIsOpen] = useState(false);
|
|
34
35
|
const textInputRef = useRef();
|
|
35
|
-
const { product, version, caseNumber,
|
|
36
|
+
const { product, version, parentProductId, caseNumber, existingCaseDetails, versionsDetails, isCaseUpdating, selectedAccountDetails, isProductNotEntitled, } = useCaseSelector((state) => ({
|
|
36
37
|
product: state.caseDetails.product,
|
|
37
38
|
version: state.caseDetails.version,
|
|
38
|
-
|
|
39
|
+
parentProductId: state.caseDetails.parentProductId,
|
|
39
40
|
caseNumber: state.caseDetails.caseNumber,
|
|
41
|
+
existingCaseDetails: state.caseDetails,
|
|
40
42
|
versionsDetails: state.versionsDetails,
|
|
41
43
|
isCaseUpdating: state.isCaseUpdating,
|
|
44
|
+
selectedAccountDetails: state.selectedAccountDetails,
|
|
45
|
+
isProductNotEntitled: state.isProductNotEntitled,
|
|
42
46
|
}), isEqual);
|
|
43
47
|
const caseDispatch = useCaseDispatch();
|
|
44
48
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
49
|
+
const apolloClient = useApolloClient();
|
|
45
50
|
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
46
51
|
const [isProductInvalid, setIsProductInvalid] = useState(false);
|
|
47
52
|
const [isVersionInvalid, setIsVersionInvalid] = useState(false);
|
|
48
53
|
const [selectedProductLocal, setSelectedProductLocal] = useState(product);
|
|
49
54
|
const [selectedVersionLocal, setSelectedVersionLocal] = useState(version);
|
|
50
|
-
const [isSEProductApiIsDown, setIsSEProductApiIsDown] = useState(false);
|
|
51
55
|
const [inputValue, setInputValue] = useState(product);
|
|
52
56
|
const [shouldFilter, setShouldFilter] = useState(false);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
var _a;
|
|
59
|
+
const matched = getProductObjById((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, parentProductId);
|
|
60
|
+
if (matched.product && matched.product !== product) {
|
|
61
|
+
setCaseDetails(caseDispatch, { product: matched.product });
|
|
62
|
+
}
|
|
63
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
+
}, [parentProductId, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, caseDispatch]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
setSelectedProductLocal(product);
|
|
67
|
+
setInputValue(product || '');
|
|
68
|
+
setSelectedVersionLocal(version);
|
|
69
|
+
}, [product, version]);
|
|
53
70
|
const onToggleClick = () => {
|
|
54
71
|
var _a;
|
|
55
72
|
setIsOpen(!isOpen);
|
|
@@ -59,6 +76,7 @@ function ProductNVersion(props) {
|
|
|
59
76
|
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
60
77
|
};
|
|
61
78
|
const canEditCase = useCanEditCase();
|
|
79
|
+
const isCaseReadOnly = canEditCase.isCaseNotEditable;
|
|
62
80
|
const { isExportingPDF } = useContext(PDFContext);
|
|
63
81
|
const onProductChange = (option) => __awaiter(this, void 0, void 0, function* () {
|
|
64
82
|
if (canEditCase.alert())
|
|
@@ -105,6 +123,7 @@ function ProductNVersion(props) {
|
|
|
105
123
|
}
|
|
106
124
|
};
|
|
107
125
|
const updateProductVerstion = (selectedProduct, selectedVersion) => __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
var _a, _b;
|
|
108
127
|
let onlyVersionChanged = false;
|
|
109
128
|
try {
|
|
110
129
|
if (product === selectedProduct) {
|
|
@@ -112,17 +131,31 @@ function ProductNVersion(props) {
|
|
|
112
131
|
}
|
|
113
132
|
setIsProductUpdating(true);
|
|
114
133
|
setIsVersionUpdating(true);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
const selectedVersionId = (_b = (_a = versionsDetails.data) === null || _a === void 0 ? void 0 : _a.find((v) => v.name === selectedVersion)) === null || _b === void 0 ? void 0 : _b.id;
|
|
135
|
+
const serviceLevels = !onlyVersionChanged
|
|
136
|
+
? resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, selectedProduct)
|
|
137
|
+
: undefined;
|
|
138
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, Object.assign({ product: selectedProduct, version: selectedVersion }, (selectedVersionId ? { productId: selectedVersionId } : {})), false, { existingCaseDetails });
|
|
139
|
+
if (!onlyVersionChanged) {
|
|
140
|
+
const catalogProduct = getProductObj(allProducts.data.productsResult, selectedProduct);
|
|
141
|
+
if (catalogProduct.productId) {
|
|
142
|
+
setCaseDetails(caseDispatch, { parentProductId: catalogProduct.productId });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (!onlyVersionChanged && (serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.productServiceLevel)) {
|
|
146
|
+
setCaseState(caseDispatch, {
|
|
147
|
+
isProductNotEntitled: false,
|
|
148
|
+
productServiceLevel: serviceLevels.productServiceLevel,
|
|
149
|
+
otherServiceLevels: serviceLevels.otherServiceLevels,
|
|
150
|
+
selectedEntitlementId: serviceLevels.defaultEntitlementId,
|
|
119
151
|
});
|
|
120
|
-
yield fetchCaseEntitlements(caseDispatch, contactSSOName, selectedProduct, undefined, true, caseNumber);
|
|
121
152
|
}
|
|
122
|
-
else {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
153
|
+
else if (!onlyVersionChanged) {
|
|
154
|
+
setCaseState(caseDispatch, {
|
|
155
|
+
isProductNotEntitled: true,
|
|
156
|
+
productServiceLevel: undefined,
|
|
157
|
+
otherServiceLevels: [],
|
|
158
|
+
selectedEntitlementId: undefined,
|
|
126
159
|
});
|
|
127
160
|
}
|
|
128
161
|
setIsProductUpdating(false);
|
|
@@ -150,60 +183,70 @@ function ProductNVersion(props) {
|
|
|
150
183
|
});
|
|
151
184
|
// To check if version in invalid
|
|
152
185
|
const checkIfVersionIsInvalid = isVersionInvalid && isEmpty(selectedVersionLocal);
|
|
153
|
-
// when user changes selected product, we need to get the versions
|
|
154
186
|
useEffect(() => {
|
|
155
|
-
if (
|
|
187
|
+
if (isEmpty(selectedProductLocal)) {
|
|
188
|
+
setCaseState(caseDispatch, {
|
|
189
|
+
isProductNotEntitled: false,
|
|
190
|
+
productServiceLevel: undefined,
|
|
191
|
+
otherServiceLevels: [],
|
|
192
|
+
selectedEntitlementId: undefined,
|
|
193
|
+
});
|
|
156
194
|
return;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
195
|
+
}
|
|
196
|
+
if (selectedAccountDetails.isFetching || isEmpty(selectedAccountDetails.data))
|
|
197
|
+
return;
|
|
198
|
+
const serviceLevels = resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, selectedProductLocal);
|
|
199
|
+
if (!serviceLevels || !serviceLevels.productServiceLevel) {
|
|
200
|
+
setCaseState(caseDispatch, {
|
|
201
|
+
isProductNotEntitled: true,
|
|
202
|
+
productServiceLevel: undefined,
|
|
203
|
+
otherServiceLevels: [],
|
|
204
|
+
selectedEntitlementId: undefined,
|
|
205
|
+
});
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
setCaseState(caseDispatch, {
|
|
209
|
+
isProductNotEntitled: false,
|
|
210
|
+
productServiceLevel: serviceLevels.productServiceLevel,
|
|
211
|
+
otherServiceLevels: serviceLevels.otherServiceLevels,
|
|
212
|
+
selectedEntitlementId: serviceLevels.defaultEntitlementId,
|
|
164
213
|
});
|
|
165
|
-
//
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
214
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
215
|
+
}, [selectedProductLocal, selectedAccountDetails.data, allProducts.data.productsResult]);
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
if (!selectedProductLocal)
|
|
218
|
+
return;
|
|
169
219
|
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
170
|
-
if (productObj.
|
|
171
|
-
|
|
172
|
-
? productObj.versions.sort()
|
|
173
|
-
: productObj.versions;
|
|
174
|
-
setVersions(productVersions);
|
|
175
|
-
if (productVersions.length === 1 && !selectedVersionLocal) {
|
|
176
|
-
setSelectedVersionLocal(productVersions[0]);
|
|
177
|
-
updateProductVerstion(selectedProductLocal, productVersions[0]);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
setIsSEProductApiIsDown(true);
|
|
220
|
+
if (productObj.productId) {
|
|
221
|
+
getVersionsDetails(caseDispatch, apolloClient, productObj.productId, productObj.name || selectedProductLocal);
|
|
182
222
|
}
|
|
183
223
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
184
224
|
}, [selectedProductLocal, caseDispatch, allProducts.data]);
|
|
185
|
-
|
|
225
|
+
const sortedVersionNames = useMemo(() => {
|
|
226
|
+
var _a;
|
|
227
|
+
if (!((_a = versionsDetails.data) === null || _a === void 0 ? void 0 : _a.length))
|
|
228
|
+
return [];
|
|
229
|
+
const versionNames = versionsDetails.data.map(({ name }) => name);
|
|
230
|
+
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
231
|
+
if (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions) {
|
|
232
|
+
return [...versionNames].sort();
|
|
233
|
+
}
|
|
234
|
+
const numeric = versionNames.filter((v) => /^\d/.test(v));
|
|
235
|
+
const alpha = versionNames.filter((v) => !/^\d/.test(v));
|
|
236
|
+
return [...getUniqueSortedVersions(numeric), ...alpha.sort()];
|
|
237
|
+
}, [versionsDetails.data, allProducts.data.productsResult, selectedProductLocal]);
|
|
186
238
|
useEffect(() => {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
const fetchedVersions = versionsDetails.data.map(({ name }) => name);
|
|
190
|
-
if (fetchedVersions.length === 1 && !selectedVersionLocal) {
|
|
191
|
-
setVersions(fetchedVersions);
|
|
192
|
-
setSelectedVersionLocal(fetchedVersions[0]);
|
|
193
|
-
updateProductVerstion(selectedProductLocal, fetchedVersions[0]);
|
|
239
|
+
var _a;
|
|
240
|
+
if (versionsDetails.isFetching || !((_a = versionsDetails.data) === null || _a === void 0 ? void 0 : _a.length))
|
|
194
241
|
return;
|
|
242
|
+
if (sortedVersionNames.length === 1 && !selectedVersionLocal) {
|
|
243
|
+
setSelectedVersionLocal(sortedVersionNames[0]);
|
|
244
|
+
updateProductVerstion(selectedProductLocal, sortedVersionNames[0]);
|
|
195
245
|
}
|
|
196
|
-
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
197
|
-
const sfdcVersions = getUniqueSortedVersions(fetchedVersions);
|
|
198
|
-
const versionsForSelectedProduct = productObj.versions ? productObj.versions : sfdcVersions;
|
|
199
|
-
const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions)
|
|
200
|
-
? versionsForSelectedProduct.sort()
|
|
201
|
-
: versionsForSelectedProduct;
|
|
202
|
-
setVersions(productVersions);
|
|
203
246
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
204
247
|
}, [versionsDetails.data]);
|
|
205
248
|
const computeDropdownList = () => {
|
|
206
|
-
const list =
|
|
249
|
+
const list = allProducts.data.productsResult;
|
|
207
250
|
if (!list)
|
|
208
251
|
return [];
|
|
209
252
|
const options = shouldFilter && !isUndefined(inputValue) && !isEmpty(inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim())
|
|
@@ -217,13 +260,13 @@ function ProductNVersion(props) {
|
|
|
217
260
|
setIsOpen,
|
|
218
261
|
onSelect: onProductChange,
|
|
219
262
|
});
|
|
220
|
-
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError), status: isProductInvalid ? 'danger' : undefined },
|
|
263
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError) || isCaseReadOnly, status: isProductInvalid ? 'danger' : undefined },
|
|
221
264
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
222
265
|
React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, autoComplete: "off", innerRef: textInputRef, placeholder: t('Select a product'), role: "combobox", isExpanded: isOpen, "aria-controls": "case-details-product-selector-listbox" }),
|
|
223
266
|
isProductUpdating ? (React.createElement(TextInputGroupUtilities, null,
|
|
224
267
|
React.createElement(Spinner, { size: "md" }))) : (React.createElement(TextInputGroupUtilities, Object.assign({}, (!inputValue ? { style: { display: 'none' } } : {})),
|
|
225
268
|
React.createElement(Button, { icon: !isExportingPDF ? React.createElement(TimesIcon, { "aria-hidden": true }) : '', variant: "plain", onClick: onProductClear, "aria-label": "Clear input value" }))))));
|
|
226
|
-
const getVersionDropdownOptions = map(
|
|
269
|
+
const getVersionDropdownOptions = map(sortedVersionNames, (option) => ({
|
|
227
270
|
label: option,
|
|
228
271
|
value: option,
|
|
229
272
|
}));
|
|
@@ -233,10 +276,10 @@ function ProductNVersion(props) {
|
|
|
233
276
|
};
|
|
234
277
|
useEffect(() => {
|
|
235
278
|
if (haventLoadedMetadata(allProducts, (data) => isEmpty(data.productsResult))) {
|
|
236
|
-
fetchProducts(dispatchToGlobalMetadataReducer,
|
|
279
|
+
fetchProducts(dispatchToGlobalMetadataReducer, apolloClient);
|
|
237
280
|
}
|
|
238
281
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
239
|
-
}, [allProducts, dispatchToGlobalMetadataReducer,
|
|
282
|
+
}, [allProducts, dispatchToGlobalMetadataReducer, apolloClient]);
|
|
240
283
|
return (React.createElement(React.Fragment, null,
|
|
241
284
|
React.createElement(AlertMessage, { show: !allProducts.isFetching && allProducts.isError, title: t('There was an error loading products.'), variant: AlertType.DANGER }),
|
|
242
285
|
isEmpty(selectedVersionLocal) && (selectedVersionLocal === null || selectedVersionLocal === void 0 ? void 0 : selectedVersionLocal.length) < 2 && (React.createElement(Alert, { isInline: true, className: "pf-v6-u-mb-md", variant: AlertVariant.danger, title: React.createElement(Trans, null, "Please clear the errors to change the product on your case") })),
|
|
@@ -246,13 +289,15 @@ function ProductNVersion(props) {
|
|
|
246
289
|
React.createElement("label", { htmlFor: "case-details-product-selector" },
|
|
247
290
|
React.createElement(Trans, null, "Product")),
|
|
248
291
|
React.createElement(Select, { className: "open-case-product", id: "case-details-product-selector", onChange: onProductChange, "data-tracking-id": "case-details-product-selector", onBlur: () => onOuterClick, isOpen: isOpen, onSelect: (event, value) => onProductChange(value), onOpenChange: () => setIsOpen(false), toggle: toggle, shouldFocusFirstItemOnOpen: false, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
249
|
-
React.createElement(SelectList, { id: "case-details-product-selector-listbox" }, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.productId, value: option, isFocused: focusedItemIndex === index }, option.name)))))
|
|
292
|
+
React.createElement(SelectList, { id: "case-details-product-selector-listbox" }, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.productId, value: option, isFocused: focusedItemIndex === index }, option.name))))),
|
|
293
|
+
isProductNotEntitled && !isEmpty(selectedProductLocal) && React.createElement(ProductNotEntitledWarning, null)),
|
|
250
294
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
251
295
|
React.createElement("label", { htmlFor: "version-dropdown" },
|
|
252
296
|
React.createElement(Trans, null, "Version")),
|
|
253
297
|
React.createElement(SingleSelectDropdown, { className: "open-case-version", id: "version-dropdown", placeholder: t(`Select a version`), selected: getVersionSelectedDropdownOption, options: getVersionDropdownOptions, isInvalid: checkIfVersionIsInvalid, isDisabled: isVersionUpdating ||
|
|
254
298
|
(allProducts.isFetching && !allProducts.isError) ||
|
|
255
299
|
isEmpty(selectedProductLocal) ||
|
|
256
|
-
isCaseUpdating
|
|
300
|
+
isCaseUpdating ||
|
|
301
|
+
isCaseReadOnly, onSelect: onVersionChange, isLoading: isVersionUpdating || versionsDetails.isFetching, dataTrackingId: "case-details-version-selector", isScrollable: true }))))));
|
|
257
302
|
}
|
|
258
303
|
export default ProductNVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/Summary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/Summary.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAQD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,qBAkM7B;kBAlMQ,OAAO;;;AAqMhB,eAAe,OAAO,CAAC"}
|
|
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
10
11
|
import { InputGroupText, Spinner, TextInput, ValidatedOptions } from '@patternfly/react-core';
|
|
11
12
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
12
13
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
@@ -19,7 +20,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
19
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
20
21
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
21
22
|
import { SUMMARY_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
22
|
-
import { setCaseDetails,
|
|
23
|
+
import { setCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
|
|
23
24
|
import { PDFContext } from '../../PDFContainer';
|
|
24
25
|
const defaultProps = {
|
|
25
26
|
inlineEditable: true,
|
|
@@ -29,11 +30,13 @@ const defaultProps = {
|
|
|
29
30
|
function Summary(props) {
|
|
30
31
|
const { t } = useTranslation();
|
|
31
32
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
32
|
-
const { summary, caseNumber } = useCaseSelector((state) => ({
|
|
33
|
+
const { summary, caseNumber, existingCaseDetails } = useCaseSelector((state) => ({
|
|
33
34
|
summary: state.caseDetails.summary,
|
|
34
35
|
caseNumber: state.caseDetails.caseNumber,
|
|
36
|
+
existingCaseDetails: state.caseDetails,
|
|
35
37
|
}), isEqual);
|
|
36
38
|
const caseDispatch = useCaseDispatch();
|
|
39
|
+
const apolloClient = useApolloClient();
|
|
37
40
|
const { isExportingPDF } = useContext(PDFContext);
|
|
38
41
|
const [summaryState, setSummaryState] = useState(summary);
|
|
39
42
|
const [isSummaryUpdating, setIsSummaryUpdating] = useState(false);
|
|
@@ -41,9 +44,11 @@ function Summary(props) {
|
|
|
41
44
|
// value changed logic to show a none local severity change
|
|
42
45
|
const [localSummaryChange, setLocalSummaryChange] = useState(false);
|
|
43
46
|
// To keep track of Cancel button state to close InlineEdit input mode
|
|
44
|
-
const [
|
|
47
|
+
const [cancelToggleKey, setCancelToggleKey] = useState(0);
|
|
45
48
|
// To keep track of Save button state to close InlineEdit input mode
|
|
46
|
-
const [
|
|
49
|
+
const [saveToggleKey, setSaveToggleKey] = useState(0);
|
|
50
|
+
const closeInlineEdit = () => setSaveToggleKey((key) => key + 1);
|
|
51
|
+
const cancelInlineEdit = () => setCancelToggleKey((key) => key + 1);
|
|
47
52
|
const afterLocalChange = () => setLocalSummaryChange(false);
|
|
48
53
|
const getSummaryChangedTT = () => React.createElement(Trans, null, "Summary has been updated");
|
|
49
54
|
// Function to handle when summary changes
|
|
@@ -55,7 +60,9 @@ function Summary(props) {
|
|
|
55
60
|
const onSummaryUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
56
61
|
setIsSummaryUpdating(true);
|
|
57
62
|
try {
|
|
58
|
-
yield
|
|
63
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, caseDetails, false, {
|
|
64
|
+
existingCaseDetails,
|
|
65
|
+
});
|
|
59
66
|
setIsSummaryUpdating(false);
|
|
60
67
|
ToastNotification.addSuccessMessage(t(`Title has been successfully updated`));
|
|
61
68
|
}
|
|
@@ -81,11 +88,11 @@ function Summary(props) {
|
|
|
81
88
|
setCaseDetails(caseDispatch, caseDetails);
|
|
82
89
|
}
|
|
83
90
|
setLocalSummaryChange(true);
|
|
84
|
-
|
|
91
|
+
closeInlineEdit();
|
|
85
92
|
});
|
|
86
93
|
const onCancel = () => {
|
|
87
94
|
setSummaryState(summary);
|
|
88
|
-
|
|
95
|
+
cancelInlineEdit();
|
|
89
96
|
};
|
|
90
97
|
useEffect(() => {
|
|
91
98
|
setSummaryState(summary);
|
|
@@ -119,14 +126,14 @@ function Summary(props) {
|
|
|
119
126
|
setCaseDetails(caseDispatch, caseDetails);
|
|
120
127
|
}
|
|
121
128
|
setLocalSummaryChange(true);
|
|
122
|
-
|
|
129
|
+
closeInlineEdit();
|
|
123
130
|
}
|
|
124
131
|
});
|
|
125
132
|
return (React.createElement(React.Fragment, null,
|
|
126
133
|
React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
|
|
127
134
|
React.createElement(Trans, null, "Title"),
|
|
128
135
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
|
|
129
|
-
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState:
|
|
136
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable && !canEditCase.isCaseNotEditable, showAlwaysEditableInput: false, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: cancelToggleKey % 2 === 1, saveToggleState: saveToggleKey % 2 === 1, isExportingPDF: isExportingPDF },
|
|
130
137
|
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center" },
|
|
131
138
|
React.createElement(TextInput, { type: "text", id: "case-details-summary", "aria-required": true, required: true, name: "case-details-summary", value: summaryState, onChange: (_event, value) => onSummaryChange(value), isDisabled: isSummaryUpdating, "data-tracking-id": "case-details-summary", onKeyDown: handleKeyDown, validated: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) > SUMMARY_LENGTH_LIMIT || isSummaryEmpty
|
|
132
139
|
? ValidatedOptions.error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAoBxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,cAAc,4EA6QlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -7,13 +7,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { Button, ButtonVariant, Icon, Tooltip, TooltipPosition } from '@patternfly/react-core';
|
|
12
12
|
import PaperclipIcon from '@patternfly/react-icons/dist/js/icons/paperclip-icon';
|
|
13
13
|
import { InlineEdit, LoadingIndicator, ToastNotification, useConfirmation, useCopyToClipboard, useFetch, } from '@rh-support/components';
|
|
14
14
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
15
15
|
import { ability, CaseDiscussionFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
16
|
-
import { formatDateTime, humanizeSize } from '@rh-support/utils';
|
|
16
|
+
import { deleteCaseAttachment, formatDateTime, humanizeSize, updateCaseAttachmentDescriptionByGraphQL, } from '@rh-support/utils';
|
|
17
17
|
import isEmpty from 'lodash/isEmpty';
|
|
18
18
|
import React, { useContext, useRef, useState } from 'react';
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -27,18 +27,32 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const clipboardRef = useRef(null);
|
|
29
29
|
const { clipboardText, copyToClipboard } = useCopyToClipboard(clipboardRef);
|
|
30
|
-
const { request, isFetching: isDeleting } = useFetch(
|
|
30
|
+
const { request, isFetching: isDeleting } = useFetch(deleteCaseAttachment, { propgateErrors: true });
|
|
31
31
|
const canSeePrivateAttachments = ability.can(resourceActions.PATCH, resources.CASE_COMMENTS, CaseDiscussionFields.VIEW_PRIVATE_ATTACHMENT);
|
|
32
32
|
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
33
33
|
const [isCardIsDeleted, setIsCardIsDeleted] = useState(false); // adds a class name needed for anim when card is removed
|
|
34
34
|
const { isExportingPDF } = useContext(PDFContext);
|
|
35
35
|
const confirm = useConfirmation();
|
|
36
36
|
const [attachmentDescription, setAttachmentDescription] = useState(props.attachment.description);
|
|
37
|
-
const
|
|
37
|
+
const [isUpdating, setIsUpdating] = useState(false);
|
|
38
|
+
const apolloClient = useApolloClient();
|
|
38
39
|
const canEditCase = useCanEditCase();
|
|
39
40
|
const onDescriptionSave = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
if (!apolloClient.mutate) {
|
|
42
|
+
ToastNotification.addDangerMessage(t('Failed to update attachment description'));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
setIsUpdating(true);
|
|
46
|
+
try {
|
|
47
|
+
const updatedAttachment = yield updateCaseAttachmentDescriptionByGraphQL(apolloClient, props.attachment, attachmentDescription);
|
|
48
|
+
props.onMetadataUpdate && props.onMetadataUpdate(props.attachment.uuid, updatedAttachment);
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
ToastNotification.addDangerMessage(t('Failed to update attachment description'));
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
setIsUpdating(false);
|
|
55
|
+
}
|
|
42
56
|
});
|
|
43
57
|
const onDescriptionChange = (event) => {
|
|
44
58
|
if (canEditCase.alert())
|
|
@@ -61,7 +75,9 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
61
75
|
"?")),
|
|
62
76
|
});
|
|
63
77
|
try {
|
|
64
|
-
|
|
78
|
+
// TODO: Re-enable when delete API accepts isSecureSupport again
|
|
79
|
+
// await request!(attachment.caseNumber!, attachment.uuid!, loggedInUsersAccount.data.secureSupport);
|
|
80
|
+
yield request(attachment.caseNumber, attachment.uuid);
|
|
65
81
|
ToastNotification.addSuccessMessage(t('Successfully deleted attachment: {{file}}', { file: attachment.fileName }));
|
|
66
82
|
setIsCardIsDeleted(true);
|
|
67
83
|
window.setTimeout(() => {
|
|
@@ -85,29 +101,27 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
85
101
|
name: fileName,
|
|
86
102
|
});
|
|
87
103
|
};
|
|
104
|
+
// Prefer size (bytes); fall back to sizeKB when GraphQL only populated the KB field.
|
|
105
|
+
const attachmentSizeBytes = props.attachment.size > 0
|
|
106
|
+
? props.attachment.size
|
|
107
|
+
: props.attachment.sizeKB > 0
|
|
108
|
+
? props.attachment.sizeKB * 1024
|
|
109
|
+
: 0;
|
|
110
|
+
const attachmentSizeLabel = attachmentSizeBytes > 0 ? humanizeSize(attachmentSizeBytes) : '';
|
|
111
|
+
const attachmentLinkLabel = attachmentSizeLabel
|
|
112
|
+
? `${props.attachment.fileName} (${attachmentSizeLabel})`
|
|
113
|
+
: props.attachment.fileName;
|
|
88
114
|
const renderAttachmentLink = () => {
|
|
89
115
|
if (!loggedInUsersAccount.data.secureSupport) {
|
|
90
116
|
if (isExportingPDF) {
|
|
91
117
|
return (React.createElement("a", { href: props.attachment.link },
|
|
92
|
-
React.createElement("span", null,
|
|
93
|
-
props.attachment.fileName,
|
|
94
|
-
" (",
|
|
95
|
-
humanizeSize(props.attachment.size),
|
|
96
|
-
")")));
|
|
118
|
+
React.createElement("span", null, attachmentLinkLabel)));
|
|
97
119
|
}
|
|
98
|
-
return (React.createElement(Button, { className: "attachment-download-btn", title: t('Download {{fileName}}', { fileName: props.attachment.fileName }), variant: ButtonVariant.link, onClick: onAttachmentDownloadClick, "data-tracking-id": "attachment-download-button" },
|
|
99
|
-
React.createElement("span", null,
|
|
100
|
-
props.attachment.fileName,
|
|
101
|
-
" (",
|
|
102
|
-
humanizeSize(props.attachment.size),
|
|
103
|
-
")")));
|
|
120
|
+
return (React.createElement(Button, { className: "attachment-download-btn", title: t('Download {{fileName}}', { fileName: props.attachment.fileName }), variant: ButtonVariant.link, isInline: true, onClick: onAttachmentDownloadClick, "data-tracking-id": "attachment-download-button" },
|
|
121
|
+
React.createElement("span", null, attachmentLinkLabel)));
|
|
104
122
|
}
|
|
105
123
|
return (React.createElement(Tooltip, { position: TooltipPosition.top, content: t(`You don't have appropriate permissions to download the attachment`) },
|
|
106
|
-
React.createElement("strong", null,
|
|
107
|
-
props.attachment.fileName,
|
|
108
|
-
" (",
|
|
109
|
-
humanizeSize(props.attachment.size),
|
|
110
|
-
")")));
|
|
124
|
+
React.createElement("strong", null, attachmentLinkLabel)));
|
|
111
125
|
};
|
|
112
126
|
const onJumpToComment = (attachmentId) => () => props.showJumpToComment && props.onJumpToComment && props.onJumpToComment(attachmentId);
|
|
113
127
|
if (((_a = props.attachment) === null || _a === void 0 ? void 0 : _a.isPrivate) && !canSeePrivateAttachments)
|
|
@@ -125,7 +139,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
125
139
|
React.createElement("h4", null,
|
|
126
140
|
React.createElement(Icon, { className: "pf-v6-u-mr-xs" },
|
|
127
141
|
React.createElement(PaperclipIcon, null)),
|
|
128
|
-
props.attachment.
|
|
142
|
+
props.attachment.createdBy),
|
|
129
143
|
React.createElement("time", { className: "text-right" }, formatDateTime(props.attachment.lastModifiedDate))),
|
|
130
144
|
React.createElement("div", { className: "comment-body" },
|
|
131
145
|
React.createElement(Trans, null, "Attached file"),
|
|
@@ -141,7 +155,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
141
155
|
React.createElement("code", { ref: clipboardRef }, props.attachment.checksum)),
|
|
142
156
|
React.createElement(Tooltip, { position: TooltipPosition.top, content: clipboardText, trigger: "click" },
|
|
143
157
|
React.createElement("button", { "aria-label": "Copy to clipboard", className: "nimbus-icon-clipboard clip-code-raw-btn xs-icon", onClick: copyToClipboard, type: "button" }))))),
|
|
144
|
-
React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit:
|
|
158
|
+
React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit: !canEditCase.isCaseNotEditable, labelContent: React.createElement(Trans, null, "Description"), content: React.createElement("div", { className: "clip-content-wrapper code-block" }, props.attachment.description), hideSaveCancel: false, onSave: onDescriptionSave, onCancel: onDescriptionCancel, dataTrackingId: "case-details-file-description", initialIsEditing: props.attachment.description ? false : true, saveDisabled: isCaseAttachmentDescriptionLengthy ||
|
|
145
159
|
isCaseAttachmentDescription ||
|
|
146
160
|
attachmentDescription === props.attachment.description ||
|
|
147
161
|
isUpdating, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
@@ -153,7 +167,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
153
167
|
React.createElement("span", { className: "pull-right pf-v6-l-flex pf-m-align-items-center" },
|
|
154
168
|
props.showJumpToComment && (React.createElement(DiscussionItemLink, { onClick: onJumpToComment(props.attachment.id), discussionType: DiscussionType.ATTACHMENT, itemId: props.attachment.id, caseNumber: props.attachment.caseNumber, isCopyLink: false },
|
|
155
169
|
React.createElement(Trans, null, "Jump to attachment"))),
|
|
156
|
-
React.createElement("button", { className: `btn btn-app btn-link text-danger ${isExportingPDF ? 'hide-in-pdf' : ''}`, title: "Delete attachment", onClick: deleteAttachment(props.attachment), "data-tracking-id": "delete-attachmentid-button", type: "button" },
|
|
170
|
+
React.createElement("button", { className: `btn btn-app btn-link text-danger ${isExportingPDF ? 'hide-in-pdf' : ''}`, title: "Delete attachment", onClick: deleteAttachment(props.attachment), "data-tracking-id": "delete-attachmentid-button", type: "button", disabled: canEditCase.isCaseNotEditable },
|
|
157
171
|
React.createElement(Trans, null, "Delete")),
|
|
158
172
|
React.createElement(JumpAndCopyLink, { caseNumber: props.attachment.caseNumber, cardId: props.attachment.id, discussionType: DiscussionType.ATTACHMENT })))));
|
|
159
173
|
});
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { ICaseComment } from '@cee-eng/hydrajs/@types/api/public/case';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const AUTOMATED_SUPPORT_ASSISTANT = "Support AI Assistant";
|
|
4
3
|
interface IProps {
|
|
5
4
|
caseNumber: string;
|
|
6
5
|
comment: ICaseComment;
|
|
7
6
|
feedback: number;
|
|
8
|
-
|
|
9
|
-
onFeedBackUpdate: (id: string, feedback: number, feedbackReason?: string) => void;
|
|
7
|
+
onFeedBackUpdate: (id: string, feedback: number) => void;
|
|
10
8
|
accountNumber: string;
|
|
11
|
-
onReply: (
|
|
9
|
+
onReply: (author: string, commentId: string, timestamp: string) => void;
|
|
12
10
|
showJumpToComment?: boolean;
|
|
13
11
|
onJumpToComment?: (commentId: string) => void;
|
|
14
12
|
downloadAttachment: ({ caseNumber, uuid, name }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA2BvE,OAAO,KAAwC,MAAM,OAAO,CAAC;AAU7D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EA8UhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|