@rh-support/troubleshoot 2.0.6 → 2.0.7

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 (115) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +44 -5
  3. package/lib/esm/components/AccountInfo/OwnerSelector.js +2 -2
  4. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +5 -3
  6. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseOverview/index.js +1 -1
  8. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +38 -36
  10. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +2 -1
  11. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +4 -3
  13. package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts +12 -0
  14. package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts.map +1 -0
  15. package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.js +14 -0
  16. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +1 -1
  17. package/lib/esm/components/CaseEditView/ShareCase/PartnerShare.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/ShareCase/PartnerShare.js +6 -1
  19. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +1 -2
  21. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +1 -1
  22. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +1 -1
  23. package/lib/esm/components/CaseInformation/CaseGroup.js +2 -2
  24. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  25. package/lib/esm/components/CaseInformation/CaseInformation.js +1 -8
  26. package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
  27. package/lib/esm/components/CaseInformation/Description.js +4 -2
  28. package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
  29. package/lib/esm/components/CaseInformation/Severity.js +1 -1
  30. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  31. package/lib/esm/components/CaseManagement/CaseManagement.js +2 -9
  32. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts +5 -1
  33. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  34. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -7
  35. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  36. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +4 -1
  37. package/lib/esm/components/IdeaInformation/IdeaInformtion.d.ts.map +1 -1
  38. package/lib/esm/components/IdeaInformation/IdeaInformtion.js +1 -8
  39. package/lib/esm/components/ImproveCase/KtQuestions.js +2 -2
  40. package/lib/esm/components/Issue/Issue.d.ts.map +1 -1
  41. package/lib/esm/components/Issue/Issue.js +1 -2
  42. package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
  43. package/lib/esm/components/OpenCase/OpenCase.js +2 -9
  44. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -2
  45. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  46. package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -1
  47. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
  48. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  49. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +3 -3
  50. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts +1 -1
  51. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  52. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +3 -3
  53. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -2
  54. package/lib/esm/components/ProductSelector/ProductSelectorLoader.d.ts +1 -2
  55. package/lib/esm/components/ProductSelector/ProductSelectorLoader.d.ts.map +1 -1
  56. package/lib/esm/components/ProductSelector/ProductSelectorLoader.js +12 -19
  57. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +3 -3
  58. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  59. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +2 -1
  60. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
  61. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +1 -1
  62. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  63. package/lib/esm/components/SessionRestore/SessionRestore.js +4 -9
  64. package/lib/esm/components/SubmitCase/ResubmitToast.js +1 -1
  65. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  66. package/lib/esm/components/Suggestions/TopContent.js +1 -1
  67. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  68. package/lib/esm/components/shared/useIsSectionValid.d.ts +1 -1
  69. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  70. package/lib/esm/components/shared/useIsSectionValid.js +5 -24
  71. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  72. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +40 -80
  73. package/lib/esm/components/wizardLayout/MainSection.d.ts +5 -3
  74. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  75. package/lib/esm/components/wizardLayout/MainSection.js +4 -4
  76. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  77. package/lib/esm/components/wizardLayout/WizardAside.js +3 -10
  78. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  79. package/lib/esm/components/wizardLayout/WizardLayout.js +31 -42
  80. package/lib/esm/components/wizardLayout/WizardMain.d.ts +2 -3
  81. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  82. package/lib/esm/components/wizardLayout/WizardMain.js +43 -163
  83. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +7 -3
  84. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  85. package/lib/esm/components/wizardLayout/WizardNavigation.js +46 -90
  86. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  87. package/lib/esm/components/wizardLayout/index.js +2 -10
  88. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  89. package/lib/esm/context/RootTroubleshootProvider.js +7 -9
  90. package/lib/esm/css/app.css +0 -450
  91. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  92. package/lib/esm/hooks/useResetCaseCreate.js +0 -4
  93. package/lib/esm/hooks/useWizard.d.ts +4 -0
  94. package/lib/esm/hooks/useWizard.d.ts.map +1 -0
  95. package/lib/esm/hooks/useWizard.js +128 -0
  96. package/lib/esm/reducers/RouteConstNTypes.d.ts +21 -1
  97. package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
  98. package/lib/esm/reducers/RouteConstNTypes.js +43 -0
  99. package/lib/esm/reducers/RouteReducer.d.ts +13 -47
  100. package/lib/esm/reducers/RouteReducer.d.ts.map +1 -1
  101. package/lib/esm/reducers/RouteReducer.js +36 -165
  102. package/lib/esm/scss/_main.scss +107 -787
  103. package/lib/esm/utils/routeUtils.d.ts +3 -9
  104. package/lib/esm/utils/routeUtils.d.ts.map +1 -1
  105. package/lib/esm/utils/routeUtils.js +14 -41
  106. package/package.json +14 -25
  107. package/lib/esm/components/wizardLayout/WizardProgress.d.ts +0 -13
  108. package/lib/esm/components/wizardLayout/WizardProgress.d.ts.map +0 -1
  109. package/lib/esm/components/wizardLayout/WizardProgress.js +0 -108
  110. package/lib/esm/context/AppMetadataContext.d.ts +0 -11
  111. package/lib/esm/context/AppMetadataContext.d.ts.map +0 -1
  112. package/lib/esm/context/AppMetadataContext.js +0 -13
  113. package/lib/esm/reducers/AppMetadataReducer.d.ts +0 -28
  114. package/lib/esm/reducers/AppMetadataReducer.d.ts.map +0 -1
  115. package/lib/esm/reducers/AppMetadataReducer.js +0 -28
