@rh-support/troubleshoot 2.6.23 → 2.6.27

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.
@@ -25,7 +25,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
25
25
  return (React.createElement("div", { className: "ask-redhat" },
26
26
  React.createElement("p", { className: "ask-redhat-title" },
27
27
  React.createElement(StarIcon, { width: 20, height: 20 }),
28
- "AI Insights"),
28
+ "Resolve your issue now with AI insights"),
29
29
  React.createElement("div", { className: "ask-redhat-content-wrapper" },
30
30
  React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
31
31
  React.createElement(Spinner, { size: "lg" }),
@@ -37,7 +37,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
37
37
  return (React.createElement("div", { className: "ask-redhat" },
38
38
  React.createElement("p", { className: "ask-redhat-title" },
39
39
  React.createElement(StarIcon, { width: 20, height: 20 }),
40
- "AI Insights"),
40
+ "Resolve your issue now with AI insights"),
41
41
  React.createElement("div", { className: "ask-redhat-content-wrapper" },
42
42
  React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
43
43
  React.createElement("p", { style: { color: '#d73502', marginBottom: '1rem' } }, "Unable to get AI insights. Please try again later."),
@@ -46,7 +46,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
46
46
  return (React.createElement("div", { className: "ask-redhat" },
47
47
  React.createElement("p", { className: "ask-redhat-title" },
48
48
  React.createElement(StarIcon, { width: 20, height: 20 }),
49
- "AI Insights"),
49
+ "Resolve your issue now with AI insights"),
50
50
  React.createElement("div", { className: "ask-redhat-content-wrapper" },
51
51
  React.createElement("div", { ref: contentRef, className: `ask-redhat-content ${isExpanded ? 'ask-redhat-content--expanded' : ''}` },
52
52
  React.createElement("div", { className: `ask-redhat-content-scrollable ${isExpanded ? 'ask-redhat-content--expanded-scrollable' : ''}` },
@@ -11,6 +11,8 @@ interface IProps {
11
11
  setIsAIChatMode: (value: boolean) => void;
12
12
  onChatWithAIClick?: () => void;
13
13
  aiServicesAvailable: boolean;
14
+ isSecureSupport?: boolean;
15
+ hasConfirmedStatesideSupport?: boolean;
14
16
  }
15
17
  declare function TroubleshootSection(props: IProps): React.JSX.Element;
16
18
  declare namespace TroubleshootSection {
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AASrD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,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;CAChC;AAUD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAiKzC;kBAjKQ,mBAAmB;;;AAoK5B,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,KAAqB,MAAM,OAAO,CAAC;AAY1C,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,qBA2KzC;kBA3KQ,mBAAmB;;;AA8K5B,eAAe,mBAAmB,CAAC"}
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import '@ifd-ui/ask-redhat-core/ask-redhat-core.css';
11
+ import { Env } from '@cee-eng/hydrajs';
11
12
  import { AskRedHatChat, setAuthToken } from '@ifd-ui/ask-redhat-core';
12
13
  import { Button, Card, CardBody, CardHeader, Tooltip } from '@patternfly/react-core';
13
14
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
@@ -53,7 +54,15 @@ function TroubleshootSection(props) {
53
54
  const canShowTopProducts = isEmpty(product);
54
55
  const canShowTopContent = !canShowTopProducts && ((_c = topContent === null || topContent === void 0 ? void 0 : topContent.data) === null || _c === void 0 ? void 0 : _c.length) > 0;
55
56
  const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
56
- const isExcludedCaseType = excludedCaseTypesforARH.includes(caseType !== null && caseType !== void 0 ? caseType : '');
57
+ const shouldShowARHUI = () => {
58
+ // Check if the case type is allowed (not in the excluded list)
59
+ const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseType !== null && caseType !== void 0 ? caseType : '');
60
+ // Check if user is not a secure support or confirmed stateside support user
61
+ const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
62
+ // Check if AI services are available
63
+ const isAIServicesAvailable = aiServicesAvailable;
64
+ return isCaseTypeAllowed && isNotSecureOrStatesideUser && isAIServicesAvailable;
65
+ };
57
66
  const handleInitialized = (success, error) => {
58
67
  if (success) {
59
68
  console.log('Chat initialized successfully');
@@ -88,6 +97,7 @@ function TroubleshootSection(props) {
88
97
  appSourceId: appSourceId_ARH,
89
98
  enableDebugLogging: false,
90
99
  headerTitle: 'AI insights',
100
+ appEnv: Env.getEnvName(),
91
101
  showWelcomeMessage: false,
92
102
  conversationId: ((_e = aiResponseState.aiResponse) === null || _e === void 0 ? void 0 : _e.conversationId) || undefined,
93
103
  enableHeaderMenu: false,
@@ -116,7 +126,7 @@ function TroubleshootSection(props) {
116
126
  React.createElement("div", { className: "fullscreen-chat-footer" },
117
127
  React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-case-btn" }, t('Return to case creation'))))) : (React.createElement(React.Fragment, null,
118
128
  React.createElement("section", null,
119
- !isExcludedCaseType && aiServicesAvailable && (React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick })),
129
+ shouldShowARHUI() && React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick }),
120
130
  !isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
121
131
  React.createElement(LoadingDots, { show: topContent.isFetching }),
122
132
  topContent.data.length === 0 && (React.createElement(Card, { id: "card", className: "pf-v6-u-mb-md" },
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAgBA,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,qBAyNzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAgBA,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,qBA2NzC"}
@@ -33,6 +33,7 @@ import { GlobalTroubleshootEffects } from './GlobalTroubleshootEffects';
33
33
  import WizardAside from './WizardAside';
34
34
  import WizardMain from './WizardMain';
35
35
  export function WizardLayout(props) {
36
+ var _a, _b;
36
37
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
37
38
  const { getMetadata } = useMetadata();
38
39
  const [isAIChatMode, setIsAIChatMode] = useState(false);
@@ -154,7 +155,7 @@ export function WizardLayout(props) {
154
155
  activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseCreationError) })),
155
156
  React.createElement(Grid, { style: { height: '100%' } },
156
157
  React.createElement(GridItem, { sm: 12, md: 12, lg: isAIChatMode ? 12 : 8, xl2: isAIChatMode ? 12 : 8 },
157
- React.createElement(WizardMain, { routeProps: props.routeProps, submitCaseAndNavigate: submitCaseAndNavigate, confirmSupportModal: confirmSupportModal, isAIChatMode: isAIChatMode, setIsAIChatMode: setIsAIChatMode })),
158
+ React.createElement(WizardMain, { routeProps: props.routeProps, submitCaseAndNavigate: submitCaseAndNavigate, confirmSupportModal: confirmSupportModal, isAIChatMode: isAIChatMode, setIsAIChatMode: setIsAIChatMode, isSecureSupport: (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport, hasConfirmedStatesideSupport: (_b = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.hasConfirmedStatesideSupport })),
158
159
  !isAIChatMode && (React.createElement(GridItem, { span: 4, className: "grid-wizard-aside-content" },
159
160
  React.createElement(WizardAside, { isAttachmentUploadModalOpen: confirmationModalType === PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL, routeProps: props.routeProps })))),
160
161
  React.createElement(AlertToastWrapper, { submitCaseAndNavigate: submitCaseAndNavigate, routeProps: props.routeProps })));
@@ -7,6 +7,8 @@ interface IProps {
7
7
  confirmSupportModal: (hasPreferredSecureSupportAccount: boolean) => void;
8
8
  isAIChatMode: boolean;
9
9
  setIsAIChatMode: Dispatch<SetStateAction<boolean>>;
10
+ isSecureSupport?: boolean;
11
+ hasConfirmedStatesideSupport?: boolean;
10
12
  }
11
13
  declare function WizardMain(props: IProps): React.JSX.Element;
12
14
  export default WizardMain;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE3G,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAU9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAyCpF,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;CACtD;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAyShC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAE3G,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAU9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAyCpF,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;CAC1C;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBA+ThC;AACD,eAAe,UAAU,CAAC"}
@@ -18,6 +18,7 @@ var __rest = (this && this.__rest) || function (s, e) {
18
18
  }
19
19
  return t;
20
20
  };
21
+ import { Env } from '@cee-eng/hydrajs';
21
22
  import { askRHDirectAIResponse, getRHDirectStatusCheck, } from '@ifd-ui/ask-redhat-core';
22
23
  import { useWizardContext, Wizard, WizardNav, WizardNavItem, WizardStep } from '@patternfly/react-core';
23
24
  import { LoadingIndicator } from '@rh-support/components';
@@ -99,19 +100,28 @@ function WizardMain(props) {
99
100
  setIsAIChatMode: props.setIsAIChatMode,
100
101
  onChatWithAIClick: handleChatWithAIClick,
101
102
  aiServicesAvailable: aiServicesAvailable,
103
+ isSecureSupport: props.isSecureSupport,
104
+ hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport,
102
105
  });
103
106
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
104
107
  const { t } = useTranslation();
105
108
  useEffect(() => {
106
109
  setActiveSectionChanged(dispatchToRouteReducer, isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT, '');
107
110
  }, [isCaseCreate, dispatchToRouteReducer]);
111
+ const shouldEnableARHServices = () => {
112
+ // Check if the current section is relevant for AI services
113
+ const isRelevantSection = isTroubleshootSection || isSummarizeSection || isResourcesSection;
114
+ // Check if the case type is allowed (not in the excluded list)
115
+ const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseType || '');
116
+ // Check if user is not a secure support or confirmed stateside support user
117
+ const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
118
+ return isRelevantSection && isCaseTypeAllowed && isNotSecureOrStatesideUser;
119
+ };
108
120
  useEffect(() => {
109
121
  if (!activeSection) {
110
122
  return;
111
123
  }
112
- const isRelevantSection = isTroubleshootSection || isSummarizeSection || isResourcesSection;
113
- const isAllowedCaseType = !excludedCaseTypesforARH.includes(caseType || '');
114
- if (!isRelevantSection || !isAllowedCaseType) {
124
+ if (!shouldEnableARHServices()) {
115
125
  if (aiServicesAvailable) {
116
126
  setAIServicesAvailable(false);
117
127
  }
@@ -120,10 +130,12 @@ function WizardMain(props) {
120
130
  // check if ARH services are available
121
131
  if (!aiServicesAvailable) {
122
132
  const checkAIServices = () => __awaiter(this, void 0, void 0, function* () {
123
- var _a, _b;
133
+ var _a, _b, _c;
124
134
  const config = {
125
135
  appSourceId: appSourceId_ARH,
126
136
  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 : '',
137
+ packageVersion: (_c = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _c === void 0 ? void 0 : _c.packageVersion,
138
+ appEnv: Env.getEnvName(),
127
139
  };
128
140
  try {
129
141
  yield getRHDirectStatusCheck(config);
@@ -136,7 +148,14 @@ function WizardMain(props) {
136
148
  checkAIServices();
137
149
  }
138
150
  // eslint-disable-next-line react-hooks/exhaustive-deps
139
- }, [activeSection, caseType, isCaseCreate, aiServicesAvailable]);
151
+ }, [
152
+ activeSection,
153
+ caseType,
154
+ isCaseCreate,
155
+ aiServicesAvailable,
156
+ props.isSecureSupport,
157
+ props.hasConfirmedStatesideSupport,
158
+ ]);
140
159
  const renderSubmitCasePage = () => (React.createElement(MainSection, { section: AppRouteSections.SUBMIT_CASE, title: t('Case has been submitted'), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case."), className: "case-submit-page" },
141
160
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
142
161
  React.createElement(SubmitCase, { routeProps: props.routeProps }))));
@@ -188,37 +207,41 @@ function WizardMain(props) {
188
207
  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) }));
189
208
  })));
190
209
  const CustomFooter = () => {
191
- var _a, _b;
210
+ var _a, _b, _c;
192
211
  const { activeStep, goToNextStep, goToPrevStep, steps, goToStepByIndex } = useWizardContext(); // Correctly using the context
193
212
  const config = {
194
213
  appSourceId: appSourceId_ARH,
195
214
  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 : '',
215
+ packageVersion: (_c = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _c === void 0 ? void 0 : _c.packageVersion,
216
+ appEnv: Env.getEnvName(),
196
217
  };
197
218
  useEffect(() => {
198
219
  if (steps.length > 2 && activeStep.index === 2 && isNextButtonClicked) {
199
220
  goToStepByIndex(3);
200
221
  }
201
222
  }, [activeStep, steps.length, goToStepByIndex]);
223
+ const fetchARHResponse = () => __awaiter(this, void 0, void 0, function* () {
224
+ const detailedQuestion = generateAIQuestion(activeSection || '', product, version, summary, issue, caseType || '');
225
+ // Dispatch request started action
226
+ aiResponseDispatch(requestAIResponse(detailedQuestion));
227
+ try {
228
+ const response = yield askRHDirectAIResponse(detailedQuestion, config);
229
+ aiResponseDispatch(receivedAIResponse(response));
230
+ }
231
+ catch (error) {
232
+ const errorMessage = error instanceof Error ? error.message : 'Failed to get AI response';
233
+ aiResponseDispatch(receivedAIResponseError(errorMessage));
234
+ }
235
+ });
202
236
  const handleContinueClick = () => __awaiter(this, void 0, void 0, function* () {
203
- const shouldCallAPI = (isTroubleshootSection || isSummarizeSection) && !excludedCaseTypesforARH.includes(caseType || '');
204
237
  // Navigate to next step first
205
238
  isNextButtonClickedRef.current = true;
206
239
  setIsNextButtonClicked(true);
207
240
  goToNextStep();
208
241
  focusWizardMainPanel();
209
- if (shouldCallAPI) {
210
- const detailedQuestion = generateAIQuestion(activeSection, product, version, summary, issue, caseType || '');
211
- const useAIServices = aiServicesAvailable;
212
- if (useAIServices) {
213
- aiResponseDispatch(requestAIResponse(detailedQuestion));
214
- try {
215
- const response = yield askRHDirectAIResponse(detailedQuestion, config);
216
- aiResponseDispatch(receivedAIResponse(response));
217
- }
218
- catch (error) {
219
- aiResponseDispatch(receivedAIResponseError((error === null || error === void 0 ? void 0 : error.message) || 'Failed to get AI response'));
220
- }
221
- }
242
+ // Fetch ARH response if conditions are met
243
+ if (shouldEnableARHServices() && aiServicesAvailable) {
244
+ yield fetchARHResponse();
222
245
  }
223
246
  });
224
247
  return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: handleContinueClick, onBack: () => {
@@ -314,6 +314,7 @@
314
314
  align-items: center !important;
315
315
  z-index: 10001 !important;
316
316
  padding-left: 25px;
317
+ display: none !important;
317
318
  }
318
319
 
319
320
  body:has(.pf-chatbot--fullscreen) .pf-v6-c-wizard__footer {
@@ -328,6 +329,10 @@ body:has(.pf-chatbot--fullscreen) .main-section {
328
329
  min-height: calc(100vh - 212px) !important;
329
330
  }
330
331
 
332
+ body:has(.pf-chatbot--embedded) .main-section {
333
+ min-height: calc(100vh - 218px) !important;
334
+ }
335
+
331
336
  body:has(.pf-chatbot--embedded) .pf-v6-c-wizard__main-body:last-child {
332
337
  padding: 0 !important;
333
338
  }
@@ -9,6 +9,8 @@ interface IProps {
9
9
  setIsAIChatMode: (value: boolean) => void;
10
10
  onChatWithAIClick?: () => void;
11
11
  aiServicesAvailable: boolean;
12
+ isSecureSupport?: boolean;
13
+ hasConfirmedStatesideSupport?: boolean;
12
14
  }
13
15
  export declare function useWizard(routeProps: any, props?: IProps): {
14
16
  getStepsSequece: (showRest?: boolean) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,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;CAChC;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAgRb,OAAO;EAwC7C"}
1
+ {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,GAAG,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,6BAA6B,EAAE,OAAO,CAAC;IACvC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,aAAa,EAAE,GAAG,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,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;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAkRb,OAAO;EAwC7C"}
@@ -68,7 +68,7 @@ export function useWizard(routeProps, props) {
68
68
  [AppRouteSections.RESOURCES]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.RESOURCES, name: isCaseCreate ? t('Resources') : t('Resources'), component: (React.createElement(MainSection, { stepNumber: 3, totalSteps: 6, section: AppRouteSections.RESOURCES, title: t('Recommendations') },
69
69
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
70
70
  alertMessage(),
71
- React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
71
+ React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable, isSecureSupport: props.isSecureSupport, hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
72
72
  (props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) &&
73
73
  (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isCaseCreate ? t('Continue') : t('Convert to case') }),
74
74
  [AppRouteSections.ADDITIONAL_INFORMATION]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.ADDITIONAL_INFORMATION, name: t('Additional information'), component: (React.createElement(MainSection, { stepNumber: 4, totalSteps: 6, section: AppRouteSections.ADDITIONAL_INFORMATION, title: React.createElement(React.Fragment, null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.23",
3
+ "version": "2.6.27",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -51,7 +51,7 @@
51
51
  "dependencies": {
52
52
  "@cee-eng/hydrajs": "4.18.57",
53
53
  "@cee-eng/ui-toolkit": "1.1.8",
54
- "@ifd-ui/ask-redhat-core": "^0.0.28",
54
+ "@ifd-ui/ask-redhat-core": "^0.0.30",
55
55
  "@patternfly/patternfly": "6.2.1",
56
56
  "@patternfly/react-core": "6.2.1",
57
57
  "@patternfly/react-table": "6.2.1",
@@ -135,5 +135,5 @@
135
135
  "defaults and supports es6-module",
136
136
  "maintained node versions"
137
137
  ],
138
- "gitHead": "01e1d7d449bc445d659dcbba88345ae110045632"
138
+ "gitHead": "ccbc3132ec2028f541f8ea4e1f713929f2754105"
139
139
  }