@rh-support/troubleshoot 2.2.51 → 2.4.10-beta.7
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/README.md +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +4 -4
- package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +19 -22
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +9 -14
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +13 -18
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +11 -14
- package/lib/esm/components/CaseEditView/CaseSecureSupportAlert.js +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +38 -82
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -4
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +4 -6
- package/lib/esm/components/CaseEditView/CaseSubscriptionAbuseAlert.js +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +11 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +6 -7
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +10 -11
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +10 -11
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftV3Popover.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +7 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +6 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseChat.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseExternalTrackerUpdate.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseExternalTrackerUpdate.js +3 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +3 -3
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +1 -1
- package/lib/esm/components/CaseEditView/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/index.js +6 -8
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +3 -3
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +1 -1
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +3 -3
- package/lib/esm/components/CaseInformation/Fts.js +3 -3
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +3 -5
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +3 -4
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -3
- package/lib/esm/components/CaseManagement/CaseManagement.js +2 -2
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +14 -30
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +12 -13
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +3 -4
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +2 -2
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +14 -15
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +3 -3
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -3
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +5 -5
- package/lib/esm/components/ImproveCase/KtQuestions.d.ts.map +1 -1
- package/lib/esm/components/ImproveCase/KtQuestions.js +7 -7
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +15 -12
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +5 -6
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +2 -2
- package/lib/esm/components/ProductSelector/ProductSelector.js +2 -2
- package/lib/esm/components/Recommendations/AlertToastWrapper.d.ts +0 -3
- package/lib/esm/components/Recommendations/AlertToastWrapper.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AlertToastWrapper.js +2 -2
- package/lib/esm/components/Recommendations/AsideResults.d.ts +7 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +17 -4
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +7 -7
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +7 -7
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +1 -1
- package/lib/esm/components/Recommendations/Recommendations.d.ts +3 -0
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +22 -6
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +1 -2
- package/lib/esm/components/Recommendations/ShowRank.d.ts +12 -0
- package/lib/esm/components/Recommendations/ShowRank.d.ts.map +1 -0
- package/lib/esm/components/Recommendations/ShowRank.js +27 -0
- package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
- package/lib/esm/components/Review/Review.js +2 -2
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +14 -9
- package/lib/esm/components/SessionRestore/SessionRestoreCard.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestoreCard.js +16 -9
- package/lib/esm/components/SubmitCase/ResubmitToast.d.ts +0 -3
- package/lib/esm/components/SubmitCase/ResubmitToast.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/ResubmitToast.js +1 -3
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts +7 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +17 -19
- package/lib/esm/components/Suggestions/Suggestions.js +1 -1
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +12 -58
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +6 -6
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +4 -4
- package/lib/esm/components/shared/Rule.js +6 -6
- package/lib/esm/components/shared/fileUpload/FileLister.js +6 -6
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
- package/lib/esm/components/shared/fileUpload/common/FileUploaderInfoIcon.js +1 -1
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +2 -2
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +2 -2
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +0 -6
- package/lib/esm/components/wizardLayout/MainSection.js +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +37 -6
- package/lib/esm/components/wizardLayout/WizardMain.js +2 -2
- package/lib/esm/components/wizardLayout/WizardNavigation.js +1 -1
- package/lib/esm/constants/caseDetailsConstants.d.ts +1 -7
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +0 -7
- package/lib/esm/css/app.css +7 -7
- package/lib/esm/css/case.css +3 -3
- package/lib/esm/hooks/useWizard.js +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +4 -4
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +4 -4
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +0 -2
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.d.ts +2 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +14 -20
- package/lib/esm/reducers/RecommendationsReducer.d.ts +2 -1
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +30 -2
- package/lib/esm/reducers/RouteConstNTypes.d.ts +2 -2
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.d.ts +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +1 -7
- package/lib/esm/scss/_main.scss +43 -109
- package/lib/esm/scss/_pf4-imports.scss +30 -0
- package/lib/esm/scss/{_pf-overrides.scss → _pf4-overrides.scss} +85 -214
- package/lib/esm/scss/index.scss +2 -1
- package/package.json +14 -13
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.d.ts +0 -13
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.js +0 -76
- package/lib/esm/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.d.ts +0 -3
- package/lib/esm/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.js +0 -118
- package/lib/esm/context/CaseOverviewContext.d.ts +0 -8
- package/lib/esm/context/CaseOverviewContext.d.ts.map +0 -1
- package/lib/esm/context/CaseOverviewContext.js +0 -10
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { kcs } from '@cee-eng/hydrajs';
|
|
11
|
-
import { ActionList, ActionListItem, Button, Icon } from '@patternfly/react-core';
|
|
12
|
-
import OutlinedThumbsDownIcon from '@patternfly/react-icons/dist/js/icons/outlined-thumbs-down-icon';
|
|
13
|
-
import OutlinedThumbsUpIcon from '@patternfly/react-icons/dist/js/icons/outlined-thumbs-up-icon';
|
|
14
|
-
import ThumbsDownIcon from '@patternfly/react-icons/dist/js/icons/thumbs-down-icon';
|
|
15
|
-
import ThumbsUpIcon from '@patternfly/react-icons/dist/js/icons/thumbs-up-icon';
|
|
16
|
-
import { LoadingIndicator } from '@rh-support/components';
|
|
17
|
-
import { cleanupMarkDown, decodeMarkTag, truncate } from '@rh-support/utils';
|
|
18
|
-
import DOMPurify from 'dompurify';
|
|
19
|
-
import React, { useState } from 'react';
|
|
20
|
-
import { Trans } from 'react-i18next';
|
|
21
|
-
import { CaseRecommendationEvalEnum } from '../../../constants/caseDetailsConstants';
|
|
22
|
-
export function HandpickedItem(props) {
|
|
23
|
-
const { recommendation } = props;
|
|
24
|
-
const [evaluation, setEvaluation] = useState((recommendation === null || recommendation === void 0 ? void 0 : recommendation.customerEvaluation) || CaseRecommendationEvalEnum.NEUTRAL);
|
|
25
|
-
const [helpfulBtnLoading, setHelpfulBtnLoading] = useState(false);
|
|
26
|
-
const [notHelpfulBtnLoading, setNotHelpfulBtnLoading] = useState(false);
|
|
27
|
-
const maxAbstractLength = 150;
|
|
28
|
-
const maxTitleLength = 150;
|
|
29
|
-
const updateEvaluation = (customerEvaluation) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
if (customerEvaluation === CaseRecommendationEvalEnum.HELPFUL) {
|
|
31
|
-
setHelpfulBtnLoading(true);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
setNotHelpfulBtnLoading(true);
|
|
35
|
-
}
|
|
36
|
-
if (evaluation === customerEvaluation)
|
|
37
|
-
customerEvaluation = CaseRecommendationEvalEnum.NEUTRAL;
|
|
38
|
-
setEvaluation(customerEvaluation);
|
|
39
|
-
const evalBody = {
|
|
40
|
-
caseNumber: props.caseNumber,
|
|
41
|
-
customerEvaluation: customerEvaluation,
|
|
42
|
-
resourceType: recommendation.resourceType,
|
|
43
|
-
resourceId: recommendation.resourceId,
|
|
44
|
-
};
|
|
45
|
-
//resourceURI is required for non Solution/Article KCS resources
|
|
46
|
-
if (recommendation.resourceType !== 'Solution') {
|
|
47
|
-
evalBody.resourceURI = recommendation.resourceURI;
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
yield kcs.postResourceEvaluation(evalBody);
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
//
|
|
54
|
-
}
|
|
55
|
-
setHelpfulBtnLoading(false);
|
|
56
|
-
setNotHelpfulBtnLoading(false);
|
|
57
|
-
if (customerEvaluation === CaseRecommendationEvalEnum.HELPFUL) {
|
|
58
|
-
props.onRecommendationLike();
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
return (React.createElement("div", { className: "handpicked-resource pf-v5-u-mx-sm" },
|
|
62
|
-
React.createElement("div", { className: "recommendation-header" },
|
|
63
|
-
React.createElement("a", { href: recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", dangerouslySetInnerHTML: {
|
|
64
|
-
__html: DOMPurify.sanitize(truncate(decodeMarkTag(recommendation.title || ''), maxTitleLength)),
|
|
65
|
-
} })),
|
|
66
|
-
React.createElement("div", { className: "result-body", dangerouslySetInnerHTML: {
|
|
67
|
-
__html: DOMPurify.sanitize(truncate(cleanupMarkDown(decodeMarkTag(props.recommendation.solutionAbstract || '')), maxAbstractLength)),
|
|
68
|
-
} }),
|
|
69
|
-
React.createElement(ActionList, { className: "pf-v5-u-my-xs" },
|
|
70
|
-
React.createElement(ActionListItem, null,
|
|
71
|
-
React.createElement(Button, { variant: "link", isDisabled: helpfulBtnLoading || notHelpfulBtnLoading, icon: helpfulBtnLoading ? (React.createElement(LoadingIndicator, { show: true, size: "xs" })) : (React.createElement(Icon, { size: "md", className: "eval-icons" }, evaluation === CaseRecommendationEvalEnum.HELPFUL ? (React.createElement(ThumbsUpIcon, null)) : (React.createElement(OutlinedThumbsUpIcon, null)))), onClick: () => updateEvaluation(CaseRecommendationEvalEnum.HELPFUL), "data-tracking-id": "recommendation-helpful" },
|
|
72
|
-
React.createElement(Trans, null, "This was helpful"))),
|
|
73
|
-
React.createElement(ActionListItem, { className: "pf-v5-u-ml-lg" },
|
|
74
|
-
React.createElement(Button, { variant: "link", isDisabled: helpfulBtnLoading || notHelpfulBtnLoading, icon: notHelpfulBtnLoading ? (React.createElement(LoadingIndicator, { show: true, size: "xs" })) : (React.createElement(Icon, { size: "md", className: "eval-icons" }, evaluation === CaseRecommendationEvalEnum.NOT_HELPFUL ? (React.createElement(ThumbsDownIcon, null)) : (React.createElement(OutlinedThumbsDownIcon, null)))), onClick: () => updateEvaluation(CaseRecommendationEvalEnum.NOT_HELPFUL), "data-tracking-id": "recommendation-not-helpful" },
|
|
75
|
-
React.createElement(Trans, null, "Not helpful"))))));
|
|
76
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RelatedTickets.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.tsx"],"names":[],"mappings":"AAmCA,QAAA,MAAM,cAAc,mBA0KnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Badge, EmptyState, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Pagination, SearchInput, ToggleGroup, ToggleGroupItem, } from '@patternfly/react-core';
|
|
11
|
-
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
|
|
12
|
-
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
13
|
-
import isEqual from 'lodash/isEqual';
|
|
14
|
-
import React, { useEffect, useState } from 'react';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { useCaseSelector } from '../../../../context/CaseContext';
|
|
17
|
-
const columnNames = {
|
|
18
|
-
id: 'Task ID',
|
|
19
|
-
type: 'Type',
|
|
20
|
-
status: 'Status',
|
|
21
|
-
title: 'Summary',
|
|
22
|
-
};
|
|
23
|
-
const RelatedTickets = () => {
|
|
24
|
-
const [activeToggleKey, setActiveToggleKey] = useState('all');
|
|
25
|
-
const [currentPage, setCurrentPage] = useState(1);
|
|
26
|
-
const [itemsPerPage, setItemsPerPage] = useState(10);
|
|
27
|
-
const [searchQuery, setSearchQuery] = useState('');
|
|
28
|
-
const { caseNumber, bugzillaFetch, externalTrackers } = useCaseSelector((state) => ({
|
|
29
|
-
caseNumber: state.caseDetails.caseNumber,
|
|
30
|
-
bugzillaFetch: state.caseDetails.bugzillas,
|
|
31
|
-
externalTrackers: state.caseDetails.externalTrackers,
|
|
32
|
-
}), isEqual);
|
|
33
|
-
const [bugzillaData, setBugzillaData] = useState([]);
|
|
34
|
-
const [jiraData, setJiraData] = useState([]);
|
|
35
|
-
const { t } = useTranslation();
|
|
36
|
-
// reset pagination when searching for edge case
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
setCurrentPage(1);
|
|
39
|
-
}, [searchQuery, activeToggleKey]);
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
const fetchData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
-
try {
|
|
43
|
-
const bugzillaTransformed = bugzillaFetch.map((bugzilla) => ({
|
|
44
|
-
id: bugzilla.caseNumber,
|
|
45
|
-
type: 'Bugzilla',
|
|
46
|
-
link: bugzilla.bugzillaLink || '',
|
|
47
|
-
status: bugzilla.status || 'N/A',
|
|
48
|
-
title: bugzilla.summary || 'N/A',
|
|
49
|
-
date: new Date(bugzilla.linkedAt),
|
|
50
|
-
}));
|
|
51
|
-
setBugzillaData(bugzillaTransformed);
|
|
52
|
-
const jiraResults = externalTrackers;
|
|
53
|
-
const jiraTransformed = jiraResults.map((jira) => ({
|
|
54
|
-
id: jira.resourceKey,
|
|
55
|
-
type: 'Jira',
|
|
56
|
-
link: jira.resourceURL || '',
|
|
57
|
-
status: jira.status || 'N/A',
|
|
58
|
-
title: jira.title || 'N/A',
|
|
59
|
-
date: new Date(jira.createdAt),
|
|
60
|
-
}));
|
|
61
|
-
setJiraData(jiraTransformed);
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
console.log(error);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
fetchData();
|
|
68
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
-
}, [bugzillaFetch, caseNumber, externalTrackers]);
|
|
70
|
-
const combinedData = [...bugzillaData, ...jiraData].sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
71
|
-
const filteredData = combinedData.filter((item) => {
|
|
72
|
-
const lowercasedQuery = searchQuery.toLowerCase();
|
|
73
|
-
if (searchQuery &&
|
|
74
|
-
!item.title.toLowerCase().includes(lowercasedQuery) &&
|
|
75
|
-
!item.id.toString().toLowerCase().includes(lowercasedQuery)) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
if (activeToggleKey === 'all')
|
|
79
|
-
return true;
|
|
80
|
-
if (activeToggleKey === 'bugzilla')
|
|
81
|
-
return item.type === 'Bugzilla';
|
|
82
|
-
if (activeToggleKey === 'jira')
|
|
83
|
-
return item.type === 'Jira';
|
|
84
|
-
return true;
|
|
85
|
-
});
|
|
86
|
-
//pagination
|
|
87
|
-
const startIdx = (currentPage - 1) * itemsPerPage;
|
|
88
|
-
const endIdx = startIdx + itemsPerPage;
|
|
89
|
-
const displayData = filteredData.slice(startIdx, endIdx);
|
|
90
|
-
return (React.createElement("section", { className: "card card-white" },
|
|
91
|
-
(activeToggleKey === 'all' && (bugzillaData.length > 0 || jiraData.length > 0)) ||
|
|
92
|
-
(activeToggleKey === 'bugzilla' && bugzillaData.length > 0) ||
|
|
93
|
-
(activeToggleKey === 'jira' && jiraData.length > 0) ? (React.createElement("div", { className: "related-ticket-search-input-container", id: "related-ticket-search-container" },
|
|
94
|
-
React.createElement(SearchInput, { className: "related-ticket-search-input", placeholder: t('Search by Task ID or Summary'), value: searchQuery, onChange: (event) => setSearchQuery(event.currentTarget.value), onClear: () => setSearchQuery('') }))) : null,
|
|
95
|
-
React.createElement(ToggleGroup, { "aria-label": "Toggle Group" },
|
|
96
|
-
React.createElement(ToggleGroupItem, { text: t('All'), isSelected: activeToggleKey === 'all', onChange: () => setActiveToggleKey('all'), "data-tracking-id": 'related-ticket-all' }),
|
|
97
|
-
React.createElement(ToggleGroupItem, { text: t('Bugzilla'), isSelected: activeToggleKey === 'bugzilla', onChange: () => setActiveToggleKey('bugzilla'), "data-tracking-id": 'related-ticket-bugzilla' }),
|
|
98
|
-
React.createElement(ToggleGroupItem, { text: t('Jira'), isSelected: activeToggleKey === 'jira', onChange: () => setActiveToggleKey('jira'), "data-tracking-id": 'related-ticket-jira' })),
|
|
99
|
-
filteredData.length > 0 ? (React.createElement(React.Fragment, null,
|
|
100
|
-
React.createElement(Table, { "aria-label": "Issue Table" },
|
|
101
|
-
React.createElement(Thead, null,
|
|
102
|
-
React.createElement(Tr, null,
|
|
103
|
-
React.createElement(Th, null, columnNames.id),
|
|
104
|
-
React.createElement(Th, null, columnNames.type),
|
|
105
|
-
React.createElement(Th, null, columnNames.status),
|
|
106
|
-
React.createElement(Th, null, columnNames.title))),
|
|
107
|
-
React.createElement(Tbody, null, displayData.map((item) => (React.createElement(Tr, { key: item.id },
|
|
108
|
-
React.createElement(Td, { dataLabel: columnNames.id }, item.link ? (React.createElement("a", { href: item.link, target: "_blank", rel: "noopener noreferrer" }, item.id)) : (item.id)),
|
|
109
|
-
React.createElement(Td, { dataLabel: columnNames.type }, item.type),
|
|
110
|
-
React.createElement(Td, { dataLabel: columnNames.status },
|
|
111
|
-
React.createElement(Badge, { isRead: true }, item.status)),
|
|
112
|
-
React.createElement(Td, { dataLabel: columnNames.title }, item.title)))))),
|
|
113
|
-
React.createElement("div", { className: "push-top" },
|
|
114
|
-
React.createElement(Pagination, { itemCount: filteredData.length, perPage: itemsPerPage, page: currentPage, onSetPage: (_, page) => setCurrentPage(page), onPerPageSelect: (_, perPage) => setItemsPerPage(perPage) })))) : (React.createElement("div", null,
|
|
115
|
-
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
116
|
-
React.createElement(EmptyStateHeader, { titleText: t("There aren't any related tasks."), headingLevel: "h4", icon: React.createElement(EmptyStateIcon, { icon: CubesIcon }) }))))));
|
|
117
|
-
};
|
|
118
|
-
export default RelatedTickets;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ICaseViewState } from '../reducers/CaseOverviewReducer';
|
|
3
|
-
export declare const CaseOverviewStateContext: React.Context<ICaseViewState>;
|
|
4
|
-
export declare const CaseOverviewDispatchContext: React.Context<(value: any) => void>;
|
|
5
|
-
export declare function CaseOverviewContextProvider({ children }: {
|
|
6
|
-
children: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
//# sourceMappingURL=CaseOverviewContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOverviewContext.d.ts","sourceRoot":"","sources":["../../../src/context/CaseOverviewContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAuB,cAAc,EAAwB,MAAM,iCAAiC,CAAC;AAG5G,eAAO,MAAM,wBAAwB,+BAA4D,CAAC;AAClG,eAAO,MAAM,2BAA2B,gCAFA,IAAI,CAEyC,CAAC;AAEtF,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE;;CAAA,eASvD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { useReducer } from 'react';
|
|
2
|
-
import { caseOverviewReducer, initialCaseViewState } from '../reducers/CaseOverviewReducer';
|
|
3
|
-
const initalDispatchContext = null;
|
|
4
|
-
export const CaseOverviewStateContext = React.createContext(initialCaseViewState);
|
|
5
|
-
export const CaseOverviewDispatchContext = React.createContext(initalDispatchContext);
|
|
6
|
-
export function CaseOverviewContextProvider({ children }) {
|
|
7
|
-
const [caseOverviewState, caseOverviewDispatch] = useReducer(caseOverviewReducer, initialCaseViewState);
|
|
8
|
-
return (React.createElement(CaseOverviewStateContext.Provider, { value: caseOverviewState },
|
|
9
|
-
React.createElement(CaseOverviewDispatchContext.Provider, { value: caseOverviewDispatch }, children)));
|
|
10
|
-
}
|