@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
|
@@ -0,0 +1,84 @@
|
|
|
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 { useApolloClient, useMutation } from '@apollo/client/react';
|
|
11
|
+
import { CREATE_CASE_LABEL_LINK, DELETE_CASE_LABEL_LINK, fetchAllAccountCaseLabels, fetchAllCaseLabelLinksForCase, } from '@rh-support/utils';
|
|
12
|
+
import unescape from 'lodash/unescape';
|
|
13
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
14
|
+
const mapCaseLabelNode = (node) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
return ({
|
|
17
|
+
id: node.Id,
|
|
18
|
+
name: unescape((_b = (_a = node.Name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ''),
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export function useCaseLabelLinks(salesforceAccountId, caseId) {
|
|
22
|
+
const client = useApolloClient();
|
|
23
|
+
const [availableLabels, setAvailableLabels] = useState([]);
|
|
24
|
+
const [assignedLinks, setAssignedLinks] = useState([]);
|
|
25
|
+
const [loading, setLoading] = useState(false);
|
|
26
|
+
const [error, setError] = useState(undefined);
|
|
27
|
+
const fetchData = useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
if (!salesforceAccountId || !caseId)
|
|
29
|
+
return;
|
|
30
|
+
setLoading(true);
|
|
31
|
+
setError(undefined);
|
|
32
|
+
try {
|
|
33
|
+
const [labelNodes, linkNodes] = yield Promise.all([
|
|
34
|
+
fetchAllAccountCaseLabels(client, salesforceAccountId),
|
|
35
|
+
fetchAllCaseLabelLinksForCase(client, caseId),
|
|
36
|
+
]);
|
|
37
|
+
setAvailableLabels(labelNodes.map(mapCaseLabelNode).filter((l) => l.id && l.name));
|
|
38
|
+
setAssignedLinks(linkNodes
|
|
39
|
+
.filter((node) => { var _a; return node.Id && ((_a = node.Label__c) === null || _a === void 0 ? void 0 : _a.value); })
|
|
40
|
+
.map((node) => ({
|
|
41
|
+
linkId: node.Id,
|
|
42
|
+
labelId: node.Label__c.value,
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
setError(e);
|
|
47
|
+
setAvailableLabels([]);
|
|
48
|
+
setAssignedLinks([]);
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
setLoading(false);
|
|
52
|
+
}
|
|
53
|
+
}), [client, salesforceAccountId, caseId]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
fetchData();
|
|
56
|
+
}, [fetchData]);
|
|
57
|
+
const [createMutate, { loading: createLoading }] = useMutation(CREATE_CASE_LABEL_LINK);
|
|
58
|
+
const createLink = useCallback((caseSfId, labelId) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
var _a, _b, _c, _d;
|
|
60
|
+
const result = yield createMutate({
|
|
61
|
+
variables: {
|
|
62
|
+
input: { RedHatSupportCaseLabelLink__c: { Case__c: caseSfId, Label__c: labelId } },
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
return (_d = (_c = (_b = (_a = result.data) === null || _a === void 0 ? void 0 : _a.redhat_support_uiapi) === null || _b === void 0 ? void 0 : _b.CaseLabelLink__cCreate) === null || _c === void 0 ? void 0 : _c.RedHatSupportRecord) === null || _d === void 0 ? void 0 : _d.Id;
|
|
66
|
+
}), [createMutate]);
|
|
67
|
+
const [deleteMutate, { loading: deleteLoading }] = useMutation(DELETE_CASE_LABEL_LINK);
|
|
68
|
+
const deleteLink = useCallback((linkId) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
yield deleteMutate({ variables: { id: linkId } });
|
|
70
|
+
}), [deleteMutate]);
|
|
71
|
+
const selectedLabelIds = assignedLinks.map((link) => link.labelId);
|
|
72
|
+
return {
|
|
73
|
+
availableLabels,
|
|
74
|
+
assignedLinks,
|
|
75
|
+
selectedLabelIds,
|
|
76
|
+
loading,
|
|
77
|
+
error,
|
|
78
|
+
mutating: createLoading || deleteLoading,
|
|
79
|
+
setAssignedLinks,
|
|
80
|
+
createLink,
|
|
81
|
+
deleteLink,
|
|
82
|
+
refetch: fetchData,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCaseUpdateErrorMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCaseUpdateErrorMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCaseUpdateErrorMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCaseUpdateErrorMessage.ts"],"names":[],"mappings":"AAGA,wBAAgB,yBAAyB;yCAEE,MAAM;EAyBhD"}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import { formattedApiErrorMessage, ToastNotification } from '@rh-support/components';
|
|
1
|
+
import { formattedApiErrorMessage, getDirectErrorMessage, ToastNotification } from '@rh-support/components';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
// TO DO
|
|
4
3
|
export function useCaseUpdateErrorMessage() {
|
|
5
4
|
const { t } = useTranslation();
|
|
6
|
-
const showError = (e,
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
const showError = (e, fallbackMessage) => {
|
|
6
|
+
const errorCode = Number.parseInt((e === null || e === void 0 ? void 0 : e.code) || (e === null || e === void 0 ? void 0 : e.status)) || 0;
|
|
7
|
+
const hasSpecificHandler = errorCode === 500 || errorCode === 403;
|
|
8
|
+
if (hasSpecificHandler) {
|
|
9
|
+
const errorMessage = formattedApiErrorMessage(e, {
|
|
10
|
+
'500': { title: t('There was a problem with your request'), message: t(fallbackMessage) },
|
|
11
|
+
'403': {
|
|
12
|
+
title: t('There was a problem with your request'),
|
|
13
|
+
message: t('You are not authorized to update this case.'),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
ToastNotification.addDangerMessage(errorMessage);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const directMessage = getDirectErrorMessage(e);
|
|
20
|
+
if (directMessage) {
|
|
21
|
+
ToastNotification.addDangerMessage(directMessage);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
ToastNotification.addDangerMessage(fallbackMessage);
|
|
15
25
|
};
|
|
16
26
|
return { showError };
|
|
17
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAcA,wBAAgB,kBAAkB;;EAsCjC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fetchLoggedInUser, fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
2
1
|
import { useContext } from 'react';
|
|
3
2
|
import { AttachmentDispatchContext, resetAttachment } from '../components/shared/fileUpload';
|
|
4
3
|
import { useCaseDispatch } from '../context/CaseContext';
|
|
@@ -7,7 +6,6 @@ import { useRecommendationDispatchContext } from '../context/RecommendationConte
|
|
|
7
6
|
import { RulesDispatchContext } from '../context/RulesContext';
|
|
8
7
|
import { TCDispatchContext } from '../context/TopContentContext';
|
|
9
8
|
import { CaseReducerConstants } from '../reducers/CaseConstNTypes';
|
|
10
|
-
import { setCaseAccountNumber, setCaseOwner } from '../reducers/CaseReducer';
|
|
11
9
|
import { resetClusterRecommendations } from '../reducers/ClusterRecommendationsReducer';
|
|
12
10
|
import { resetRecommendations } from '../reducers/RecommendationsReducer';
|
|
13
11
|
import { resetEARules } from '../reducers/RulesReducer';
|
|
@@ -17,22 +15,31 @@ export function useResetCaseCreate() {
|
|
|
17
15
|
const tcDispatch = useContext(TCDispatchContext);
|
|
18
16
|
const recommendationsDispatch = useRecommendationDispatchContext();
|
|
19
17
|
const caseDispatch = useCaseDispatch();
|
|
20
|
-
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
21
18
|
const rulesDispatch = useContext(RulesDispatchContext);
|
|
22
19
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
23
|
-
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
24
20
|
const resetCaseCreateState = () => {
|
|
25
|
-
//
|
|
26
|
-
fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
|
|
21
|
+
// Commented out — don't refetch logged-in user contact details on case creation
|
|
22
|
+
// fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
|
|
27
23
|
resetAttachment(dispatchToAttachmentReducer);
|
|
28
24
|
resetTopContent(tcDispatch);
|
|
29
25
|
resetRecommendations(recommendationsDispatch);
|
|
30
26
|
caseDispatch({ type: CaseReducerConstants.resetCaseState });
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
// Commented out — don't refetch account details or auto-populate account/owner on case creation
|
|
28
|
+
// fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
|
|
29
|
+
// setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
|
|
30
|
+
// setCaseOwner(
|
|
31
|
+
// caseDispatch,
|
|
32
|
+
// loggedInUserRights.data.getHydraContactFromLoggedInUser(),
|
|
33
|
+
// '',
|
|
34
|
+
// undefined,
|
|
35
|
+
// undefined,
|
|
36
|
+
// true,
|
|
37
|
+
// undefined,
|
|
38
|
+
// true,
|
|
39
|
+
// undefined,
|
|
40
|
+
// undefined,
|
|
41
|
+
// loggedInUserRights.data.isInternal() ? loggedInUserRights.data.getAccountNumber() : undefined
|
|
42
|
+
// );
|
|
36
43
|
resetEARules(rulesDispatch);
|
|
37
44
|
resetClusterRecommendations(clusterRecommendationsDispatch);
|
|
38
45
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ApolloQueryClient } from '@rh-support/utils';
|
|
2
|
+
export declare function useS3Upload(caseNumber: string, apolloClient?: ApolloQueryClient, caseSalesforceId?: string): {
|
|
3
|
+
uploadFile: ({ file, description, isPrivate, listenerFn, }: {
|
|
4
|
+
file: File;
|
|
4
5
|
description?: string;
|
|
5
6
|
isPrivate?: boolean;
|
|
6
|
-
listenerFn?: (percent:
|
|
7
|
+
listenerFn?: (percent: number, abort: () => void) => void;
|
|
7
8
|
}) => Promise<string>;
|
|
8
9
|
isUploadingFile: boolean;
|
|
9
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useS3Upload.d.ts","sourceRoot":"","sources":["../../../src/hooks/useS3Upload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useS3Upload.d.ts","sourceRoot":"","sources":["../../../src/hooks/useS3Upload.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EAIpB,MAAM,mBAAmB,CAAC;AAU3B,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,MAAM;gEA0BpG;QACC,IAAI,EAAE,IAAI,CAAC;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;KAC7D;;EAgDJ"}
|
|
@@ -7,14 +7,15 @@ 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 {
|
|
10
|
+
import { ToastNotification } from '@rh-support/components';
|
|
11
|
+
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
12
|
+
import { fetchCaseDetailsByCaseNumber, pollAttachmentUploadStatus, uploadCaseAttachment, } from '@rh-support/utils';
|
|
12
13
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
14
|
+
// TODO: Re-enable when Hydra/GraphQL attachment APIs support secure support again
|
|
15
|
+
// Previously: useS3Upload(idToUploadTo, isSecureSupport) and passed isSecureSupport into uploadAttachmentS3
|
|
16
|
+
export function useS3Upload(caseNumber, apolloClient, caseSalesforceId) {
|
|
17
17
|
const { t } = useTranslation();
|
|
18
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
18
19
|
const getFileAccessDetails = (file) => __awaiter(this, void 0, void 0, function* () {
|
|
19
20
|
const fileName = (file === null || file === void 0 ? void 0 : file.name) || '';
|
|
20
21
|
if (file.size === 0) {
|
|
@@ -23,12 +24,12 @@ export function useS3Upload(idToUploadTo, isSecureSupport) {
|
|
|
23
24
|
const reader = new FileReader();
|
|
24
25
|
return new Promise((resolve, reject) => {
|
|
25
26
|
reader.onloadend = () => resolve({ ableToUpload: true, ableToUploadMessage: 'File attached, but not yet uploaded' });
|
|
26
|
-
reader.onerror = (
|
|
27
|
-
// only read the first 10 bytes. readAsBinaryString is not supported in IE 11
|
|
27
|
+
reader.onerror = () => reject({ ableToUpload: false, ableToUploadMessage: `${fileName} ${t("Can't be selected")}` });
|
|
28
28
|
reader.readAsArrayBuffer(file.slice(0, 10));
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
|
-
const uploadFile = (_a) => __awaiter(this, [_a], void 0, function* ({ file, description = '', isPrivate = false, listenerFn = (
|
|
31
|
+
const uploadFile = (_a) => __awaiter(this, [_a], void 0, function* ({ file, description = '', isPrivate = false, listenerFn = (_percent, _abort) => { }, }) {
|
|
32
|
+
var _b;
|
|
32
33
|
try {
|
|
33
34
|
yield getFileAccessDetails(file);
|
|
34
35
|
}
|
|
@@ -38,33 +39,30 @@ export function useS3Upload(idToUploadTo, isSecureSupport) {
|
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
|
-
const listener = (progress, abort) => {
|
|
42
|
-
const decimal = progress.loaded / progress.total;
|
|
43
|
-
const percent = decimal * 100;
|
|
44
|
-
// const verifyingUpdate = decimal === 1;
|
|
45
|
-
const currentUploadProgress = Math.floor(percent);
|
|
46
|
-
// Forwarding abort single to parent callback function
|
|
47
|
-
listenerFn(currentUploadProgress, abort);
|
|
48
|
-
};
|
|
49
|
-
const putObjectRequest = {
|
|
50
|
-
Body: file, // use the original file for upload
|
|
51
|
-
ContentLength: file.size,
|
|
52
|
-
Metadata: Object.assign(Object.assign(Object.assign(Object.assign({}, (description && { 'x-amz-meta-description': description })), (file.name && { 'x-amz-meta-fileName': file.name })), (file.size && { 'x-amz-meta-byteLength': file.size.toString() })), (file.type && { 'x-amz-meta-content-type': file.type })),
|
|
53
|
-
};
|
|
54
42
|
try {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
let abortFn;
|
|
44
|
+
const attachmentId = yield uploadCaseAttachment(caseNumber, file, (percent) => listenerFn(percent, () => abortFn === null || abortFn === void 0 ? void 0 : abortFn()), (abort) => {
|
|
45
|
+
abortFn = abort;
|
|
46
|
+
});
|
|
47
|
+
let resolvedCaseSalesforceId = caseSalesforceId;
|
|
48
|
+
if (apolloClient && !resolvedCaseSalesforceId) {
|
|
49
|
+
const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, Boolean((_b = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.secureSupport));
|
|
50
|
+
resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
|
|
51
|
+
}
|
|
52
|
+
if (apolloClient && resolvedCaseSalesforceId) {
|
|
53
|
+
yield pollAttachmentUploadStatus(apolloClient, resolvedCaseSalesforceId, attachmentId);
|
|
54
|
+
}
|
|
61
55
|
return attachmentId;
|
|
62
56
|
}
|
|
63
57
|
catch (error) {
|
|
64
58
|
if (error.message === 'Request aborted by user') {
|
|
65
|
-
|
|
59
|
+
return;
|
|
66
60
|
}
|
|
61
|
+
throw error;
|
|
67
62
|
}
|
|
68
63
|
});
|
|
69
|
-
return {
|
|
64
|
+
return {
|
|
65
|
+
uploadFile,
|
|
66
|
+
isUploadingFile: false,
|
|
67
|
+
};
|
|
70
68
|
}
|
|
@@ -137,7 +137,7 @@ declare const _default: {
|
|
|
137
137
|
'Exporting CSV': string;
|
|
138
138
|
'Could not export CSV': string;
|
|
139
139
|
'4 (Low)': string;
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': string;
|
|
141
141
|
'2 (High)': string;
|
|
142
142
|
'1 (Urgent)': string;
|
|
143
143
|
'Saved for later': string;
|
|
@@ -533,7 +533,7 @@ declare const _default: {
|
|
|
533
533
|
STANDARD: string;
|
|
534
534
|
PREMIUM: string;
|
|
535
535
|
'4 (Low) - 2 business days': string;
|
|
536
|
-
'3 (
|
|
536
|
+
'3 (Medium) - 1 business day': string;
|
|
537
537
|
'2 (High) - 4 business hours': string;
|
|
538
538
|
'1 (Urgent) - 1 business hour': string;
|
|
539
539
|
'Loading...': string;
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
'Exporting CSV': 'CSV wird exportiert',
|
|
138
138
|
'Could not export CSV': 'CSV nicht exportiert',
|
|
139
139
|
'4 (Low)': '4 (Niedrig)',
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': '3 (Medium)',
|
|
141
141
|
'2 (High)': '2 (Hoch)',
|
|
142
142
|
'1 (Urgent)': '1 (Dringend)',
|
|
143
143
|
'Saved for later': 'Gespeichert für später',
|
|
@@ -533,7 +533,7 @@ export default {
|
|
|
533
533
|
STANDARD: 'STANDARD',
|
|
534
534
|
PREMIUM: 'PREMIUM',
|
|
535
535
|
'4 (Low) - 2 business days': '4 (Niedrig) – 2 Werktage',
|
|
536
|
-
'3 (
|
|
536
|
+
'3 (Medium) - 1 business day': '3 (Medium) – 1 Werktag',
|
|
537
537
|
'2 (High) - 4 business hours': '2 (Hoch) – 4 Geschäftsstunden',
|
|
538
538
|
'1 (Urgent) - 1 business hour': '1 (Dringend) – 1 Geschäftsstunde',
|
|
539
539
|
'Loading...': 'Laden...',
|
|
@@ -138,7 +138,7 @@ declare const _default: {
|
|
|
138
138
|
'Exporting CSV': string;
|
|
139
139
|
'Could not export CSV': string;
|
|
140
140
|
'4 (Low)': string;
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': string;
|
|
142
142
|
'2 (High)': string;
|
|
143
143
|
'1 (Urgent)': string;
|
|
144
144
|
'Saved for later': string;
|
|
@@ -534,7 +534,7 @@ declare const _default: {
|
|
|
534
534
|
STANDARD: string;
|
|
535
535
|
PREMIUM: string;
|
|
536
536
|
'4 (Low) - 2 business days': string;
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': string;
|
|
538
538
|
'2 (High) - 4 business hours': string;
|
|
539
539
|
'1 (Urgent) - 1 business hour': string;
|
|
540
540
|
'Loading...': string;
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
'Exporting CSV': 'Exportación de CSV',
|
|
139
139
|
'Could not export CSV': 'No pudo exportar el CSV',
|
|
140
140
|
'4 (Low)': '4 (bajo)',
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': '3 (Medium)',
|
|
142
142
|
'2 (High)': '2 (alto)',
|
|
143
143
|
'1 (Urgent)': '1 (urgente)',
|
|
144
144
|
'Saved for later': 'Guardado para más tarde',
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
STANDARD: 'STANDARD',
|
|
535
535
|
PREMIUM: 'PREMIUM',
|
|
536
536
|
'4 (Low) - 2 business days': '4 (Bajo) - 2 días hábiles',
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': '3 (Medium) - 1 día hábil',
|
|
538
538
|
'2 (High) - 4 business hours': '2 (Alto) - 4 horas de trabajo',
|
|
539
539
|
'1 (Urgent) - 1 business hour': '1 (Urgente) - 1 hora de trabajo',
|
|
540
540
|
'Loading...': 'Cargando...',
|
|
@@ -138,7 +138,7 @@ declare const _default: {
|
|
|
138
138
|
'Exporting CSV': string;
|
|
139
139
|
'Could not export CSV': string;
|
|
140
140
|
'4 (Low)': string;
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': string;
|
|
142
142
|
'2 (High)': string;
|
|
143
143
|
'1 (Urgent)': string;
|
|
144
144
|
'Saved for later': string;
|
|
@@ -533,7 +533,7 @@ declare const _default: {
|
|
|
533
533
|
STANDARD: string;
|
|
534
534
|
PREMIUM: string;
|
|
535
535
|
'4 (Low) - 2 business days': string;
|
|
536
|
-
'3 (
|
|
536
|
+
'3 (Medium) - 1 business day': string;
|
|
537
537
|
'2 (High) - 4 business hours': string;
|
|
538
538
|
'1 (Urgent) - 1 business hour': string;
|
|
539
539
|
'Loading...': string;
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
'Exporting CSV': 'Exportation de CSV',
|
|
139
139
|
'Could not export CSV': 'N’a pas pu exporter CSV',
|
|
140
140
|
'4 (Low)': '4 (faible)',
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': '3 (normal)',
|
|
142
142
|
'2 (High)': '2 (élevé)',
|
|
143
143
|
'1 (Urgent)': '1 (urgent)',
|
|
144
144
|
'Saved for later': 'Sauvegardé pour plus tard',
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
STANDARD: 'STANDARD',
|
|
535
535
|
PREMIUM: 'PREMIUM',
|
|
536
536
|
'4 (Low) - 2 business days': '4 (faible) - 2 jours ouvrables',
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': '3 (normal) - 1 jour ouvrable',
|
|
538
538
|
'2 (High) - 4 business hours': '2 (élevé) - 4 heures ouvrables',
|
|
539
539
|
'1 (Urgent) - 1 business hour': '1 (Urgent) - 1 heure ouvrable',
|
|
540
540
|
'Loading...': 'Chargement...',
|
|
@@ -138,7 +138,7 @@ declare const _default: {
|
|
|
138
138
|
'Exporting CSV': string;
|
|
139
139
|
'Could not export CSV': string;
|
|
140
140
|
'4 (Low)': string;
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': string;
|
|
142
142
|
'2 (High)': string;
|
|
143
143
|
'1 (Urgent)': string;
|
|
144
144
|
'Saved for later': string;
|
|
@@ -534,7 +534,7 @@ declare const _default: {
|
|
|
534
534
|
STANDARD: string;
|
|
535
535
|
PREMIUM: string;
|
|
536
536
|
'4 (Low) - 2 business days': string;
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': string;
|
|
538
538
|
'2 (High) - 4 business hours': string;
|
|
539
539
|
'1 (Urgent) - 1 business hour': string;
|
|
540
540
|
'Loading...': string;
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
'Exporting CSV': 'Esportazione CSV',
|
|
139
139
|
'Could not export CSV': 'Impossibile esportare CSV',
|
|
140
140
|
'4 (Low)': '4 (basso)',
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': '3 (normale)',
|
|
142
142
|
'2 (High)': '2 (alto)',
|
|
143
143
|
'1 (Urgent)': '1 (urgente)',
|
|
144
144
|
'Saved for later': 'Salvato per dopo',
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
STANDARD: 'STANDARD',
|
|
535
535
|
PREMIUM: 'PREMIUM',
|
|
536
536
|
'4 (Low) - 2 business days': '4 (Basso): 2 giorni lavorativi',
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': '3 (Normale): 1 giorno lavorativo',
|
|
538
538
|
'2 (High) - 4 business hours': '2 (alto): 4 ore lavorative',
|
|
539
539
|
'1 (Urgent) - 1 business hour': '1 (urgente): 1 ora lavorativa',
|
|
540
540
|
'Loading...': 'Caricamento in corso',
|
|
@@ -138,7 +138,7 @@ declare const _default: {
|
|
|
138
138
|
'Exporting CSV': string;
|
|
139
139
|
'Could not export CSV': string;
|
|
140
140
|
'4 (Low)': string;
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': string;
|
|
142
142
|
'2 (High)': string;
|
|
143
143
|
'1 (Urgent)': string;
|
|
144
144
|
'Saved for later': string;
|
|
@@ -533,7 +533,7 @@ declare const _default: {
|
|
|
533
533
|
STANDARD: string;
|
|
534
534
|
PREMIUM: string;
|
|
535
535
|
'4 (Low) - 2 business days': string;
|
|
536
|
-
'3 (
|
|
536
|
+
'3 (Medium) - 1 business day': string;
|
|
537
537
|
'2 (High) - 4 business hours': string;
|
|
538
538
|
'1 (Urgent) - 1 business hour': string;
|
|
539
539
|
'Loading...': string;
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
'Exporting CSV': 'CSV をエクスポート中です',
|
|
139
139
|
'Could not export CSV': 'CSV をエクスポートできません',
|
|
140
140
|
'4 (Low)': '4 (低)',
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': '3 (中)',
|
|
142
142
|
'2 (High)': '2 (高)',
|
|
143
143
|
'1 (Urgent)': '1 (緊急)',
|
|
144
144
|
'Saved for later': '一時保存しました',
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
STANDARD: 'STANDARD',
|
|
535
535
|
PREMIUM: 'PREMIUM',
|
|
536
536
|
'4 (Low) - 2 business days': '4 (低) - 2 営業日',
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': '3 (中) - 1 営業日',
|
|
538
538
|
'2 (High) - 4 business hours': '2 (高) - 4 営業時間',
|
|
539
539
|
'1 (Urgent) - 1 business hour': '1 (緊急) - 1 営業時間',
|
|
540
540
|
'Loading...': '読み込み中...',
|
|
@@ -138,7 +138,7 @@ declare const _default: {
|
|
|
138
138
|
'Exporting CSV': string;
|
|
139
139
|
'Could not export CSV': string;
|
|
140
140
|
'4 (Low)': string;
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': string;
|
|
142
142
|
'2 (High)': string;
|
|
143
143
|
'1 (Urgent)': string;
|
|
144
144
|
'Saved for later': string;
|
|
@@ -535,7 +535,7 @@ declare const _default: {
|
|
|
535
535
|
STANDARD: string;
|
|
536
536
|
PREMIUM: string;
|
|
537
537
|
'4 (Low) - 2 business days': string;
|
|
538
|
-
'3 (
|
|
538
|
+
'3 (Medium) - 1 business day': string;
|
|
539
539
|
'2 (High) - 4 business hours': string;
|
|
540
540
|
'1 (Urgent) - 1 business hour': string;
|
|
541
541
|
'Loading...': string;
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
'Exporting CSV': 'CSV 내보내기',
|
|
139
139
|
'Could not export CSV': 'CSV를 내보낼 수 없습니다',
|
|
140
140
|
'4 (Low)': '4 (낮음)',
|
|
141
|
-
'3 (
|
|
141
|
+
'3 (Medium)': '3 (보통)',
|
|
142
142
|
'2 (High)': '2 (높음)',
|
|
143
143
|
'1 (Urgent)': '1 (긴급)',
|
|
144
144
|
'Saved for later': '임시 저장했습니다',
|
|
@@ -536,7 +536,7 @@ export default {
|
|
|
536
536
|
STANDARD: 'STANDARD',
|
|
537
537
|
PREMIUM: 'PREMIUM',
|
|
538
538
|
'4 (Low) - 2 business days': '4 (낮음)-영업일 기준 2 일',
|
|
539
|
-
'3 (
|
|
539
|
+
'3 (Medium) - 1 business day': '3 (중간)-영업일 기준 1 일',
|
|
540
540
|
'2 (High) - 4 business hours': '2 (높음) - 4 시간 (영업 시간)',
|
|
541
541
|
'1 (Urgent) - 1 business hour': '1 (긴급) - 1 시간 (영업 시간)',
|
|
542
542
|
'Loading...': '로드 중 ...',
|
|
@@ -137,7 +137,7 @@ declare const _default: {
|
|
|
137
137
|
'Exporting CSV': string;
|
|
138
138
|
'Could not export CSV': string;
|
|
139
139
|
'4 (Low)': string;
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': string;
|
|
141
141
|
'2 (High)': string;
|
|
142
142
|
'1 (Urgent)': string;
|
|
143
143
|
'Saved for later': string;
|
|
@@ -534,7 +534,7 @@ declare const _default: {
|
|
|
534
534
|
STANDARD: string;
|
|
535
535
|
PREMIUM: string;
|
|
536
536
|
'4 (Low) - 2 business days': string;
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': string;
|
|
538
538
|
'2 (High) - 4 business hours': string;
|
|
539
539
|
'1 (Urgent) - 1 business hour': string;
|
|
540
540
|
'Loading...': string;
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
'Exporting CSV': 'Exportando CSV',
|
|
138
138
|
'Could not export CSV': 'Não foi possível exportar CSV',
|
|
139
139
|
'4 (Low)': '4 (Baixa)',
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': '3 (Medium)',
|
|
141
141
|
'2 (High)': '2 (Alta)',
|
|
142
142
|
'1 (Urgent)': '1 (Urgente)',
|
|
143
143
|
'Saved for later': 'Salvo para mais tarde',
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
STANDARD: 'STANDARD',
|
|
535
535
|
PREMIUM: 'PREMIUM',
|
|
536
536
|
'4 (Low) - 2 business days': '4 (Baixa) - 2 dias úteis',
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': '3 (Medium) - 1 dia útil',
|
|
538
538
|
'2 (High) - 4 business hours': '2 (Alta) - 4 horas úteis',
|
|
539
539
|
'1 (Urgent) - 1 business hour': '1 (Urgente) - 1 hora útil',
|
|
540
540
|
'Loading...': 'Carregando...',
|
|
@@ -137,7 +137,7 @@ declare const _default: {
|
|
|
137
137
|
'Exporting CSV': string;
|
|
138
138
|
'Could not export CSV': string;
|
|
139
139
|
'4 (Low)': string;
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': string;
|
|
141
141
|
'2 (High)': string;
|
|
142
142
|
'1 (Urgent)': string;
|
|
143
143
|
'Saved for later': string;
|
|
@@ -534,7 +534,7 @@ declare const _default: {
|
|
|
534
534
|
STANDARD: string;
|
|
535
535
|
PREMIUM: string;
|
|
536
536
|
'4 (Low) - 2 business days': string;
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': string;
|
|
538
538
|
'2 (High) - 4 business hours': string;
|
|
539
539
|
'1 (Urgent) - 1 business hour': string;
|
|
540
540
|
'Loading...': string;
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
'Exporting CSV': 'Экспорт CSV',
|
|
138
138
|
'Could not export CSV': 'Не удалось экспортировать CSV',
|
|
139
139
|
'4 (Low)': '4 (низкий)',
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': '3 (обычный)',
|
|
141
141
|
'2 (High)': '2 (высокий)',
|
|
142
142
|
'1 (Urgent)': '1 (срочный)',
|
|
143
143
|
'Saved for later': 'Сохранено на будущее',
|
|
@@ -534,7 +534,7 @@ export default {
|
|
|
534
534
|
STANDARD: 'STANDARD',
|
|
535
535
|
PREMIUM: 'PREMIUM',
|
|
536
536
|
'4 (Low) - 2 business days': '4 (низкий) — 2 рабочих дня',
|
|
537
|
-
'3 (
|
|
537
|
+
'3 (Medium) - 1 business day': '3 (нормальный) — 1 рабочий день',
|
|
538
538
|
'2 (High) - 4 business hours': '2 (высокий) — 4 рабочих часа',
|
|
539
539
|
'1 (Urgent) - 1 business hour': '1 (срочный) — 1 рабочий час',
|
|
540
540
|
'Loading...': 'Загрузка...',
|
|
@@ -137,7 +137,7 @@ declare const _default: {
|
|
|
137
137
|
'Exporting CSV': string;
|
|
138
138
|
'Could not export CSV': string;
|
|
139
139
|
'4 (Low)': string;
|
|
140
|
-
'3 (
|
|
140
|
+
'3 (Medium)': string;
|
|
141
141
|
'2 (High)': string;
|
|
142
142
|
'1 (Urgent)': string;
|
|
143
143
|
'Saved for later': string;
|
|
@@ -527,7 +527,7 @@ declare const _default: {
|
|
|
527
527
|
STANDARD: string;
|
|
528
528
|
PREMIUM: string;
|
|
529
529
|
'4 (Low) - 2 business days': string;
|
|
530
|
-
'3 (
|
|
530
|
+
'3 (Medium) - 1 business day': string;
|
|
531
531
|
'2 (High) - 4 business hours': string;
|
|
532
532
|
'1 (Urgent) - 1 business hour': string;
|
|
533
533
|
'Loading...': string;
|