@rh-support/troubleshoot 2.6.123 → 2.6.134

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":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAS3D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAuKhD"}
1
+ {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAS3D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAsKhD"}
@@ -75,8 +75,6 @@ export default function Description(props) {
75
75
  React.createElement("br", null),
76
76
  " ",
77
77
  React.createElement(Trans, null, "Error Messages"))));
78
- console.log('into decription component');
79
- console.log('isVariationA in description component', isVariationA);
80
78
  return (React.createElement(InlineEdit, { labelContent: React.createElement(React.Fragment, null, props.customTitle ? (props.customTitle) : (React.createElement(React.Fragment, null,
81
79
  React.createElement(Trans, { i18nKey: "i18nKeyDescribeProblem" }, "Describe your problem. Include specific actions and error messages."),
82
80
  isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
@@ -209,7 +209,7 @@ export default function Recommendations(props) {
209
209
  ' '))),
210
210
  recommendationState.isLoadingRecommendations ? (React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
211
211
  var _a, _b;
212
- return (React.createElement("li", { className: "result", key: doc.id },
212
+ return (React.createElement("li", { className: "result", key: `${doc.id}-${i}` },
213
213
  React.createElement("header", { className: "result-header" },
214
214
  React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS)}`, className: "se-recommended ts-result", "data-tracking-id": `se-recommended-main-recommendations-${i}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, i), dangerouslySetInnerHTML: computeRecommendationTitle(doc) }),
215
215
  React.createElement("div", { className: "header-meta pf-v6-u-mt-xs" },
@@ -22,6 +22,7 @@ interface IProps {
22
22
  onBack?: (e: React.MouseEvent<HTMLButtonElement>) => void;
23
23
  haveARHFieldsChanged?: boolean;
24
24
  resetARHFieldsChanged?: () => void;
25
+ onSeeMoreResources?: () => void;
25
26
  }
26
27
  declare function TroubleshootSection(props: IProps): React.JSX.Element;
27
28
  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;AAkBrD,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAyBpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,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AU,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,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7D,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;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAWD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmZzC;kBAnZQ,mBAAmB;;;AAsZ5B,eAAe,mBAAmB,CAAC"}
@@ -252,7 +252,7 @@ function TroubleshootSection(props) {
252
252
  React.createElement(AskRedHatChat, { initConfig: initConfig }),
253
253
  React.createElement("div", { className: "fullscreen-chat-footer" }, isVariationA && activeSection === AppRouteSections.RESOURCES ? (React.createElement(React.Fragment, null,
254
254
  React.createElement("button", { onClick: props.onBack, className: "btn btn-app btn-open-white main-nav-button", type: "button" }, t('Go back')),
255
- React.createElement("button", { onClick: () => props.setIsAIChatMode(false), className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: !aiResponseState.hasChunkReceived }, t('See more resources')))) : isCaseCreate ? (React.createElement("span", null,
255
+ React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: props.aiServicesAvailable && !aiResponseState.hasChunkReceived }, t('See more resources')))) : isCaseCreate ? (React.createElement("span", null,
256
256
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
257
257
  span: React.createElement("span", { className: "return-to-case-text" }),
258
258
  button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: () => props.setIsAIChatMode(false) })),
@@ -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,qBA+NzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAqLzC"}
@@ -11,7 +11,7 @@ import { Grid, GridItem } from '@patternfly/react-core';
11
11
  import { SupportFeedbackForm } from '@rh-support/components';
12
12
  import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { ABTestSplitBasedOnAccountNumber, getConfigField, getVersionIfOnlyVersion, PCM_CONFIG_FIELD_TYPE, pendoTrackEvent, PreviousCaseTypes, } from '@rh-support/utils';
14
+ import { getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
15
15
  import findIndex from 'lodash/findIndex';
16
16
  import isEmpty from 'lodash/isEmpty';
17
17
  import isEqual from 'lodash/isEqual';
@@ -20,7 +20,7 @@ import { Trans } from 'react-i18next';
20
20
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
21
21
  import { RouteContext } from '../../context/RouteContext';
22
22
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
23
- import { setABTestVariation, submitCase } from '../../reducers/CaseReducer';
23
+ import { submitCase } from '../../reducers/CaseReducer';
24
24
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
25
25
  import { useMetadata } from '../../utils/metadataUtil';
26
26
  import RouteUtils from '../../utils/routeUtils';
@@ -37,19 +37,18 @@ export function WizardLayout(props) {
37
37
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
38
38
  const { getMetadata } = useMetadata();
39
39
  const [isAIChatMode, setIsAIChatMode] = useState(false);
40
- const { caseCreationError, contactSSOName, caseType, product, caseState, ABTestVariation, hasInvalidEntitlements } = useCaseSelector((state) => ({
40
+ const { caseCreationError, contactSSOName, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
41
41
  caseState: state,
42
42
  caseCreationError: state.caseCreationError,
43
43
  contactSSOName: state.caseDetails.contactSSOName,
44
44
  caseType: state.caseDetails.caseType,
45
45
  product: state.caseDetails.product,
46
- ABTestVariation: state.ABTestVariation,
47
46
  hasInvalidEntitlements: state.hasInvalidEntitlements,
48
47
  }), isEqual);
49
48
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
50
49
  const caseDispatch = useCaseDispatch();
51
50
  const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
52
- const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, loggedInUserRights, pcmConfig }, } = useContext(GlobalMetadataStateContext);
51
+ const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
53
52
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
54
53
  const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
55
54
  const { attachmentState } = useContext(AttachmentStateContext);
@@ -121,31 +120,6 @@ export function WizardLayout(props) {
121
120
  }
122
121
  setConfirmationModalType(null);
123
122
  };
124
- // A/B test
125
- useEffect(() => {
126
- var _a, _b;
127
- if (isEmpty(loggedInUsersAccount.data.accountNumber))
128
- return;
129
- const urlParams = new URLSearchParams(window.location.search);
130
- const useflowFromUrl = urlParams.get('useflow');
131
- // if useflow was added in url, we force the selection
132
- if (useflowFromUrl &&
133
- (((_a = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'a' || ((_b = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'b')) {
134
- // set state for PCM to show A or B
135
- setABTestVariation(caseDispatch, useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase());
136
- return;
137
- }
138
- const appABTestConfig = getConfigField(pcmConfig.data, 'testVariationWeightZeroToTen', PCM_CONFIG_FIELD_TYPE.STRING);
139
- if (isEmpty(loggedInUsersAccount.data.accountNumber) || isEmpty(appABTestConfig))
140
- return;
141
- const appTestWeight = parseInt(appABTestConfig, 10);
142
- const newABTestVariation = ABTestSplitBasedOnAccountNumber(appTestWeight, loggedInUsersAccount.data.accountNumber);
143
- if (newABTestVariation !== ABTestVariation) {
144
- // set state for PCM to show A or B
145
- setABTestVariation(caseDispatch, newABTestVariation);
146
- }
147
- // eslint-disable-next-line react-hooks/exhaustive-deps
148
- }, [loggedInUsersAccount.data.accountNumber, ABTestVariation]);
149
123
  // Loading app metadata
150
124
  useEffect(() => {
151
125
  fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAkE,MAAM,OAAO,CAAC;AAExH,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAY9D,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,IA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,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,qBAkbhC;AACD,eAAe,UAAU,CAAC"}
@@ -113,6 +113,8 @@ function WizardMain(props) {
113
113
  const isBackButtonClickedRef = useRef(false);
114
114
  const resultsRowRef = useRef(null);
115
115
  const goToPrevStepRef = useRef(null);
116
+ const goToNextStepRef = useRef(null);
117
+ const activeStepRef = useRef(null);
116
118
  //to track the previous ARH fields
117
119
  const previousARHFieldsRef = useRef({
118
120
  product: '',
@@ -136,6 +138,17 @@ function WizardMain(props) {
136
138
  const resetARHFieldsChanged = useCallback(() => {
137
139
  haveARHFieldsChangedRef.current = false;
138
140
  }, []);
141
+ const handleSeeMoreResources = () => __awaiter(this, void 0, void 0, function* () {
142
+ var _a;
143
+ props.setIsAIChatMode(false);
144
+ if (sessionRestore.activeSessionId) {
145
+ const sessionDetails = (_a = sessionRestore.previousSessions.data[sessionRestore.activeSessionId]) === null || _a === void 0 ? void 0 : _a.sessionDetails;
146
+ const newSession = {
147
+ returnToCase: true,
148
+ };
149
+ yield updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, sessionDetails, newSession);
150
+ }
151
+ });
139
152
  // Check if any of the ARH-related fields have changed
140
153
  useEffect(() => {
141
154
  var _a;
@@ -190,6 +203,7 @@ function WizardMain(props) {
190
203
  onBack: handleOnBackForExpandedARH,
191
204
  haveARHFieldsChanged: haveARHFieldsChangedRef.current,
192
205
  resetARHFieldsChanged,
206
+ onSeeMoreResources: handleSeeMoreResources,
193
207
  });
194
208
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
195
209
  const { t } = useTranslation();
@@ -338,12 +352,8 @@ function WizardMain(props) {
338
352
  })));
339
353
  const CustomFooter = (activeStep, goToNextStep, goToPrevStep) => {
340
354
  goToPrevStepRef.current = goToPrevStep;
341
- useEffect(() => {
342
- if (steps.length > 2 && (activeStep === null || activeStep === void 0 ? void 0 : activeStep.index) === 2 && isNextButtonClicked) {
343
- goToNextStep({});
344
- }
345
- // eslint-disable-next-line react-hooks/exhaustive-deps
346
- }, [activeStep, steps.length, isNextButtonClicked, goToNextStep]);
355
+ goToNextStepRef.current = goToNextStep;
356
+ activeStepRef.current = activeStep;
347
357
  const handleContinueClick = () => __awaiter(this, void 0, void 0, function* () {
348
358
  // Navigate to next step first
349
359
  isNextButtonClickedRef.current = true;
@@ -360,13 +370,20 @@ function WizardMain(props) {
360
370
  isBackButtonClickedRef.current = true;
361
371
  goToPrevStep({});
362
372
  focusWizardMainPanel();
363
- }, 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, isLoadingARH: aiResponseState.isStreaming && aiResponseState.accumulatedResponse === '' }));
373
+ }, 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, onSeeMoreResources: handleSeeMoreResources, isLoadingARH: aiResponseState.isStreaming && aiResponseState.accumulatedResponse === '', aiServicesAvailable: aiServicesAvailable }));
364
374
  };
365
375
  const steps = getStepsSequece(showRestFlag);
366
376
  const wizardSteps = steps.map((step) => {
367
377
  const { component } = step, rest = __rest(step, ["component"]);
368
378
  return (React.createElement(WizardStep, Object.assign({ key: step.id }, rest), component));
369
379
  });
380
+ // moved from CustomFooter to comply with React Rules of Hooks
381
+ useEffect(() => {
382
+ var _a;
383
+ if (steps.length > 2 && ((_a = activeStepRef.current) === null || _a === void 0 ? void 0 : _a.index) === 2 && isNextButtonClicked && goToNextStepRef.current) {
384
+ goToNextStepRef.current({});
385
+ }
386
+ }, [steps.length, isNextButtonClicked]);
370
387
  // To add a new step to wizard first need to add the component to appRouteConfugurations
371
388
  // in useWizard file then add it to step squences in RouteConstNTypes
372
389
  return (React.createElement(React.Fragment, null,
@@ -19,7 +19,9 @@ interface IProps {
19
19
  isAIChatMode?: boolean;
20
20
  setIsAIChatMode?: (value: boolean) => void;
21
21
  onReturnToCaseCreation?: () => void;
22
+ onSeeMoreResources?: () => void;
22
23
  isLoadingARH?: boolean;
24
+ aiServicesAvailable?: boolean;
23
25
  }
24
26
  declare function WizardNavigation(props: IProps): React.JSX.Element;
25
27
  declare namespace WizardNavigation {
@@ -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;AAUvD,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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K,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAuatC;kBAvaQ,gBAAgB;;;AAyazB,eAAe,gBAAgB,CAAC"}
@@ -15,7 +15,7 @@ import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, PreviousTo
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, useRef, useState } from 'react';
18
+ import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
19
19
  import { Trans, useTranslation } from 'react-i18next';
20
20
  import { useAIResponseState } from '../../context/AIResponseContext';
21
21
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
@@ -93,12 +93,17 @@ function WizardNavigation(props) {
93
93
  const [hasUserScrolled, setHasUserScrolled] = useState(false);
94
94
  const [shouldOpenChatbot, setShouldOpenChatbot] = useState(false);
95
95
  useEffect(() => {
96
- var _a, _b;
96
+ var _a;
97
97
  if (activeSection !== AppRouteSections.RESOURCES && props.isAIChatMode) {
98
98
  (_a = props.setIsAIChatMode) === null || _a === void 0 ? void 0 : _a.call(props, false);
99
99
  }
100
+ // eslint-disable-next-line react-hooks/exhaustive-deps
101
+ }, [activeSection]);
102
+ // to prevent flash of recommendations before AI chat mode is set
103
+ useLayoutEffect(() => {
104
+ var _a;
100
105
  if (activeSection === AppRouteSections.RESOURCES && shouldOpenChatbot) {
101
- (_b = props.setIsAIChatMode) === null || _b === void 0 ? void 0 : _b.call(props, true);
106
+ (_a = props.setIsAIChatMode) === null || _a === void 0 ? void 0 : _a.call(props, true);
102
107
  setShouldOpenChatbot(false);
103
108
  }
104
109
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -251,7 +256,6 @@ function WizardNavigation(props) {
251
256
  const isLoadingARH = props.isLoadingARH &&
252
257
  props.activeStep.id === AppRouteSections.RESOURCES &&
253
258
  !excludedCaseTypesforARH.includes(caseType || '');
254
- const shouldCheckRecommendationsLoading = !isVariationA && recommendationState.isLoadingRecommendations;
255
259
  let value = isLoadingARH ||
256
260
  ((isEmpty(summary) || isEmpty(issue) || isEmpty(product) || isEmpty(version)) &&
257
261
  props.activeStep.id === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT)) ||
@@ -259,7 +263,7 @@ function WizardNavigation(props) {
259
263
  props.activeStep.nextButtonLabel === 'Troubleshoot' ||
260
264
  (isSectionValidFn && !isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
261
265
  noValidEntitlement ||
262
- shouldCheckRecommendationsLoading;
266
+ recommendationState.isLoadingRecommendations;
263
267
  return value;
264
268
  };
265
269
  const isDisabledGoBack = () => {
@@ -275,7 +279,7 @@ function WizardNavigation(props) {
275
279
  React.createElement(WizardFooterWrapper, null,
276
280
  shouldShowNewARHFlowFooterButtons ? (React.createElement(React.Fragment, null,
277
281
  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" }, t('Go back'))),
278
- React.createElement("button", { onClick: () => { var _a; return (_a = props.setIsAIChatMode) === null || _a === void 0 ? void 0 : _a.call(props, false); }, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: !aiResponseState.hasChunkReceived }, t('See more resources')))) : props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
282
+ React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: props.aiServicesAvailable && !aiResponseState.hasChunkReceived }, t('See more resources')))) : props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
279
283
  React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
280
284
  span: React.createElement("span", { className: "return-to-case-text" }),
281
285
  button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: props.onReturnToCaseCreation })),
@@ -1 +1 @@
1
- {"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IACzD,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,SAAS,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACjC;AAED,oBAAY,MAAM;IACd,CAAC,MAAM;IACP,CAAC,MAAM;CACV;AAED,wBAAgB,KAAK,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CAmC/D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAMrF"}
1
+ {"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IACzD,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,SAAS,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACjC;AAED,oBAAY,MAAM;IACd,CAAC,MAAM;IACP,CAAC,MAAM;CACV;AAED,wBAAgB,KAAK,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CA2D/D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAMrF"}
@@ -1,31 +1,56 @@
1
1
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
2
- import { getConfigField, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
2
+ import { getConfigField, PCM_CONFIG_FIELD_TYPE, PreviousCaseTypes } from '@rh-support/utils';
3
+ import { isEqual } from 'lodash';
3
4
  import { useContext, useEffect, useState } from 'react';
5
+ import { useCaseDispatch, useCaseSelector } from '../context/CaseContext';
6
+ import { setABTestVariation } from '../reducers/CaseReducer';
4
7
  export var ABEnum;
5
8
  (function (ABEnum) {
6
9
  ABEnum["A"] = "A";
7
10
  ABEnum["B"] = "B";
8
11
  })(ABEnum || (ABEnum = {}));
9
12
  export function useAB(options = {}) {
10
- console.log('useAB - Testing console log');
11
13
  const { globalMetadataState: { pcmConfig, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
12
14
  const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.A);
15
+ const caseDispatch = useCaseDispatch();
16
+ const { caseType } = useCaseSelector((state) => ({ caseType: state.caseDetails.caseType }), isEqual);
13
17
  useEffect(() => {
14
- if (loggedInUsersAccount.data.hasConfirmedStatesideSupport || loggedInUsersAccount.data.secureSupport) {
15
- setTestVariation(ABEnum.B);
16
- return;
18
+ var _a, _b;
19
+ let newVariation = ABEnum.B;
20
+ // Check URL parameter first - if useflow is specified, force that selection
21
+ const hashQueryString = window.location.hash.includes('?')
22
+ ? window.location.hash.substring(window.location.hash.indexOf('?'))
23
+ : '';
24
+ const urlParams = new URLSearchParams(hashQueryString || window.location.search);
25
+ const useflowFromUrl = urlParams.get('useflow');
26
+ if (useflowFromUrl &&
27
+ (((_a = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'a' || ((_b = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'b')) {
28
+ newVariation = (useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase()) === 'A' ? ABEnum.A : ABEnum.B;
17
29
  }
18
- const variantAAccountNumbers = getConfigField(pcmConfig.data, 'askRedHatAccountsA', PCM_CONFIG_FIELD_TYPE.STRING);
19
- const userAccountNumber = loggedInUsersAccount.data.accountNumber;
20
- const isUserInVariantAAccountNumbers = variantAAccountNumbers === null || variantAAccountNumbers === void 0 ? void 0 : variantAAccountNumbers.includes(userAccountNumber);
21
- if ((variantAAccountNumbers === null || variantAAccountNumbers === void 0 ? void 0 : variantAAccountNumbers.length) && userAccountNumber && isUserInVariantAAccountNumbers) {
22
- setTestVariation(ABEnum.A);
30
+ else if (loggedInUsersAccount.data.hasConfirmedStatesideSupport || loggedInUsersAccount.data.secureSupport) {
31
+ newVariation = ABEnum.B;
23
32
  }
24
33
  else {
34
+ const variantAAccountNumbers = getConfigField(pcmConfig.data, 'askRedHatAccountsA', PCM_CONFIG_FIELD_TYPE.STRING);
35
+ const userAccountNumber = loggedInUsersAccount.data.accountNumber;
36
+ const isUserInVariantAAccountNumbers = variantAAccountNumbers === null || variantAAccountNumbers === void 0 ? void 0 : variantAAccountNumbers.includes(userAccountNumber);
37
+ if ((variantAAccountNumbers === null || variantAAccountNumbers === void 0 ? void 0 : variantAAccountNumbers.length) && userAccountNumber && isUserInVariantAAccountNumbers) {
38
+ newVariation = ABEnum.A;
39
+ }
40
+ else {
41
+ newVariation = ABEnum.B;
42
+ }
43
+ }
44
+ // Update local state used to display only the UI conditionally
45
+ setTestVariation(newVariation);
46
+ // Update global Redux state for analytics (userAgent field) - used in session
47
+ setABTestVariation(caseDispatch, newVariation);
48
+ // Check if the case type is Idea and update the variation to B (only for UI display) global state is still A
49
+ if (caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
25
50
  setTestVariation(ABEnum.B);
26
51
  }
27
52
  // eslint-disable-next-line react-hooks/exhaustive-deps
28
- }, [pcmConfig.data, loggedInUsersAccount.data.accountNumber]);
53
+ }, [pcmConfig.data, loggedInUsersAccount.data.accountNumber, caseDispatch]);
29
54
  return {
30
55
  variation: testVariation,
31
56
  isVariationA: testVariation === ABEnum.A,
@@ -15,6 +15,7 @@ interface IProps {
15
15
  onBack?: (e: React.MouseEvent<HTMLButtonElement>) => void;
16
16
  haveARHFieldsChanged?: boolean;
17
17
  resetARHFieldsChanged?: () => void;
18
+ onSeeMoreResources?: () => void;
18
19
  }
19
20
  export declare function useWizard(routeProps: any, props?: IProps): {
20
21
  getStepsSequece: (showRest?: boolean) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA4BpD,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,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CAAC;CACnC;AAED,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,KAAK,CAAC,EAAE,MAAM;iCAyTb,OAAO;EAwC7C"}
@@ -81,16 +81,16 @@ export function useWizard(routeProps, props) {
81
81
  [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') },
82
82
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
83
83
  alertMessage(),
84
- React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable, isSecureSupport: props.isSecureSupport, hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport, onBack: props.onBack, routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef, haveARHFieldsChanged: props.haveARHFieldsChanged, resetARHFieldsChanged: props.resetARHFieldsChanged })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
84
+ React.createElement(TroubleshootSection, { isAIChatMode: props.isAIChatMode, setIsAIChatMode: props.setIsAIChatMode, onChatWithAIClick: props.onChatWithAIClick, aiServicesAvailable: props.aiServicesAvailable, isSecureSupport: props.isSecureSupport, hasConfirmedStatesideSupport: props.hasConfirmedStatesideSupport, onBack: props.onBack, onSeeMoreResources: props.onSeeMoreResources, routeProps: routeProps, userSeenRecommendations: props.userSeenRecommendationsfn, userClickedNextonRecommendations: props.userClickedNextonRecommendationsValue, resultsRowRef: props.resultsRowRef, haveARHFieldsChanged: props.haveARHFieldsChanged, resetARHFieldsChanged: props.resetARHFieldsChanged })))), canJumpTo: isSectionValidFn(AppRouteSections.RESOURCES || activeSection === AppRouteSections.RESOURCES) &&
85
85
  (props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) &&
86
86
  (props === null || props === void 0 ? void 0 : props.userCanNavigateToTroubleshoot), nextButtonLabel: isVariationA
87
87
  ? ((summarizeNextButtonLabelLogic() || ((props === null || props === void 0 ? void 0 : props.userSeenRecommendationsValue) && numFound < 3)) &&
88
88
  !isEmpty(issue)) ||
89
89
  numFound === 0
90
- ? t('Continue')
91
- : isCaseCreate
92
- ? t('See more options')
90
+ ? isCaseCreate
91
+ ? t('Continue')
93
92
  : t('Convert to case')
93
+ : t('See more options')
94
94
  : isCaseCreate
95
95
  ? t('Continue')
96
96
  : t('Convert to case') }),
@@ -565,6 +565,7 @@ span.pf-v6-c-input-group__text {
565
565
  }
566
566
 
567
567
  .top-content-suggestion-accordion {
568
+ margin-top: 32px;
568
569
  dl dt {
569
570
  margin: 0px;
570
571
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.123",
3
+ "version": "2.6.134",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "94497d4bbf021a7649a3be2df4633555004c9a68"
136
+ "gitHead": "568ccdf05848de9fc8ceae3544383d43345e9ee7"
137
137
  }