@rh-support/troubleshoot 2.6.55 → 2.6.58

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 (24) hide show
  1. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +4 -4
  3. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +5 -3
  5. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +1 -1
  6. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
  7. package/lib/esm/components/Recommendations/AsideResults.js +1 -1
  8. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +1 -1
  9. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -1
  10. package/lib/esm/components/TroubleshootSection/AskRedHat.js +53 -4
  11. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  12. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +11 -2
  13. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +1 -1
  14. package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
  15. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  16. package/lib/esm/components/wizardLayout/WizardMain.js +40 -30
  17. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +1 -0
  18. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  19. package/lib/esm/components/wizardLayout/WizardNavigation.js +8 -1
  20. package/lib/esm/css/AskRedHat.css +8 -0
  21. package/lib/esm/scss/_main.scss +1 -1
  22. package/lib/esm/utils/caseDetailsCacheUtils.d.ts.map +1 -1
  23. package/lib/esm/utils/caseDetailsCacheUtils.js +1 -0
  24. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA6Y7C"}
1
+ {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAgZ7C"}
@@ -194,18 +194,18 @@ export function CaseDetailsAside(props) {
194
194
  React.createElement("div", { className: "case-detail-collapse-panel" },
195
195
  React.createElement("p", { className: "case-detail-collapse-label" },
196
196
  React.createElement(Trans, null, "Collapse")),
197
- React.createElement(OpenDrawerRightIcon, { className: "pf-v6-u-ml-auto" })))) : (React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-column sidebar-section-collapsed" },
197
+ React.createElement(OpenDrawerRightIcon, { className: "pf-v6-u-ml-auto" })))) : (React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-column sidebar-section-collapsed pf-v6-u-align-items-center pf-v6-u-justify-content-center" },
198
198
  React.createElement(Tooltip, { content: t('Expand sidebar'), position: "left" },
199
199
  React.createElement("div", { className: "case-detail-collapse-panel pf-v6-u-mb-xs" },
200
200
  React.createElement(OpenDrawerRightIcon, { className: "mirrored" }))),
201
201
  canSeeToggleCustomerView && (React.createElement(Tooltip, { content: viewAsCustomer ? t('External view') : t('Internal view'), position: "left" },
202
- React.createElement(Button, { icon: React.createElement(Icon, { size: "md", className: viewAsCustomer ? 'blueLock' : 'greyLock' },
202
+ React.createElement(Button, { icon: React.createElement(Icon, { size: "lg", className: `${viewAsCustomer ? 'blueLock' : 'greyLock'} pf-v6-u-p-sm` },
203
203
  React.createElement(LockIcon, null)), variant: "link", onClick: () => setSectionToScollRef(toggleCustomerViewRef), className: "sidebar-section-toggle-btn", "aria-label": viewAsCustomer ? t('External view') : t('Internal view') }))),
204
204
  !isLoadingRecommendations && allDocs.length > 0 && (React.createElement(Tooltip, { content: t('Top recommendations'), position: "left" },
205
- React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
205
+ React.createElement(Button, { icon: React.createElement(Icon, { className: "pf-v6-u-p-sm", size: "lg" },
206
206
  React.createElement(ListIcon, null)), variant: "link", onClick: () => setSectionToScollRef(topSolutionsRef), className: "sidebar-section-toggle-btn", "aria-label": t('Top recommendations') }))),
207
207
  !caseEscalations.isFetching && (canCreateICE || (canCreateRME && isCreateRMEVisible)) && (React.createElement(Tooltip, { content: t('Request an escalation'), position: "left" },
208
- React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
208
+ React.createElement(Button, { icon: React.createElement(Icon, { className: "pf-v6-u-p-sm", size: "lg" },
209
209
  React.createElement(TrendUpIcon, null)), variant: "link", className: "sidebar-section-toggle-btn", onClick: () => setSectionToScollRef(createEscalationRef), "aria-label": t('Request an escalation') })))))),
210
210
  React.createElement("pfe-collapse-panel", { className: "sidebar-content", "pfe-animation": "false", id: "case-details-aside-content", ref: caseDetailsAsidePanelRef },
211
211
  React.createElement("div", { className: "grid-aside-content" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAwE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAihBxB,CAAC"}
1
+ {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAwE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAshBxB,CAAC"}
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
19
19
  return t;
20
20
  };
21
21
  import { search } from '@cee-eng/hydrajs';
22
- import { Button, Card, CardBody, CardExpandableContent, CardHeader, Modal, ModalFooter, ModalVariant, } from '@patternfly/react-core';
22
+ import { Button, Card, CardBody, CardExpandableContent, CardHeader, Label, Modal, ModalFooter, ModalVariant, } from '@patternfly/react-core';
23
23
  import { PaginatedList, ToastNotification } from '@rh-support/components';
24
24
  import { useGlobalStateContext } from '@rh-support/react-context';
25
25
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -311,8 +311,10 @@ export const CaseSolutions = forwardRef((props, ref) => {
311
311
  ] })))))),
