@rh-support/troubleshoot 2.6.353 → 2.6.357
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 +76 -45
- 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 +23 -10
- 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 +132 -57
- 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 +1 -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 +13 -8
- 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 -271
- 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 +103 -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 +21 -13
- 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 +110 -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 +22 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +15 -22
- 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 +5 -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 +16 -18
- 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 +5 -5
- 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/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/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +104 -62
- package/lib/esm/components/shared/Constants.d.ts +1 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +1 -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 +21 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +207 -34
- 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 +116 -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/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 +9 -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 +13 -10
- 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/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 +21 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +91 -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 +117 -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 +279 -99
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +16 -19
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentHelper.d.ts","s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GAAI,oBAAoB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAQ,SAUvC,CAAC"}
|
|
@@ -7,9 +7,9 @@ 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 { Config, pcm, sessionAttachments } from '@cee-eng/hydrajs';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import { getText, pendoTrackEvent } from '@rh-support/utils';
|
|
12
|
+
import { CaseAttachmentUploadError, deleteCaseAttachment, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, MultipartUploadError, pendoTrackEvent, pollAttachmentUploadStatus, pollContentVersionStatus, uploadCaseAttachment, } from '@rh-support/utils';
|
|
13
13
|
import find from 'lodash/find';
|
|
14
14
|
import forEach from 'lodash/forEach';
|
|
15
15
|
import includes from 'lodash/includes';
|
|
@@ -62,6 +62,7 @@ const getFileAccessDetails = (file) => __awaiter(void 0, void 0, void 0, functio
|
|
|
62
62
|
});
|
|
63
63
|
export const isUploadingOnSession = (status) => status === UploadStatusConstants.uploadingOnSession;
|
|
64
64
|
export const isUploadingOnCase = (status) => status === UploadStatusConstants.uploadingOnCase;
|
|
65
|
+
export const isAttachedOnCase = (status) => status === UploadStatusConstants.attachedOnCase;
|
|
65
66
|
export const isVerifyingSessionUpload = (status) => status === UploadStatusConstants.verifyingSessionUpload;
|
|
66
67
|
export const isVerifyingCaseUpload = (status) => status === UploadStatusConstants.verifyingCaseUpload;
|
|
67
68
|
export const isRestoredFromSession = (status) => status === UploadStatusConstants.restoredFromSession;
|
|
@@ -86,16 +87,35 @@ export const hasAnalysedSomeAttachments = (selectedLocalFiles) => !isEmpty(find(
|
|
|
86
87
|
export const hasSomeUnUploadedAttachments = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => !isUploading(localFile.uploadProgress.uploadStatus) &&
|
|
87
88
|
!isUploadComplete(localFile.uploadProgress.uploadStatus) &&
|
|
88
89
|
!isFileDeleted(localFile.uploadProgress.uploadStatus)));
|
|
89
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Files still queued to start uploading. Aborted/failed are terminal and must not
|
|
92
|
+
* block post-upload discussion refresh when other files in the batch succeeded.
|
|
93
|
+
*/
|
|
94
|
+
export const hasQueuedAttachmentUploads = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => !isUploading(localFile.uploadProgress.uploadStatus) &&
|
|
95
|
+
!isUploadComplete(localFile.uploadProgress.uploadStatus) &&
|
|
96
|
+
!isFileDeleted(localFile.uploadProgress.uploadStatus) &&
|
|
97
|
+
!isUploadAborted(localFile.uploadProgress.uploadStatus) &&
|
|
98
|
+
!isUploadFailed(localFile.uploadProgress.uploadStatus)));
|
|
99
|
+
/** Aborted/failed rows should stay in the upload panel until the user clicks Remove. */
|
|
100
|
+
export const hasAbortedOrFailedAttachments = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => isUploadAborted(localFile.uploadProgress.uploadStatus) ||
|
|
101
|
+
isUploadFailed(localFile.uploadProgress.uploadStatus)));
|
|
102
|
+
/** True when at least one non-deleted file remains in the upload queue (UI visibility). */
|
|
103
|
+
export const hasSomeSelectedFiles = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => !isFileDeleted(localFile.uploadProgress.uploadStatus)));
|
|
90
104
|
export const isUploadingAttachment = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => isUploading(localFile.uploadProgress.uploadStatus)));
|
|
91
105
|
export const isAnalysingAnyAttachment = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => isAnalysingFile(localFile.analysisMetadata.analysisStatus)));
|
|
92
106
|
export const canShowProgressBar = (file) => isUploading(file.uploadProgress.uploadStatus) || isAnalysingFile(file.analysisMetadata.analysisStatus);
|
|
107
|
+
/** Case discussion: show radial progress while queued (attachedOnCase) or actively uploading. */
|
|
108
|
+
export const shouldShowUploadProgressIndicator = (file, isSessionUpload) => isUploading(file.uploadProgress.uploadStatus) ||
|
|
109
|
+
(!isSessionUpload && isAttachedOnCase(file.uploadProgress.uploadStatus));
|
|
93
110
|
export const shouldHideDescription = (file, isSessionUpload) => !file.uploadability.ableToUpload ||
|
|
94
111
|
isUploading(file.uploadProgress.uploadStatus) ||
|
|
95
112
|
(!isSessionUpload &&
|
|
96
|
-
((file.
|
|
97
|
-
file.uploadProgress.
|
|
98
|
-
(file.
|
|
113
|
+
(isAttachedOnCase(file.uploadProgress.uploadStatus) ||
|
|
114
|
+
isUploadAborted(file.uploadProgress.uploadStatus) ||
|
|
115
|
+
isUploadFailed(file.uploadProgress.uploadStatus) ||
|
|
116
|
+
(file.uploadability.ableToUpload &&
|
|
117
|
+
file.uploadProgress.percentUploaded > 0 &&
|
|
118
|
+
(file.description || '').length === 0) ||
|
|
99
119
|
isUploadComplete(file.uploadProgress.uploadStatus)));
|
|
100
120
|
export const isUploadOnTrack = (file) => !isUploadFailed(file.uploadProgress.uploadStatus) &&
|
|
101
121
|
!isUploadAborted(file.uploadProgress.uploadStatus) &&
|
|
@@ -110,30 +130,54 @@ export const isUploadedAndAnalysisSkipped = (file) => isSessionUploadComplete(fi
|
|
|
110
130
|
export const updateUploadMetadata = (dispatch, fileIndexToEdit, newUploadMetadata) => {
|
|
111
131
|
udpateFileUploadMetadata(dispatch, newUploadMetadata, fileIndexToEdit);
|
|
112
132
|
};
|
|
113
|
-
export const uploadAllFiles = (_a) => __awaiter(void 0, [_a], void 0, function* ({ dispatch, idToUploadTo, caseFiles,
|
|
114
|
-
|
|
133
|
+
export const uploadAllFiles = (_a) => __awaiter(void 0, [_a], void 0, function* ({ dispatch, idToUploadTo, caseFiles,
|
|
134
|
+
// isSecureSupport, // TODO: Re-enable when Hydra/GraphQL attachment APIs support secure support again
|
|
135
|
+
needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient, caseSalesforceId, onCaseFileUploaded, }) {
|
|
136
|
+
const eligibleIndices = [];
|
|
137
|
+
caseFiles.selectedLocalFiles.forEach((localFile, index) => {
|
|
115
138
|
const fileStatus = new FileStatusHelper(localFile);
|
|
116
139
|
if (fileStatus.isUploadComplete() ||
|
|
117
140
|
fileStatus.isAnalysingFile() ||
|
|
118
141
|
fileStatus.isAnalysisFailed() ||
|
|
119
142
|
fileStatus.isUploading() ||
|
|
120
143
|
fileStatus.isVerifyingUpload() ||
|
|
121
|
-
fileStatus.isFileDeleted())
|
|
144
|
+
fileStatus.isFileDeleted()) {
|
|
122
145
|
return;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
146
|
+
}
|
|
147
|
+
eligibleIndices.push(index);
|
|
148
|
+
});
|
|
149
|
+
const eligibleCount = eligibleIndices.length;
|
|
150
|
+
if (eligibleCount === 0) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const startEligibleUploads = () => {
|
|
154
|
+
eligibleIndices.forEach((index) => {
|
|
155
|
+
const localFile = caseFiles.selectedLocalFiles[index];
|
|
156
|
+
uploadFile({
|
|
157
|
+
dispatch,
|
|
158
|
+
idToUploadTo,
|
|
159
|
+
localFile,
|
|
160
|
+
originalFile: caseFiles.selectedOriginalFiles[index],
|
|
161
|
+
index,
|
|
162
|
+
needsAnalyzing,
|
|
163
|
+
isSessionId,
|
|
164
|
+
slowUploadConfig,
|
|
165
|
+
apolloClient,
|
|
166
|
+
caseSalesforceId,
|
|
167
|
+
onCaseFileUploaded,
|
|
168
|
+
});
|
|
133
169
|
});
|
|
134
|
-
}
|
|
170
|
+
};
|
|
171
|
+
if (isUploadingAttachment(caseFiles.selectedLocalFiles)) {
|
|
172
|
+
startEligibleUploads();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
startEligibleUploads();
|
|
135
176
|
});
|
|
136
|
-
export const uploadFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ dispatch, idToUploadTo, localFile, originalFile, index,
|
|
177
|
+
export const uploadFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ dispatch, idToUploadTo, localFile, originalFile, index,
|
|
178
|
+
// isSecureSupport = false, // TODO: Re-enable when Hydra/GraphQL attachment APIs support secure support again
|
|
179
|
+
needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient, caseSalesforceId, onCaseFileUploaded, }) {
|
|
180
|
+
var _b;
|
|
137
181
|
if (!localFile.uploadability.ableToUpload) {
|
|
138
182
|
return;
|
|
139
183
|
}
|
|
@@ -150,6 +194,8 @@ export const uploadFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ d
|
|
|
150
194
|
Metadata: Object.assign(Object.assign(Object.assign(Object.assign({}, (localFile.description && { 'x-amz-meta-description': localFile.description })), (localFile.name && { 'x-amz-meta-fileName': localFile.name })), (localFile.size && { 'x-amz-meta-byteLength': localFile.size.toString() })), (localFile.type && { 'x-amz-meta-content-type': localFile.type })),
|
|
151
195
|
};
|
|
152
196
|
let triggerTrackSlowUpload = true;
|
|
197
|
+
// Hoisted so catch can treat S3 403-after-abort as user cancel, not a hard failure.
|
|
198
|
+
let userAborted = false;
|
|
153
199
|
try {
|
|
154
200
|
const listener = (progress, abort, isUploadingWithSlowConfig) => {
|
|
155
201
|
if (isUploadingWithSlowConfig && triggerTrackSlowUpload) {
|
|
@@ -203,14 +249,81 @@ export const uploadFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ d
|
|
|
203
249
|
}, putObjectRequest, listener, true, { partSize: 5 * 1024 * 1024, queueSize: 5 }, Object.assign(Object.assign({}, slowUploadConfig), { preferSlowS3Upload: Config.userConfig.preferSlowS3Upload }));
|
|
204
250
|
}
|
|
205
251
|
else {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
252
|
+
// Mirror master Hydra listener behavior for circular progress + abort button.
|
|
253
|
+
let abortUpload;
|
|
254
|
+
const onAbort = (abortedFileIndex) => {
|
|
255
|
+
userAborted = true;
|
|
256
|
+
const abortPayload = {
|
|
257
|
+
percentUploaded: 0,
|
|
258
|
+
onAbort: undefined,
|
|
259
|
+
uploadStatus: UploadStatusConstants.aborted,
|
|
260
|
+
};
|
|
261
|
+
abortUpload === null || abortUpload === void 0 ? void 0 : abortUpload();
|
|
262
|
+
updateUploadMetadata(dispatch, abortedFileIndex, abortPayload);
|
|
263
|
+
};
|
|
264
|
+
// Register abort handler immediately so Cancel works before first progress tick
|
|
265
|
+
updateUploadMetadata(dispatch, index, {
|
|
266
|
+
uploadStatus: UploadStatusConstants.uploadingOnCase,
|
|
267
|
+
percentUploaded: 0,
|
|
268
|
+
uploadErrorMessage: '',
|
|
269
|
+
onAbort,
|
|
270
|
+
});
|
|
271
|
+
attachmentId = yield uploadCaseAttachment(idToUploadTo, originalFile, (percent) => {
|
|
272
|
+
if (userAborted)
|
|
273
|
+
return;
|
|
274
|
+
const verifyingUpdate = percent === 100;
|
|
275
|
+
updateUploadMetadata(dispatch, index, {
|
|
276
|
+
uploadStatus: verifyingUpdate
|
|
277
|
+
? UploadStatusConstants.verifyingCaseUpload
|
|
278
|
+
: UploadStatusConstants.uploadingOnCase,
|
|
279
|
+
percentUploaded: percent,
|
|
280
|
+
uploadErrorMessage: '',
|
|
281
|
+
onAbort: verifyingUpdate ? undefined : onAbort,
|
|
282
|
+
});
|
|
283
|
+
}, (abort) => {
|
|
284
|
+
abortUpload = abort;
|
|
285
|
+
if (userAborted) {
|
|
286
|
+
abort();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
updateUploadMetadata(dispatch, index, {
|
|
290
|
+
uploadStatus: UploadStatusConstants.uploadingOnCase,
|
|
291
|
+
onAbort,
|
|
292
|
+
});
|
|
293
|
+
}, undefined, localFile.uploadProgress.multipartResumeState
|
|
294
|
+
? {
|
|
295
|
+
attachmentId: localFile.uploadProgress.multipartResumeState.attachmentId,
|
|
296
|
+
uploadId: localFile.uploadProgress.multipartResumeState.uploadId,
|
|
297
|
+
parts: localFile.uploadProgress.multipartResumeState.parts,
|
|
298
|
+
completedParts: localFile.uploadProgress.multipartResumeState.completedParts,
|
|
299
|
+
}
|
|
300
|
+
: undefined, (initAttachmentId) => {
|
|
301
|
+
updateAttachmentIdForFile(dispatch, initAttachmentId, index);
|
|
302
|
+
});
|
|
303
|
+
if (userAborted) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (apolloClient && caseSalesforceId) {
|
|
307
|
+
updateUploadMetadata(dispatch, index, {
|
|
308
|
+
uploadStatus: UploadStatusConstants.verifyingCaseUpload,
|
|
309
|
+
percentUploaded: 100,
|
|
310
|
+
onAbort: undefined,
|
|
311
|
+
});
|
|
312
|
+
yield pollAttachmentUploadStatus(apolloClient, caseSalesforceId, attachmentId);
|
|
313
|
+
}
|
|
212
314
|
}
|
|
213
315
|
attachmentId && updateAttachmentIdForFile(dispatch, attachmentId, index);
|
|
316
|
+
if (!isSessionId && attachmentId) {
|
|
317
|
+
// Hide from upload queue without shifting indices of in-flight siblings, then refresh discussion
|
|
318
|
+
updateUploadMetadata(dispatch, index, {
|
|
319
|
+
uploadStatus: UploadStatusConstants.deleted,
|
|
320
|
+
uploadErrorMessage: '',
|
|
321
|
+
percentUploaded: 100,
|
|
322
|
+
onAbort: undefined,
|
|
323
|
+
});
|
|
324
|
+
onCaseFileUploaded === null || onCaseFileUploaded === void 0 ? void 0 : onCaseFileUploaded();
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
214
327
|
const uploadPayload = {
|
|
215
328
|
uploadStatus: isSessionId ? UploadStatusConstants.uploadedOnSession : UploadStatusConstants.uploadedOnCase,
|
|
216
329
|
uploadErrorMessage: '',
|
|
@@ -224,8 +337,24 @@ export const uploadFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ d
|
|
|
224
337
|
}
|
|
225
338
|
}
|
|
226
339
|
catch (error) {
|
|
227
|
-
|
|
228
|
-
|
|
340
|
+
const isUserAbort = userAborted || (error === null || error === void 0 ? void 0 : error.message) === 'Request aborted by user';
|
|
341
|
+
const attachmentIdFromError = (error instanceof MultipartUploadError && ((_b = error.resumeData) === null || _b === void 0 ? void 0 : _b.attachmentId)) ||
|
|
342
|
+
(error instanceof CaseAttachmentUploadError && error.attachmentId) ||
|
|
343
|
+
undefined;
|
|
344
|
+
if (attachmentIdFromError) {
|
|
345
|
+
updateAttachmentIdForFile(dispatch, attachmentIdFromError, index);
|
|
346
|
+
}
|
|
347
|
+
if (isUserAbort) {
|
|
348
|
+
if (!isSessionId && attachmentIdFromError) {
|
|
349
|
+
try {
|
|
350
|
+
yield deleteCaseAttachment(idToUploadTo, attachmentIdFromError);
|
|
351
|
+
}
|
|
352
|
+
catch (_c) {
|
|
353
|
+
// Best-effort: file stays in queue as ABORTED for retry
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
const resumeState = error instanceof MultipartUploadError ? error.resumeData : undefined;
|
|
357
|
+
updateUploadMetadata(dispatch, index, Object.assign({ uploadStatus: UploadStatusConstants.aborted, uploadErrorMessage: '', onAbort: undefined, percentUploaded: 0 }, (resumeState && resumeState.completedParts.length > 0 ? { multipartResumeState: resumeState } : {})));
|
|
229
358
|
}
|
|
230
359
|
else {
|
|
231
360
|
console.error(error);
|
|
@@ -234,10 +363,12 @@ export const uploadFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({ d
|
|
|
234
363
|
? UploadStatusConstants.uploadOnSessionFailed
|
|
235
364
|
: UploadStatusConstants.uploadOnCaseFailed,
|
|
236
365
|
uploadErrorMessage: error.message,
|
|
237
|
-
percentUploaded: 0,
|
|
238
366
|
onAbort: undefined,
|
|
367
|
+
multipartResumeState: error instanceof MultipartUploadError ? error.resumeData : undefined,
|
|
239
368
|
};
|
|
240
|
-
|
|
369
|
+
if (!uploadErrorPayload.multipartResumeState) {
|
|
370
|
+
uploadErrorPayload.percentUploaded = 0;
|
|
371
|
+
}
|
|
241
372
|
updateUploadMetadata(dispatch, index, uploadErrorPayload);
|
|
242
373
|
}
|
|
243
374
|
}
|
|
@@ -321,8 +452,10 @@ export function computeAnalysisResults(idToUploadTo, attachmentId, fileSize, isS
|
|
|
321
452
|
return analysisResults;
|
|
322
453
|
});
|
|
323
454
|
}
|
|
324
|
-
|
|
455
|
+
const SCT_PART_SIZE = 5 * 1024 * 1024;
|
|
456
|
+
export function moveSessionAttachmentToCase(dispatch, caseNumber, sessionId, localFile, fileIndex, apolloClient, caseSalesforceId) {
|
|
325
457
|
return __awaiter(this, void 0, void 0, function* () {
|
|
458
|
+
var _a, _b, _c, _d, _e;
|
|
326
459
|
if (!caseNumber || !sessionId || !localFile.attachmentId)
|
|
327
460
|
return;
|
|
328
461
|
const currentUploadPayload = {
|
|
@@ -330,9 +463,49 @@ export function moveSessionAttachmentToCase(dispatch, caseNumber, sessionId, loc
|
|
|
330
463
|
uploadStatus: UploadStatusConstants.movingToCase,
|
|
331
464
|
};
|
|
332
465
|
updateUploadMetadata(dispatch, fileIndex, currentUploadPayload);
|
|
333
|
-
const fileMetadata = yield sessionAttachments.moveSessionAttachmentsToCase(sessionId, [localFile.attachmentId], caseNumber);
|
|
334
466
|
try {
|
|
335
|
-
|
|
467
|
+
let resolvedCaseSalesforceId = caseSalesforceId;
|
|
468
|
+
if (apolloClient && !resolvedCaseSalesforceId) {
|
|
469
|
+
const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber);
|
|
470
|
+
resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
|
|
471
|
+
}
|
|
472
|
+
const totalChunks = Math.ceil(localFile.size / SCT_PART_SIZE);
|
|
473
|
+
const moveResponse = yield sessionAttachments.moveSessionAttachmentsToCaseSCT(sessionId, {
|
|
474
|
+
caseNumber,
|
|
475
|
+
attachments: [
|
|
476
|
+
{
|
|
477
|
+
attachmentId: localFile.attachmentId,
|
|
478
|
+
fileName: localFile.name,
|
|
479
|
+
fileSize: String(localFile.size),
|
|
480
|
+
totalChunks: String(totalChunks),
|
|
481
|
+
clientId: 'pcm',
|
|
482
|
+
description: localFile.description || '',
|
|
483
|
+
},
|
|
484
|
+
],
|
|
485
|
+
});
|
|
486
|
+
const sctAttachmentId = (_a = moveResponse === null || moveResponse === void 0 ? void 0 : moveResponse[0]) === null || _a === void 0 ? void 0 : _a.attachmentId;
|
|
487
|
+
if (!sctAttachmentId) {
|
|
488
|
+
throw new Error('Missing attachmentId from SCT move response');
|
|
489
|
+
}
|
|
490
|
+
if (!resolvedCaseSalesforceId || !apolloClient) {
|
|
491
|
+
updateUploadMetadata(dispatch, fileIndex, {
|
|
492
|
+
uploadStatus: UploadStatusConstants.uploadedOnCase,
|
|
493
|
+
});
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
const { data: docLinkData } = yield apolloClient.query({
|
|
497
|
+
query: GET_CONTENT_DOCUMENT_IDS,
|
|
498
|
+
variables: { linkedEntityId: { eq: resolvedCaseSalesforceId } },
|
|
499
|
+
fetchPolicy: 'network-only',
|
|
500
|
+
});
|
|
501
|
+
const contentDocumentIds = ((_e = (_d = (_c = (_b = docLinkData === null || docLinkData === void 0 ? void 0 : docLinkData.redhat_support_uiapi) === null || _b === void 0 ? void 0 : _b.query) === null || _c === void 0 ? void 0 : _c.RedHatSupportContentDocumentLink) === null || _d === void 0 ? void 0 : _d.edges) !== null && _e !== void 0 ? _e : []).map((edge) => edge.node.ContentDocumentId.value);
|
|
502
|
+
if (contentDocumentIds.length === 0) {
|
|
503
|
+
updateUploadMetadata(dispatch, fileIndex, {
|
|
504
|
+
uploadStatus: UploadStatusConstants.uploadedOnCase,
|
|
505
|
+
});
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
yield pollContentVersionStatus(apolloClient, contentDocumentIds, sctAttachmentId);
|
|
336
509
|
updateUploadMetadata(dispatch, fileIndex, {
|
|
337
510
|
uploadStatus: UploadStatusConstants.uploadedOnCase,
|
|
338
511
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CaseDiagnosticsStatus, ICaseDiagnosticsResponse } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
2
2
|
import { Report } from '@cee-eng/hydrajs/@types/models/insights';
|
|
3
3
|
import { IAction } from '@rh-support/types/shared';
|
|
4
|
+
import { IMultipartResumeData } from '@rh-support/utils';
|
|
4
5
|
export declare enum AttachmentReducerConstants {
|
|
5
6
|
caseFileSelected = "caseFileSelected",
|
|
6
7
|
caseLocalFileEdited = "caseLocalFileEdited",
|
|
@@ -10,7 +11,8 @@ export declare enum AttachmentReducerConstants {
|
|
|
10
11
|
updateAttachmentIdForFile = "updateAttachmentIdForFile",
|
|
11
12
|
updateAnalysisMetadata = "updateAnalysisMetadata",
|
|
12
13
|
udpateFileUploadMetadata = "udpateFileUploadMetadata",
|
|
13
|
-
setShowUploadingOnSlowConnectionMsg = "setShowUploadingOnSlowConnectionMsg"
|
|
14
|
+
setShowUploadingOnSlowConnectionMsg = "setShowUploadingOnSlowConnectionMsg",
|
|
15
|
+
clearCompletedAttachments = "clearCompletedAttachments"
|
|
14
16
|
}
|
|
15
17
|
export declare enum UploadStatusConstants {
|
|
16
18
|
attachedOnCase = "ATTACHED_ON_CASE",
|
|
@@ -53,6 +55,7 @@ export interface IUploadMetadata {
|
|
|
53
55
|
uploadErrorMessage: string;
|
|
54
56
|
onAbort: (abortedFileIndex: number) => void;
|
|
55
57
|
percentUploaded: number;
|
|
58
|
+
multipartResumeState?: IMultipartResumeData;
|
|
56
59
|
}
|
|
57
60
|
export interface IAnalysisMetadata {
|
|
58
61
|
analysisErrorMesssage?: string;
|
|
@@ -102,6 +105,7 @@ export declare const onFilesSelect: (dispatch: AttachmentReducerDispatchType, ca
|
|
|
102
105
|
export declare const onFileEdit: (dispatch: AttachmentReducerDispatchType, editedLocalFile: IFileLocal, fileIndexToEdit: number) => void;
|
|
103
106
|
export declare const onFileRemove: (dispatch: AttachmentReducerDispatchType, fileIndexToRemove: number) => void;
|
|
104
107
|
export declare const resetAttachment: (dispatch: AttachmentReducerDispatchType) => void;
|
|
108
|
+
export declare const clearCompletedAttachments: (dispatch: AttachmentReducerDispatchType) => void;
|
|
105
109
|
export declare const onIncludeExcludeResults: (dispatch: AttachmentReducerDispatchType, includeResults: boolean) => void;
|
|
106
110
|
export declare const updateAttachmentIdForFile: (dispatch: AttachmentReducerDispatchType, attachmentId: string, fileIndexToEdit: number) => void;
|
|
107
111
|
export declare const updateAnalysisMetadata: (dispatch: AttachmentReducerDispatchType, analysisMetadata: Partial<IAnalysisMetadata>, fileIndexToEdit: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentReducer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentReducer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAMzD,oBAAY,0BAA0B;IAClC,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,sBAAsB,2BAA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CAAC;AAC/E,MAAM,MAAM,6BAA6B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAKzE,eAAO,MAAM,iBAAiB,GAAI,QAAQ,gBAAgB,EAAE,QAAQ,WAAW,KAAG,gBAsJjF,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,UAAU,6BAA6B,EAAE,WAAW,UAAU,SAE3F,CAAC;AACF,eAAO,MAAM,UAAU,GACnB,UAAU,6BAA6B,EACvC,iBAAiB,UAAU,EAC3B,iBAAiB,MAAM,SAG1B,CAAC;AACF,eAAO,MAAM,YAAY,GAAI,UAAU,6BAA6B,EAAE,mBAAmB,MAAM,SAE9F,CAAC;AACF,eAAO,MAAM,eAAe,GAAI,UAAU,6BAA6B,SAEtE,CAAC;AACF,eAAO,MAAM,yBAAyB,GAAI,UAAU,6BAA6B,SAEhF,CAAC;AACF,eAAO,MAAM,uBAAuB,GAAI,UAAU,6BAA6B,EAAE,gBAAgB,OAAO,SAEvG,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAClC,UAAU,6BAA6B,EACvC,cAAc,MAAM,EACpB,iBAAiB,MAAM,SAM1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAC/B,UAAU,6BAA6B,EACvC,kBAAkB,OAAO,CAAC,iBAAiB,CAAC,EAC5C,iBAAiB,MAAM,SAM1B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACjC,UAAU,6BAA6B,EACvC,gBAAgB,OAAO,CAAC,eAAe,CAAC,EACxC,iBAAiB,MAAM,SAM1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
|
-
import { isAnalysingAnyAttachment, isUploadingAttachment } from './AttachmentHelper';
|
|
3
|
+
import { isAnalysingAnyAttachment, isUploadComplete, isUploadingAttachment } from './AttachmentHelper';
|
|
4
4
|
// Constants
|
|
5
5
|
export var AttachmentReducerConstants;
|
|
6
6
|
(function (AttachmentReducerConstants) {
|
|
@@ -13,6 +13,7 @@ export var AttachmentReducerConstants;
|
|
|
13
13
|
AttachmentReducerConstants["updateAnalysisMetadata"] = "updateAnalysisMetadata";
|
|
14
14
|
AttachmentReducerConstants["udpateFileUploadMetadata"] = "udpateFileUploadMetadata";
|
|
15
15
|
AttachmentReducerConstants["setShowUploadingOnSlowConnectionMsg"] = "setShowUploadingOnSlowConnectionMsg";
|
|
16
|
+
AttachmentReducerConstants["clearCompletedAttachments"] = "clearCompletedAttachments";
|
|
16
17
|
})(AttachmentReducerConstants || (AttachmentReducerConstants = {}));
|
|
17
18
|
export var UploadStatusConstants;
|
|
18
19
|
(function (UploadStatusConstants) {
|
|
@@ -59,6 +60,7 @@ export const initialAttachmentState = {
|
|
|
59
60
|
includeAnalysisResults: true,
|
|
60
61
|
showUploadingOnSlowConnectionMsg: false,
|
|
61
62
|
};
|
|
63
|
+
const getLocalFileAtIndex = (selectedLocalFiles, index) => index >= 0 && index < selectedLocalFiles.length ? selectedLocalFiles[index] : undefined;
|
|
62
64
|
export const attachmentReducer = (pState, action) => {
|
|
63
65
|
switch (action.type) {
|
|
64
66
|
case AttachmentReducerConstants.caseFileSelected: {
|
|
@@ -78,6 +80,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
78
80
|
case AttachmentReducerConstants.caseLocalFileEdited: {
|
|
79
81
|
const editedLocalFile = action.payload.editedLocalFile;
|
|
80
82
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
83
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
84
|
+
return pState;
|
|
85
|
+
}
|
|
81
86
|
const newState = Object.assign({}, pState);
|
|
82
87
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
83
88
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -129,6 +134,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
129
134
|
}
|
|
130
135
|
case AttachmentReducerConstants.updateAttachmentIdForFile: {
|
|
131
136
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
137
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
138
|
+
return pState;
|
|
139
|
+
}
|
|
132
140
|
const newState = Object.assign({}, pState);
|
|
133
141
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
134
142
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -139,6 +147,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
139
147
|
}
|
|
140
148
|
case AttachmentReducerConstants.updateAnalysisMetadata: {
|
|
141
149
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
150
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
151
|
+
return pState;
|
|
152
|
+
}
|
|
142
153
|
const newState = Object.assign({}, pState);
|
|
143
154
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
144
155
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -149,6 +160,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
149
160
|
}
|
|
150
161
|
case AttachmentReducerConstants.udpateFileUploadMetadata: {
|
|
151
162
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
163
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
164
|
+
return pState;
|
|
165
|
+
}
|
|
152
166
|
const newState = Object.assign({}, pState);
|
|
153
167
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
154
168
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -160,6 +174,24 @@ export const attachmentReducer = (pState, action) => {
|
|
|
160
174
|
case AttachmentReducerConstants.setShowUploadingOnSlowConnectionMsg: {
|
|
161
175
|
return Object.assign(Object.assign({}, pState), { showUploadingOnSlowConnectionMsg: action.payload.showUploadingOnSlowConnectionMsg });
|
|
162
176
|
}
|
|
177
|
+
case AttachmentReducerConstants.clearCompletedAttachments: {
|
|
178
|
+
const selectedLocalFiles = pState.caseFiles.selectedLocalFiles;
|
|
179
|
+
const selectedOriginalFiles = pState.caseFiles.selectedOriginalFiles;
|
|
180
|
+
const keptLocalFiles = [];
|
|
181
|
+
const keptOriginalFiles = [];
|
|
182
|
+
selectedLocalFiles.forEach((localFile, index) => {
|
|
183
|
+
if (!isUploadComplete(localFile.uploadProgress.uploadStatus)) {
|
|
184
|
+
keptLocalFiles.push(localFile);
|
|
185
|
+
if (selectedOriginalFiles[index]) {
|
|
186
|
+
keptOriginalFiles.push(selectedOriginalFiles[index]);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
return Object.assign(Object.assign({}, pState), { caseFiles: {
|
|
191
|
+
selectedLocalFiles: keptLocalFiles,
|
|
192
|
+
selectedOriginalFiles: keptOriginalFiles,
|
|
193
|
+
} });
|
|
194
|
+
}
|
|
163
195
|
default: {
|
|
164
196
|
return pState;
|
|
165
197
|
}
|
|
@@ -178,6 +210,9 @@ export const onFileRemove = (dispatch, fileIndexToRemove) => {
|
|
|
178
210
|
export const resetAttachment = (dispatch) => {
|
|
179
211
|
dispatch({ type: AttachmentReducerConstants.resetAttachment });
|
|
180
212
|
};
|
|
213
|
+
export const clearCompletedAttachments = (dispatch) => {
|
|
214
|
+
dispatch({ type: AttachmentReducerConstants.clearCompletedAttachments });
|
|
215
|
+
};
|
|
181
216
|
export const onIncludeExcludeResults = (dispatch, includeResults) => {
|
|
182
217
|
dispatch({ type: AttachmentReducerConstants.caseFileIncludeExclude, payload: { includeResults } });
|
|
183
218
|
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export interface IFileUploaderCommonProps {
|
|
2
|
-
isSecureSupport
|
|
2
|
+
isSecureSupport?: boolean;
|
|
3
3
|
idToUploadTo: string;
|
|
4
|
+
/** Salesforce case Id from caseDetails.state — avoids an extra GetCaseByCaseNumber on upload. */
|
|
5
|
+
caseSalesforceId?: string;
|
|
4
6
|
needsAnalyzing?: boolean;
|
|
5
7
|
isSessionId: boolean;
|
|
6
8
|
autoUploadOnSelect?: boolean;
|
|
7
9
|
isPrivate?: boolean;
|
|
8
10
|
onUploadClick?: () => void;
|
|
11
|
+
/** Fired after each successful case attachment upload so discussion can refresh immediately. */
|
|
12
|
+
onCaseFileUploaded?: () => void;
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACrC,eAAe,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gGAAgG;IAChG,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { IFileLocal } from './reducer/AttachmentReducer';
|
|
3
3
|
import { IFileUploaderCommonProps } from './types';
|
|
4
4
|
export declare function useFileUploader(props: IFileUploaderCommonProps): {
|
|
5
|
-
retryUpload: (indexToRetry: number) => void
|
|
5
|
+
retryUpload: (indexToRetry: number) => Promise<void>;
|
|
6
6
|
editFile: (editedLocalFile: IFileLocal, fileIndexToEdit: number, changes: IFileLocal) => Promise<void>;
|
|
7
7
|
removeFile: (fileIndexToRemove: number, file: IFileLocal) => Promise<void>;
|
|
8
8
|
uploadAll: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => Promise<void>;
|
|
9
|
-
uploadFile: (fileIndex: number) => void
|
|
9
|
+
uploadFile: (fileIndex: number) => Promise<void>;
|
|
10
10
|
retryAnalysis: (indexToRetry: number) => void;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=useFileUploader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAgBnF,OAAO,EACH,UAAU,EAKb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCA0JjB,MAAM;gCAYA,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBAtGzD,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BAsJ3B,MAAM;kCA9DN,MAAM;EAwFhD"}
|