@rh-support/troubleshoot 2.6.47 → 2.6.48

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 (154) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +1 -0
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +31 -5
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +33 -34
  6. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +3 -2
  8. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -0
  10. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +14 -18
  12. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -1
  13. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +16 -22
  15. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
  17. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +53 -102
  19. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
  21. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +23 -21
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +4 -2
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +7 -4
  26. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -1
  28. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +7 -9
  30. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +0 -8
  31. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  32. package/lib/esm/components/CaseInformation/Fts.js +6 -2
  33. package/lib/esm/components/CaseInformation/Severity.js +1 -1
  34. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  35. package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
  36. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +3 -0
  37. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  38. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +16 -24
  39. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  40. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +5 -7
  41. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
  42. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +20 -18
  43. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  44. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +6 -9
  45. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  46. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +22 -15
  47. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  48. package/lib/esm/components/Cve/CveModal.js +2 -3
  49. package/lib/esm/components/Cve/CveSidebar.js +1 -1
  50. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
  51. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  52. package/lib/esm/components/ProductSelector/AllProductsSelector.js +6 -9
  53. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  54. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +1 -10
  55. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  56. package/lib/esm/components/Recommendations/AsideResults.js +3 -3
  57. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
  58. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +4 -7
  59. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
  60. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +1 -3
  61. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  62. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  63. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +2 -9
  64. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
  65. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
  66. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  67. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  68. package/lib/esm/components/Recommendations/RulesModal.js +4 -7
  69. package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
  70. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
  71. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +3 -5
  72. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  73. package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
  74. package/lib/esm/components/Suggestions/Suggestions.js +12 -17
  75. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  76. package/lib/esm/components/Suggestions/TopContent.js +13 -13
  77. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +7 -0
  78. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -0
  79. package/lib/esm/components/TroubleshootSection/AskRedHat.js +176 -0
  80. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts +9 -0
  81. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts.map +1 -0
  82. package/lib/esm/components/TroubleshootSection/CloseButton.js +5 -0
  83. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts +15 -0
  84. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts.map +1 -0
  85. package/lib/esm/components/TroubleshootSection/QuickResponse.js +26 -0
  86. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts +18 -0
  87. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts.map +1 -0
  88. package/lib/esm/components/TroubleshootSection/ResponseActionButton.js +28 -0
  89. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts +20 -0
  90. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -0
  91. package/lib/esm/components/TroubleshootSection/ResponseActions.js +52 -0
  92. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +7 -0
  93. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  94. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +99 -13
  95. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +12 -0
  96. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -0
  97. package/lib/esm/components/TroubleshootSection/UserFeedback.js +44 -0
  98. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts +10 -0
  99. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts.map +1 -0
  100. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.js +46 -0
  101. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +9 -0
  102. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +1 -0
  103. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +9 -0
  104. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +9 -0
  105. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +1 -0
  106. package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +17 -0
  107. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
  108. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +0 -1
  109. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +0 -1
  110. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  111. package/lib/esm/components/shared/input/ContactSelectorInternal.js +1 -6
  112. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  113. package/lib/esm/components/shared/useIsSectionValid.js +1 -7
  114. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  115. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +2 -8
  116. package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
  117. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  118. package/lib/esm/components/wizardLayout/WizardLayout.js +9 -6
  119. package/lib/esm/components/wizardLayout/WizardMain.d.ts +7 -1
  120. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  121. package/lib/esm/components/wizardLayout/WizardMain.js +217 -18
  122. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +4 -2
  123. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  124. package/lib/esm/components/wizardLayout/WizardNavigation.js +13 -16
  125. package/lib/esm/components/wizardLayout/index.d.ts +1 -0
  126. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  127. package/lib/esm/components/wizardLayout/index.js +1 -0
  128. package/lib/esm/constants/askRedHatMessages.d.ts +35 -0
  129. package/lib/esm/constants/askRedHatMessages.d.ts.map +1 -0
  130. package/lib/esm/constants/askRedHatMessages.js +36 -0
  131. package/lib/esm/context/AIResponseContext.d.ts +10 -0
  132. package/lib/esm/context/AIResponseContext.d.ts.map +1 -0
  133. package/lib/esm/context/AIResponseContext.js +26 -0
  134. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  135. package/lib/esm/context/RootTroubleshootProvider.js +8 -6
  136. package/lib/esm/css/AskRedHat.css +359 -0
  137. package/lib/esm/css/app.css +4 -5
  138. package/lib/esm/css/case.css +6 -39
  139. package/lib/esm/css/results.css +2 -2
  140. package/lib/esm/hooks/useWizard.d.ts +6 -0
  141. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  142. package/lib/esm/hooks/useWizard.js +1 -1
  143. package/lib/esm/reducers/AIResponseConstNTypes.d.ts +48 -0
  144. package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -0
  145. package/lib/esm/reducers/AIResponseConstNTypes.js +18 -0
  146. package/lib/esm/reducers/AIResponseReducer.d.ts +9 -0
  147. package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -0
  148. package/lib/esm/reducers/AIResponseReducer.js +42 -0
  149. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -0
  150. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  151. package/lib/esm/reducers/CaseConstNTypes.js +2 -0
  152. package/lib/esm/scss/_main.scss +22 -84
  153. package/lib/esm/scss/_pf-overrides.scss +10 -37
  154. package/package.json +7 -6
