@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
|
@@ -37,6 +37,18 @@ function OpenshiftDropdownV4(props) {
|
|
|
37
37
|
const { t } = useTranslation();
|
|
38
38
|
const PER_PAGE = 200;
|
|
39
39
|
const LOAD_MORE_VALUE = 'loader';
|
|
40
|
+
const getDisplayName = (id, noClusterIdReasonExplanation, display_name) => {
|
|
41
|
+
if (isEmpty(id))
|
|
42
|
+
return '';
|
|
43
|
+
if (id === 'dont-have-id') {
|
|
44
|
+
return noClusterIdReasonExplanation === 'v3-cluster'
|
|
45
|
+
? t('The case is for a v3 cluster')
|
|
46
|
+
: t("I don't have my Cluster ID");
|
|
47
|
+
}
|
|
48
|
+
if (id === 'v3-cluster')
|
|
49
|
+
return t('The case is for a v3 cluster');
|
|
50
|
+
return display_name || id;
|
|
51
|
+
};
|
|
40
52
|
const [clustersRawResponse, setClustersRawResponse] = useState([]);
|
|
41
53
|
const clustersRawResponseRef = useRef(clustersRawResponse);
|
|
42
54
|
clustersRawResponseRef.current = clustersRawResponse;
|
|
@@ -44,7 +56,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
44
56
|
const loadMoreInProgressRef = useRef(false);
|
|
45
57
|
const [clustersSelectOptions, setClustersSelectOptions] = useState([]);
|
|
46
58
|
const [isOpen, setIsOpen] = useState(false);
|
|
47
|
-
const [inputVal, setInputVal] = useState(props.openshiftDisplayName);
|
|
59
|
+
const [inputVal, setInputVal] = useState(() => getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState));
|
|
48
60
|
const inputValRef = useRef(inputVal);
|
|
49
61
|
inputValRef.current = inputVal;
|
|
50
62
|
const [showArchivedClusters, setShowArchivedClusters] = useState(false);
|
|
@@ -53,19 +65,6 @@ function OpenshiftDropdownV4(props) {
|
|
|
53
65
|
const { getFromCache, setInCache } = useLRUCache(50);
|
|
54
66
|
const textInputRef = useRef();
|
|
55
67
|
const { isExportingPDF } = useContext(PDFContext);
|
|
56
|
-
// gets a cluster id and returns display name
|
|
57
|
-
const getDisplayName = (id, noClusterIdReasonExplanation, display_name) => {
|
|
58
|
-
if (isEmpty(id))
|
|
59
|
-
return '';
|
|
60
|
-
if (id === 'dont-have-id') {
|
|
61
|
-
return noClusterIdReasonExplanation === 'v3-cluster'
|
|
62
|
-
? t('The case is for a v3 cluster')
|
|
63
|
-
: t("I don't have my Cluster ID");
|
|
64
|
-
}
|
|
65
|
-
if (id === 'v3-cluster')
|
|
66
|
-
return t('The case is for a v3 cluster');
|
|
67
|
-
return display_name || id;
|
|
68
|
-
};
|
|
69
68
|
const onDropdownClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
70
69
|
setIsOpen(false);
|
|
71
70
|
setInputVal('');
|
|
@@ -149,12 +148,10 @@ function OpenshiftDropdownV4(props) {
|
|
|
149
148
|
React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")), "data-tracking-id": "dont-have-cluster-id", isFocused: focusedItemIndex === 1 }, "I don't have my Cluster ID"),
|
|
150
149
|
...(props.isV3
|
|
151
150
|
? [
|
|
152
|
-
React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')), isFocused: focusedItemIndex === 2 }),
|
|
151
|
+
React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')), "data-tracking-id": "v3-cluster-case", isFocused: focusedItemIndex === 2 }, t('The case is for a v3 cluster')),
|
|
153
152
|
]
|
|
154
153
|
: []),
|
|
155
|
-
],
|
|
156
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
157
|
-
[showArchivedClusters, focusedItemIndex]);
|
|
154
|
+
], [showArchivedClusters, focusedItemIndex, props.isV3, t]);
|
|
158
155
|
const getClusterOptions = (clusters, total = totalResultsNo) => {
|
|
159
156
|
const clustersResponseGrouped = groupBy(clusters, 'console_url') || [];
|
|
160
157
|
const domainNames = Object.keys(clustersResponseGrouped) || [];
|
|
@@ -224,17 +221,14 @@ function OpenshiftDropdownV4(props) {
|
|
|
224
221
|
}
|
|
225
222
|
else {
|
|
226
223
|
if (abortControllerRef.current !== undefined) {
|
|
227
|
-
// Cancel the previous request
|
|
228
224
|
abortControllerRef.current.abort();
|
|
229
225
|
}
|
|
230
|
-
// recreate a new AbortController for each call
|
|
231
226
|
let controller = new AbortController();
|
|
232
227
|
abortControllerRef.current = controller;
|
|
233
228
|
const clusterStatus = ` AND status not in ('Deprovisioned'${!showArchivedClusters ? ",'Archived'" : ''})`;
|
|
234
229
|
const searchPhrase = search
|
|
235
230
|
? ` AND (external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%' OR console_url ILIKE '%${search}%')`
|
|
236
231
|
: '';
|
|
237
|
-
// query language: https://github.com/yaacov/tree-search-language
|
|
238
232
|
clustersResponse = yield cloud.getAccountClustersSubscription({
|
|
239
233
|
order: 'display_name asc',
|
|
240
234
|
page,
|
|
@@ -265,7 +259,6 @@ function OpenshiftDropdownV4(props) {
|
|
|
265
259
|
};
|
|
266
260
|
}
|
|
267
261
|
catch (e) {
|
|
268
|
-
// silently fails
|
|
269
262
|
setIsFetchingClusters(false);
|
|
270
263
|
return { items: [], totalResult: 0, page: 1, total: 0 };
|
|
271
264
|
}
|
package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA2NxD"}
|
|
@@ -69,58 +69,52 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
69
69
|
const onRemoveItem = (optionToRemove) => {
|
|
70
70
|
props.onChange && props.onChange([optionToRemove]);
|
|
71
71
|
};
|
|
72
|
+
const mapContactsToNotifyees = (rawContacts) => rawContacts
|
|
73
|
+
.filter((c) => !!c.ssoName)
|
|
74
|
+
.map((c) => {
|
|
75
|
+
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
76
|
+
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
77
|
+
});
|
|
78
|
+
const hasSelectedUsername = (mappedContacts) => mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
72
79
|
const onAddClick = () => __awaiter(this, void 0, void 0, function* () {
|
|
73
80
|
var _a, _b, _c, _d;
|
|
74
81
|
clearErrors();
|
|
75
|
-
const searchResults = yield request(props.accountNumber, inputVal,
|
|
76
|
-
// eslint-disable-next-line eqeqeq
|
|
77
|
-
props.groupNumber == '-1' ? null : props.groupNumber);
|
|
82
|
+
const searchResults = yield request(props.accountNumber, inputVal, props.groupNumber || null);
|
|
78
83
|
const { notificationAddress = { email: '' }, contacts = [] } = (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults[0]) !== null && _a !== void 0 ? _a : {};
|
|
79
84
|
if ((notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) && (contacts === null || contacts === void 0 ? void 0 : contacts.length)) {
|
|
80
|
-
const mappedContacts = contacts
|
|
81
|
-
|
|
82
|
-
.map((c) => {
|
|
83
|
-
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
84
|
-
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
85
|
-
});
|
|
86
|
-
const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
87
|
-
if (!isUsernameAlreadySelected) {
|
|
85
|
+
const mappedContacts = mapContactsToNotifyees(contacts);
|
|
86
|
+
if (!hasSelectedUsername(mappedContacts)) {
|
|
88
87
|
(_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, [...mappedContacts]);
|
|
89
88
|
}
|
|
90
89
|
setInputVal('');
|
|
91
90
|
setNotifyeesList([...mappedContacts, { emailAddress: notificationAddress.email }]);
|
|
91
|
+
return;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const updatedSelection = [{ emailAddress: notificationAddress.email, caseNumber: '' }];
|
|
102
|
-
(_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, updatedSelection);
|
|
103
|
-
}
|
|
104
|
-
setInputVal('');
|
|
105
|
-
}
|
|
106
|
-
else if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
|
|
107
|
-
const mappedContacts = contacts
|
|
108
|
-
.filter((c) => !!c.ssoName)
|
|
109
|
-
.map((c) => {
|
|
110
|
-
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
111
|
-
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
112
|
-
});
|
|
113
|
-
const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
114
|
-
if (!isUsernameAlreadySelected) {
|
|
115
|
-
(_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
|
|
116
|
-
}
|
|
117
|
-
setInputVal('');
|
|
93
|
+
if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
|
|
94
|
+
const isEmailAlreadySelected = props.selectedItems.some((item) => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
return isCustomEmailAddress(item) &&
|
|
97
|
+
((_a = item.emailAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = notificationAddress.email) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
98
|
+
});
|
|
99
|
+
if (!isEmailAlreadySelected) {
|
|
100
|
+
(_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, [{ emailAddress: notificationAddress.email, caseNumber: '' }]);
|
|
118
101
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
102
|
+
setInputVal('');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
|
|
106
|
+
const mappedContacts = mapContactsToNotifyees(contacts);
|
|
107
|
+
if (!hasSelectedUsername(mappedContacts)) {
|
|
108
|
+
(_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
|
|
123
109
|
}
|
|
110
|
+
setInputVal('');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (loggedInUsersAccount.data.hasGroupACLs && props.groupNumber) {
|
|
114
|
+
setShowGroupPermissionError(true);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
setShowAccountPermissionError(true);
|
|
124
118
|
}
|
|
125
119
|
});
|
|
126
120
|
const clearErrors = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoAttachmentSelectedModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/NoAttachmentSelectedModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAiBvE,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NoAttachmentSelectedModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/NoAttachmentSelectedModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAiBvE,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAkJtD"}
|
|
@@ -16,17 +16,18 @@ const TIMEOUT_DURATION = 9000;
|
|
|
16
16
|
export function NoAttachmentSelectedModal(props) {
|
|
17
17
|
const { t } = useTranslation();
|
|
18
18
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
19
|
-
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
20
19
|
const { attachmentState: { caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
|
|
21
20
|
const [isUploading, setIsUploading] = useState(false);
|
|
22
21
|
const isAnyFileAttachedLocal = isAnyFileAttached(selectedLocalFiles);
|
|
23
22
|
const skipAndCreateCaseBtntimeoutRef = useRef(null);
|
|
24
23
|
const rulesDispatch = useContext(RulesDispatchContext);
|
|
25
24
|
const { rulesState } = useContext(RulesStateContext);
|
|
25
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
26
|
+
const isSecureSupport = Boolean(loggedInUsersAccount.data.secureSupport);
|
|
26
27
|
const isFirstMounRef = useRef(true);
|
|
27
28
|
const canUseSessionManagement = ability.can(resourceActions.CREATE, resources.SESSION_TRACKING);
|
|
28
29
|
useEffect(() => {
|
|
29
|
-
if (rulesState.triggerRuleNotification && !isFirstMounRef.current) {
|
|
30
|
+
if (rulesState.triggerRuleNotification && !isFirstMounRef.current && !isSecureSupport) {
|
|
30
31
|
rulesDispatch({
|
|
31
32
|
type: RulesReducerConstants.triggerEARulesModalVisibiltyChange,
|
|
32
33
|
payload: { isRuleModalVisible: true },
|
|
@@ -36,7 +37,7 @@ export function NoAttachmentSelectedModal(props) {
|
|
|
36
37
|
}
|
|
37
38
|
isFirstMounRef.current = false;
|
|
38
39
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
|
-
}, [rulesState.triggerRuleNotification, rulesDispatch]);
|
|
40
|
+
}, [rulesState.triggerRuleNotification, rulesDispatch, isSecureSupport]);
|
|
40
41
|
/** Clearing timeout on component unmount */
|
|
41
42
|
useEffect(() => {
|
|
42
43
|
return () => {
|
|
@@ -78,7 +79,7 @@ export function NoAttachmentSelectedModal(props) {
|
|
|
78
79
|
React.createElement("p", { className: "pf-v6-u-mb-md" },
|
|
79
80
|
React.createElement(Trans, null, "Uploading an attachment will speed up your case's resolution time")),
|
|
80
81
|
React.createElement(FileEARule, { isInline: true })))),
|
|
81
|
-
React.createElement(FileUpload, { idToUploadTo: activeSessionId, onUploadClick: onFileUploadClick, isSessionId: true, needsAnalyzing:
|
|
82
|
+
React.createElement(FileUpload, { idToUploadTo: activeSessionId, onUploadClick: onFileUploadClick, isSessionId: true, needsAnalyzing: !isSecureSupport, autoUploadOnSelect: isSecureSupport ? false : true, isSecureSupport: isSecureSupport, isPrivate: false }),
|
|
82
83
|
React.createElement(ModalFooter, null, isUploading ? (React.createElement(Button, { key: "create-case", variant: ButtonVariant.primary, onClick: props.onConfirm, "data-tracking-id": "skip-upload-or-analysis-and-submit" },
|
|
83
84
|
React.createElement(Trans, null, "Skip analyze and create my case"))) : isAnyFileAttachedLocal ? (!canUseSessionManagement && (React.createElement(Button, { className: "pf-v6-u-mt-sm", variant: ButtonVariant.primary, onClick: props.onConfirm, "data-tracking-id": "no-attachment-modal-create-case" },
|
|
84
85
|
React.createElement(Trans, null, "Create Case")))) : (React.createElement(React.Fragment, null,
|
|
@@ -41,7 +41,7 @@ export default function EditDescription(props) {
|
|
|
41
41
|
try {
|
|
42
42
|
setIsUpdating(true);
|
|
43
43
|
const caseDetails = { description: localDescription };
|
|
44
|
-
//
|
|
44
|
+
//Only GS4 internal can edit description
|
|
45
45
|
yield kase.updateCase(caseNumber, caseDetails, true);
|
|
46
46
|
setIsUpdating(false);
|
|
47
47
|
setCaseDetails(caseDispatch, caseDetails);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAkBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBAoJtC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
1
2
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
3
|
import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
|
|
3
4
|
import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
@@ -8,26 +9,27 @@ import React, { useContext, useEffect } from 'react';
|
|
|
8
9
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
10
11
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
11
|
-
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
12
|
+
// import CaseGroup from '../CaseInformation/CaseGroup';
|
|
12
13
|
import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
13
|
-
|
|
14
|
+
// TODO: Re-enable once phone number verification flow is fully supported with GraphQL
|
|
15
|
+
// import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
|
|
14
16
|
import Severity from '../CaseInformation/Severity';
|
|
15
17
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
16
18
|
import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
|
|
17
|
-
import { Cep } from '../CaseManagement/Cep';
|
|
19
|
+
// import { Cep } from '../CaseManagement/Cep';
|
|
18
20
|
import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
|
|
19
21
|
import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
|
|
20
|
-
import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
|
|
22
|
+
// import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
|
|
21
23
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
22
24
|
export default function IdeaInformation() {
|
|
23
25
|
const { t } = useTranslation();
|
|
24
26
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
25
27
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
26
|
-
const
|
|
28
|
+
const apolloClient = useApolloClient();
|
|
29
|
+
const { contactSSOName, selectedAccountDetails, ownersCaseGroups } = useCaseSelector((state) => ({
|
|
27
30
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
28
31
|
ownersCaseGroups: state.ownersCaseGroups,
|
|
29
32
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
30
|
-
hasInvalidEntitlements: state.hasInvalidEntitlements,
|
|
31
33
|
}), isEqual);
|
|
32
34
|
const caseDispatch = useCaseDispatch();
|
|
33
35
|
const isMetadataLoading = () => {
|
|
@@ -48,13 +50,13 @@ export default function IdeaInformation() {
|
|
|
48
50
|
}
|
|
49
51
|
const allPromisses = [];
|
|
50
52
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
51
|
-
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer,
|
|
53
|
+
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient));
|
|
52
54
|
}
|
|
53
55
|
if (haventLoadedMetadata(allCaseSeverities)) {
|
|
54
|
-
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer,
|
|
56
|
+
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, apolloClient));
|
|
55
57
|
}
|
|
56
58
|
if (haventLoadedMetadata(caseLanguages)) {
|
|
57
|
-
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
|
|
59
|
+
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient));
|
|
58
60
|
}
|
|
59
61
|
Promise.all(allPromisses);
|
|
60
62
|
}, [
|
|
@@ -66,6 +68,7 @@ export default function IdeaInformation() {
|
|
|
66
68
|
loggedInUserJwtToken,
|
|
67
69
|
selectedAccountDetails,
|
|
68
70
|
loggedInUsersAccount.data.secureSupport,
|
|
71
|
+
apolloClient,
|
|
69
72
|
]);
|
|
70
73
|
const onSeverityChange = (payload) => {
|
|
71
74
|
setCaseDetails(caseDispatch, payload);
|
|
@@ -79,13 +82,13 @@ export default function IdeaInformation() {
|
|
|
79
82
|
' ',
|
|
80
83
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
81
84
|
" for assistance.")),
|
|
82
|
-
React.createElement(AlertMessage, { show:
|
|
85
|
+
React.createElement(AlertMessage, { show: !loggedInUserRights.data.isEntitled(), variant: AlertType.DANGER, className: "pf-v6-u-mb-md", isInline: true },
|
|
83
86
|
React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
|
|
84
87
|
"You need a valid entitlement to create a case.\u00A0 Please contact",
|
|
85
88
|
' ',
|
|
86
89
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
87
90
|
" for assistance.")),
|
|
88
|
-
|
|
91
|
+
loggedInUserRights.data.isEntitled() &&
|
|
89
92
|
!isMetadataLoading() &&
|
|
90
93
|
!isMetadataLoadingError() &&
|
|
91
94
|
loggedInUserRights.data.canManageCases() && (React.createElement(React.Fragment, null,
|
|
@@ -97,14 +100,9 @@ export default function IdeaInformation() {
|
|
|
97
100
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
98
101
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xl" },
|
|
99
102
|
React.createElement(ContactPhoneNumber, null))),
|
|
100
|
-
React.createElement(ContactPhoneNumberAlert, null),
|
|
101
103
|
React.createElement(Grid, { hasGutter: true },
|
|
102
104
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
103
|
-
React.createElement(CaseLanguageSelector, { isManageStep: true })),
|
|
104
|
-
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
105
|
-
React.createElement(CaseGroup, { init: true }))),
|
|
106
|
-
React.createElement(CaseContactSelector, null),
|
|
105
|
+
React.createElement(CaseLanguageSelector, { isManageStep: true }))),
|
|
107
106
|
React.createElement(RHAssociatesSelector, null),
|
|
108
|
-
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })
|
|
109
|
-
React.createElement(Cep, null))))));
|
|
107
|
+
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))))));
|
|
110
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBAkM9C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
1
2
|
import { Bullseye, Card, CardBody, Gallery, GalleryItem, Split, SplitItem } from '@patternfly/react-core';
|
|
2
3
|
import { LoadingIndicator } from '@rh-support/components';
|
|
3
4
|
import { fetchCaseTypes, useGlobalDispatchContext, useGlobalStateContext } from '@rh-support/react-context';
|
|
@@ -11,8 +12,9 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
|
11
12
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
12
13
|
import { BugIcon, CertificationIcon, CustomerServiceIcon, DocumentationIcon, GearIcon, IdeaIcon, RcaIcon, } from './SupportTypeIcons';
|
|
13
14
|
export default function SupportTypeSelectorPage() {
|
|
14
|
-
const { globalMetadataState: { allCaseTypes
|
|
15
|
+
const { globalMetadataState: { allCaseTypes }, } = useGlobalStateContext();
|
|
15
16
|
const globalDispatch = useGlobalDispatchContext();
|
|
17
|
+
const apolloClient = useApolloClient();
|
|
16
18
|
const [selectedSupportType, setSelectedSupportType] = useState('');
|
|
17
19
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
18
20
|
const { caseType, isFetchingSelectedAccountDetails, issue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
|
|
@@ -27,7 +29,7 @@ export default function SupportTypeSelectorPage() {
|
|
|
27
29
|
useEffect(() => {
|
|
28
30
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
29
31
|
// Load support types.
|
|
30
|
-
fetchCaseTypes(globalDispatch,
|
|
32
|
+
fetchCaseTypes(globalDispatch, apolloClient);
|
|
31
33
|
}
|
|
32
34
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
35
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAOD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAoJvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
2
|
-
import { AlertMessage, AlertType } from '@rh-support/components';
|
|
3
2
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
|
-
import filter from 'lodash/filter';
|
|
5
|
-
import find from 'lodash/find';
|
|
6
3
|
import isEmpty from 'lodash/isEmpty';
|
|
7
4
|
import isEqual from 'lodash/isEqual';
|
|
8
5
|
import React, { forwardRef, useContext, useEffect, useState } from 'react';
|
|
@@ -19,7 +16,6 @@ import { ProductVersionDropdownSelector } from './ProductVersionDropdownSelector
|
|
|
19
16
|
const defaultProps = {
|
|
20
17
|
loadTCOnChange: false,
|
|
21
18
|
showTCAfterButtonClicked: false,
|
|
22
|
-
checkEntitledProduct: false,
|
|
23
19
|
};
|
|
24
20
|
/**
|
|
25
21
|
* Renders a dropdown list to select all products.
|
|
@@ -30,15 +26,12 @@ const defaultProps = {
|
|
|
30
26
|
* @param props
|
|
31
27
|
*/
|
|
32
28
|
const AllProductsSelector = forwardRef((props, ref) => {
|
|
33
|
-
|
|
34
|
-
const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
29
|
+
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
35
30
|
const caseDispatch = useCaseDispatch();
|
|
36
|
-
const { product, version
|
|
31
|
+
const { product, version } = useCaseSelector((state) => ({
|
|
37
32
|
product: state.caseDetails.product,
|
|
38
33
|
version: state.caseDetails.version,
|
|
39
|
-
contactSSOName: state.caseDetails.contactSSOName,
|
|
40
34
|
}), isEqual);
|
|
41
|
-
//test
|
|
42
35
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
43
36
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
44
37
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
@@ -46,7 +39,6 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
46
39
|
const [showModalButton, setShowModalButton] = useState(false);
|
|
47
40
|
const [isProductChanged, setProductChanged] = useState(false);
|
|
48
41
|
const { t } = useTranslation();
|
|
49
|
-
const isEntitledProduct = (_b = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
|
|
50
42
|
useEffect(() => {
|
|
51
43
|
// after TC data is loaded we open the modal
|
|
52
44
|
const showTCPopUpModalOnProductChange = props.loadTCOnChange && !props.showTCAfterButtonClicked && showModal;
|
|
@@ -79,7 +71,6 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
79
71
|
};
|
|
80
72
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
81
73
|
}
|
|
82
|
-
const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
|
|
83
74
|
const renderProductVersionDropdownSelector = (activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
|
|
84
75
|
!props.caseCreateExperience) ||
|
|
85
76
|
activeSection === AppRouteSections.GET_SUPPORT ||
|
|
@@ -91,12 +82,9 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
91
82
|
return (React.createElement(React.Fragment, null,
|
|
92
83
|
renderProductVersionDropdownSelector && (React.createElement("div", { className: "form-group product-selector-wrapper" },
|
|
93
84
|
React.createElement("div", { className: "all-product-selector-dropdown" },
|
|
94
|
-
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products:
|
|
85
|
+
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
|
|
95
86
|
renderOpenCaseIssue && (React.createElement("div", { className: "case-details-summary" },
|
|
96
87
|
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage, isOnGetSupportPage: props.isOnGetSupportPage }))),
|
|
97
|
-
React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
98
|
-
? 'You are'
|
|
99
|
-
: 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
|
|
100
88
|
showModalButton &&
|
|
101
89
|
!isEmpty(product) &&
|
|
102
90
|
!isEmpty(version) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAiBpE,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM,sBA+JvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import { Button,
|
|
1
|
+
import { Button, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
2
2
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
3
3
|
import { useSelectKeyboardNavigator } from '@rh-support/components';
|
|
4
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
5
4
|
import isEmpty from 'lodash/isEmpty';
|
|
6
5
|
import isEqual from 'lodash/isEqual';
|
|
7
|
-
import React, {
|
|
8
|
-
import {
|
|
6
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
9
8
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
10
|
-
const isProductSupportedForCustomer = (productName, productResults) => {
|
|
11
|
-
const foundItem = productResults.filter((item) => item.name === productName)[0];
|
|
12
|
-
return foundItem ? foundItem.supportedForCustomer : false;
|
|
13
|
-
};
|
|
14
9
|
export const NewProductDropdownSelector = (props) => {
|
|
15
10
|
const { t } = useTranslation();
|
|
16
11
|
const [isOpen, setIsOpen] = useState(false);
|
|
17
12
|
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
18
|
-
const [isSelectedProductSupportedForCustomer, setIsSelectedProductSupportedForCustomer] = useState(true);
|
|
19
13
|
const [filteredProducts, setFilteredProducts] = useState(props.products);
|
|
20
14
|
const [shouldFilter, setShouldFilter] = useState(false);
|
|
21
15
|
const textInputRef = useRef();
|
|
@@ -23,7 +17,6 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
23
17
|
product: state.caseDetails.product,
|
|
24
18
|
}), isEqual);
|
|
25
19
|
const [inputValue, setInputValue] = useState('');
|
|
26
|
-
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
27
20
|
useEffect(() => {
|
|
28
21
|
setShowValidationLocal(props.isNextBtnClickedToShowValidationError);
|
|
29
22
|
}, [props.isNextBtnClickedToShowValidationError]);
|
|
@@ -33,22 +26,15 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
33
26
|
}
|
|
34
27
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
28
|
}, [product]);
|
|
36
|
-
// Update filtered products whenever input changes
|
|
37
29
|
useEffect(() => {
|
|
38
|
-
const productsToFilter = props.isCaseCreate ? props.products : allProducts.data.productsResult;
|
|
39
30
|
if (!isEmpty(inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim())) {
|
|
40
|
-
const filtered =
|
|
31
|
+
const filtered = props.products.filter((p) => { var _a; return (_a = p.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(inputValue.toLowerCase()); });
|
|
41
32
|
setFilteredProducts(filtered);
|
|
42
33
|
}
|
|
43
34
|
else {
|
|
44
|
-
setFilteredProducts(
|
|
35
|
+
setFilteredProducts(props.products);
|
|
45
36
|
}
|
|
46
|
-
}, [inputValue, props.products
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
product &&
|
|
49
|
-
props.isOnSummaryPage &&
|
|
50
|
-
setIsSelectedProductSupportedForCustomer(isProductSupportedForCustomer(product, allProducts.data.productsResult));
|
|
51
|
-
}, [allProducts.data.productsResult, product, props.isOnSummaryPage]);
|
|
37
|
+
}, [inputValue, props.products]);
|
|
52
38
|
const onToggleClick = () => {
|
|
53
39
|
var _a;
|
|
54
40
|
setIsOpen(!isOpen);
|
|
@@ -83,14 +69,12 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
83
69
|
setIsOpen(false);
|
|
84
70
|
},
|
|
85
71
|
});
|
|
86
|
-
const
|
|
87
|
-
const productsToShow = shouldFilter ? filteredProducts : products;
|
|
88
|
-
return productsToShow.length > 0 ? (React.createElement(React.Fragment, null,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return (React.createElement(SelectOption, { key: `${type}-${index}`, value: prod, isFocused: focusedItemIndex === index, className: "pf-v6-c-select__menu-wrapper", "data-tracking-id": `${(_a = prod.name) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, '')}-${type}-dropdown`, isSelected: prod.name === product }, prod.name));
|
|
93
|
-
}))) : (React.createElement(SelectOption, { key: '', value: '', className: "pf-v6-c-select__menu-wrapper", isDisabled: true }, "No Results Found"));
|
|
72
|
+
const renderProductOptions = () => {
|
|
73
|
+
const productsToShow = shouldFilter ? filteredProducts : props.products;
|
|
74
|
+
return productsToShow.length > 0 ? (React.createElement(React.Fragment, null, productsToShow.map((prod, index) => {
|
|
75
|
+
var _a;
|
|
76
|
+
return (React.createElement(SelectOption, { key: `product-${index}`, value: prod, isFocused: focusedItemIndex === index, className: "pf-v6-c-select__menu-wrapper", "data-tracking-id": `${(_a = prod.name) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, '')}-product-dropdown`, isSelected: prod.name === product }, prod.name));
|
|
77
|
+
}))) : (React.createElement(SelectOption, { key: '', value: '', className: "pf-v6-c-select__menu-wrapper", isDisabled: true }, "No Results Found"));
|
|
94
78
|
};
|
|
95
79
|
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: props.isLoading, status: isEmpty(inputValue) && showValidationLocal ? 'danger' : undefined },
|
|
96
80
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
@@ -98,16 +82,8 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
98
82
|
props.isLoading ? (React.createElement(TextInputGroupUtilities, null,
|
|
99
83
|
React.createElement(Spinner, { size: "md" }))) : (React.createElement(TextInputGroupUtilities, Object.assign({}, (!inputValue ? { style: { display: 'none' } } : {})),
|
|
100
84
|
React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onClear, "aria-label": "Clear input value" }))))));
|
|
101
|
-
const topProducts = allProducts.data.topProducts.filter((p) => p.isEntitledProduct).slice(0, 3);
|
|
102
85
|
return (React.createElement("div", null,
|
|
103
86
|
React.createElement(Select, { id: "product-selector", isOpen: isOpen, onSelect: (e, selection) => onSelect(selection), onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, selected: product, shouldFocusFirstItemOnOpen: false, isScrollable: true, "data-tracking-id": "get-support-product-dropdown-selector" },
|
|
104
|
-
React.createElement(SelectList, { id: "product-selector-listbox" },
|
|
105
|
-
!shouldFilter && createProductGroup(topProducts, t('Top products'), 'topProduct'),
|
|
106
|
-
!shouldFilter && React.createElement(Divider, null),
|
|
107
|
-
createProductGroup(props.isCaseCreate ? props.products : allProducts.data.productsResult, t('All products'), 'product', shouldFilter))),
|
|
108
|
-
!props.isLoading && !isSelectedProductSupportedForCustomer && (React.createElement("div", { className: "pf-v6-u-ml-xs pf-v6-u-mt-sm form-instructions" },
|
|
109
|
-
React.createElement(Trans, null, "Red Hat must confirm your subscription status before providing support."),
|
|
110
|
-
React.createElement("br", null),
|
|
111
|
-
React.createElement(Trans, null, "We'll contact you if we have any questions.")))));
|
|
87
|
+
React.createElement(SelectList, { id: "product-selector-listbox" }, renderProductOptions()))));
|
|
112
88
|
};
|
|
113
89
|
export default NewProductDropdownSelector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductVersionSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NewProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductVersionSelector.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,UAAU,MAAM;IACZ,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;CAClD;AAED,eAAO,MAAM,yBAAyB,GAAI,OAAO,MAAM,sBAwGtD,CAAC"}
|