@rh-support/troubleshoot 2.5.5 → 2.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAoRnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAkRnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -104,6 +104,8 @@ function OwnerSelector(props) {
104
104
  yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
105
105
  setCaseDetails(caseDispatch, {
106
106
  contactSSOName: newOwner.ssoUsername,
107
+ phoneCountryCode: '',
108
+ phoneAreaCodePrefixLineNumber: '',
107
109
  });
108
110
  const abortSignal = new AbortController().signal;
109
111
  yield setCaseOwner(caseDispatch, {
@@ -131,6 +133,7 @@ function OwnerSelector(props) {
131
133
  setCaseOwner(caseDispatch, null, '');
132
134
  }
133
135
  if (!isEmpty(caseNumber)) {
136
+ // editing a case
134
137
  if (isEmpty(selected[0]) || selected[0].ssoUsername === selectedOwner.data.ssoUsername) {
135
138
  return;
136
139
  }
@@ -139,6 +142,7 @@ function OwnerSelector(props) {
139
142
  yield onCaseOwnerUpdate(selected[0]);
140
143
  }
141
144
  else {
145
+ // openning a case
142
146
  const customerContacts = !isEmpty(selected === null || selected === void 0 ? void 0 : selected[0])
143
147
  ? selected
144
148
  : [
@@ -191,8 +195,6 @@ function OwnerSelector(props) {
191
195
  React.createElement(Trans, null, "Owner"),
192
196
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: ownerComparator, isLocalChange: localOwnerChange, value: selectedOwner.data, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.owner, (v) => v.fullNameCustom) }),
193
197
  React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
194
- showUsersWithSelectedGroupAccess ? (React.createElement(React.Fragment, null,
195
- React.createElement(OwnerTypeaheadDropdown, { id: "get-support-owner", hasClearButton: true, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], isDisabled: selectedCaseGroupUsers.isFetching || isCaseOwnerUpdating || isCasePhoneUpdating, onSelect: onCustomerContactSelect, onClearQuery: onClearQuery, onQueryUpdated: onQueryUpdated, options: ownerDropdownOptions, status: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data) ? 'danger' : undefined }))) : (React.createElement(React.Fragment, null,
196
- React.createElement(CaseContactsSelectorExternal, { loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, placeholder: t(`Search by name or username`), clearButton: true, id: "get-support-owner", name: "get-support-owner", className: "react-select-custom", isUpdating: isCaseOwnerUpdating, isInvalid: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data), isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating })))));
198
+ showUsersWithSelectedGroupAccess ? (React.createElement(OwnerTypeaheadDropdown, { id: "get-support-owner", hasClearButton: true, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], isDisabled: selectedCaseGroupUsers.isFetching || isCaseOwnerUpdating || isCasePhoneUpdating, onSelect: onCustomerContactSelect, onClearQuery: onClearQuery, onQueryUpdated: onQueryUpdated, options: ownerDropdownOptions, status: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data) ? 'danger' : undefined })) : (React.createElement(CaseContactsSelectorExternal, { loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, placeholder: t(`Search by name or username`), clearButton: true, id: "get-support-owner", name: "get-support-owner", className: "react-select-custom", isUpdating: isCaseOwnerUpdating, isInvalid: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data), isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating }))));
197
199
  }
198
200
  export { OwnerSelector };
@@ -22,7 +22,7 @@ const defaultProps = {
22
22
  caseNumber: undefined,
23
23
  };
24
24
  function CaseActionPlan(props) {
25
- const { t, i18n } = useTranslation();
25
+ const { t } = useTranslation();
26
26
  const caseUpdateError = useCaseUpdateErrorMessage();
27
27
  const ability = useContext(AbilityContext);
28
28
  const canUpdateActionPlan = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_ACTION_PLAN_EDIT);
@@ -76,7 +76,7 @@ function CaseActionPlan(props) {
76
76
  React.createElement(Trans, null, "Action plan")),