@@ -0,0 +1,20 @@
1
+ import { ButtonProps } from '@patternfly/react-core';
2
+ import React, { type FunctionComponent, type MouseEvent } from 'react';
3
+ export interface ActionProps extends Omit<ButtonProps, 'ref'> {
4
+ ariaLabel?: string;
5
+ clickedAriaLabel?: string;
6
+ onClick?: ((event: MouseEvent | React.MouseEvent<Element, MouseEvent> | KeyboardEvent) => void) | undefined;
7
+ tooltipContent?: string;
8
+ clickedTooltipContent?: string;
9
+ }
10
+ export interface ResponseActionProps {
11
+ actions: {
12
+ positive?: ActionProps;
13
+ negative?: ActionProps;
14
+ copy?: ActionProps;
15
+ };
16
+ submittedFeedbackTypes?: string[];
17
+ }
18
+ export declare const ResponseActions: FunctionComponent<ResponseActionProps>;
19
+ export default ResponseActions;
20
+ //# sourceMappingURL=ResponseActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/ResponseActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAA+B,MAAM,OAAO,CAAC;AAIpG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,IAAI,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,mBAAmB,CA4FlE,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,52 @@
1
+ import OutlinedCopyIcon from '@patternfly/react-icons/dist/esm/icons/outlined-copy-icon';
2
+ import OutlinedThumbsDownIcon from '@patternfly/react-icons/dist/esm/icons/outlined-thumbs-down-icon';
3
+ import OutlinedThumbsUpIcon from '@patternfly/react-icons/dist/esm/icons/outlined-thumbs-up-icon';
4
+ import React, { useEffect, useRef, useState } from 'react';
5
+ import ResponseActionButton from './ResponseActionButton';
6
+ export const ResponseActions = ({ actions, submittedFeedbackTypes = [], }) => {
7
+ var _a, _b, _c, _d, _e, _f;
8
+ const [activeButton, setActiveButton] = useState();
9
+ const [clickStatePersisted, setClickStatePersisted] = useState(false);
10
+ useEffect(() => {
11
+ // Define the order of precedence for checking initial `isClicked`
12
+ const actionPrecedence = ['positive', 'negative', 'copy'];
13
+ let initialActive;
14
+ // Check predefined actions first based on precedence
15
+ for (const actionName of actionPrecedence) {
16
+ const actionProp = actions[actionName];
17
+ if (actionProp === null || actionProp === void 0 ? void 0 : actionProp.isClicked) {
18
+ initialActive = actionName;
19
+ break;
20
+ }
21
+ }
22
+ if (initialActive) {
23
+ // Click state is explicitly controlled by consumer.
24
+ setClickStatePersisted(true);
25
+ }
26
+ setActiveButton(initialActive);
27
+ // eslint-disable-next-line react-hooks/exhaustive-deps
28
+ }, [actions]);
29
+ const { positive, negative, copy } = actions;
30
+ const responseActions = useRef(null);
31
+ useEffect(() => {
32
+ const handleClickOutside = (e) => {
33
+ if (responseActions.current && !responseActions.current.contains(e.target) && !clickStatePersisted) {
34
+ setActiveButton(undefined);
35
+ }
36
+ };
37
+ window.addEventListener('click', handleClickOutside);
38
+ return () => {
39
+ window.removeEventListener('click', handleClickOutside);
40
+ };
41
+ }, [clickStatePersisted]);
42
+ const handleClick = (e, id, onClick) => {
43
+ setClickStatePersisted(false);
44
+ setActiveButton(id);
45
+ onClick && onClick(e);
46
+ };
47
+ return (React.createElement("div", { ref: responseActions, className: "pf-chatbot__response-actions" },
48
+ positive && (React.createElement(ResponseActionButton, { ariaLabel: "Good response", clickedAriaLabel: "Response recorded", onClick: (e) => handleClick(e, 'positive', positive.onClick), tooltipContent: (_a = positive.tooltipContent) !== null && _a !== void 0 ? _a : 'Good response', clickedTooltipContent: (_b = positive.clickedTooltipContent) !== null && _b !== void 0 ? _b : 'Response recorded', icon: React.createElement(OutlinedThumbsUpIcon, null), isClicked: activeButton === 'positive', isDisabled: submittedFeedbackTypes === null || submittedFeedbackTypes === void 0 ? void 0 : submittedFeedbackTypes.includes('positive') })),
49
+ negative && (React.createElement(ResponseActionButton, { ariaLabel: "Bad response", clickedAriaLabel: "Response recorded", onClick: (e) => handleClick(e, 'negative', negative.onClick), tooltipContent: (_c = negative.tooltipContent) !== null && _c !== void 0 ? _c : 'Bad response', clickedTooltipContent: (_d = negative.clickedTooltipContent) !== null && _d !== void 0 ? _d : 'Response recorded', icon: React.createElement(OutlinedThumbsDownIcon, null), isClicked: activeButton === 'negative', isDisabled: submittedFeedbackTypes === null || submittedFeedbackTypes === void 0 ? void 0 : submittedFeedbackTypes.includes('negative') })),
50
+ copy && (React.createElement(ResponseActionButton, { ariaLabel: "Copy", clickedAriaLabel: "Copied", onClick: (e) => handleClick(e, 'copy', copy.onClick), tooltipContent: (_e = copy.tooltipContent) !== null && _e !== void 0 ? _e : 'Copy', clickedTooltipContent: (_f = copy.clickedTooltipContent) !== null && _f !== void 0 ? _f : 'Copied', icon: React.createElement(OutlinedCopyIcon, null), isClicked: activeButton === 'copy' }))));
51
+ };
52
+ export default ResponseActions;
@@ -1,3 +1,4 @@
1
+ import '@ifd-ui/ask-redhat-core/ask-redhat-core.css';
1
2
  import React from 'react';