@@ -1,174 +1,54 @@
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 { AlertMessage, AlertType, LoadingIndicator, usePrevious } from '@rh-support/components';
11
- import { useUserPreferences } from '@rh-support/react-context';
12
- import { PreviousCaseTypes } from '@rh-support/utils';
13
- import isEmpty from 'lodash/isEmpty';
1
+ import { Wizard, WizardContextConsumer, WizardFooter } from '@patternfly/react-core';
2
+ import { LoadingIndicator } from '@rh-support/components';
14
3
  import isEqual from 'lodash/isEqual';
15
- import isFunction from 'lodash/isFunction';
16
- import map from 'lodash/map';
17
- import React, { Suspense, useContext, useEffect, useRef } from 'react';
18
- import { Trans, useTranslation } from 'react-i18next';
4
+ import React, { Suspense, useContext, useState } from 'react';
5
+ import { useTranslation } from 'react-i18next';
19
6
  import { Route } from 'react-router-dom';
20
- import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
21
- import { RecommendationStateContext } from '../../context/RecommendationContext';
22
- import { RouteContext } from '../../context/RouteContext';
23
- import { TCStateContext } from '../../context/TopContentContext';
24
- import { setCaseDetails } from '../../reducers/CaseReducer';
7
+ import { useCaseSelector } from '../../context/CaseContext';
8
+ import { RouteDispatchContext } from '../../context/RouteContext';
9
+ import { useWizard } from '../../hooks/useWizard';
25
10
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
26
- import { getAppRouteConfugurations, getAppRouteSectionsSequence } from '../../reducers/RouteReducer';
11
+ import { setActiveSectionChanged, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
27
12
  import RouteUtils from '../../utils/routeUtils';
28
- import CaseInformation from '../CaseInformation/CaseInformation';
29
- import CaseManagement from '../CaseManagement/CaseManagement';
30
- import IdeaInformation from '../IdeaInformation/IdeaInformtion';
31
- import OpenCase from '../OpenCase/OpenCase';
32
- // section chunks
33
- import ProductSelector from '../ProductSelector/ProductSelector';
34
- import Review from '../Review/Review';
35
- import Constants from '../shared/Constants';
36
- import { useIsSectionValid } from '../shared/useIsSectionValid';
37
13
  import SubmitCase from '../SubmitCase/SubmitCase';
38
- import TroubleshootSection from '../TroubleshootSection/TroubleshootSection';
39
- import { GlobalTroubleshootEffects } from './GlobalTroubleshootEffects';
40
14
  import MainSection from './MainSection';
41
- const defaultProps = {};
15
+ import WizardNavigation from './WizardNavigation';
42
16
  function WizardMain(props) {
43
- const { isActiveSectionValid } = useIsSectionValid();
44
- const caseDispatch = useCaseDispatch();
45
- const { getPreferredLanguage } = useUserPreferences();
46
- const userOriginalPreferredLanguage = () => __awaiter(this, void 0, void 0, function* () {
47
- try {
48
- const retrievedLanguage = yield getPreferredLanguage();
49
- if (!isEmpty(retrievedLanguage)) {
50
- const preferredLanguage = {
51
- label: Constants.languagesMap[retrievedLanguage] || retrievedLanguage,
52
- value: retrievedLanguage,
53
- };
54
- onLanguageChange(preferredLanguage);
55
- }
56
- }
57
- catch (error) {
58
- console.log(error);
59
- }
60
- });
61
- const onCaseDetailsChange = (caseDetails) => {
62
- setCaseDetails(caseDispatch, caseDetails);
63
- };
64
- const onLanguageChange = (selection) => {
65
- onCaseDetailsChange({ caseLanguage: selection.value });
66
- };
67
- useEffect(() => {
68
- userOriginalPreferredLanguage();
69
- // eslint-disable-next-line react-hooks/exhaustive-deps
70
- }, []);
71
- const { t } = useTranslation();
72
- const allSectionRefs = {
73
- [AppRouteSections.SUMMARIZE]: useRef(null),
74
- [AppRouteSections.TROUBLESHOOT]: useRef(null),
75
- [AppRouteSections.DESCRIBE_MORE]: useRef(null),
76
- [AppRouteSections.MANAGEMENT]: useRef(null),
77
- [AppRouteSections.REVIEW]: useRef(null),
78
- [AppRouteSections.GET_SUPPORT]: useRef(null),
79
- [AppRouteSections.SUBMIT_CASE]: useRef(null),
80
- };
81
- const { routeState: { activeSection, isCaseCreate, isSearchIntent, showValidationErrorAlert, sectionsToHide }, } = useContext(RouteContext);
82
- const { recommendationState: { isLoadingRecommendations }, } = useContext(RecommendationStateContext);
83
- const { topContentState: { topContent }, } = useContext(TCStateContext);
84
- const { isCreatingCase, isSelectedAccounntSecureSupport, summary, caseType, product } = useCaseSelector((state) => ({
17
+ const [showRestFlag, setShowRestFlag] = useState(false);
18
+ const { isCreatingCase } = useCaseSelector((state) => ({
85
19
  isCreatingCase: state.isCreatingCase,
86
- isSelectedAccounntSecureSupport: state.selectedAccountDetails.data.secureSupport,
87
- summary: state.caseDetails.summary,
88
- caseType: state.caseDetails.caseType,
89
- product: state.caseDetails.product,
90
20
  }), isEqual);
91
- const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
92
- const appRouteConfugurations = getAppRouteConfugurations(isCaseCreate, isIdea, product);
93
- const previousActiveSection = usePrevious(activeSection);
94
- // scrolling and focus related
95
- useEffect(() => {
96
- var _a, _b;
97
- if (!isEmpty(activeSection) &&
98
- previousActiveSection !== activeSection &&
99
- isFunction((_b = (_a = allSectionRefs[activeSection]) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.scrollIntoView)) {
100
- allSectionRefs[activeSection].current.focus({ preventScroll: true });
101
- }
102
- // eslint-disable-next-line react-hooks/exhaustive-deps
103
- }, [activeSection, previousActiveSection]);
104
- const renderSummarizePage = () => {
105
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.SUMMARIZE], section: AppRouteSections.SUMMARIZE, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.SUMMARIZE].title) },
106
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
107
- React.createElement(ProductSelector, { routeProps: props.routeProps }))));
108
- };
109
- const renderTroubleshootPage = () => {
110
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.TROUBLESHOOT], section: AppRouteSections.TROUBLESHOOT, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.TROUBLESHOOT].title) },
111
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
112
- React.createElement(TroubleshootSection, null))));
113
- };
114
- const renderDescribeMorePage = () => {
115
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.DESCRIBE_MORE], section: AppRouteSections.DESCRIBE_MORE, activeSection: activeSection, title: React.createElement(React.Fragment, null,
116
- t(appRouteConfugurations[AppRouteSections.DESCRIBE_MORE].title),
117
- isEmpty(RouteUtils.seBasePath) && isSelectedAccounntSecureSupport && (React.createElement("span", { className: "secured-support" },
118
- React.createElement(Trans, null, "Secured Support")))), description: t('Provide the details of your issue.') },
119
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
120
- React.createElement(CaseInformation, { routeProps: props.routeProps }))));
121
- };
122
- const renderManagementPage = () => {
123
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.MANAGEMENT], section: AppRouteSections.MANAGEMENT, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.MANAGEMENT].title), descriptionClassName: "text-medium-grey" },
124
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
125
- React.createElement(CaseManagement, null))));
126
- };
127
- const renderReviewPage = () => {
128
- // The review is going to change so adding Recommendations is just temporary.
129
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.REVIEW], section: AppRouteSections.REVIEW, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.REVIEW].title), description: t('Before submitting, review the information you entered.') },
130
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
131
- React.createElement(Review, { routeProps: props.routeProps }))));
132
- };
133
- const renderGetSupportPage = () => {
134
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.GET_SUPPORT], section: AppRouteSections.GET_SUPPORT, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.GET_SUPPORT].title), description: t('Select the best category for your issue.'), isLoading: isCreatingCase },
135
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
136
- React.createElement(OpenCase, { routeProps: props.routeProps }))));
137
- };
138
- const renderSubmitCasePage = () => {
139
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.SUBMIT_CASE], section: AppRouteSections.SUBMIT_CASE, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.SUBMIT_CASE].title), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case.") },
140
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
141
- React.createElement(SubmitCase, null))));
142
- };
143
- const renderIdeaInformationPage = () => {
144
- return (React.createElement(MainSection, { ref: allSectionRefs[AppRouteSections.DESCRIBE_IDEA], section: AppRouteSections.DESCRIBE_IDEA, activeSection: activeSection, title: t(appRouteConfugurations[AppRouteSections.DESCRIBE_IDEA].title), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case.") },
145
- React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
146
- React.createElement(IdeaInformation, null))));
147
- };
148
- const mainSectionComponents = {
149
- [AppRouteSections.GET_SUPPORT]: renderGetSupportPage,
150
- [AppRouteSections.SUMMARIZE]: renderSummarizePage,
151
- [AppRouteSections.TROUBLESHOOT]: renderTroubleshootPage,
152
- [AppRouteSections.DESCRIBE_MORE]: renderDescribeMorePage,
153
- [AppRouteSections.DESCRIBE_IDEA]: renderIdeaInformationPage,
154
- [AppRouteSections.MANAGEMENT]: renderManagementPage,
155
- [AppRouteSections.REVIEW]: renderReviewPage,
156
- [AppRouteSections.SUBMIT_CASE]: renderSubmitCasePage,
157
- };
158
- // alert title and variant based on multiple conditions for two different sections
159
- const title = topContent.isFetching || (isLoadingRecommendations && summary)
160
- ? t('Please wait while recommendations are loading')
161
- : t('Please address the errors to proceed');
162
- return (React.createElement("article", { className: "grid-main" },
163
- React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
164
- React.createElement(AlertMessage, { show: showValidationErrorAlert && !isActiveSectionValid, variant: (isLoadingRecommendations && summary) || topContent.isFetching ? AlertType.INFO : AlertType.DANGER, isInline: true, title: title }),
165
- map(getAppRouteSectionsSequence(sectionsToHide, isCaseCreate, isSearchIntent, isIdea), (activeSectionLocal) => {
166
- if (activeSectionLocal === AppRouteSections.SUBMIT_CASE) {
167
- return;
168
- }
169
- return (React.createElement(Route, { key: `route-${activeSectionLocal}`, exact: true, path: `${RouteUtils.getRoutePathForActiveSection(activeSectionLocal, getAppRouteSectionsSequence(sectionsToHide, isCaseCreate, isSearchIntent, isIdea), isCaseCreate, isSearchIntent, caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT)}`, render: mainSectionComponents[activeSectionLocal] }));
170
- }),
171
- React.createElement(Route, { exact: true, ref: allSectionRefs[AppRouteSections.SUBMIT_CASE], path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: mainSectionComponents[AppRouteSections.SUBMIT_CASE] })));
21
+ const { getStepsSequece } = useWizard(props.routeProps);
22
+ const dispatchToRouteReducer = useContext(RouteDispatchContext);
23
+ const { t } = useTranslation();
24
+ const renderSubmitCasePage = () => (React.createElement(MainSection, { section: AppRouteSections.SUBMIT_CASE, title: t('Case has been submitted'), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case."), className: "case-submit-page" },
25
+ React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
26
+ React.createElement(SubmitCase, null))));
27
+ const onNext = (step) => {
28
+ RouteUtils.navigateToSection(props.routeProps, `${props.routeProps.location.pathname}/${step.id}`, false);
29
+ };
30
+ const onBack = (step, prevStep) => {
31
+ var regex = new RegExp('/' + prevStep.prevId + '$');
32
+ RouteUtils.navigateToSection(props.routeProps, props.routeProps.location.pathname.replace(regex, ''), false);
33
+ };
34
+ const onSubmit = () => {
35
+ setActiveSectionChanged(dispatchToRouteReducer, AppRouteSections.SUBMIT_CASE);
36
+ props.submitCaseAndNavigate(false);
37
+ return;
38
+ };
39
+ const onCurrentStepChanged = (step) => {
40
+ setActiveSectionChanged(dispatchToRouteReducer, step.id);
41
+ updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
42
+ };
43
+ const CustomFooter = (React.createElement(WizardFooter, null,
44
+ React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
45
+ return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: onNext, onBack: onBack, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag) }));
46
+ })));
47
+ // To add a new step to wizard first need to add the component to appRouteConfugurations
48
+ // in useWizard file then add it to step squences in RouteConstNTypes
49
+ const steps = getStepsSequece(showRestFlag);
50
+ return (React.createElement(React.Fragment, null,
51
+ steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/${steps[0].id}`, render: () => (React.createElement(Wizard, { navAriaLabel: ` navAriaLabel steps `, mainAriaLabel: ` mainAriaLabel content `, steps: steps, footer: CustomFooter, onNext: onNext, onBack: onBack, hideClose: true, backButtonText: t('Go back'), onCurrentStepChanged: onCurrentStepChanged })) })),
52
+ React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
172
53
  }
173
- WizardMain.defaultProps = defaultProps;
174
54
  export default WizardMain;
@@ -1,9 +1,13 @@
1
- import React from 'react';
2
1
  import { RouteComponentProps } from 'react-router';
3
- import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
2
+ import { IRouteUrlParams, ISectionConfiguration } from '../../reducers/RouteConstNTypes';
4
3
  interface IProps {
5
4
  routeProps: RouteComponentProps<IRouteUrlParams>;
6
- onNext: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
5
+ onNext: () => void;
6
+ onBack: () => void;
7
+ activeStep: Partial<ISectionConfiguration>;
8
+ onSubmit: () => void;
9
+ confirmSupportModal: (isConfirmedStateSideSupport: boolean, hasPreferredSecureSupportAccount: boolean) => void;
10
+ onShowRestUpdate: (flag: boolean) => void;
7
11
  }
8
12
  declare function WizardNavigation(props: IProps): JSX.Element;
9
13
  declare namespace WizardNavigation {
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAOnD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,eA6KtC;kBA7KQ,gBAAgB;;;AA+KzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAI3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,2BAA2B,EAAE,OAAO,EAAE,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/G,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAmFtC;kBAnFQ,gBAAgB;;;AAqFzB,eAAe,gBAAgB,CAAC"}
@@ -1,104 +1,60 @@
1
- import { SupportFeedbackForm } from '@rh-support/components';
2
- import { PreviousCaseTypes } from '@rh-support/utils';
3
- import isEmpty from 'lodash/isEmpty';
4
- import isEqual from 'lodash/isEqual';
5
- import React, { useContext, useEffect, useRef } from 'react';
1
+ import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
2
+ import React, { useContext } from 'react';
6
3
  import { useTranslation } from 'react-i18next';
7
- import { AppMetadataDispatchContext } from '../../context/AppMetadataContext';
8
- import { useCaseSelector } from '../../context/CaseContext';
9
4
  import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
10
- import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
11
- import { setRef } from '../../reducers/AppMetadataReducer';
12
- import { getAppRouteConfugurations, getAppRouteSectionsSequence, getDefaultSection, RouteReducerConstants, } from '../../reducers/RouteReducer';
13
- import RouteUtils from '../../utils/routeUtils';
14
- import { isUploadingAttachment } from '../shared/fileUpload/reducer/AttachmentHelper';
15
- import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
5
+ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
6
+ import { updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
16
7
  import { useIsSectionValid } from '../shared/useIsSectionValid';
17
8
  const defaultProps = {};
18
9
  function WizardNavigation(props) {
19
10
  const { t } = useTranslation();
20
- const { routeState: { activeSection, sectionsToHide, isCaseCreate, isSearchIntent, showValidationErrorAlert }, } = useContext(RouteContext);
21
- const { caseNumber, caseType, caseCreationError, isCreatingCase, product } = useCaseSelector((state) => ({
22
- caseNumber: state.caseDetails.caseNumber,
23
- caseType: state.caseDetails.caseType,
24
- caseCreationError: state.caseCreationError,
25
- isCreatingCase: state.isCreatingCase,
26
- product: state.caseDetails.product,
27
- }), isEqual);
28
- const dispatchToAppMetadataReducer = useContext(AppMetadataDispatchContext);
29
- const { attachmentState } = useContext(AttachmentStateContext);
30
- const isUploadingAnyAttachment = isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles);
11
+ const canCreateCase = useCanCreateCase();
12
+ const { routeState: { activeSection, isNextBtnClickedToShowValidationError, noValidEntitlement }, } = useContext(RouteContext);
13
+ const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
31
14
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
32
- const { isActiveSectionValid, activeSectionError } = useIsSectionValid();
33
- const { resetCaseCreateState } = useResetCaseCreate();
34
- const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
35
- const appRouteConfugurations = getAppRouteConfugurations(isCaseCreate, isIdea, product);
36
- // defining next button ref
37
- const nextButtonRef = useRef(null);
38
- useEffect(() => {
39
- // setting ref in the reducer
40
- setRef(dispatchToAppMetadataReducer, nextButtonRef);
41
- }, [dispatchToAppMetadataReducer, nextButtonRef]);
42
- const onNext = (e) => {
43
- if (isActiveSectionValid) {
44
- props.onNext && props.onNext(e);
45
- dispatchToRouteReducer({
46
- type: RouteReducerConstants.setShowValidationErrorAlert,
47
- payload: {
48
- showValidationErrorAlert: false,
49
- },
50
- });
15
+ const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
16
+ const onNext = () => {
17
+ var _a, _b;
18
+ updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, true);
19
+ const userCanNotOpenCase = props.activeStep.id === AppRouteSections.TROUBLESHOOT && canCreateCase.alert();
20
+ if (userCanNotOpenCase || !isSectionValidFn(props.activeStep.id))
51
21
  return;
52
- }
53
- dispatchToRouteReducer({
54
- type: RouteReducerConstants.setShowValidationErrorAlert,
55
- payload: {
56
- showValidationErrorAlert: true,
57
- },
58
- });
59
- };
60
- const onPrevious = (e) => {
61
- RouteUtils.navigateToSection(props.routeProps, appRouteConfugurations[activeSection].previousSection, getAppRouteSectionsSequence(sectionsToHide, isCaseCreate, isSearchIntent, isIdea), isCaseCreate, isSearchIntent, isIdea, false);
62
- };
63
- const onBackToSectionSelect = (e) => {
64
- RouteUtils.navigateToSection(props.routeProps, appRouteConfugurations[activeSection].backToSection, getAppRouteSectionsSequence(sectionsToHide, isCaseCreate, isSearchIntent, isIdea), isCaseCreate, isSearchIntent, isIdea, false);
65
- };
66
- const onCaseOpen = () => {
67
- if (isEmpty(caseNumber))
22
+ const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
23
+ const hasPreferredSecureSupportAccount = (_b = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.hasPreferredSecureSupportAccount;
24
+ if (props.activeStep.id === AppRouteSections.TROUBLESHOOT &&
25
+ (isConfirmedStateSideSupport || hasPreferredSecureSupportAccount)) {
26
+ props.confirmSupportModal(isConfirmedStateSideSupport, hasPreferredSecureSupportAccount);
68
27
  return;
69
- !isEmpty(RouteUtils.seBasePath)
70
- ? props.routeProps.history.push({ pathname: `/case/${caseNumber}` })
71
- : window.open(`/support/cases/#/case/${caseNumber}`);
28
+ }
29
+ if (props.activeStep.isLastStep) {
30
+ props.onSubmit();
31
+ }
32
+ else {
33
+ if (props.activeStep.showRestOnNext) {
34
+ props.onShowRestUpdate(true);
35
+ // when we want to transit from showing steps partially
36
+ // to show all steps, a delay needed in order to steps array
37
+ // to be updated
38
+ window.setTimeout(() => {
39
+ props.onNext && props.onNext();
40
+ }, 10);
41
+ }
42
+ else {
43
+ props.onNext && props.onNext();
44
+ }
45
+ }
46
+ return;
72
47
  };
