@rh-support/troubleshoot 2.6.22 → 2.6.24

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.
@@ -26,7 +26,7 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
26
26
  React.createElement(CardHeader, null,
27
27
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading pf-v6-u-display-flex pf-v6-u-justify-content-space-between" },
28
28
  t('Remote session request'),
29
- React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('A remote session allows support engineers to view or access your computer to simplify collaboration and troubleshooting.'), 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')) },
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)))),
31
31
  React.createElement(CardBody, null,
32
32
  isInternal && (React.createElement(React.Fragment, null,
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA8T9D"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAmU9D"}
@@ -161,6 +161,7 @@ export function useIsSectionValid(sectionName) {
161
161
  !isEmpty(version) &&
162
162
  !isEmpty(summary) &&
163
163
  !isEmpty(issue) &&
164
+ isEntitlement === true &&
164
165
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
165
166
  return isValid;
166
167
  }
@@ -252,7 +253,12 @@ export function useIsSectionValid(sectionName) {
252
253
  return '';
253
254
  switch (sectionNameLocal) {
254
255
  case AppRouteSections.RESOURCES:
255
- return recommendationSectionError();
256
+ if (isCaseCreate === false) {
257
+ return getSupportSectionError();
258
+ }
259
+ else {
260
+ return recommendationSectionError();
261
+ }
256
262
  case AppRouteSections.GET_SUPPORT:
257
263
  return getSupportSectionError();
258
264
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,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;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAuMhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,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;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAwMhC;AACD,eAAe,UAAU,CAAC"}
@@ -39,7 +39,7 @@ function WizardMain(props) {
39
39
  const [userScrolledLabel, setUserScrolledLabel] = useState(false);
40
40
  const [userCanNavigateToTroubleshoot, setUserCanNavigateToTroubleshoot] = useState(false);
41
41
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
- const [_, setIsNextButtonClicked] = useState(false);
42
+ const [isNextButtonClicked, setIsNextButtonClicked] = useState(false);
43
43
  const isNextButtonClickedRef = useRef(false);
44
44
  const isBackButtonClickedRef = useRef(false);
45
45
  const resultsRowRef = useRef(null);
@@ -103,22 +103,24 @@ function WizardMain(props) {
103
103
  const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
104
104
  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) }));
105
105
  })));
106
- // const { activeStep, steps: wizardContextSteps, goToStepByIndex } = useWizardContext(); // Correctly using the context
107
- // useEffect(() => {
108
- // if (wizardContextSteps?.length > 2 && activeStep?.index === 2 && isNextButtonClicked) {
109
- // goToStepByIndex(3);
110
- // }
111
- // }, [activeStep, wizardContextSteps?.length, goToStepByIndex, isNextButtonClicked]);
112
- const CustomFooter = (activeStep, goToNextStep, goToPrevStep) => (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: (e) => {
113
- isNextButtonClickedRef.current = true;
114
- setIsNextButtonClicked(true);
115
- goToNextStep(e);
116
- focusWizardMainPanel();
117
- }, onBack: (e) => {
118
- isBackButtonClickedRef.current = true;
119
- goToPrevStep(e);
120
- focusWizardMainPanel();
121
- }, 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 }));
106
+ const CustomFooter = (activeStep, goToNextStep, goToPrevStep) => {
107
+ useEffect(() => {
108
+ if (steps.length > 2 && (activeStep === null || activeStep === void 0 ? void 0 : activeStep.index) === 2 && isNextButtonClicked) {
109
+ goToNextStep({});
110
+ }
111
+ // eslint-disable-next-line react-hooks/exhaustive-deps
112
+ }, [activeStep, steps.length, isNextButtonClicked, goToNextStep]);
113
+ return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: (e) => {
114
+ isNextButtonClickedRef.current = true;
115
+ setIsNextButtonClicked(true);
116
+ goToNextStep(e);
117
+ focusWizardMainPanel();
118
+ }, onBack: (e) => {
119
+ isBackButtonClickedRef.current = true;
120
+ goToPrevStep(e);
121
+ focusWizardMainPanel();
122
+ }, 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 }));
123
+ };
122
124
  const steps = getStepsSequece(showRestFlag);
123
125
  const wizardSteps = steps.map((step) => {
124
126
  const { component } = step, rest = __rest(step, ["component"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.22",
3
+ "version": "2.6.24",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -58,8 +58,8 @@
58
58
  "@progress/kendo-licensing": "1.3.5",
59
59
  "@progress/kendo-react-pdf": "^5.16.0",
60
60
  "@redux-devtools/extension": "^3.3.0",
61
- "@rh-support/components": "2.5.31",
62
- "@rh-support/react-context": "2.5.33",
61
+ "@rh-support/components": "2.5.32",
62
+ "@rh-support/react-context": "2.5.34",
63
63
  "@rh-support/types": "2.0.5",
64
64
  "@rh-support/user-permissions": "2.5.20",
65
65
  "@rh-support/utils": "2.5.19",
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "1987aef1be6d63188e3313e7f8a6d5d563f6aae4"
137
+ "gitHead": "0ecaec663e234789df10d8f8a98a46757388e573"
138
138
  }