2
3
  interface IProps {
3
4
  inlineEditable: boolean;
@@ -6,6 +7,12 @@ interface IProps {
6
7
  collapseOnBlur?: boolean;
7
8
  autoFocus?: boolean;
8
9
  hideSaveCancel?: boolean;
10
+ isAIChatMode: boolean;
11
+ setIsAIChatMode: (value: boolean) => void;
12
+ onChatWithAIClick?: () => void;
13
+ aiServicesAvailable: boolean;
14
+ isSecureSupport?: boolean;
15
+ hasConfirmedStatesideSupport?: boolean;
9
16
  }
10
17
  declare function TroubleshootSection(props: IProps): React.JSX.Element;
11
18
  declare namespace TroubleshootSection {
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,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;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAoFzC;kBApFQ,mBAAmB;;;AAuF5B,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;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,4 +1,16 @@
1
- import { Card, CardBody, CardHeader, Tooltip } from '@patternfly/react-core';
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import '@ifd-ui/ask-redhat-core/ask-redhat-core.css';
11
+ import { Env } from '@cee-eng/hydrajs';
12
+ import { AskRedHatChat, setAuthToken } from '@ifd-ui/ask-redhat-core';
13
+ import { Button, Card, CardBody, CardHeader, Tooltip } from '@patternfly/react-core';
2
14
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
15
  import { ErrorBoundary, LoadingDots } from '@rh-support/components';
4
16
  import { PreviousCaseTypes } from '@rh-support/utils';
@@ -6,23 +18,33 @@ import isEmpty from 'lodash/isEmpty';
6
18
  import isEqual from 'lodash/isEqual';
7
19
  import React, { useContext } from 'react';
8
20
  import { Trans, useTranslation } from 'react-i18next';
21
+ import { useAIResponseState } from '../../context/AIResponseContext';
9
22
  import { useCaseSelector } from '../../context/CaseContext';
23
+ import { RouteContext } from '../../context/RouteContext';
10
24
  import { TCStateContext } from '../../context/TopContentContext';
25
+ import { appSourceId_ARH, excludedCaseTypesforARH } from '../../reducers/CaseConstNTypes';
11
26
  import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
12
27
  import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
13
28
  import InsightsResults from '../Recommendations/InsightsResults';
14
29
  import Suggestions from '../Suggestions/Suggestions';
30
+ import { AskRedHat } from './AskRedHat';
15
31
  const defaultProps = {
16
32
  initialIsEditing: false,
17
33
  required: false,
18
34
  collapseOnBlur: false,
19
35
  autoFocus: false,
20
36
  hideSaveCancel: false,
37
+ aiServicesAvailable: false,
21
38
  };
22
39
  function TroubleshootSection(props) {
23
- var _a;
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
24
41
  const { t } = useTranslation();
42
+ const { aiServicesAvailable, isAIChatMode, setIsAIChatMode, onChatWithAIClick } = props;
25
43
  const { topContentState: { topContent }, } = useContext(TCStateContext);
44
+ const { routeState: { isCaseCreate }, } = useContext(RouteContext);
45
+ const aiResponseState = useAIResponseState();
46
+ const session = window === null || window === void 0 ? void 0 : window.sessionjs;
47
+ const keycloakSession = (_b = (_a = session === null || session === void 0 ? void 0 : session._state) === null || _a === void 0 ? void 0 : _a.keycloak) !== null && _b !== void 0 ? _b : null;
26
48
  const { product, version, isCreatingCase, caseType } = useCaseSelector((state) => ({
27
49
  product: state.caseDetails.product,
28
50
  version: state.caseDetails.version,
@@ -32,18 +54,82 @@ function TroubleshootSection(props) {
32
54
  issue: state.caseDetails.issue,
33
55
  }), isEqual);
34
56
  const canShowTopProducts = isEmpty(product);
35
- const canShowTopContent = !canShowTopProducts && ((_a = topContent === null || topContent === void 0 ? void 0 : topContent.data) === null || _a === void 0 ? void 0 : _a.length) > 0;
57
+ const canShowTopContent = !canShowTopProducts && ((_c = topContent === null || topContent === void 0 ? void 0 : topContent.data) === null || _c === void 0 ? void 0 : _c.length) > 0;
36
58
  const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
37
- return (React.createElement(React.Fragment, null,
59
+ const shouldShowARHUI = () => {
60
+ // Check if the case type is allowed (not in the excluded list)
61
+ // test
62
+ const isCaseTypeAllowed = !excludedCaseTypesforARH.includes(caseType !== null && caseType !== void 0 ? caseType : '');
63
+ // Check if user is not a secure support or confirmed stateside support user
64
+ const isNotSecureOrStatesideUser = !props.isSecureSupport && !props.hasConfirmedStatesideSupport;
65
+ // Check if AI services are available
66
+ const isAIServicesAvailable = aiServicesAvailable;
67
+ return isCaseTypeAllowed && isNotSecureOrStatesideUser && isAIServicesAvailable;
68
+ };
69
+ const handleInitialized = (success, error) => {
70
+ if (success) {
71
+ console.log('Chat initialized successfully');
72
+ }
73
+ else {
74
+ console.error('Chat initialization failed:', error);
75
+ }
76
+ };
77
+ const preprocessRequest = () => __awaiter(this, void 0, void 0, function* () {
78
+ var _a;
79
+ if (!keycloakSession) {
80
+ throw new Error('No Keycloak session available');
81
+ }
82
+ try {
83
+ yield ((_a = session === null || session === void 0 ? void 0 : session.updateToken) === null || _a === void 0 ? void 0 : _a.call(session, 500));
84
+ const token = session === null || session === void 0 ? void 0 : session.getEncodedToken();
85
+ if (token) {
86
+ setAuthToken(token);
87
+ }
88
+ else {
89
+ throw new Error('No token available');
90
+ }
91
+ return Promise.resolve();
92
+ }
93
+ catch (error) {
94
+ console.error('Failed to refresh token:', error);
95
+ throw error;
96
+ }
97
+ });
98
+ const initConfig = {
99
+ packageVersion: (_d = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _d === void 0 ? void 0 : _d.packageVersion,
100
+ appSourceId: appSourceId_ARH,
101
+ enableDebugLogging: false,
102
+ headerTitle: 'AI insights',
103
+ appEnv: Env.getEnvName(),
104
+ showWelcomeMessage: false,
105
+ conversationId: ((_e = aiResponseState.aiResponse) === null || _e === void 0 ? void 0 : _e.conversationId) || undefined,
106
+ enableHeaderMenu: false,
107
+ enableTheme: false,
108
+ tokenAuth: {
109
+ auth: {
110
+ userInfo: (_h = (_g = (_f = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _f === void 0 ? void 0 : _f.getToken) === null || _g === void 0 ? void 0 : _g.call(_f)) !== null && _h !== void 0 ? _h : {},
111
+ authToken: (_k = (_j = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _j === void 0 ? void 0 : _j.getEncodedToken()) !== null && _k !== void 0 ? _k : '',
112
+ },
113
+ events: {
114
+ preprocessRequest,
115
+ isAuthenticated: () => {
116
+ var _a, _b, _c;
117
+ return (_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.isAuthenticated) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : false;
118
+ },
119
+ },
120
+ },
121
+ onInitialized: handleInitialized,
122
+ };
123
+ const handleChatWithAIClick = () => {
124
+ setIsAIChatMode(true);
125
+ onChatWithAIClick === null || onChatWithAIClick === void 0 ? void 0 : onChatWithAIClick();
126
+ };
127
+ return (React.createElement(React.Fragment, null, isAIChatMode ? (React.createElement(React.Fragment, null,
128
+ React.createElement(AskRedHatChat, { initConfig: initConfig }),
129
+ React.createElement("div", { className: "fullscreen-chat-footer" },
130
+ React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Return to resources'))))) : (React.createElement(React.Fragment, null,
38
131
  React.createElement("section", null,
39
- React.createElement("header", null,
40
- React.createElement("p", { className: "pf-v6-u-pt-md" },
41
- React.createElement("span", { className: "pf-v6-u-font-family-heading pf-v6-u-pr-xs" }, t('Product')),
42
- " ",
43
- product),
44
- React.createElement("p", null,
45
- React.createElement("span", { className: "pf-v6-u-font-family-heading pf-v6-u-pr-xs" }, t('Version')),
46
- version)),
132
+ shouldShowARHUI() && React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick }),
47
133
  !isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
48
134
  React.createElement(LoadingDots, { show: topContent.isFetching }),
49
135
  topContent.data.length === 0 && (React.createElement(Card, { id: "card", className: "pf-v6-u-mb-md" },
@@ -56,7 +142,7 @@ function TroubleshootSection(props) {
56
142
  React.createElement(Trans, null, "No recommendations for this product")))),
57
143
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } }, canShowTopContent && !isEmpty(version) && React.createElement(Suggestions, null)),
58
144
  !isCreatingCase && React.createElement(ClusterRecommendations, { className: "pf-v6-u-mt-lg" })),
59
- React.createElement("section", { className: "pf-v6-u-mt-lg" }, isNotAnIdea && (React.createElement(InsightsResults, { isDisplayOnMain: true, "data-tracking-id": "troubleshoot-section-file-recs" })))));
145
+ React.createElement("section", { className: "pf-v6-u-mt-lg" }, isNotAnIdea && (React.createElement(InsightsResults, { isDisplayOnMain: true, "data-tracking-id": "troubleshoot-section-file-recs" })))))));
60
146
  }
61
147
  TroubleshootSection.defaultProps = defaultProps;
62
148
  export default TroubleshootSection;
@@ -0,0 +1,12 @@
1
+ import { CardProps, OUIAProps } from '@patternfly/react-core';
2
+ import { type FunctionComponent } from 'react';
3
+ import QuickResponse from './QuickResponse';
4
+ export interface UserFeedbackProps extends Omit<CardProps, 'onSubmit'>, OUIAProps {
5
+ quickResponses?: QuickResponse[];
6
+ hasTextArea?: boolean;
7
+ onSubmit: (selectedResponse?: string, additionalFeedback?: string) => void;
8
+ onClose: () => void;
9
+ }
10
+ declare const UserFeedback: FunctionComponent<UserFeedbackProps>;
11
+ export default UserFeedback;
12
+ //# sourceMappingURL=UserFeedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserFeedback.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/UserFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,SAAS,EAET,SAAS,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAc,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGhE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS;IAC7E,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAqEtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,44 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { ActionGroup, Button, Card, CardBody, CardHeader, Form, TextArea, } from '@patternfly/react-core';
13
+ import React, { useState } from 'react';
14
+ import CloseButton from './CloseButton';
15
+ import QuickResponse from './QuickResponse';
16
+ const UserFeedback = (_a) => {
17
+ var { title = 'Why did you choose this rating?', hasTextArea, quickResponses, onSubmit, onClose, isCompact } = _a, props = __rest(_a, ["title", "hasTextArea", "quickResponses", "onSubmit", "onClose", "isCompact"]);
18
+ const [selectedResponse, setSelectedResponse] = useState();
19
+ const [value, setValue] = useState('');
20
+ return (React.createElement(Card, Object.assign({ isCompact: isCompact, className: "pf-chatbot__feedback-card" }, props),
21
+ React.createElement(CardHeader, { actions: {
22
+ actions: React.createElement(CloseButton, { onClose: onClose }),
23
+ } },
24
+ React.createElement("h1", { className: "pf-chatbot__feedback-card-title" }, title)),
25
+ React.createElement(CardBody, null,
26
+ React.createElement(Form, { className: `pf-chatbot__feedback-card-form ${isCompact ? 'pf-m-compact' : ''}` },
27
+ quickResponses && (React.createElement(QuickResponse, { quickResponses: quickResponses, onSelect: (id) => {
28
+ const selectedQuickResponse = quickResponses.find((response) => response.id === id);
29
+ setSelectedResponse(selectedQuickResponse === null || selectedQuickResponse === void 0 ? void 0 : selectedQuickResponse.content);
30
+ }, isCompact: isCompact })),
31
+ hasTextArea && (React.createElement(React.Fragment, null,
32
+ React.createElement(TextArea, { value: value, onChange: (_event, value) => {
33
+ setValue(value);
34
+ }, placeholder: "Provide optional additional feedback", "aria-label": "Provide optional additional feedback", resizeOrientation: "vertical" }),
35
+ React.createElement("div", { className: "privacy-notice-container" },
36
+ React.createElement("p", null,
37
+ "Do not share any personal or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or services. For more information about Red Hat's privacy practices, please refer to the",
38
+ ' ',
39
+ React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" }, "Red Hat Privacy Statement"),
40
+ ".")))),
41
+ React.createElement(ActionGroup, null,
42
+ React.createElement(Button, { onClick: () => onSubmit(selectedResponse, value) }, "Send Feedback"))))));
43
+ };
44
+ export default UserFeedback;
@@ -0,0 +1,10 @@
1
+ import { CardProps, OUIAProps } from '@patternfly/react-core';
2
+ import React, { type FunctionComponent } from 'react';
3
+ export interface UserFeedbackCompleteProps extends Omit<CardProps, 'ref'>, OUIAProps {
4
+ title?: string;
5
+ body?: string | React.ReactNode;
6
+ onClose?: () => void;
7
+ }
8
+ declare const UserFeedbackComplete: FunctionComponent<UserFeedbackCompleteProps>;
9
+ export default UserFeedbackComplete;
10
+ //# sourceMappingURL=UserFeedbackComplete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserFeedbackComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/UserFeedbackComplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,SAAS,EAAa,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,yBAAyB,CAyEtE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,46 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { Card, CardBody, CardHeader, CardTitle } from '@patternfly/react-core';
13
+ import React from 'react';
14
+ import CloseButton from './CloseButton';
15
+ const UserFeedbackComplete = (_a) => {
16
+ var { title = 'Feedback submitted', body = "We've received your response. Thank you for sharing your feedback!", onClose, isCompact } = _a, props = __rest(_a, ["title", "body", "onClose", "isCompact"]);
17
+ return (React.createElement(Card, Object.assign({ isCompact: isCompact, className: "pf-chatbot__feedback-card pf-chatbot__feedback-card-complete" }, props),
18
+ React.createElement(CardHeader, { className: onClose
19
+ ? 'pf-chatbot__feedback-card-complete-header'
20
+ : 'pf-chatbot__feedback-card-complete-empty-header', actions: onClose
21
+ ? {
22
+ actions: React.createElement(CloseButton, { onClose: onClose }),
23
+ }
24
+ : undefined }),
25
+ React.createElement("div", { className: "pf-chatbot__feedback-complete-body" },
26
+ React.createElement("div", { className: "pf-chatbot__feedback-complete-image" },
27
+ React.createElement("svg", { width: "60", height: "64", viewBox: "0 0 60 64", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
28
+ React.createElement("path", { d: "M53.0555 21.5975H6.94323C3.57013 21.5975 0.835693 24.3319 0.835693 27.705V57.8925C0.835693 61.2656 3.57013 64 6.94323 64H53.0555C56.4286 64 59.1631 61.2656 59.1631 57.8925V27.705C59.1631 24.3319 56.4286 21.5975 53.0555 21.5975Z", fill: "#F8AE54" }),
29
+ React.createElement("path", { d: "M55.8973 19.8247C52.5894 15.7926 29.9992 0 29.9992 0C29.9992 0 7.40996 15.7926 4.10102 19.8247C0.79312 23.8568 0.835476 25.7184 0.835476 27.8899H59.1629C59.1629 25.7184 59.2052 23.8578 55.8973 19.8257V19.8247Z", fill: "#FFCC17" }),
30
+ React.createElement("g", null,
31
+ React.createElement("path", { d: "M53.0567 8.48981H6.94336V61.8388H53.0567V8.48981Z", fill: "#F2F2F2" })),
32
+ React.createElement("path", { d: "M51.6589 7.49908H8.34204V60.8481H51.6589V7.49908Z", fill: "white" }),
33
+ React.createElement("path", { d: "M0.835693 29.1296V57.8925C0.835693 59.2375 1.27165 60.4803 2.00823 61.4896L23.0303 43.5462L0.835693 29.1296Z", fill: "#FFCC17" }),
34
+ React.createElement("path", { d: "M36.9695 43.5472L57.9905 61.4907C58.7271 60.4813 59.1631 59.2386 59.1631 57.8935V29.1306L36.9685 43.5472H36.9695Z", fill: "#FFF4CC" }),
35
+ React.createElement("path", { d: "M0.835693 57.8925V57.8067L22.4146 42.7992L29.9994 37.5244L37.5842 42.7992L59.1641 57.8067V57.8925C59.1641 61.2665 56.4296 64 53.0566 64H6.94323C3.57024 64 0.835693 61.2665 0.835693 57.8925Z", fill: "#FFE072" }),
36
+ React.createElement("g", null,
37
+ React.createElement("path", { d: "M22.1563 42.978L0.835693 57.8067V56.6993L22.1563 42.978Z", fill: "#FEF07C" })),
38
+ React.createElement("g", null,
39
+ React.createElement("path", { d: "M37.8425 42.978L59.1631 57.8067V56.6993L37.8425 42.978Z", fill: "#FEF07C" })),
40
+ React.createElement("path", { d: "M37.8037 32.2373C42.1136 27.9273 42.1136 20.9395 37.8037 16.6295C33.4937 12.3196 26.5059 12.3196 22.196 16.6295C17.886 20.9395 17.886 27.9273 22.196 32.2373C26.5059 36.5472 33.4937 36.5472 37.8037 32.2373Z", fill: "#0066CC" }),
41
+ React.createElement("path", { d: "M27.7803 30.1276C27.6098 30.1276 27.4497 30.0614 27.3298 29.9406L22.9465 25.5562C22.8267 25.4364 22.7595 25.2762 22.7595 25.1068C22.7595 24.9374 22.8256 24.7762 22.9465 24.6554L24.2379 23.364C24.3577 23.2442 24.5178 23.177 24.6883 23.177C24.8587 23.177 25.0168 23.2431 25.1377 23.363L27.7803 26.0056L34.861 18.9259C34.9808 18.8061 35.1409 18.7389 35.3103 18.7389C35.4798 18.7389 35.6389 18.8051 35.7597 18.9239L37.0531 20.2173C37.173 20.3361 37.2401 20.4962 37.2401 20.6677C37.2401 20.8392 37.174 20.9983 37.0531 21.1181L28.2317 29.9406C28.1119 30.0604 27.9518 30.1265 27.7823 30.1265L27.7803 30.1276Z", fill: "white" }))),
42
+ React.createElement("div", { className: "pf-chatbot__feedback-complete-text" },
43
+ React.createElement(CardTitle, { className: "pf-chatbot__feedback-complete-title" }, title),
44
+ React.createElement(CardBody, { className: `pf-chatbot__feedback-complete-card-body` }, body)))));
45
+ };
46
+ export default UserFeedbackComplete;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IconProps {
3
+ width?: number;
4
+ height?: number;
5
+ fillColor?: string;
6
+ }
7
+ export declare const CollapseIcon: (props: IconProps) => React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=CollapseIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapseIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/TroubleshootSection/icons/CollapseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,sBAiB5C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export const CollapseIcon = (props) => {
3
+ const { width = 18.118, height = 12 } = props;
4
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 19 11", fill: "none", style: {
5
+ flexShrink: 0,
6
+ } },
7
+ React.createElement("path", { d: "M9.05895 0L16.9042 7.07143H1.21367L9.05895 0Z", fill: "#9F549C" }),
8
+ React.createElement("path", { d: "M9.05895 1.57129L16.9042 8.64272H1.21367L9.05895 1.57129Z", fill: "white" })));
9
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IconProps {
3
+ width?: number;
4
+ height?: number;
5
+ fillColor?: string;
6
+ }
7
+ export declare const StarIcon: (props: IconProps) => React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=StarIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StarIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/TroubleshootSection/icons/StarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,UAAW,SAAS,sBAgDxC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export const StarIcon = (props) => {
3
+ const { width = 16, height = 15.273 } = props;
4
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 16 15.273", fill: "none", style: {
5
+ flexShrink: 0,
6
+ aspectRatio: '16.00/15.27',
7
+ } },
8
+ React.createElement("path", { d: "M16.197 9.21581L11.3573 8.18825L10.3297 3.34854C10.2937 3.16868 10.1345 3.04541 9.95463 3.04541C9.77478 3.04541 9.61558 3.17385 9.57958 3.34854L8.55202 8.18825L3.71231 9.21581C3.53245 9.25181 3.40918 9.41101 3.40918 9.59087C3.40918 9.77072 3.53762 9.92992 3.71231 9.96592L8.55202 10.9935L9.57958 15.8332C9.61558 16.013 9.77478 16.1363 9.95463 16.1363C10.1345 16.1363 10.2937 16.0079 10.3297 15.8332L11.3573 10.9935L16.197 9.96592C16.3768 9.92992 16.5001 9.77072 16.5001 9.59087C16.5001 9.41101 16.3717 9.25181 16.197 9.21581Z", fill: "url(#paint0_linear_5146_16767)" }),
9
+ React.createElement("path", { d: "M3.40909 6.68195C3.58647 6.68195 3.74356 6.55526 3.77905 6.38297L4.16931 4.53308L6.0192 4.14282C6.19658 4.10733 6.31818 3.95024 6.31818 3.77286C6.31818 3.59548 6.19149 3.43839 6.0192 3.4029L4.16931 3.01264L3.77905 1.16275C3.74356 0.98537 3.58647 0.86377 3.40909 0.86377C3.23171 0.86377 3.07462 0.990461 3.03913 1.16275L2.64887 3.01264L0.798982 3.4029C0.6216 3.43839 0.5 3.59548 0.5 3.77286C0.5 3.95024 0.626691 4.10733 0.798982 4.14282L2.64887 4.53308L3.03913 6.38297C3.07462 6.56035 3.23171 6.68195 3.40909 6.68195Z", fill: "url(#paint1_linear_5146_16767)" }),
10
+ React.createElement("defs", null,
11
+ React.createElement("linearGradient", { id: "paint0_linear_5146_16767", x1: "9.95463", y1: "3.04541", x2: "9.95463", y2: "16.1363", gradientUnits: "userSpaceOnUse" },
12
+ React.createElement("stop", { stopColor: "#F56E6E" }),
13
+ React.createElement("stop", { offset: "1", stopColor: "#5E40BE" })),
14
+ React.createElement("linearGradient", { id: "paint1_linear_5146_16767", x1: "3.40909", y1: "0.86377", x2: "3.40909", y2: "6.68195", gradientUnits: "userSpaceOnUse" },
15
+ React.createElement("stop", { stopColor: "#F56E6E" }),
16
+ React.createElement("stop", { offset: "1", stopColor: "#5E40BE" })))));
17
+ };
@@ -146,12 +146,12 @@ function WidgetFileUploader(props) {
146
146
  }