73
- const onNewIssue = (e) => {
74
- resetCaseCreateState();
75
- RouteUtils.navigateToSection(props.routeProps, getDefaultSection(isCaseCreate, isSearchIntent, isIdea), getAppRouteSectionsSequence(sectionsToHide, isCaseCreate, isSearchIntent, isIdea), isCaseCreate, isSearchIntent, isIdea, true);
48
+ const onBack = () => {
49
+ if (props.activeStep.hidRestOnBack)
50
+ props.onShowRestUpdate(false);
51
+ props.onBack();
76
52
  };
77
- /**
78
- * Adding recommendations back if users comes back on product selector
79
- */
80
- useEffect(() => {
81
- // Adding here to handle on previous click
82
- if (isActiveSectionValid) {
83
- dispatchToRouteReducer({
84
- type: RouteReducerConstants.setShowValidationErrorAlert,
85
- payload: {
86
- showValidationErrorAlert: false,
87
- },
88
- });
89
- }
90
- // eslint-disable-next-line react-hooks/exhaustive-deps
91
- }, [activeSection]);
92
- return (React.createElement("footer", { className: "grid-navigation" },
93
- !appRouteConfugurations[activeSection].showBackToSection &&
94
- appRouteConfugurations[activeSection].previousSection && (React.createElement("button", { disabled: appRouteConfugurations[activeSection].disableOtherSections, onClick: onPrevious, className: "btn btn-app btn-open-white", "data-tracking-id": `prev-of-${activeSection}` }, t(appRouteConfugurations[activeSection].previousButtonLabel))),
95
- appRouteConfugurations[activeSection].nextSection && (React.createElement("button", { ref: nextButtonRef, disabled: appRouteConfugurations[activeSection].disableOtherSections ||
96
- (!isActiveSectionValid && showValidationErrorAlert), onClick: onNext, className: "btn btn-app btn-primary", "data-tracking-id": `next-of-${activeSection}` }, t(appRouteConfugurations[activeSection].nextButtonLabel))),
97
- appRouteConfugurations[activeSection].showBackToSection && caseCreationError && (React.createElement("button", { onClick: onBackToSectionSelect, className: "btn btn-app btn-open-white", "data-tracking-id": `back-to-${appRouteConfugurations[activeSection].backToSectionLabel}` }, t(appRouteConfugurations[activeSection].backToSectionLabel))),
98
- appRouteConfugurations[activeSection].showOpenCaseButton && !caseCreationError && (React.createElement("button", { disabled: isUploadingAnyAttachment || isCreatingCase, onClick: onCaseOpen, className: "btn btn-app btn-open-white", "data-tracking-id": "view-case-from-nav" }, t(appRouteConfugurations[activeSection].openCaseButtonLabel))),
99
- appRouteConfugurations[activeSection].showNewIssueButton && !caseCreationError && (React.createElement("button", { disabled: isUploadingAnyAttachment || isCreatingCase, onClick: onNewIssue, className: "btn btn-app btn-primary" }, t(appRouteConfugurations[activeSection].newIssueButtonLabel))),
100
- activeSectionError ? (React.createElement("small", { className: "pf-u-align-self-center pf-u-ml-md text-red" }, t(activeSectionError))) : null,
101
- isEmpty(RouteUtils.seBasePath) && React.createElement(SupportFeedbackForm, null)));
53
+ return (React.createElement(React.Fragment, null,
54
+ props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack(), className: "btn btn-app btn-open-white", "data-tracking-id": `prev-of-${activeSection}` }, t('Go back'))),
55
+ React.createElement("button", { disabled: (!isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
56
+ noValidEntitlement, onClick: onNext, className: "btn btn-app btn-primary", "data-tracking-id": `next-of-${activeSection}` }, t(props.activeStep.nextButtonLabel)),
57
+ activeSectionError ? (React.createElement("small", { className: "pf-u-align-self-center pf-u-ml-md text-red" }, t(activeSectionError))) : null));
102
58
  }