77
77
  !canUpdateActionPlan ? (React.createElement(CodeBlock, null,
78
78
  React.createElement(CodeBlockCode, { style: {
79
- fontFamily: ['zh', 'ja', 'ko'].includes(i18n.language) ? 'inherit' : undefined,
79
+ fontFamily: isExportingPDF ? 'DejaVu Sans' : undefined,
80
80
  } }, isEmpty(actionPlan) ? t('No action plan to display.') : actionPlan))) : (React.createElement("form", null,
81
81
  React.createElement(TextAreaResizable, { id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 }),
82
82
  !isInternalWithoutSFDCUser && (React.createElement("div", { className: `${isExportingPDF ? 'hide-in-pdf' : ''} push-top-narrow` },
@@ -67,18 +67,18 @@ export default function Description(props) {
67
67
  "\"Bad yes/no argument for ShowPatchLevel parameter\"")),
68
68
  React.createElement(Trans, null, "To expedite your case, include these details:"),
69
69
  React.createElement("p", { className: "pf-v5-u-color-200" },
70
- React.createElement(Trans, null,
71
- "Problem",
72
- React.createElement("br", null),
73
- "Steps you've taken",
74
- React.createElement("br", null),
75
- "Error Messages"))));
70
+ React.createElement(Trans, null, "Problem"),
71
+ React.createElement("br", null),
72
+ React.createElement(Trans, null, "Steps you've taken"),
73
+ React.createElement("br", null),
74
+ " ",
75
+ React.createElement(Trans, null, "Error Messages"))));
76
76
  return (React.createElement(InlineEdit, { labelContent: React.createElement(React.Fragment, null, props.customTitle ? (props.customTitle) : (React.createElement(React.Fragment, null,
77
- React.createElement(Trans, null, "Describe your problem. Include specific actions and error messages."),
77
+ React.createElement(Trans, { i18nKey: "i18nKeyDescribeProblem" }, "Describe your problem. Include specific actions and error messages."),
78
78
  isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
79
79
  React.createElement(Popover, { isVisible: isOpen, shouldClose: handleClose, headerContent: headerPopoverContent, bodyContent: PopoverContent },
80
80
  React.createElement(OutlinedQuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", onClick: handleToggle }))))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
81
- React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) || isEmpty(summary) || isEmpty(product) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) || isEmpty(summary) || isEmpty(product), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t(`The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ? 10 : 4, ref: textAreaRef, onClick: handleTextAreaClick }),
81
+ React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) || isEmpty(summary) || isEmpty(product) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) || isEmpty(summary) || isEmpty(product), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t('i18nKeyPlaceHolderDetail', `The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ? 10 : 4, ref: textAreaRef, onClick: handleTextAreaClick }),
82
82
  React.createElement("p", { className: "form-instructions pf-v5-u-danger-color-100", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT
83
83
  ? `This description exceeds ${CASE_DETAILS_ISSUE_LIMIT} characters. Try shortening it.`
84
84
  : ''}`)));
@@ -283,7 +283,7 @@ function CaseContactSelector(props) {
283
283
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
284
284
  React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
285
285
  React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-watcher" },
286
- React.createElement(Trans, null, "Remove me as a watcher"))))))) : (React.createElement(NonOrgCaseNotifyeesSelector, { id: "open-case-notifications", placeholder: "Enter an email address or username for the person you want to notify", isDisabled: isAssociatesUpdating || customEmailsList.isFetching || isUpdatingCustomEmails, selectedItems: [
286
+ React.createElement(Trans, null, "Remove me as a watcher"))))))) : (React.createElement(NonOrgCaseNotifyeesSelector, { id: "open-case-notifications", placeholder: t('Enter an email address or username for the person you want to notify'), isDisabled: isAssociatesUpdating || customEmailsList.isFetching || isUpdatingCustomEmails, selectedItems: [
287
287
  ...customEmailsList.data,
288
288
  ...filter(selectedNotificationContacts, (c) => !c.isInternal),
289
289
  ], dataTrackingId: "non-org-admin-contact-selector", onChange: onNotifiedUserChange, isChipDisabled: !isCurrentUserCaseCreator && !!caseNumber, accountNumber: accountNumber, groupNumber: groupNumber, typeaheadRef: nonOrgTypeaheadRef, contactSsoUsername: contactSsoUsername })))));
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYpF,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,qBA4YpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYpF,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,qBA8YpD"}
@@ -10,7 +10,7 @@ import isEmpty from 'lodash/isEmpty';
10
10
  import isEqual from 'lodash/isEqual';
11
11
  import map from 'lodash/map';
12
12
  import React, { useContext, useEffect, useRef, useState } from 'react';
13
- import { Trans } from 'react-i18next';
13
+ import { Trans, useTranslation } from 'react-i18next';
14
14
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
15
15
  import { RecommendationDispatchContext, RecommendationStateContext } from '../../context/RecommendationContext';
16
16
  import { RouteContext } from '../../context/RouteContext';
@@ -37,6 +37,7 @@ export default function Recommendations(props) {
37
37
  cveWorkflowRecommendation: state.cveWorkflowRecommendation,
38
38
  }), isEqual);
39
39
  const caseDispatch = useCaseDispatch();
40
+ const { t } = useTranslation();
40
41
  const { routeState: { activeSection }, } = useContext(RouteContext);
41
42
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
42
43
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
@@ -180,10 +181,11 @@ export default function Recommendations(props) {
180
181
  const isCveExist = !isEmpty(find(cveWorkflowRecommendation, (cveW) => (cveW === null || cveW === void 0 ? void 0 : cveW.title) === title));
181
182
  const percentage = getRankPercentage(rerank_score);
182
183
  return (React.createElement(React.Fragment, null,
183
- (percentage >= 80 || isCveExist) && (React.createElement(Label, { color: "green", className: "match-label", icon: React.createElement(StarIcon, null) }, isCveExist ? 'Exact match' : 'Best match')),
184
+ (percentage >= 80 || isCveExist) && (React.createElement(Label, { color: "green", className: "match-label", icon: React.createElement(StarIcon, null) }, isCveExist ? t('Exact match') : t('Best match'))),
184
185
  !isCveExist && (React.createElement(Label, { className: "match-label", color: "purple" },
185
186
  percentage,
186
- "% Match"))));
187
+ "% ",
188
+ t('Match')))));
187
189
  };
188
190
  return (React.createElement(React.Fragment, null,
189
191
  isBTestvariation && (React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) })),
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA+Q9D"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAgR9D"}
@@ -116,7 +116,7 @@ export function useIsSectionValid(sectionName) {
116
116
  hasAlternateCaseIdValidLength);
117
117
  };
118
118
  const isTroubleshootSectionValid = () => {
119
- var _a;
119
+ var _a, _b;
120
120
  if (isBTestvariation) {
121
121
  //if we are in the new experience and user is troubleshoot we give them those validity fields
122
122
  if (!isCaseCreate) {
@@ -129,7 +129,8 @@ export function useIsSectionValid(sectionName) {
129
129
  !isEmpty(product) &&
130
130
  !isEmpty(version) &&
131
131
  !isEmpty(summary) &&
132
- !isEmpty(issue);
132
+ !isEmpty(issue) &&
133
+ isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
133
134
  return isValid;
134
135
  }
135
136
  }
@@ -137,7 +138,7 @@ export function useIsSectionValid(sectionName) {
137
138
  const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
138
139
  return (!recommendationState.isLoadingRecommendations &&
139
140
  isEntitledProductLocal &&
140
- isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult));
141
+ isClusterIDValid(caseState, (_b = allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult));
141
142
  };
142
143
  const isReviewSectionValid = () => {
143
144
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,K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,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAsUtC;kBAtUQ,gBAAgB;;;AAwUzB,eAAe,gBAAgB,CAAC"}
@@ -15,7 +15,7 @@ import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, scrollInto
15
15
  import find from 'lodash/find';
16
16
  import isEmpty from 'lodash/isEmpty';
17
17
  import isEqual from 'lodash/isEqual';
18
- import React, { useContext, useEffect, useState } from 'react';
18
+ import React, { useContext, useEffect, useRef, useState } from 'react';
19
19
  import { useTranslation } from 'react-i18next';
20
20
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
21
21
  import { RecommendationStateContext } from '../../context/RecommendationContext';
@@ -50,6 +50,7 @@ function WizardNavigation(props) {
50
50
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
51
51
  const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
52
52
  const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
53
+ const previousRecommendationTop = useRef(0);
53
54
  const { request: resolveSessionRequest } = useFetch(pcm.preCase.session.resolveSession);
54
55
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
55
56
  const { SessionResourceSource } = pcm.preCase.session;
@@ -89,24 +90,44 @@ function WizardNavigation(props) {
89
90
  // console.log('Intersection ratio:', entry.intersectionRatio);
90
91
  // console.log({ hasUserScrolled });
91
92
  const boundingRect = entry.boundingClientRect;
92
- const isScrollingUp = boundingRect.top > 0;
93
- const isAboveThreshold = entry.intersectionRatio >= 0.6;
93
+ if (props.userClickedNextonRecommendationsValue) {
94
+ if (previousRecommendationTop.current > boundingRect.top ||
95
+ previousRecommendationTop.current === 0) {
96
+ previousRecommendationTop.current = boundingRect.top + 50;
97
+ }
98
+ else {
99
+ props.userClickedNextonRecommendationsFn && props.userClickedNextonRecommendationsFn(false);
100
+ previousRecommendationTop.current = 0;
101
+ }
102
+ }
103
+ const offsetValue = props.userClickedNextonRecommendationsValue
104
+ ? previousRecommendationTop.current
105
+ : 100;
106
+ const isScrollingUp = boundingRect.top > offsetValue;
107
+ const isAboveThreshold = boundingRect.top < 100;
94
108
  isAboveThreshold && props.setUserCanNavigateToTroubleshoot(true);
95
109
  isAboveThreshold && props.setUserSeenRecommendations(true);
110
+ /**
111
+ * This variable indicates whether the recommendations section is fully visible within
112
+ * the viewport.
113
+ */
114
+ const areRecommendationsFullyVisible = entry.isIntersecting && entry.intersectionRatio === 1;
96
115
  // If scrolling up, always use the threshold check
97
- if (isScrollingUp) {
98
- setHasUserScrolled(isAboveThreshold);
99
- props.setUserScrolledLabel(isAboveThreshold);
116
+ if (isScrollingUp || areRecommendationsFullyVisible) {
117
+ setHasUserScrolled(isAboveThreshold || areRecommendationsFullyVisible);
118
+ props.setUserScrolledLabel(isAboveThreshold || areRecommendationsFullyVisible);
119
+ props.userClickedNextonRecommendationsFn && props.userClickedNextonRecommendationsFn(false);
100
120
  return;
101
121
  }
102
122
  // If scrolling down and we hit the threshold, set to true
103
123
  if (isAboveThreshold) {
124
+ setHasUserScrolled(true);
104
125
  props.setUserScrolledLabel(true);
105
126
  props.userClickedNextonRecommendationsFn && props.userClickedNextonRecommendationsFn(true);
106
127
  }
107
128
  }, {
108
129
  root: null,
109
- threshold: [0, 0.6], // Changing threshold value to have its effect on pagination when page size is more than 10.
130
+ threshold: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1], // Changing threshold value to have its effect on pagination when page size is more than 10.
110
131
  rootMargin: '0px',
111
132
  });
112
133
  const resultsRowElement = props.resultsRowRef.current;
@@ -131,6 +152,8 @@ function WizardNavigation(props) {
131
152
  onlyIfNotInViewport: true,
132
153
  offset: 120,
133
154
  });
155
+ setHasUserScrolled(true);
156
+ props.setUserScrolledLabel(true);
134
157
  props.userClickedNextonRecommendationsFn && props.userClickedNextonRecommendationsFn(true);
135
158
  return;
136
159
  }
@@ -71,7 +71,7 @@ export function useWizard(routeProps, props) {
71
71
  alertMessage(),
72
72
  React.createElement(TroubleshootSection, null)))), canJumpTo: isSectionValidFn(AppRouteSections.TROUBLESHOOT || activeSection === AppRouteSections.TROUBLESHOOT) &&
73
73
  (props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) &&
74
- (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isCaseCreate ? t('Continue') : t('Convert to Case') }),
74
+ (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isCaseCreate ? t('Continue') : t('Convert to case') }),
75
75
  [AppRouteSections.DESCRIBE_MORE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_MORE, name: t('Additional information'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.DESCRIBE_MORE, title: React.createElement(React.Fragment, null,
76
76
  t('Case information'),
77
77
  isEmpty(RouteUtils.seBasePath) && isSelectedAccounntSecureSupport && (React.createElement("span", { className: "secured-support" },
@@ -794,6 +794,40 @@ declare const _default: {
794
794
  'or as in your Service Level Agreement (SLA)': string;
795
795
  'View case': string;
796
796
  'Update info': string;
797
+ 'See more options': string;
798
+ 'Describe the impact to you or the business': string;
799
+ 'In what environment are you experiencing this behavior?': string;
800
+ 'How frequently does this behavior occur? Does it occur repeatedly or at certain times?': string;
801
+ 'Review phone number': string;
802
+ 'Please confirm the phone number we have on file is correct.': string;
803
+ 'Confirm phone number': string;
804
+ "I don't know": string;
805
+ 'Customer support': string;
806
+ i18nKeyDescribeProblem: string;
807
+ Resources: string;
808
+ 'Upload a file for Red Hat to analyze': string;
809
+ 'To help us provide the right guidance, upload a sosreport.': string;
810
+ 'How to create sosreport?': string;
811
+ 'Articles recommended by OpenShift AI': string;
812
+ 'Updating recommendations using OpenShift AI': string;
813
+ 'Recommending articles using OpenShift AI': string;
814
+ 'Exact match': string;
815
+ 'Best match': string;
816
+ Match: string;
817
+ 'Additional information': string;
818
+ 'Support articles are matched to the product and version details you selected, not the problem details you entered.': string;
819
+ 'Convert to case': string;
820
+ 'Please provide details about the location, device, software version, etc. where you encounter this issue': string;
821
+ 'Describe the user or financial impact. Tell us about any legal, national, or medical urgency.': string;
822
+ 'Describe when and how often the problem occurs, e.g., daily, after specific actions, at particular times of day, etc.': string;
823
+ i18nKeyPlaceHolderDetail: string;
824
+ 'Example:': string;
825
+ 'To expedite your case, include these details:': string;
826
+ Problem: string;
827
+ 'Error Messages': string;
828
+ "Steps you've taken": string;
829
+ 'Tips for describing your problem': string;
830
+ 'Live search results powered by OpenShift AI': string;
797
831
  };
798
832
  export default _default;
799
833
  //# sourceMappingURL=template-zh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template-zh.d.ts","sourceRoot":"","sources":["../../../src/i18n/template-zh.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAg6BE"}
@@ -426,7 +426,7 @@ export default {
426
426
  'The customer thinks the case is not moving appropriately': '客户认为当前处理的问题没有正当进展',
427
427
  'The customer wants a new resource': '客户需要新的资源',
428
428
  'The issue is more severe than originally thought': '问题实际比最初想象的更严重',
429
- Title: '职位',
429
+ Title: '问题摘要',
430
430
  Email: '电子邮件',
431
431
  Phone: '电话',
432
432
  IRC: 'IRC',
@@ -542,7 +542,7 @@ export default {
542
542
  'Edit your product or version under the details tab below.': '在下面的详细信息标签下编辑您的产品或版本。',
543
543
  'All comments': '全部评论',
544
544
  'Select a filter': '选择过滤器',
545
- 'Search by keyword or case ID': '按关键字或案例 ID 搜索',
545
+ 'Search by keyword or case ID': '按关键字或问题单ID搜索',
546
546
  'Are you sure you want to change this severity to <>': '您确定要将该严重性更改为 <> 吗',
547
547
  'Handpicked by you': '由您挑选',
548
548
  'Pinned by customer': '由客户固定',
@@ -766,7 +766,7 @@ export default {
766
766
  Idea: '想法',
767
767
  'Request a feature or product enhancement': '请求一个功能或产品增强',
768
768
  'Root cause analysis': '根本原因分析',
769
- 'Only for identifying the source of an issue': '仅用于标识问题的源',
769
+ 'Only for identifying the source of an issue': '仅用于识别问题根源',
770
770
  'Describe more': '提供更多信息',
771
771
  'Please enter an elaborate description': '请输入详细描述',
772
772
  'Define the value or impact to you or the business': '定义对您的业务的损失或影响',
@@ -789,7 +789,7 @@ export default {
789
789
  'Case number:': '问题单号:',
790
790
  'Is this contact information correct?': '此联系信息是否正确?',
791
791
  'Troubleshoot this case': '对此问题进行故障排除',
792
- Summarize: '总结',
792
+ Summarize: '概述',
793
793
  'These changes to your phone number affect only this case.': '这些对您电话号码的更改仅影响此案例.',
794
794
  'Please select a support type': '请选择一个支持类型',
795
795
  'Product Recommendations': '产品建议',
@@ -798,4 +798,45 @@ export default {
798
798
  'or as in your Service Level Agreement (SLA)': '或按照您的服务水平协议(SLA)',
799
799
  'View case': '查看问题单',
800
800
  'Update info': '更新信息',
801
+ //Dec 16th PCM-13632 quick fixes - MUST UPDATE LATER WITH APPROPRIATE TRANSLATIONS
802
+ 'See more options': '查看更多选项',
803
+ 'Describe the impact to you or the business': '描述此问题对您或业务的影响',
804
+ 'In what environment are you experiencing this behavior?': '您在什么环境下遇到此问题?',
805
+ 'How frequently does this behavior occur? Does it occur repeatedly or at certain times?': '这个问题发生的频率是多少?它是重复发生还是在特定时间发生?',
806
+ 'Review phone number': '检查电话号码',
807
+ 'Please confirm the phone number we have on file is correct.': '请确认您的电话号码是正确的。',
808
+ 'Confirm phone number': '确认电话号码 ',
809
+ "I don't know": '我不知道',
810
+ 'Customer support': '客户支持',
811
+ i18nKeyDescribeProblem: '描述您的问题。包括具体操作和错误消息。',
812
+ Resources: '资源',
813
+ 'Upload a file for Red Hat to analyze': '向红帽上传文件以进行分析',
814
+ 'To help us provide the right guidance, upload a sosreport.': '为帮助我们尽快解决问题,请上传 sosreport。',
815
+ // 'Describe your problem. Include specific actions and error messages.': '描述您的问题。包括特定的操作和错误消息。',
816
+ 'How to create sosreport?': '如何创建 sosreport?',
817
+ 'Articles recommended by OpenShift AI': 'OpenShift AI 推荐的文章',
818
+ 'Updating recommendations using OpenShift AI': '使用 OpenShift AI 更新建议',
819
+ 'Recommending articles using OpenShift AI': '使用 OpenShift AI 推荐文章',
820
+ 'Exact match': '完全匹配',
821
+ 'Best match': '最佳匹配',
822
+ Match: '匹配',
823
+ 'Additional information': '附加信息',
824
+ 'Support articles are matched to the product and version details you selected, not the problem details you entered.': '支持文章与您选择的产品和版本详情匹配,而不是与您输入的问题详情匹配。',
825
+ 'Convert to case': '转换为问题单',
826
+ 'Please provide details about the location, device, software version, etc. where you encounter this issue': '请提供您遇到此问题的位置、设备、软件版本等信息',
827
+ 'Describe the user or financial impact. Tell us about any legal, national, or medical urgency.': '描述问题对用户或财务的影响。请告诉我们问题是否涉及到任何法律、国家或紧急医疗事件。',
828
+ 'Describe when and how often the problem occurs, e.g., daily, after specific actions, at particular times of day, etc.': '描述问题的发生频率(如每日)、是否在特定操作后发生、是否在每日的特定时间发生,等等。',
829
+ // 'Describe the impact to you or the business': '描述问题对您业务的影响',
830
+ // 'In what environment are you experiencing this behavior?': '您在哪些环境中遇到此行为?',
831
+ // 'How frequently does this behavior occur? Does it occur repeatedly or at certain times?':
832
+ // '此行为发生的频率?是否会反复发生?是否在特定时间发生?',
833
+ i18nKeyPlaceHolderDetail: '您提供的信息越详细,越容易帮助我们为您解决问题。',
834
+ 'Example:': '例如:',
835
+ 'To expedite your case, include these details:': '为了加快您的问题单处理速度,请包括以下详情:',
836
+ Problem: '问题',
837
+ 'Error Messages': '错误信息',
838
+ "Steps you've taken": '您已进行的操作',
839
+ 'Tips for describing your problem': '描述您的问题的建议',
840
+ //B-Variation
841
+ 'Live search results powered by OpenShift AI': 'Openshift AI 提供的实时搜索结果',
801
842
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.5.5",
3
+ "version": "2.5.7",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -40,7 +40,6 @@
40
40
  "marked": "^1.2.4",
41
41
  "qs": "^6.7.0",
42
42
  "react": "18.2.0",
43
- "react-bootstrap-typeahead": "^5.1.4",
44
43
  "react-dom": "18.2.0",
45
44
  "react-dropzone": "^10.2.1",
46
45
  "react-i18next": "^15.0.1",
@@ -59,11 +58,11 @@
59
58
  "@progress/kendo-licensing": "1.3.5",
60
59
  "@progress/kendo-react-pdf": "^5.16.0",
61
60
  "@redux-devtools/extension": "^3.3.0",
62
- "@rh-support/components": "2.5.4",
63
- "@rh-support/react-context": "2.5.4",
61
+ "@rh-support/components": "2.5.6",
62
+ "@rh-support/react-context": "2.5.6",
64
63
  "@rh-support/types": "2.0.5",
65
- "@rh-support/user-permissions": "2.5.1",
66
- "@rh-support/utils": "2.5.1",
64
+ "@rh-support/user-permissions": "2.5.3",
65
+ "@rh-support/utils": "2.5.3",
67
66
  "@types/react-redux": "^7.1.33",
68
67
  "@types/redux": "^3.6.0",
69
68
  "date-fns": "3.6.0",
@@ -80,7 +79,6 @@
80
79
  "marked": "^1.2.4",
81
80
  "qs": "^6.7.0",
82
81
  "react": "18.2.0",
83
- "react-bootstrap-typeahead": "^5.1.4",
84
82
  "react-dom": "18.2.0",
85
83
  "react-dropzone": "^10.2.1",
86
84
  "react-i18next": "^15.0.1",
@@ -109,7 +107,8 @@
109
107
  "@types/redux": "^3.6.0",
110
108
  "faker": "^5.5.3",
111
109
  "jest": "^29.7.0",
112
- "jest-environment-jsdom": "^29.7.0"
110
+ "jest-environment-jsdom": "^29.7.0",
111
+ "react-bootstrap-typeahead": "^5.1.4"
113
112
  },
114
113
  "overrides": {
115
114
  "@types/react": "^18.2.20",
@@ -135,5 +134,5 @@
135
134
  "defaults and supports es6-module",
136
135
  "maintained node versions"
137
136
  ],
138
- "gitHead": "b95b2654a27a2208fcdf880f96643b158723d16a"
137
+ "gitHead": "b6a8eed6fd124d98a0da537fc889513e3e533f06"
139
138
  }