147
147
  }
148
148
  });
149
- return (React.createElement(Card, { id: "file-uploader-card", className: "file-diag", onPaste: handlePaste },
149
+ return (React.createElement(Card, { id: "file-uploader-card", className: `file-diag pf-v6-u-m-sm`, 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
- React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body" },
152
+ React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body pf-v6-u-pt-md" },
153
153
  React.createElement(WidgetFileSelector, { isSessionId: props.isSessionId, isPrivate: props.isPrivate, isIdea: props.isIdea, showFileExceed: fileExceedInfo }),
154
- !hasSomeSelectedFiles(selectedLocalFiles) ? ((!props.isIdea && props.helperText) || (React.createElement("p", { className: "pf-v6-u-mt-md" },
154
+ !hasSomeSelectedFiles(selectedLocalFiles) ? ((!props.isIdea && props.helperText) || (React.createElement("p", { className: "pf-v6-u-mt-sm" },
155
155
  !props.isIdea ? (React.createElement(React.Fragment, null,
156
156
  React.createElement(Trans, null, "To help us provide the right guidance, upload a sosreport."),
157
157
  React.createElement("br", null),
@@ -73,7 +73,6 @@ i.web-icon-check {
73
73
  color: #06c;
74
74
  font-size: 14px;
75
75
  text-align: center;
76
- margin-bottom: 0;
77
76
  }
78
77
 
79
78
  .file-diag .file-diag-dragndrop:hover,
@@ -8,7 +8,6 @@ export interface IProps {
8
8
  disabled?: boolean;
9
9
  selectedContacts?: IContact[];
10
10
  contactsToExclude?: IContact[];
11
- disableContactRemoval?: IContact[];
12
11
  className?: string;
13
12
  id: string;
14
13
  typeAheadSize?: 'sm' | 'md' | 'lg';
@@ -1 +1 @@
1
- {"version":3,"file":"ContactSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/input/ContactSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAsBrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,MAAM;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,qBAAqB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,KAAK,KAAA,EAAE,GAAG,KAAA,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACxE,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAQ;IAC5C,QAAQ,oCAAuC;IAE/C,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAalC;gBAEU,KAAK,EAAE,MAAM;IAYzB,gBAAgB,YAAa,QAAQ,KAAG,MAAM,CAS5C;IAEF,mBAAmB,aAAc,QAAQ,EAAE,KAAG,QAAQ,EAAE,CAGtD;IAEF,sBAAsB,MAAO,QAAQ,KAAG,OAAO,CAE7C;IAEF,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAmBpC,QAAQ,aAAoB,QAAQ,EAAE,mBAKpC;IAEF,YAAY,UAAiB,MAAM,mBA0CjC;IAEF,iBAAiB,UAAW,MAAM,UAiBhC;IAEF,YAAY,UAAW,GAAG,aAAa,GAAG,UAkBxC;IAEF,mBAAmB,oBAAqB,QAAQ,UAI9C;IAEF,aAAa,UAAW,KAAK,CAAC,aAAa,UAkCzC;IAEF,WAAW,aAIT;IAEF,UAAU,aAKR;IAEF,WAAW,aAGT;IAEF,QAAQ,aAEN;IAEF,MAAM;CA6GT"}
1
+ {"version":3,"file":"ContactSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/input/ContactSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAqBrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,MAAM;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,KAAK,KAAA,EAAE,GAAG,KAAA,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACxE,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAQ;IAC5C,QAAQ,oCAAuC;IAE/C,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAalC;gBAEU,KAAK,EAAE,MAAM;IAYzB,gBAAgB,YAAa,QAAQ,KAAG,MAAM,CAS5C;IAEF,mBAAmB,aAAc,QAAQ,EAAE,KAAG,QAAQ,EAAE,CAGtD;IAEF,sBAAsB,MAAO,QAAQ,KAAG,OAAO,CAE7C;IAEF,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAmBpC,QAAQ,aAAoB,QAAQ,EAAE,mBAKpC;IAEF,YAAY,UAAiB,MAAM,mBA0CjC;IAEF,iBAAiB,UAAW,MAAM,UAiBhC;IAEF,YAAY,UAAW,GAAG,aAAa,GAAG,UAkBxC;IAEF,mBAAmB,oBAAqB,QAAQ,UAI9C;IAEF,aAAa,UAAW,KAAK,CAAC,aAAa,UAkCzC;IAEF,WAAW,aAIT;IAEF,UAAU,aAKR;IAEF,WAAW,aAGT;IAEF,QAAQ,aAEN;IAEF,MAAM;CAqGT"}
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { contacts } from '@cee-eng/hydrajs';
11
11
  import { Button, Label, LabelGroup, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
12
  import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
13
- import { haltEvent } from '@rh-support/utils';
14
13
  import assign from 'lodash/assign';
15
14
  import differenceBy from 'lodash/differenceBy';
16
15
  import filter from 'lodash/filter';
@@ -213,11 +212,7 @@ export class ContactSelectorInternal extends React.Component {
213
212
  : searchValue;
214
213
  const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: this.onToggle, isExpanded: isOpen, isDisabled: this.props.disabled || this.props.isUpdating, isFullWidth: true },
215
214
  React.createElement(TextInputGroup, { isPlain: true },
216
- React.createElement(TextInputGroupMain, { value: displayValue, onChange: (_, value) => this.handleInputChange(value), onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, placeholder: this.props.placeholder || 'Search contact by name or username', ref: this.inputRef, autoComplete: "off", isExpanded: isOpen, role: "combobox" }, this.props.multiple && selectedContacts.length > 0 && (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, selectedContacts.map((contact, index) => {
217
- var _a, _b;
218
- const isDisabled = !!((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.disableContactRemoval) === null || _b === void 0 ? void 0 : _b.find((v) => v.ssoUsername === contact.ssoUsername));
219
- return (React.createElement(Label, { key: contact.ssoUsername, variant: "outline", color: "blue", onClick: haltEvent, onClose: () => this.handleRemoveContact(contact), isDisabled: isDisabled }, this.getSelectedLabel(contact)));
220
- })))),
215
+ React.createElement(TextInputGroupMain, { value: displayValue, onChange: (_, value) => this.handleInputChange(value), onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, placeholder: this.props.placeholder || 'Search contact by name or username', ref: this.inputRef, autoComplete: "off", isExpanded: isOpen, role: "combobox" }, this.props.multiple && selectedContacts.length > 0 && (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, selectedContacts.map((contact, index) => (React.createElement(Label, { key: contact.ssoUsername, variant: "outline", color: "blue", onClose: () => this.handleRemoveContact(contact) }, this.getSelectedLabel(contact))))))),
221
216
  React.createElement(TextInputGroupUtilities, null,
222
217
  isLoading && React.createElement(Spinner, { size: "sm" }),
223
218
  this.props.clearButton && (searchValue || selectedContacts.length > 0) && (React.createElement(Button, { variant: "plain", icon: React.createElement(TimesCircleIcon, null), onClick: this.handleClear, "aria-label": "Clear input" }))))));
@@ -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;;;;;EAmU9D"}
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"}
@@ -161,7 +161,6 @@ export function useIsSectionValid(sectionName) {
161
161
  !isEmpty(version) &&
162
162
  !isEmpty(summary) &&
163
163
  !isEmpty(issue) &&
164
- isEntitlement === true &&
165
164
  isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
166
165
  return isValid;
167
166
  }
@@ -253,12 +252,7 @@ export function useIsSectionValid(sectionName) {
253
252
  return '';
254
253
  switch (sectionNameLocal) {
255
254
  case AppRouteSections.RESOURCES:
256
- if (isCaseCreate === false) {
257
- return getSupportSectionError();
258
- }
259
- else {
260
- return recommendationSectionError();
261
- }
255
+ return recommendationSectionError();
262
256
  case AppRouteSections.GET_SUPPORT:
263
257
  return getSupportSectionError();
264
258
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAuTtD"}
1
+ {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAgTtD"}
@@ -24,8 +24,7 @@ import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
24
24
  import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
25
25
  import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
26
26
  import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
27
- import { AppRouteSections } from '../../reducers/RouteConstNTypes';
28
- import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
27
+ import { setRouteFlags } from '../../reducers/RouteReducer';
29
28
  import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
30
29
  import { fetchTopContent } from '../../reducers/TopContentReducer';
31
30
  import RouteUtils from '../../utils/routeUtils';
@@ -118,8 +117,6 @@ export function GlobalTroubleshootEffects(props) {
118
117
  }, [allProducts.data.productsResult, caseDispatch, props.routeProps]);
119
118
  // if you want to hide any section on page load then the logic will go here..
120
119
  useEffect(() => {
121
- // Reset validation error state when the troubleshoot app loads freshly
122
- updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
123
120
  if (!isFirstMount.current && loggedInUser.data && managedAccounts.data)
124
121
  return;
125
122
  if (isFirstMount.current) {
@@ -146,14 +143,11 @@ export function GlobalTroubleshootEffects(props) {
146
143
  */
147
144
  useEffect(() => {
148
145
  if (props.routeProps.location.pathname === RouteUtils.seBasePath) {
149
- // Set the active section to the default section when navigating to base path
150
- const defaultSection = isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT;
151
- setActiveSectionChanged(dispatchToRouteReducer, defaultSection, '');
152
146
  RouteUtils.navigateToDefaltSection(props.routeProps, isCaseCreate, isSearchIntent, false);
153
147
  !isSearchIntent && resetCaseCreateState();
154
148
  }
155
149
  // eslint-disable-next-line react-hooks/exhaustive-deps
156
- }, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
150
+ }, [dispatchToRouteReducer, props.routeProps, isCaseCreate, isSearchIntent]);
157
151
  /**
158
152
  * Setting Default AccountNumber and ContactSsoUsername from loggedInUsersAccount
159
153
  * Disabling exhaustive-deps rule as we don't want to reset default values if user manually clears these from UI.