103
59
  WizardNavigation.defaultProps = defaultProps;
104
60
  export default WizardNavigation;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2CAA2C,CAAC;AAKnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAIpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,OAAA,KAAK,GAAG,KAAK,GAAG,CAAC;QAC9E,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,eAAe,EAAE,GAAG,CAAC;QACrB,aAAa,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC;SACnB,CAAC;KACL;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AAED,eAAO,MAAM,YAAY,UAAW,MAAM,gBA4BzC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AACrD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AACvC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2CAA2C,CAAC;AAKnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAIlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,OAAA,KAAK,GAAG,KAAK,GAAG,CAAC;QAC9E,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,eAAe,EAAE,GAAG,CAAC;QACrB,aAAa,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC;SACnB,CAAC;KACL;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AAED,eAAO,MAAM,YAAY,UAAW,MAAM,gBAgBzC,CAAC"}
@@ -7,18 +7,13 @@ import '../shared/fileUpload/css/fileSelector.css';
7
7
  import { useDocumentTitle } from '@rh-support/components';
8
8
  import { fetchProducts, GlobalMetadataDispatchContext } from '@rh-support/react-context';
9
9
  import React, { useContext, useEffect } from 'react';
10
- import { AppMetadataDispatchContext } from '../../context/AppMetadataContext';
11
10
  import { useCaseSelector } from '../../context/CaseContext';