312
312
  pinnedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: pinnedOpen },
313
313
  React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: () => setPinnedOpen((pre) => !pre) },
314
- React.createElement("span", null, canLinkUnlink ? (React.createElement(Trans, null, "Pinned by customer")) : (React.createElement(Trans, null, "My pinned recommendations"))),
315
- React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm" }, pinnedRecommendations.length)),
314
+ React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
315
+ React.createElement("span", null, canLinkUnlink ? (React.createElement(Trans, null, "Pinned by customer")) : (React.createElement(Trans, null, "My pinned recommendations"))),
316
+ React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm", style: { lineHeight: '18px' } },
317
+ React.createElement(Label, null, pinnedRecommendations.length)))),
316
318
  React.createElement(CardExpandableContent, null,
317
319
  React.createElement(CardBody, null, !hasPin ? (!canLinkUnlink ? (React.createElement(Trans, null, "When you save a recommended article or solution, you'll see it here. Saved items display only in this case and are not saved for later.")) : (React.createElement(React.Fragment, null))) : (React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: pinnedRecommendations.map((rec, index) => canLinkUnlink
318
320
  ? renderPinnedByCustomerRedhatterView(rec, index, 'pinned-recommendations')
@@ -24,7 +24,7 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
24
24
  // ESS RS Aside Section Body
25
25
  const ESSRemoteSessionSectionBody = (React.createElement(Card, { className: "card-support escalations", ref: ref },
26
26
  React.createElement(CardHeader, null,
27
- React.createElement("h3", { className: "card-heading case-detail-panel-card-heading pf-v6-u-display-flex pf-v6-u-justify-content-space-between" },
27
+ React.createElement("h3", { className: "card-heading case-detail-panel-card-heading pf-v6-u-display-flex pf-v6-u-justify-content-space-between pf-v6-u-align-items-center" },
28
28
  t('Remote session request'),
29
29
  React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
30
30
  React.createElement(InfoCircleIcon, null)))),
@@ -24,7 +24,7 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
24
24
  // RSA Aside Section Body
25
25
  const RemoteSessionAgreementSectionBody = (React.createElement(Card, { className: "card-support escalations", ref: ref },
26
26
  React.createElement(CardHeader, null,
27
- React.createElement("h3", { className: "card-heading pf-v6-u-display-flex pf-v6-u-justify-content-space-between case-detail-panel-card-heading" },
27
+ React.createElement("h3", { className: "card-heading pf-v6-u-display-flex pf-v6-u-justify-content-space-between case-detail-panel-card-heading pf-v6-u-align-items-center" },
28
28
  t('Remote session request'),
29
29
  React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
30
30
  React.createElement(InfoCircleIcon, null)))),
@@ -131,7 +131,7 @@ export function AsideResults(props) {
131
131
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
132
132
  if (!canShowSideRecommendations())
133
133
  return React.createElement(React.Fragment, null);
134
- return (React.createElement(Card, { className: "pf-v6-u-mt-lg pf-v6-u-mb-0" },
134
+ return (React.createElement(Card, { className: "pf-v6-u-mb-0" },
135
135
  React.createElement(CardHeader, null,
136
136
  React.createElement("h3", null, isIdea ? React.createElement(Trans, null, "Search recommendations") : React.createElement(Trans, null, "Recommended search results"))),
137
137
  React.createElement(CardBody, null,
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  interface IProps {
3
3
  onChatWithAIClick?: () => void;
4
4
  }
5
- export declare const AskRedHat: React.FC<IProps>;
5
+ export declare const AskRedHat: ({ onChatWithAIClick }: IProps) => React.JSX.Element;
6
6
  export {};
7
7
  //# sourceMappingURL=AskRedHat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAe5D,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAsVtC,CAAC"}
1
+ {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAgC5D,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,0BAA2B,MAAM,sBAuZtD,CAAC"}
@@ -7,24 +7,39 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Env } from '@cee-eng/hydrajs';
10
+ import { Env, pcm } from '@cee-eng/hydrajs';
11
11
  import { sendRHDirectMessageFeedback } from '@ifd-ui/ask-redhat-core';
12
12
  import { Button, Card, CardBody, CardHeader, Content, ContentVariants, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateVariant, Icon, Modal, ModalVariant, Skeleton, Spinner, } from '@patternfly/react-core';
13
13
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
+ import { useFetch } from '@rh-support/components';
14
15
  import isEqual from 'lodash/isEqual';
15
16
  import React, { useContext, useRef, useState } from 'react';
16
17
  import { MODAL_MESSAGES, QUICK_RESPONSES, TOOLTIP_MESSAGES } from '../../constants/askRedHatMessages';
17
18
  import { useAIResponseState } from '../../context/AIResponseContext';
18
19
  import { useCaseSelector } from '../../context/CaseContext';
19
20
  import { RouteContext } from '../../context/RouteContext';
21
+ import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
20
22
  import { useARHResponse } from '../../hooks/useARHResponse';
21
23
  import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
22
24
  import { appSourceId_ARH } from '../../reducers/CaseConstNTypes';
25
+ import { createOrUpdateSessionResources } from '../../reducers/SessionRestoreReducer';
23
26
  import { CollapseIcon } from './icons/CollapseIcon';
24
27
  import { StarIcon } from './icons/StarIcon';
25
28
  import ResponseActions from './ResponseActions';
26
29
  import UserFeedback from './UserFeedback';
27
30
  import UserFeedbackComplete from './UserFeedbackComplete';
31
+ const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
32
+ const getSessResFromARHSource = (source, visibilityStatus, rank = 1) => ({
33
+ visibilityStatus,
34
+ resourceEntityId: source.id,
35
+ url: source.link || source.url,
36
+ rank,
37
+ });
38
+ const getSessResFromAISources = (sources, visibilityStatus) => {
39
+ if (!sources || sources.length === 0)
40
+ return [];
41
+ return sources.map((source, index) => getSessResFromARHSource(source, visibilityStatus, index + 1));
42
+ };
28
43
  export const AskRedHat = ({ onChatWithAIClick }) => {
29
44
  var _a, _b, _c;
30
45
  const [isExpanded, setIsExpanded] = useState(false);
@@ -36,6 +51,8 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
36
51
  const aiResponseState = useAIResponseState();
37
52
  const contentRef = useRef(null);
38
53
  const { routeState: { isCaseCreate, activeSection }, } = useContext(RouteContext);
54
+ const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
55
+ const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
39
56
  const { product, version, summary, issue, caseType } = useCaseSelector((state) => ({
40
57
  product: state.caseDetails.product,
41
58
  version: state.caseDetails.version,
@@ -43,6 +60,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
43
60
  issue: state.caseDetails.issue,
44
61
  caseType: state.caseDetails.caseType,
45
62
  }), isEqual);
63
+ const { request: updateSessionOrigin } = useFetch(pcm.preCase.session.updateSessionOrigin);
46
64
  const config = {
47
65
  appSourceId: appSourceId_ARH,
48
66
  authToken: (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.getEncodedToken()) !== null && _b !== void 0 ? _b : '',
@@ -62,9 +80,40 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
62
80
  if (isExpanded && contentRef.current) {
63
81
  contentRef.current.scrollTop = 0;
64
82
  }
83
+ if (!isExpanded) {
84
+ const payload = JSON.stringify({
85
+ product,
86
+ version,
87
+ summary,
88
+ issue,
89
+ });
90
+ const sessionResources = getSessResFromAISources(sources || [], SessionResourceVisibility.PRESENTED);
91
+ createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.ASK_RED_HAT, sessionResources, payload);
92
+ }
65
93
  setIsExpanded((prev) => !prev);
66
94
  };
67
- const handleChatWithAIClick = () => onChatWithAIClick === null || onChatWithAIClick === void 0 ? void 0 : onChatWithAIClick();
95
+ const handleChatWithAIClick = () => __awaiter(void 0, void 0, void 0, function* () {
96
+ var _a;
97
+ onChatWithAIClick === null || onChatWithAIClick === void 0 ? void 0 : onChatWithAIClick();
98
+ if (updateSessionOrigin) {
99
+ yield updateSessionOrigin(activeSessionId, {
100
+ id: (_a = sessionResourceTracking[SessionResourceSource.ASK_RED_HAT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId,
101
+ aiChatStarted: true,
102
+ });
103
+ }
104
+ });
105
+ const handleSourceClick = (source, index) => () => {
106
+ if (!source || !activeSessionId)
107
+ return;
108
+ const payload = JSON.stringify({
109
+ product,
110
+ version,
111
+ summary,
112
+ issue,
113
+ });
114
+ const sessionResource = getSessResFromARHSource(source, SessionResourceVisibility.VISITED, index + 1);
115
+ createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.ASK_RED_HAT, [sessionResource], payload);
116
+ };
68
117
  const aiResponse = aiResponseState.aiResponse;
69
118
  const messageId = aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.messageId;
70
119
  const conversationId = aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.conversationId;
@@ -72,7 +121,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
72
121
  const answer = aiResponseState.isStreaming && aiResponseState.accumulatedResponse
73
122
  ? aiResponseState.accumulatedResponse
74
123
  : (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.answer) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.content) || 'No AI response available yet.';
75
- const sources = (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.sources) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.references) || [];
124
+ const sources = React.useMemo(() => (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.sources) || (aiResponse === null || aiResponse === void 0 ? void 0 : aiResponse.references) || [], [aiResponse]);
76
125
  const sourcesCount = sources.length || 0;
77
126
  // Show loading only when streaming has started but no content received yet
78
127
  const isLoading = aiResponseState.isStreaming && aiResponseState.accumulatedResponse === '';
@@ -174,7 +223,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
174
223
  React.createElement("div", { className: "ask-redhat-cards" }, sources.map((source, index) => (React.createElement(Card, { className: "ask-redhat-card", key: index },
175
224
  React.createElement(CardHeader, null,
176
225
  React.createElement("h3", { className: "ask-redhat-card-title" },
177
- React.createElement("a", { href: source.link, target: "_blank", rel: "noopener noreferrer" }, source.title))),
226
+ React.createElement("a", { href: source.link, target: "_blank", rel: "noopener noreferrer", onClick: handleSourceClick(source, index) }, source.title))),
178
227
  React.createElement(CardBody, null,
179
228
  React.createElement("p", null, source.snippet)))))))),
180
229
  React.createElement("div", { className: "response-actions-wrapper" },
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAUrD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAc1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAUD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAgLzC;kBAhLQ,mBAAmB;;;AAmL5B,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAUrD,OAAO,KAA6B,MAAM,OAAO,CAAC;AAclD,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAUD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAuLzC;kBAvLQ,mBAAmB;;;AA0L5B,eAAe,mBAAmB,CAAC"}
@@ -16,7 +16,7 @@ import { ErrorBoundary, LoadingDots } from '@rh-support/components';
16
16
  import { PreviousCaseTypes } from '@rh-support/utils';
17
17
  import isEmpty from 'lodash/isEmpty';
18
18
  import isEqual from 'lodash/isEqual';
19
- import React, { useContext } from 'react';
19
+ import React, { useContext, useRef } from 'react';
20
20
  import { Trans, useTranslation } from 'react-i18next';
21
21
  import { useAIResponseState } from '../../context/AIResponseContext';
22
22
  import { useCaseSelector } from '../../context/CaseContext';
@@ -40,6 +40,7 @@ function TroubleshootSection(props) {
40
40
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
41
  const { t } = useTranslation();
42
42
  const { aiServicesAvailable, isAIChatMode, setIsAIChatMode, onChatWithAIClick } = props;
43
+ const refetchControlReady = useRef(null);
43
44
  const { topContentState: { topContent }, } = useContext(TCStateContext);
44
45
  const { routeState: { isCaseCreate }, } = useContext(RouteContext);
45
46
  const aiResponseState = useAIResponseState();
@@ -58,7 +59,6 @@ function TroubleshootSection(props) {
58
59
  const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
59
60
  const shouldShowARHUI = () => {
60
61
  // Check if the case type is allowed (not in the excluded list)
61
- // test
62
62
  const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseType !== null && caseType !== void 0 ? caseType : '');
63
63
  // Check if user is not a secure support or confirmed stateside support user
64
64
  const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
@@ -67,8 +67,10 @@ function TroubleshootSection(props) {
67
67
  return isCaseTypeAllowed && isNotSecureOrStatesideUser && isAIServicesAvailable;
68
68
  };
69
69
  const handleInitialized = (success, error) => {
70
+ var _a;
70
71
  if (success) {
71
72
  console.log('Chat initialized successfully');
73
+ (_a = refetchControlReady.current) === null || _a === void 0 ? void 0 : _a.refetch();
72
74
  }
73
75
  else {
74
76
  console.error('Chat initialization failed:', error);
@@ -119,6 +121,13 @@ function TroubleshootSection(props) {
119
121
  },
120
122
  },
121
123
  onInitialized: handleInitialized,
124
+ onUnauthenticatedLogin: () => {
125
+ var _a, _b;
126
+ (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.login) === null || _b === void 0 ? void 0 : _b.call(_a);
127
+ },
128
+ onRefetchControlReady: (refetchControl) => {
129
+ refetchControlReady.current = refetchControl;
130
+ },
122
131
  };
123
132
  const handleChatWithAIClick = () => {
124
133
  setIsAIChatMode(true);
@@ -146,7 +146,7 @@ function WidgetFileUploader(props) {
146
146
  }
147
147
  }
148
148
  });
149
- return (React.createElement(Card, { id: "file-uploader-card", className: "file-diag pf-v6-u-mb-lg", onPaste: handlePaste },
149
+ return (React.createElement(Card, { id: "file-uploader-card", className: "file-diag pf-v6-u-mb-md", onPaste: handlePaste },
150
150
  React.createElement(CardHeader, { "aria-label": t('File uploader') },
151
151
  React.createElement("h3", { id: "file-uploader-title" }, props.isIdea || props.isSecureSupport ? (React.createElement(Trans, null, "File uploader")) : (React.createElement(Trans, null, "Upload a file for Red Hat to analyze")))),
152
152
  React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body" },
@@ -39,14 +39,14 @@ function WizardAside(props) {
39
39
  React.createElement("section", { className: "grid-aside-content" },
40
40
  canUseSessionManagement && !isCreatingCase && activeSection !== AppRouteSections.SUBMIT_CASE && (React.createElement(SessionRestore, { routeProps: props.routeProps })),
41
41
  canShowFileUploadWidget() && React.createElement(InsightsResults, null),
42
- canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v6-u-mb-lg" }),
42
+ canShowFileUploadWidget() && React.createElement(FileDiag, null),
43
43
  activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
44
44
  !isCveModalOpened && React.createElement(CveSidebar, null),
45
45
  activeSection === AppRouteSections.RESOURCES && React.createElement(CveSidebar, null),
46
46
  canShowEARuleWidget && React.createElement(EARuleWidget, null),
47
- !(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-lg pf-v6-u-mt-0" })),
47
+ !(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-md" })),
48
48
  canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
49
- React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-lg pf-v6-u-mt-0" }))));
49
+ React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-md" }))));
50
50
  }
51
51
  WizardAside.defaultProps = defaultProps;
52
52
  export default WizardAside;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE3G,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAS9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,eAAO,MAAM,iBAAiB,aAAc,MAAM,KAAG,MAEpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,kBAAmB,MAAM,YAAY,MAAM,QAAQ,MAAM,KAAG,MAqB9F,CAAC;AAGF,eAAO,MAAM,kBAAkB,kBACZ,MAAM,WACZ,MAAM,GAAG,SAAS,WAClB,MAAM,GAAG,SAAS,WAClB,MAAM,GAAG,SAAS,SACpB,MAAM,GAAG,SAAS,YACf,MAAM,QACV,MAAM,KACb,MAwCF,CAAC;AACF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAyVhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE3G,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAW9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcpF,eAAO,MAAM,iBAAiB,aAAc,MAAM,KAAG,MAEpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,kBAAmB,MAAM,YAAY,MAAM,QAAQ,MAAM,KAAG,MAqB9F,CAAC;AAGF,eAAO,MAAM,kBAAkB,kBACZ,MAAM,WACZ,MAAM,GAAG,SAAS,WAClB,MAAM,GAAG,SAAS,WAClB,MAAM,GAAG,SAAS,SACpB,MAAM,GAAG,SAAS,YACf,MAAM,QACV,MAAM,KACb,MAwCF,CAAC;AACF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAmWhC;AACD,eAAe,UAAU,CAAC"}
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
19
19
  return t;
20
20
  };
21
21
  import { Env } from '@cee-eng/hydrajs';
22
- import { getRHDirectStatusCheck } from '@ifd-ui/ask-redhat-core';
22
+ import { getRHDirectHealthCheck, getRHDirectStatusCheck, } from '@ifd-ui/ask-redhat-core';
23
23
  import { Wizard, WizardNav, WizardNavItem, WizardStep, } from '@patternfly/react-core';
24
24
  import { LoadingIndicator } from '@rh-support/components';
25
25
  import isEqual from 'lodash/isEqual';
@@ -29,12 +29,15 @@ import { Route } from 'react-router-dom';
29
29
  import { useCaseSelector } from '../../context/CaseContext';
30
30
  import { RecommendationDispatchContext } from '../../context/RecommendationContext';
31
31
  import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
32
+ import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
32
33
  import { useARHResponse } from '../../hooks/useARHResponse';
33
34
  import { useWizard } from '../../hooks/useWizard';
34
35
  import { appSourceId_ARH, excludedCaseTypesforARH } from '../../reducers/CaseConstNTypes';
36
+ import { getSessionDetailsFromCase } from '../../reducers/CaseHelpers';
35
37
  import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
36
38
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
37
39
  import { setActiveSectionChanged, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
40
+ import { updateSession } from '../../reducers/SessionRestoreReducer';
38
41
  import RouteUtils from '../../utils/routeUtils';
39
42
  import SubmitCase from '../SubmitCase/SubmitCase';
40
43
  import MainSection from './MainSection';
@@ -88,13 +91,12 @@ function WizardMain(props) {
88
91
  const [showRestFlag, setShowRestFlag] = useState(false);
89
92
  const [aiServicesAvailable, setAIServicesAvailable] = useState(false); // default to false until services are confirmed available
90
93
  const recommendationDispatch = useContext(RecommendationDispatchContext);
91
- const { isCreatingCase, product, version, summary, issue, caseType } = useCaseSelector((state) => ({
94
+ const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
95
+ const { sessionRestore } = useContext(SessionRestoreStateContext);
96
+ const { isCreatingCase, caseDetails, selectedNotificationContacts } = useCaseSelector((state) => ({
92
97
  isCreatingCase: state.isCreatingCase,
93
- product: state.caseDetails.product,
94
- version: state.caseDetails.version,
95
- summary: state.caseDetails.summary,
96
- issue: state.caseDetails.issue,
97
- caseType: state.caseDetails.caseType,
98
+ caseDetails: state.caseDetails,
99
+ selectedNotificationContacts: state.selectedNotificationContacts,
98
100
  }), isEqual);
99
101
  const { routeState: { isCaseCreate, activeSection }, } = useContext(RouteContext);
100
102
  const config = {
@@ -105,11 +107,11 @@ function WizardMain(props) {
105
107
  };
106
108
  const { fetchARHResponse } = useARHResponse({
107
109
  activeSection,
108
- product,
109
- version,
110
- summary,
111
- issue,
112
- caseType,
110
+ product: caseDetails.product,
111
+ version: caseDetails.version,
112
+ summary: caseDetails.summary,
113
+ issue: caseDetails.issue,
114
+ caseType: caseDetails.caseType,
113
115
  config,
114
116
  });
115
117
  const isTroubleshootSection = activeSection === AppRouteSections.TROUBLESHOOT;
@@ -124,10 +126,10 @@ function WizardMain(props) {
124
126
  const isBackButtonClickedRef = useRef(false);
125
127
  const resultsRowRef = useRef(null);
126
128
  const previousARHFieldsRef = useRef({
127
- product: product,
128
- version: version,
129
- summary: summary,
130
- issue: issue,
129
+ product: caseDetails.product,
130
+ version: caseDetails.version,
131
+ summary: caseDetails.summary,
132
+ issue: caseDetails.issue,
131
133
  });
132
134
  const handleChatWithAIClick = () => {
133
135
  props.setIsAIChatMode(true);
@@ -155,7 +157,7 @@ function WizardMain(props) {
155
157
  // Check if the current section is relevant for AI services
156
158
  const isRelevantSection = isTroubleshootSection || isSummarizeSection || isResourcesSection;
157
159
  // Check if the case type is allowed (not in the excluded list)
158
- const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseType || '');
160
+ const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseDetails.caseType || '');
159
161
  // Check if user is not a secure support or confirmed stateside support user
160
162
  const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
161
163
  // Check if the ARH fields have changed
@@ -170,20 +172,20 @@ function WizardMain(props) {
170
172
  };
171
173
  // Check if any of the ARH-relevant fields have changed
172
174
  const haveARHFieldsChanged = React.useMemo(() => {
173
- const hasChanged = previousARHFieldsRef.current.product !== product ||
174
- previousARHFieldsRef.current.version !== version ||
175
- previousARHFieldsRef.current.summary !== summary ||
176
- previousARHFieldsRef.current.issue !== issue;
175
+ const hasChanged = previousARHFieldsRef.current.product !== caseDetails.product ||
176
+ previousARHFieldsRef.current.version !== caseDetails.version ||
177
+ previousARHFieldsRef.current.summary !== caseDetails.summary ||
178
+ previousARHFieldsRef.current.issue !== caseDetails.issue;
177
179
  if (hasChanged) {
178
180
  previousARHFieldsRef.current = {
179
- product,
180
- version,
181
- summary,
182
- issue,
181
+ product: caseDetails.product,
182
+ version: caseDetails.version,
183
+ summary: caseDetails.summary,
184
+ issue: caseDetails.issue,
183
185
  };
184
186
  }
185
187
  return hasChanged;
186
- }, [product, version, summary, issue]);
188
+ }, [caseDetails.product, caseDetails.version, caseDetails.summary, caseDetails.issue]);
187
189
  useEffect(() => {
188
190
  if (!activeSection) {
189
191
  return;
@@ -206,6 +208,7 @@ function WizardMain(props) {
206
208
  appEnv: Env.getEnvName(),
207
209
  };
208
210
  try {
211
+ yield getRHDirectHealthCheck(config);
209
212
  yield getRHDirectStatusCheck(config);
210
213
  setAIServicesAvailable(true);
211
214
  }
@@ -218,7 +221,7 @@ function WizardMain(props) {
218
221
  // eslint-disable-next-line react-hooks/exhaustive-deps
219
222
  }, [
220
223
  activeSection,
221
- caseType,
224
+ caseDetails.caseType,
222
225
  isCaseCreate,
223
226
  aiServicesAvailable,
224
227
  props.isSecureSupport,
@@ -268,9 +271,16 @@ function WizardMain(props) {
268
271
  isBackButtonClickedRef.current = false;
269
272
  setIsNextButtonClicked(false);
270
273
  };
271
- const handleReturnToCaseCreation = () => {
274
+ const handleReturnToCaseCreation = () => __awaiter(this, void 0, void 0, function* () {
272
275
  props.setIsAIChatMode(false);
273
- };
276
+ if (sessionRestore.activeSessionId) {
277
+ const sessionDetails = getSessionDetailsFromCase(caseDetails, selectedNotificationContacts);
278
+ const newSession = {
279
+ returnToCase: true,
280
+ };
281
+ yield updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, sessionDetails, newSession);
282
+ }
283
+ });
274
284
  const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
275
285
  return (React.createElement(WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: activeStep.id === step.id, isDisabled: !step.canJumpTo, stepIndex: step.index, onClick: () => goToStepByIndex(step.index) }));
276
286
  })));
@@ -296,7 +306,7 @@ function WizardMain(props) {
296
306
  isBackButtonClickedRef.current = true;
297
307
  goToPrevStep({});
298
308
  focusWizardMainPanel();
299
- }, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel, isAIChatMode: props.isAIChatMode, onReturnToCaseCreation: handleReturnToCaseCreation }));
309
+ }, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel, isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onReturnToCaseCreation: handleReturnToCaseCreation }));
300
310
  };
301
311
  const steps = getStepsSequece(showRestFlag);
302
312
  const wizardSteps = steps.map((step) => {
@@ -17,6 +17,7 @@ interface IProps {
17
17
  resultsRowRef?: any;
18
18
  setUserScrolledLabel: (value: React.SetStateAction<boolean>) => void;
19
19
  isAIChatMode?: boolean;
20
+ setIsAIChatMode?: (value: boolean) => void;
20
21
  onReturnToCaseCreation?: () => void;
21
22
  }
22
23
  declare function WizardNavigation(props: IProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,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,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,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,KAAK,CAAC,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;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAsVtC;kBAtVQ,gBAAgB;;;AAwVzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,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,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,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,KAAK,CAAC,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;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA6VtC;kBA7VQ,gBAAgB;;;AA+VzB,eAAe,gBAAgB,CAAC"}
@@ -78,6 +78,13 @@ function WizardNavigation(props) {
78
78
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
79
  }, [previousStep === null || previousStep === void 0 ? void 0 : previousStep.id, props.activeStep.id]);
80
80
  const [hasUserScrolled, setHasUserScrolled] = useState(false);
81
+ useEffect(() => {
82
+ var _a;
83
+ if (activeSection !== AppRouteSections.RESOURCES && props.isAIChatMode) {
84
+ (_a = props.setIsAIChatMode) === null || _a === void 0 ? void 0 : _a.call(props, false);
85
+ }
86
+ // eslint-disable-next-line react-hooks/exhaustive-deps
87
+ }, [activeSection]);
81
88
  useEffect(() => {
82
89
  if (props.activeStep.id !== (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) ||
83
90
  recommendationState.numFound <= 2) {
@@ -253,7 +260,7 @@ function WizardNavigation(props) {
253
260
  // To handle entitled products
254
261
  return (React.createElement(React.Fragment, null,
255
262
  React.createElement(WizardFooterWrapper, null,
256
- props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (React.createElement(Button, { onClick: props.onReturnToCaseCreation, variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Return to resources'))) : (React.createElement(React.Fragment, null,
263
+ props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (React.createElement(Button, { onClick: props.onReturnToCaseCreation, variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Back to resources'))) : (React.createElement(React.Fragment, null,
257
264
  props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack({}), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
258
265
  React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
259
266
  activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))))),
@@ -375,6 +375,7 @@ body:has(.pf-chatbot--embedded) .pf-v6-c-wizard__main-body:last-child {
375
375
  .ask-redhat-core .pf-chatbot__beta-label .pf-v6-c-label__content {
376
376
  color: #707070 !important;
377
377
  line-height: var(--global-font-line-height-figma-only-body-small, 18px) !important;
378
+ font-weight: 500 !important;
378
379
  }
379
380
 
380
381
  .ask-redhat-core .pf-chatbot__header-container:after {
@@ -384,6 +385,13 @@ body:has(.pf-chatbot--embedded) .pf-v6-c-wizard__main-body:last-child {
384
385
  .ask-redhat-core .pf-chatbot__expand-collapse-button {
385
386
  color: #151515 !important;
386
387
  font-size: var(--global-font-size-body-sm, 12px) !important;
388
+ align-items: center !important;
389
+ }
390
+
391
+ .pf-chatbot__expand-collapse-button .pf-v6-svg {
392
+ width: 16px !important;
393
+ height: 16px !important;
394
+ color: black !important;
387
395
  }
388
396
 
389
397
  .pf-v6-c-button__icon.pf-m-end {
@@ -90,7 +90,7 @@ div.support-grid-case-details.support-case {
90
90
  }
91
91
 
92
92
  #case-details-top-recommendations-pagination-bottom-pagination {
93
- justify-content: flex-start;
93
+ justify-content: space-between;
94
94
  }
95
95
  }
96
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"caseDetailsCacheUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseDetailsCacheUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAStD,eAAO,MAAM,+BAA+B,oBAAoB,CAAC;AACjE,eAAO,MAAM,qBAAqB,oCAEhC,CAAC"}
1
+ {"version":3,"file":"caseDetailsCacheUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseDetailsCacheUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAUtD,eAAO,MAAM,+BAA+B,oBAAoB,CAAC;AACjE,eAAO,MAAM,qBAAqB,oCAEhC,CAAC"}
@@ -4,6 +4,7 @@ import localForageCaseDetails from 'localforage';
4
4
  // if you need a new namespace say may be for troubleshoot package you can create a new cacheutils
5
5
  // with the new namespace. or you can use the same namespace.
6
6
  // packages can decide what namespace they want to create or share an existing namespace
7
+ // test
7
8
  export const CASE_DETAILS_CACHE_STORAGE_NAME = 'support-case-lf';
8
9
  export const CaseDetailsCacheUtils = new CacheUtilsService(localForageCaseDetails, {
9
10
  name: CASE_DETAILS_CACHE_STORAGE_NAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.55",
3
+ "version": "2.6.58",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -25,7 +25,7 @@
25
25
  "lib/**/*"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@cee-eng/hydrajs": "4.18.57",
28
+ "@cee-eng/hydrajs": "4.18.84",
29
29
  "@cee-eng/ui-toolkit": "1.1.8",
30
30
  "@patternfly/patternfly": "6.2.1",
31
31
  "@patternfly/react-core": "6.2.1",
@@ -49,9 +49,9 @@
49
49
  "react-virtualized": "^9.22.5"
50
50
  },
51
51
  "dependencies": {
52
- "@cee-eng/hydrajs": "4.18.57",
52
+ "@cee-eng/hydrajs": "4.18.84",
53
53
  "@cee-eng/ui-toolkit": "1.1.8",
54
- "@ifd-ui/ask-redhat-core": "^0.0.33",
54
+ "@ifd-ui/ask-redhat-core": "^0.0.34",
55
55
  "@patternfly/patternfly": "6.2.1",
56
56
  "@patternfly/react-core": "6.2.1",
57
57
  "@patternfly/react-table": "6.2.1",
@@ -59,11 +59,11 @@
59
59
  "@progress/kendo-licensing": "1.3.5",
60
60
  "@progress/kendo-react-pdf": "^5.16.0",
61
61
  "@redux-devtools/extension": "^3.3.0",
62
- "@rh-support/components": "2.5.45",
63
- "@rh-support/react-context": "2.5.60",
62
+ "@rh-support/components": "2.5.47",
63
+ "@rh-support/react-context": "2.5.62",
64
64
  "@rh-support/types": "2.0.5",
65
- "@rh-support/user-permissions": "2.5.20",
66
- "@rh-support/utils": "2.5.19",
65
+ "@rh-support/user-permissions": "2.5.22",
66
+ "@rh-support/utils": "2.5.21",
67
67
  "@types/react-redux": "^7.1.33",
68
68
  "@types/redux": "^3.6.0",
69
69
  "date-fns": "3.6.0",
@@ -135,5 +135,5 @@
135
135
  "defaults and supports es6-module",
136
136
  "maintained node versions"
137
137
  ],
138
- "gitHead": "496bf698365697ff751a8edf712284454440d6ea"
138
+ "gitHead": "80f5df71ce02c1fa9130373d1f0df60acb24f023"
139
139
  }