@rh-support/troubleshoot 2.6.353 → 2.6.355

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.
Files changed (27) hide show
  1. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +1 -1
  2. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +0 -1
  3. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +0 -6
  5. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -5
  7. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  8. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +0 -3
  9. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  10. package/lib/esm/components/Recommendations/AsideResults.js +4 -5
  11. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  12. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  13. package/lib/esm/components/Recommendations/Recommendations.js +9 -3
  14. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  15. package/lib/esm/components/shared/Constants.d.ts +0 -4
  16. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  17. package/lib/esm/components/shared/Constants.js +0 -4
  18. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  19. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +1 -4
  20. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  21. package/lib/esm/components/wizardLayout/WizardLayout.js +1 -4
  22. package/lib/esm/components/wizardLayout/WizardNavigation.js +1 -1
  23. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  24. package/lib/esm/hooks/useAB.js +23 -45
  25. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  26. package/lib/esm/reducers/RecommendationsReducer.js +5 -5
  27. package/package.json +6 -6
@@ -79,7 +79,7 @@ export function AsaCommentFeedbackModal(props) {
79
79
  React.createElement(FormGroup, { label: t('How can we improve?'), fieldId: "asa-comment-feedback-reason" },
80
80
  React.createElement(TextArea, { id: "asa-comment-feedback-reason", name: "feedbackReason", value: feedbackReason, onChange: (_event, value) => setFeedbackReason(value), placeholder: t('Describe your suggestion in details'), "aria-label": t('How can we improve?'), isDisabled: props.isSubmitting, resizeOrientation: "vertical" })),
81
81
  React.createElement("p", { className: "asa-feedback-privacy" },
82
- React.createElement(Trans, null, "Do not share any personal or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or services.")))),
82
+ React.createElement(Trans, null, "Do not include any personal information or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or Services.")))),
83
83
  React.createElement(ModalFooter, null,
84
84
  React.createElement(Button, { key: "confirm", variant: "primary", onClick: handleSubmit, isDisabled: isSubmitDisabled, isLoading: props.isSubmitting, spinnerAriaValueText: props.isSubmitting ? t('Sending feedback') : undefined, "data-tracking-id": "case-asa-comment-feedback-submit", "aria-label": t('Send Feedback') },
85
85
  React.createElement(Trans, null, "Send Feedback")),
@@ -9,7 +9,6 @@ export declare function useMarkdownFileUploader({ caseNumber, secureSupport, onA
9
9
  isMarkdownFileUploadInProgress: boolean;
10
10
  isDeletingFile: boolean;
11
11
  isUploadingFile: boolean;
12
- onFileSelect: (selectedImage: any) => void;
13
12
  onFileAttach: (files: any, isPublic: any) => Promise<void>;
14
13
  onFileDelete: (attachment: Partial<IAttachment>) => Promise<void>;
15
14
  cancelFileUpload: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useMarkdownFileUploader.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAcxE,UAAU,MAAM;IACZ,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,QAAkB,CAAC;AAE/C,wBAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,MAAM;;;;;;+BAyDpD,OAAO,CAAC,WAAW,CAAC;;EA2C/D"}
1
+ {"version":3,"file":"useMarkdownFileUploader.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAYxE,UAAU,MAAM;IACZ,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,QAAkB,CAAC;AAE/C,wBAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,MAAM;;;;;+BAqDpD,OAAO,CAAC,WAAW,CAAC;;EA0C/D"}
@@ -9,13 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { caseAttachments } from '@cee-eng/hydrajs';
11
11
  import { ToastNotification, useConfirmation, useFetch } from '@rh-support/components';
12
- import { pendoTrackEvent } from '@rh-support/utils';
13
12
  import React, { useRef, useState } from 'react';
14
13
  import { Trans, useTranslation } from 'react-i18next';
15
14
  import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../../../context/CaseDiscussionTabContext';
16
15
  import { useS3Upload } from '../../../../../hooks/useS3Upload';
17
16
  import { updateAttacmentsAfterRemoval } from '../../../../../reducers/CaseDiscussionTabReducer';
18
- import { markdownInlineFileSelectEvent } from '../../../../shared/Constants';
19
17
  export const FILE_SIZE_LIMIT = 2 * 1024 * 1000;
20
18
  export function useMarkdownFileUploader({ caseNumber, secureSupport, onAttachmentAdded }) {
21
19
  const [isMarkdownFileUploadInProgress, setIsMarkdownFileUploadinProgress] = useState(false);
@@ -63,9 +61,6 @@ export function useMarkdownFileUploader({ caseNumber, secureSupport, onAttachmen
63
61
  isMarkdownFileUploadCanceled.current = true;
64
62
  setIsMarkdownFileUploadinProgress(false);
65
63
  };
66
- const onFileSelect = (selectedImage) => {
67
- pendoTrackEvent(markdownInlineFileSelectEvent);
68
- };
69
64
  const onFileDelete = (attachment) => __awaiter(this, void 0, void 0, function* () {
70
65
  try {
71
66
  yield confirm({
@@ -94,7 +89,6 @@ export function useMarkdownFileUploader({ caseNumber, secureSupport, onAttachmen
94
89
  isMarkdownFileUploadInProgress,
95
90
  isDeletingFile,
96
91
  isUploadingFile,
97
- onFileSelect,
98
92
  onFileAttach,
99
93
  onFileDelete,
100
94
  cancelFileUpload,
@@ -1 +1 @@
1
- {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBA+iBxC"}
1
+ {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAuiBxC"}
@@ -13,7 +13,6 @@ import PlusIcon from '@patternfly/react-icons/dist/js/icons/plus-icon';
13
13
  import { EditorMode, LoadingIndicator, MarkdownEditor, ToastNotification, useFetch, usePrevious, } from '@rh-support/components';
14
14
  import { FeatureAnnouncementKeys, GlobalMetadataStateContext, NewFeaturePopoverAnnouncement, useCanEditCase, useUserPreferences, } from '@rh-support/react-context';
15
15
  import { ability, CaseDiscussionFields, CaseListFields, resourceActions, resources, } from '@rh-support/user-permissions';
16
- import { pendoTrackEvent } from '@rh-support/utils';
17
16
  import isEmpty from 'lodash/isEmpty';
18
17
  import isEqual from 'lodash/isEqual';
19
18
  import uniqBy from 'lodash/uniqBy';
@@ -26,7 +25,6 @@ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorM
26
25
  import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
27
26
  import { addingNotifiedUsers, checkForCaseStatusToggleOnAttachOrComment, setNotifiedUser, } from '../../../../reducers/CaseReducer';
28
27
  import { CaseDetailsCacheUtils } from '../../../../utils/caseDetailsCacheUtils';
29
- import { markdownFilePasteEvent } from '../../../shared/Constants';
30
28
  import { AttachmentDispatchContext, AttachmentStateContext, hasSomeSelectedFiles, hasSomeUnUploadedAttachments, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
31
29
  import FileSelectorButton from '../../../shared/fileUpload/fileSelectors/FileSelectorButton';
32
30
  import FileUpload from '../../../shared/fileUpload/FileUpload';
@@ -82,7 +80,7 @@ export function PostComment(props) {
82
80
  const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
83
81
  const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
84
82
  const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
85
- const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
83
+ const { onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload } = useMarkdownFileUploader({
86
84
  caseNumber,
87
85
  secureSupport: loggedInUsersAccount.data.secureSupport,
88
86
  onAttachmentAdded: props.onAttachmentAdded,
@@ -301,7 +299,6 @@ export function PostComment(props) {
301
299
  .map((elem) => elem.item);
302
300
  };
303
301
  const onClipboardPaste = (files) => {
304
- pendoTrackEvent(markdownFilePasteEvent);
305
302
  onFileAttach(files, isPublicRef.current);
306
303
  };
307
304
  const onCancel = () => {
@@ -337,7 +334,6 @@ export function PostComment(props) {
337
334
  : 'Add a comment or attach a file privately', fileSelectorProps: {
338
335
  showFileSelectorInToolbar: !loggedInUsersAccount.data.secureSupport,
339
336
  filesList: getAllAttachments(),
340
- onFileSelect: onFileSelect,
341
337
  onFileDelete: onFileDelete,
342
338
  isSupportedFile: (extension) => true,
343
339
  attachFileBtn: markdownToolbarFileSelectorBtn,
@@ -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,qBAiJtD"}
1
+ {"version":3,"file":"NoAttachmentSelectedModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmationModals/NoAttachmentSelectedModal.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,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,qBAgJtD"}
@@ -1,14 +1,12 @@
1
1
  import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
2
2
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
3
  import { ability, resourceActions, resources } from '@rh-support/user-permissions';
4
- import { pendoTrackEvent } from '@rh-support/utils';
5
4
  import React, { useContext, useEffect, useRef, useState } from 'react';
6
5
  import { Trans, useTranslation } from 'react-i18next';
7
6
  import { RulesDispatchContext, RulesStateContext } from '../../context/RulesContext';
8
7
  import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
9
8
  import { RulesReducerConstants } from '../../reducers/RulesReducer';
10
9
  import FileEARule from '../ImproveCase/FileEARule';
11
- import { recsViewedFromNoAttachmentModalEvent } from '../shared/Constants';
12
10
  import { AttachmentStateContext, isAnyFileAttached, isAnyFileDiagnosticsAttachment, isUploadingAttachment, } from '../shared/fileUpload';
13
11
  import FileSelectorButton from '../shared/fileUpload/fileSelectors/FileSelectorButton';
14
12
  import FileUpload from '../shared/fileUpload/FileUpload';
@@ -31,7 +29,6 @@ export function NoAttachmentSelectedModal(props) {
31
29
  type: RulesReducerConstants.triggerEARulesModalVisibiltyChange,
32
30
  payload: { isRuleModalVisible: true },
33
31
  });
34
- pendoTrackEvent(recsViewedFromNoAttachmentModalEvent);
35
32
  props.onClose();
36
33
  }
37
34
  isFirstMounRef.current = false;
@@ -1 +1 @@
1
- {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAWxH,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA8MzC"}
1
+ {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAWxH,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA4MzC"}
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { pcm, search } from '@cee-eng/hydrajs';
11
11
  import { Card, CardBody, CardHeader } from '@patternfly/react-core';
12
12
  import { useDebounce } from '@rh-support/components';
13
- import { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, dtmTrackEventContentListingItemClicked, getRecommendationTitle, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
13
+ import { computeRecommendationAbstract, computeRecommendationTitle, convertObjToEncodedQueryParams, dtmTrackEventContentListingItemClicked, getRecommendationTitle, getSolrParams, getTrimmedCharacters, PreviousCaseTypes, replaceHighlightingData, uniqueRecommendationDocs, } from '@rh-support/utils';
14
14
  import isEmpty from 'lodash/isEmpty';
15
15
  import isEqual from 'lodash/isEqual';
16
16
  import React, { useContext, useEffect, useRef } from 'react';
@@ -83,13 +83,12 @@ export function AsideResults(props) {
83
83
  description: getTrimmedCharacters(payload.description, WATSONX_DESCRIPTION_LIMIT),
84
84
  };
85
85
  const response = yield search.getWatsonXRecommendationsForCase2(convertObjToEncodedQueryParams(Object.assign({ rerank: true }, getSolrParams(PAGE_SIZE, 129, queryFilters))), payloadData, controllerRef.current.signal);
86
- const sideDocs = replaceHighlightingData(response.response.docs, response.highlighting);
86
+ const sideDocs = uniqueRecommendationDocs(replaceHighlightingData(response.response.docs, response.highlighting));
87
87
  recommendationDispatch({
88
88
  type: RecommendationsConstants.receiveSidebarRecommendation,
89
89
  payload: { sideRecommendation: sideDocs, sideRecommendationError: false },
90
90
  });
91
- !isEmpty(caseResourceLinks) &&
92
- setCaseRecommendations(caseDispatch, response.response.docs, caseResourceLinks);
91
+ !isEmpty(caseResourceLinks) && setCaseRecommendations(caseDispatch, sideDocs, caseResourceLinks);
93
92
  }
94
93
  catch (error) {
95
94
  // AbortError is thrown even if we cancel our fetch request so to handle and not to consider this as an erro
@@ -145,7 +144,7 @@ export function AsideResults(props) {
145
144
  React.createElement(CardBody, null,
146
145
  React.createElement("ul", { className: "list-flat" }, recommendationState.sideRecommendation.map((doc, index) => {
147
146
  var _a, _b;
148
- return (React.createElement("li", { className: `result${index !== 0 && 'pf-v6-u-mt-sm'}`, key: doc.id },
147
+ return (React.createElement("li", { className: `result${index !== 0 && 'pf-v6-u-mt-sm'}`, key: doc.uri },
149
148
  React.createElement("header", { className: "result-header" },
150
149
  React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS_ASIDE]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS_ASIDE)}`, className: "se-recommended ts-result-aside", "data-tracking-id": `se-recommended-sidebar-recommendations-${index}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, index), dangerouslySetInnerHTML: computeRecommendationTitle(doc) })),
151
150
  React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 150) })));
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  import { pcm, search } from '@cee-eng/hydrajs';
22
22
  import { Alert } from '@patternfly/react-core';
23
23
  import { usePrevious } from '@rh-support/components';
24
- import { getSolrParams, PreviousCaseTypes } from '@rh-support/utils';
24
+ import { getSolrParams, PreviousCaseTypes, uniqueRecommendationDocs } from '@rh-support/utils';
25
25
  import difference from 'lodash/difference';
26
26
  import filter from 'lodash/filter';
27
27
  import flatMap from 'lodash/flatMap';
@@ -110,7 +110,7 @@ function InsightsResults(props) {
110
110
  summary: summary,
111
111
  description: getDescriptionWOQues(issue, environment, periodicityOfIssue, timeFramesAndUrgency),
112
112
  }, getSolrParams(3, 129, { id: kcsIds }));
113
- const docs = (_c = (_b = response === null || response === void 0 ? void 0 : response.response) === null || _b === void 0 ? void 0 : _b.docs) !== null && _c !== void 0 ? _c : [];
113
+ const docs = uniqueRecommendationDocs((_c = (_b = response === null || response === void 0 ? void 0 : response.response) === null || _b === void 0 ? void 0 : _b.docs) !== null && _c !== void 0 ? _c : []);
114
114
  if (!recommendedResultsMap[attachmentId]) {
115
115
  setRecommendedResultsMap((oldMap) => (Object.assign(Object.assign({}, oldMap), { [attachmentId]: docs.map((item) => (Object.assign({ attachmentId }, item))) })));
116
116
  }
@@ -138,7 +138,7 @@ function InsightsResults(props) {
138
138
  try {
139
139
  const _c = getSolrParams(200, 256, { id: kcsIds }, false, true), { start, rows, q } = _c, expression = __rest(_c, ["start", "rows", "q"]);
140
140
  const res = yield search.solrSearchV2({ start, rows, q }, 'kcs', expression);
141
- const docs = (_b = (_a = res === null || res === void 0 ? void 0 : res.response) === null || _a === void 0 ? void 0 : _a.docs) !== null && _b !== void 0 ? _b : [];
141
+ const docs = uniqueRecommendationDocs((_b = (_a = res === null || res === void 0 ? void 0 : res.response) === null || _a === void 0 ? void 0 : _a.docs) !== null && _b !== void 0 ? _b : []);
142
142
  const attachmentId = localFile.attachmentId;
143
143
  if (!insightResultsMap[attachmentId]) {
144
144
  setInsightResultsMap((oldMap) => (Object.assign(Object.assign({}, oldMap), { [attachmentId]: docs.map((item) => (Object.assign({ attachmentId }, item))) })));
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAgBvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBA0XpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAgBvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAiYpD"}
@@ -47,7 +47,7 @@ export default function Recommendations(props) {
47
47
  const { recommendationState } = useContext(RecommendationStateContext);
48
48
  const prevMainRecommendations = usePrevious((_a = recommendationState === null || recommendationState === void 0 ? void 0 : recommendationState.visibleDocs) !== null && _a !== void 0 ? _a : []);
49
49
  const recommendationDispatch = useContext(RecommendationDispatchContext);
50
- const DEFAULTPAGESIZE = 10;
50
+ const DEFAULTPAGESIZE = 5;
51
51
  const MAXROW = 24;
52
52
  const recPageSize = pageSize !== null && pageSize !== void 0 ? pageSize : DEFAULTPAGESIZE;
53
53
  const abortControllerRef = useRef(undefined);
@@ -209,7 +209,7 @@ export default function Recommendations(props) {
209
209
  ' '))),
210
210
  recommendationState.isLoadingRecommendations ? (React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
211
211
  var _a, _b;
212
- return (React.createElement("li", { className: "result", key: `${doc.id}-${i}` },
212
+ return (React.createElement("li", { className: "result", key: doc.uri || i },
213
213
  React.createElement("header", { className: "result-header" },
214
214
  React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS)}`, className: "se-recommended ts-result", "data-tracking-id": `se-recommended-main-recommendations-${i}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, i), dangerouslySetInnerHTML: computeRecommendationTitle(doc) }),
215
215
  React.createElement("div", { className: "header-meta pf-v6-u-mt-xs" },
@@ -225,7 +225,13 @@ export default function Recommendations(props) {
225
225
  !recommendationState.isLoadingRecommendations &&
226
226
  recommendationState.numFound !== 0 &&
227
227
  recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
228
- React.createElement(Pagination, { className: "push-top", itemCount: (_c = (_b = recommendationState.allDocs) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, perPage: recPageSize, page: recommendationState.currentPage, variant: PaginationVariant.bottom, onSetPage: pageChanged, dropDirection: "up", onPerPageSelect: onPageSizeChanged })))),
228
+ React.createElement(Pagination, { className: "push-top", itemCount: (_c = (_b = recommendationState.allDocs) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0, perPage: recPageSize, page: recommendationState.currentPage, variant: PaginationVariant.bottom, onSetPage: pageChanged, dropDirection: "up", onPerPageSelect: onPageSizeChanged, perPageOptions: [
229
+ { title: '5', value: 5 },
230
+ { title: '10', value: 10 },
231
+ { title: '20', value: 20 },
232
+ { title: '50', value: 50 },
233
+ { title: '100', value: 100 },
234
+ ] })))),
229
235
  recommendationState.numFound === 0 &&
230
236
  !recommendationState.isLoadingRecommendations &&
231
237
  !recommendationState.isLoadingRecommendationsError &&
@@ -143,7 +143,7 @@ function TroubleshootSection(props) {
143
143
  updateSession(sessionRestoreDispatch, activeSessionId, sessionDetails, newSession);
144
144
  }
145
145
  }
146
- // Enable "See more resources" button when first chunk is received
146
+ // Enable Continue button when first chunk is received
147
147
  if (eventData.eventName === ARHEventName.FirstMessageReceived) {
148
148
  aiResponseDispatch(setHasChunkReceived(true));
149
149
  }
@@ -355,7 +355,7 @@ function TroubleshootSection(props) {
355
355
  React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: isFunctionalCookieAccepted() &&
356
356
  props.aiServicesAvailable &&
357
357
  !aiResponseState.hasChunkReceived &&
358
- !aiResponseState.error }, isFunctionalCookieAccepted() ? t('See more resources') : t('Continue')))) : isCaseCreate ? (React.createElement("span", null,
358
+ !aiResponseState.error }, t('Continue')))) : isCaseCreate ? (React.createElement("span", null,
359
359
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
360
360
  span: React.createElement("span", { className: "return-to-case-text" }),
361
361
  button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: () => props.setIsAIChatMode(false) })),
@@ -47,10 +47,6 @@ export declare enum CaseValuesToWatch {
47
47
  hostname = "Hostname",
48
48
  openshiftClusterID = "OpenShift Cluster ID"
49
49
  }
50
- export declare const preferredSSModalOpenPendoEvent = "PCM-Next > Preferred-secured-support-modal-open";
51
- export declare const recsViewedFromNoAttachmentModalEvent = "PCM-Next > No-Attachment-modal-view-recommendations";
52
- export declare const markdownInlineFileSelectEvent = "PCM-Next > Markdown-toolbar-file-select";
53
- export declare const markdownFilePasteEvent = "PCM-Next > Markdown-toolbar-file-paste";
54
50
  export declare const riskLabels: {
55
51
  1: {
56
52
  icon: React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,iBAAiB;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,8BAA8B;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
1
+ {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,iBAAiB;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,8BAA8B;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
@@ -51,10 +51,6 @@ export var CaseValuesToWatch;
51
51
  CaseValuesToWatch["hostname"] = "Hostname";
52
52
  CaseValuesToWatch["openshiftClusterID"] = "OpenShift Cluster ID";
53
53
  })(CaseValuesToWatch || (CaseValuesToWatch = {}));
54
- export const preferredSSModalOpenPendoEvent = 'PCM-Next > Preferred-secured-support-modal-open';
55
- export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-modal-view-recommendations';
56
- export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
57
- export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
58
54
  export const riskLabels = {
59
55
  1: { icon: React.createElement(AngleDoubleDownIcon, null), label: 'Low', className: 'pf-m-blue' },
60
56
  2: { icon: React.createElement(EqualsIcon, null), label: 'Moderate', className: 'pf-m-gold' },
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AASvF,OAAO,EACH,uBAAuB,EAEvB,6BAA6B,EAK7B,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,eAAe,EAMf,qBAAqB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,MAAM,GACd,6BAA6B,6BAA6B,EAAE,aAAa,OAAO,EAAE,mBAAiB,MACnG,eAAe,IAAI,EAAE,SA+BrB,CAAC;AAiBN,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,uDAAwD,CAAC;AAC5G,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,oDAAqD,CAAC;AACtG,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,2DAA4D,CAAC;AACpH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,wDAAyD,CAAC;AAC9G,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,wDAAyD,CAAC;AAC9G,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,kGACiC,CAAC;AACxF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,mDAAoD,CAAC;AACx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AY,EAAE,MAAM,EACpB,UAAU,EAAE,UAAU,EAAE,EACxB,WAAW,EAAE,OAAO,iBAMvB;AAED,wBAAsB,0BAA0B,CAC5C,QAAQ,KAAA,EACR,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,qBAAqB,iBA6D3C;AAED,wBAAsB,sBAAsB,CACxC,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,GAClD,OAAO,CAAC,gBAAgB,CAAC,CAwB3B;AAED,wBAAsB,2BAA2B,CAC7C,QAAQ,KAAA,EACR,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,MAAM,iBA6BpB;AAED,wBAAsB,uBAAuB,CAAC,QAAQ,KAAA,EAAE,SAAS,EAAE,MAAM,iBA+CxE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,WAEvE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,WAKzD;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,UAAU,KAAG,OAShE,CAAC;AAKF,eAAO,MAAM,2BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,oBAAoB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAQ,SAUvC,CAAC"}
1
+ {"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,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,2BAA2B,CAC7C,QAAQ,KAAA,EACR,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,MAAM,iBA6BpB;AAED,wBAAsB,uBAAuB,CAAC,QAAQ,KAAA,EAAE,SAAS,EAAE,MAAM,iBA+CxE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,WAEvE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,WAKzD;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,UAAU,KAAG,OAShE,CAAC;AAKF,eAAO,MAAM,2BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,oBAAoB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAQ,SAOvC,CAAC"}
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { caseAttachments, Config, pcm, sessionAttachments } from '@cee-eng/hydrajs';
11
11
  import { ToastNotification } from '@rh-support/components';
12
- import { getText, pendoTrackEvent } from '@rh-support/utils';
12
+ import { getText } from '@rh-support/utils';
13
13
  import find from 'lodash/find';
14
14
  import forEach from 'lodash/forEach';
15
15
  import includes from 'lodash/includes';
@@ -432,13 +432,10 @@ export const isAnyFileDiagnosticsAttachment = (selectedLocalFiles) => {
432
432
  return selectedLocalFiles.some(isDiagnosticsAttachment);
433
433
  };
434
434
  export const trackSlowUpload = (dispatch) => {
435
- // show an alert
436
- //track in pendo
437
435
  dispatch({
438
436
  type: AttachmentReducerConstants.setShowUploadingOnSlowConnectionMsg,
439
437
  payload: {
440
438
  showUploadingOnSlowConnectionMsg: true,
441
439
  },
442
440
  });
443
- pendoTrackEvent('PCM-Next > S3-Slow-Upload');
444
441
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAqLzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAmLzC"}
@@ -11,7 +11,7 @@ import { Grid, GridItem } from '@patternfly/react-core';
11
11
  import { SupportFeedbackForm } from '@rh-support/components';
12
12
  import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
14
+ import { getVersionIfOnlyVersion, PreviousCaseTypes } from '@rh-support/utils';
15
15
  import findIndex from 'lodash/findIndex';
16
16
  import isEmpty from 'lodash/isEmpty';
17
17
  import isEqual from 'lodash/isEqual';
@@ -26,7 +26,6 @@ import { useMetadata } from '../../utils/metadataUtil';
26
26
  import RouteUtils from '../../utils/routeUtils';
27
27
  import PreCaseConfirmationModals, { PreCaseConfirmationModalsEnum, } from '../ConfirmationModals/PreCaseConfirmationModals';
28
28
  import AlertToastWrapper from '../Recommendations/AlertToastWrapper';
29
- import { preferredSSModalOpenPendoEvent } from '../shared/Constants';
30
29
  import { AttachmentStateContext } from '../shared/fileUpload';
31
30
  import { isAnyFileAttached } from '../shared/fileUpload/reducer/AttachmentHelper';
32
31
  import { GlobalTroubleshootEffects } from './GlobalTroubleshootEffects';
@@ -110,8 +109,6 @@ export function WizardLayout(props) {
110
109
  const confirmSupportModal = (hasPreferredSecureSupportAccount) => {
111
110
  if (hasPreferredSecureSupportAccount) {
112
111
  setConfirmationModalType(PreCaseConfirmationModalsEnum.PREFERRED_GS4_Modal);
113
- // track pendo event
114
- pendoTrackEvent(preferredSSModalOpenPendoEvent);
115
112
  }
116
113
  };
117
114
  const onModalClose = () => {
@@ -287,7 +287,7 @@ function WizardNavigation(props) {
287
287
  React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: isFunctionalCookieAccepted() &&
288
288
  props.aiServicesAvailable &&
289
289
  !aiResponseState.hasChunkReceived &&
290
- !aiResponseState.error }, isFunctionalCookieAccepted() ? t('See more resources') : t('Continue')))) : props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
290
+ !aiResponseState.error }, t('Continue')))) : props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
291
291
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
292
292
  span: React.createElement("span", { className: "return-to-case-text" }),
293
293
  button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: props.onReturnToCaseCreation })),
@@ -1 +1 @@
1
- {"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC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AarF;AAkBD,wBAAgB,KAAK,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CAe/D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAMrF"}
@@ -1,8 +1,6 @@
1
- import { GlobalMetadataStateContext } from '@rh-support/react-context';
2
- import { getConfigField, PCM_CONFIG_FIELD_TYPE, PreviousCaseTypes } from '@rh-support/utils';
3
- import { isEqual } from 'lodash';
4
- import { useContext, useEffect, useState } from 'react';
5
- import { useCaseDispatch, useCaseSelector } from '../context/CaseContext';
1
+ import { Env } from '@cee-eng/hydrajs';
2
+ import { useEffect, useState } from 'react';
3
+ import { useCaseDispatch } from '../context/CaseContext';
6
4
  import { setABTestVariation } from '../reducers/CaseReducer';
7
5
  export var ABEnum;
8
6
  (function (ABEnum) {
@@ -15,54 +13,34 @@ export function getVariationByAccountNumber(accountNumber) {
15
13
  }
16
14
  const lastChar = accountNumber.charAt(accountNumber.length - 1);
17
15
  const lastDigit = parseInt(lastChar, 10);
18
- // If lastDigit is not a valid number, default to B
19
16
  if (isNaN(lastDigit)) {
20
17
  return ABEnum.B;
21
18
  }
22
- // Even last digit → Experience A, Odd last digit → Experience B
23
19
  return lastDigit % 2 === 0 ? ABEnum.A : ABEnum.B;
24
20
  }
21
+ function getVariationFromUrl() {
22
+ const isNonProdEnv = Env.getEnvName() !== Env.EnvNames.PROD && Env.getEnvName() !== Env.EnvNames.PROD_BETA;
23
+ if (!isNonProdEnv)
24
+ return null;
25
+ const hashQueryString = window.location.hash.includes('?')
26
+ ? window.location.hash.substring(window.location.hash.indexOf('?'))
27
+ : '';
28
+ const urlParams = new URLSearchParams(hashQueryString || window.location.search);
29
+ const useflow = urlParams.get('useflow');
30
+ if (useflow && (useflow.charAt(0).toLowerCase() === 'a' || useflow.charAt(0).toLowerCase() === 'b')) {
31
+ return useflow.charAt(0).toUpperCase() === 'A' ? ABEnum.A : ABEnum.B;
32
+ }
33
+ return null;
34
+ }
25
35
  export function useAB(options = {}) {
26
- const { globalMetadataState: { pcmConfig, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
27
- const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.A);
36
+ const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.B);
28
37
  const caseDispatch = useCaseDispatch();
29
- const { caseType } = useCaseSelector((state) => ({ caseType: state.caseDetails.caseType }), isEqual);
30
38
  useEffect(() => {
31
- var _a, _b;
32
- let newVariation = ABEnum.B;
33
- // Check URL parameter first - if useflow is specified, force that selection
34
- const hashQueryString = window.location.hash.includes('?')
35
- ? window.location.hash.substring(window.location.hash.indexOf('?'))
36
- : '';
37
- const urlParams = new URLSearchParams(hashQueryString || window.location.search);
38
- const useflowFromUrl = urlParams.get('useflow');
39
- if (useflowFromUrl &&
40
- (((_a = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'a' || ((_b = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'b')) {
41
- newVariation = (useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase()) === 'A' ? ABEnum.A : ABEnum.B;
42
- }
43
- else if (loggedInUsersAccount.data.hasConfirmedStatesideSupport || loggedInUsersAccount.data.secureSupport) {
44
- newVariation = ABEnum.B;
45
- }
46
- else {
47
- const isABTestingEnabled = getConfigField(pcmConfig.data, 'askRedHatAccountsA', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
48
- const userAccountNumber = loggedInUsersAccount.data.accountNumber;
49
- if (isABTestingEnabled && userAccountNumber) {
50
- newVariation = getVariationByAccountNumber(userAccountNumber);
51
- }
52
- else {
53
- newVariation = ABEnum.B;
54
- }
55
- }
56
- // Update local state used to display only the UI conditionally
57
- setTestVariation(newVariation);
58
- // Update global Redux state for analytics (userAgent field) - used in session
59
- setABTestVariation(caseDispatch, newVariation);
60
- // Check if the case type is Idea and update the variation to B (only for UI display) global state is still A
61
- if (caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
62
- setTestVariation(ABEnum.B);
63
- }
64
- // eslint-disable-next-line react-hooks/exhaustive-deps
65
- }, [pcmConfig.data, loggedInUsersAccount.data.accountNumber, caseDispatch, caseType]);
39
+ var _a;
40
+ const variation = (_a = getVariationFromUrl()) !== null && _a !== void 0 ? _a : ABEnum.B;
41
+ setTestVariation(variation);
42
+ setABTestVariation(caseDispatch, variation);
43
+ }, [caseDispatch]);
66
44
  return {
67
45
  variation: testVariation,
68
46
  isVariationA: testVariation === ABEnum.A,
@@ -1 +1 @@
1
- {"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAiB,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAIH,gCAAgC,EAEnC,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG,OAAO,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAC5E,MAAM,MAAM,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,MAAM,WAAW,qBAAqB;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,6BAA6B,EAAE,OAAO,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAA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B,iCAAiC;IAC7D,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,sBAAsB,2BAA2B;IACjD,2BAA2B,gCAAgC;IAC3D,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;CACpC;AAGD,eAAO,MAAM,sBAAsB,GAAI,OAAO,qBAAqB,EAAE,QAAQ,WAAW,KAAG,qBAmD1F,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAC7B,UAAU,kCAAkC,EAC5C,MAAM,uBAAuB,EAC7B,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,2BAA2B,MAAM,EACjC,sBAAqB,EACrB,YAAY,MAAM,EAClB,wBAAwB,OAAO,EAC/B,oBAAoB,gCAAgC,EACpD,cAAc,WAAW,kBAsC5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACpC,UAAU,kCAAkC,EAC5C,OAAO,mBAAmB,EAC1B,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,2BAA2B,MAAM,EACjC,uBAAqB,EACrB,oBAAoB,gCAAgC,EACpD,cAAc,WAAW,kBAqC5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,kCAAkC,EAAE,SAAS,mBAAmB,EAAE,SAE1G,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,kCAAkC,EAAE,SAAS,MAAM,SAE3F,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,kCAAkC,EAAE,gBAAgB,MAAM,EAAE,SAE5G,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,kCAAkC,SAEhF,CAAC"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { search } from '@cee-eng/hydrajs';
11
- import { convertObjToEncodedQueryParams, getSolrParams, getTrimmedCharacters, replaceHighlightingData, } from '@rh-support/utils';
11
+ import { convertObjToEncodedQueryParams, getSolrParams, getTrimmedCharacters, replaceHighlightingData, uniqueRecommendationDocs, } from '@rh-support/utils';
12
12
  import { WATSONX_DESCRIPTION_LIMIT, WATSONX_SUMMARY_LIMIT } from './CaseConstNTypes';
13
13
  export const initialRecommendationsState = {
14
14
  isLoadingRecommendations: false,
@@ -91,13 +91,13 @@ export const fetchRecommendations = (dispatch_1, body_1, max_rows_1, page_size_1
91
91
  const response = yield search.getRecommendationsForCase(body, Object.assign(Object.assign({}, searchParams), { caseNumber,
92
92
  isSecureSupportAccount }), // Need to pass caseNumber and isSecureSupportAccount flag with SOLR parameter which will be used in service worker strategy.
93
93
  abortSignal);
94
- const docs = replaceHighlightingData(response.response.docs, response.highlighting);
94
+ const docs = uniqueRecommendationDocs(replaceHighlightingData(response.response.docs, response.highlighting));
95
95
  dispatch({
96
96
  type: RecommendationsConstants.receivedRecommendations,
97
97
  payload: {
98
98
  allDocs: docs,
99
99
  visibleDocs: docs.slice(0, page_size),
100
- numFound: response.response.numFound,
100
+ numFound: docs.length,
101
101
  },
102
102
  });
103
103
  }
@@ -118,13 +118,13 @@ export const fetchWatsonXRecommendations = (dispatch_1, query_1, max_rows_1, pag
118
118
  description: getTrimmedCharacters(query.description, WATSONX_DESCRIPTION_LIMIT),
119
119
  };
120
120
  const response = yield search.getWatsonXRecommendationsForCase2(convertObjToEncodedQueryParams(Object.assign({ rerank: true }, getSolrParams(max_rows, highlighted_fragment_size, additionalFilters, seQueryFields))), bodyPayload, abortSignal);
121
- const docs = replaceHighlightingData(response.response.docs, response.highlighting);
121
+ const docs = uniqueRecommendationDocs(replaceHighlightingData(response.response.docs, response.highlighting));
122
122
  dispatch({
123
123
  type: RecommendationsConstants.receivedRecommendations,
124
124
  payload: {
125
125
  allDocs: docs,
126
126
  visibleDocs: docs.slice(0, page_size),
127
- numFound: response.response.numFound,
127
+ numFound: docs.length,
128
128
  },
129
129
  });
130
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.353",
3
+ "version": "2.6.355",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -53,11 +53,11 @@
53
53
  "@progress/kendo-licensing": "1.3.5",
54
54
  "@progress/kendo-react-pdf": "^5.16.0",
55
55
  "@redux-devtools/extension": "^3.3.0",
56
- "@rh-support/components": "2.5.182",
57
- "@rh-support/react-context": "2.5.276",
56
+ "@rh-support/components": "2.5.223",
57
+ "@rh-support/react-context": "2.5.319",
58
58
  "@rh-support/types": "2.0.26",
59
- "@rh-support/user-permissions": "2.5.128",
60
- "@rh-support/utils": "2.5.92",
59
+ "@rh-support/user-permissions": "2.5.170",
60
+ "@rh-support/utils": "2.5.149",
61
61
  "@types/react-redux": "^7.1.33",
62
62
  "@types/redux": "^3.6.0",
63
63
  "date-fns": "3.6.0",
@@ -127,5 +127,5 @@
127
127
  "defaults and supports es6-module",
128
128
  "maintained node versions"
129
129
  ],
130
- "gitHead": "901ab574cf5530464bcbc26b62471c18cd2246d9"
130
+ "gitHead": "91484dc6ea9833f72f85919ee4da022cba93d3c8"
131
131
  }