12
- import { RouteContext } from '../../context/RouteContext';
13
11
  import { PageTitle } from '../../enums/pageTitle';
14
- import { AppRouteSections } from '../../reducers/RouteConstNTypes';
15
12
  import RouteUtils from '../../utils/routeUtils';
16
13
  import { WizardLayout } from './WizardLayout';
17
14
  export const Troubleshoot = (props) => {
18
- const { routeState: { activeSection }, } = useContext(RouteContext);
19
15
  const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
20
16
  useDocumentTitle(isCaseCreate ? PageTitle.NEW_CASE : PageTitle.TROUBLESHOOT);
21
- const dispatchToAppMetadataReducer = useContext(AppMetadataDispatchContext);
22
17
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
23
18
  const contactSSOName = useCaseSelector((state) => state.caseDetails.contactSSOName);
24
19
  RouteUtils.seBasePath = props.basePath || '';
@@ -26,10 +21,7 @@ export const Troubleshoot = (props) => {
26
21
  useEffect(() => {
27
22
  fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
28
23
  // eslint-disable-next-line react-hooks/exhaustive-deps
29
- }, [contactSSOName, dispatchToAppMetadataReducer, dispatchToGlobalMetadataReducer]);
24
+ }, [contactSSOName, dispatchToGlobalMetadataReducer]);
30
25
  return (React.createElement("div", { id: "se-solution-engine" },
31
- React.createElement("div", { className: `${activeSection !== AppRouteSections.SUBMIT_CASE
32
- ? 'support-grid-progress'
33
- : 'support-grid-no-progress'}` },
34
- React.createElement(WizardLayout, { routeProps: props.routeProps }))));
26
+ React.createElement(WizardLayout, { routeProps: props.routeProps })));
35
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"AAYA,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,eAoBrD"}
1
+ {"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"AAWA,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,eAkBrD"}
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { AttachmentContextProvider } from '../components/shared/fileUpload/reducer/AttachmentReducerContext';
3
- import { AppMetadataContextProvider } from './AppMetadataContext';
4
3
  import { CaseContextProvider } from './CaseContext';
5
4
  import { ClusterRecommendationsContextProvider } from './ClusterRecommendationsContext';
6
5
  import { RecommendationContextProvider } from './RecommendationContext';
@@ -10,12 +9,11 @@ import { SessionRestoreContextProvider } from './SessionRestoreContext';
10
9
  import { TCContextProvider } from './TopContentContext';
11
10
  export function RootTroubleshootProvider(props) {
12
11
  return (React.createElement(RouteContextProvider, null,
13
- React.createElement(AppMetadataContextProvider, null,
14
- React.createElement(CaseContextProvider, null,
15
- React.createElement(RecommendationContextProvider, null,
16
- React.createElement(AttachmentContextProvider, null,
17
- React.createElement(RulesContextProvider, null,
18
- React.createElement(ClusterRecommendationsContextProvider, null,
19
- React.createElement(TCContextProvider, null,
20
- React.createElement(SessionRestoreContextProvider, null, props.children))))))))));
12
+ React.createElement(CaseContextProvider, null,
13
+ React.createElement(RecommendationContextProvider, null,
14
+ React.createElement(AttachmentContextProvider, null,
15
+ React.createElement(RulesContextProvider, null,
16
+ React.createElement(ClusterRecommendationsContextProvider, null,
17
+ React.createElement(TCContextProvider, null,
18
+ React.createElement(SessionRestoreContextProvider, null, props.children)))))))));
21
19
  }