@rh-support/troubleshoot 2.0.5 → 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.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +44 -5
- package/lib/esm/components/AccountInfo/OwnerSelector.js +2 -2
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +5 -3
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +38 -36
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +2 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +4 -3
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts +12 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.js +14 -0
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/PartnerShare.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/PartnerShare.js +6 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +1 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +2 -2
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +1 -8
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +4 -2
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +2 -9
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts +5 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -7
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +4 -1
- package/lib/esm/components/IdeaInformation/IdeaInformtion.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformtion.js +1 -8
- package/lib/esm/components/ImproveCase/KtQuestions.js +2 -2
- package/lib/esm/components/Issue/Issue.d.ts.map +1 -1
- package/lib/esm/components/Issue/Issue.js +1 -2
- package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/OpenCase.js +2 -9
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +3 -3
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +3 -3
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -2
- package/lib/esm/components/ProductSelector/ProductSelectorLoader.d.ts +1 -2
- package/lib/esm/components/ProductSelector/ProductSelectorLoader.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelectorLoader.js +12 -19
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +3 -3
- package/lib/esm/components/Recommendations/AlertToastWrapper.js +4 -5
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +2 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +4 -9
- package/lib/esm/components/SubmitCase/ResubmitToast.js +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +8 -5
- package/lib/esm/components/Suggestions/TopContent.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +4 -3
- package/lib/esm/components/shared/useIsSectionValid.d.ts +1 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +5 -24
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +40 -80
- package/lib/esm/components/wizardLayout/MainSection.d.ts +5 -3
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +4 -4
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -10
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +31 -42
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +2 -3
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +43 -163
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +7 -3
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +46 -90
- package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/index.js +2 -10
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +7 -9
- package/lib/esm/css/app.css +0 -450
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +0 -4
- package/lib/esm/hooks/useWizard.d.ts +4 -0
- package/lib/esm/hooks/useWizard.d.ts.map +1 -0
- package/lib/esm/hooks/useWizard.js +128 -0
- package/lib/esm/reducers/RouteConstNTypes.d.ts +21 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +43 -0
- package/lib/esm/reducers/RouteReducer.d.ts +13 -47
- package/lib/esm/reducers/RouteReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RouteReducer.js +36 -165
- package/lib/esm/scss/_main.scss +112 -791
- package/lib/esm/utils/routeUtils.d.ts +3 -9
- package/lib/esm/utils/routeUtils.d.ts.map +1 -1
- package/lib/esm/utils/routeUtils.js +14 -41
- package/package.json +14 -25
- package/lib/esm/components/wizardLayout/WizardProgress.d.ts +0 -13
- package/lib/esm/components/wizardLayout/WizardProgress.d.ts.map +0 -1
- package/lib/esm/components/wizardLayout/WizardProgress.js +0 -108
- package/lib/esm/context/AppMetadataContext.d.ts +0 -11
- package/lib/esm/context/AppMetadataContext.d.ts.map +0 -1
- package/lib/esm/context/AppMetadataContext.js +0 -13
- package/lib/esm/reducers/AppMetadataReducer.d.ts +0 -28
- package/lib/esm/reducers/AppMetadataReducer.d.ts.map +0 -1
- package/lib/esm/reducers/AppMetadataReducer.js +0 -28
package/lib/esm/css/app.css
CHANGED
|
@@ -1,423 +1,6 @@
|
|
|
1
1
|
/* Main CSS file
|
|
2
2
|
============================================ */
|
|
3
3
|
|
|
4
|
-
/* mobile first - excludes aside */
|
|
5
|
-
/* #se-solution-engine .se-grid {
|
|
6
|
-
display: -ms-grid;
|
|
7
|
-
display: grid;
|
|
8
|
-
-ms-grid-rows: 1fr auto;
|
|
9
|
-
grid-template-rows: 1fr auto;
|
|
10
|
-
grid-template-areas: "main"
|
|
11
|
-
"nav";
|
|
12
|
-
min-height: 90vh;
|
|
13
|
-
margin-top: -2.5rem;
|
|
14
|
-
margin-bottom: -2.5rem;
|
|
15
|
-
padding: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
#se-solution-engine .se-grid #wizard-main {
|
|
19
|
-
-ms-grid-row: 1;
|
|
20
|
-
-ms-grid-column: 1;
|
|
21
|
-
grid-area: main;
|
|
22
|
-
padding: 1rem 2rem;
|
|
23
|
-
border-right: 1px solid #e7e7e7;
|
|
24
|
-
min-height: 100vh;
|
|
25
|
-
min-width: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
#se-solution-engine .se-grid #wizard-navigation {
|
|
29
|
-
-ms-grid-row: 2;
|
|
30
|
-
-ms-grid-column: 1;
|
|
31
|
-
grid-area: nav;
|
|
32
|
-
position: -webkit-sticky;
|
|
33
|
-
position: sticky;
|
|
34
|
-
bottom: 0;
|
|
35
|
-
display: -webkit-box;
|
|
36
|
-
display: -ms-flexbox;
|
|
37
|
-
display: flex;
|
|
38
|
-
padding: 1rem 1rem 1rem 3rem;
|
|
39
|
-
background-color: #fff;
|
|
40
|
-
border: 1px solid #e7e7e7;
|
|
41
|
-
border-bottom: initial;
|
|
42
|
-
border-left: initial;
|
|
43
|
-
z-index: 999;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#se-solution-engine .se-grid #wizard-progress,
|
|
47
|
-
#se-solution-engine .se-grid #wizard-aside {
|
|
48
|
-
display: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* larger devices - add progress */
|
|
52
|
-
/* @media (min-width: 768px) {
|
|
53
|
-
#se-solution-engine .se-grid {
|
|
54
|
-
-ms-grid-columns: .1fr 2fr;
|
|
55
|
-
grid-template-columns: .1fr 2fr;
|
|
56
|
-
-ms-grid-rows: 1fr auto;
|
|
57
|
-
grid-template-rows: 1fr auto;
|
|
58
|
-
grid-template-areas: "progress main"
|
|
59
|
-
"progress nav";
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
#se-solution-engine .se-grid #wizard-progress {
|
|
63
|
-
display: inline-block;
|
|
64
|
-
grid-area: progress;
|
|
65
|
-
border-right: 1px solid #e7e7e7;
|
|
66
|
-
padding: .2rem;
|
|
67
|
-
}
|
|
68
|
-
#se-solution-engine .se-grid #wizard-main {
|
|
69
|
-
-ms-grid-row: 1;
|
|
70
|
-
-ms-grid-column: 2;
|
|
71
|
-
}
|
|
72
|
-
#se-solution-engine .se-grid #wizard-navigation {
|
|
73
|
-
-ms-grid-row: 2;
|
|
74
|
-
-ms-grid-column: 2;
|
|
75
|
-
}
|
|
76
|
-
} */
|
|
77
|
-
|
|
78
|
-
/* larger devices - add aside */
|
|
79
|
-
/* @media (min-width: 992px) {
|
|
80
|
-
#se-solution-engine .se-grid {
|
|
81
|
-
-ms-grid-columns: .4fr 2.5fr 1.5fr;
|
|
82
|
-
grid-template-columns: .4fr 2.5fr 1.5fr;
|
|
83
|
-
-ms-grid-rows: 1fr auto;
|
|
84
|
-
grid-template-rows: 1fr auto;
|
|
85
|
-
grid-template-areas: "progress main aside"
|
|
86
|
-
"progress nav aside";
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
#se-solution-engine .se-grid #wizard-main,
|
|
90
|
-
#se-solution-engine .se-grid #wizard-navigation {
|
|
91
|
-
border-right: initial;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
#se-solution-engine .se-grid #wizard-aside {
|
|
95
|
-
display: inline-block;
|
|
96
|
-
grid-area: aside;
|
|
97
|
-
background-color: #e7e7e7;
|
|
98
|
-
padding: 1em;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
#se-solution-engine .se-grid #wizard-aside .wizard-aside-content {
|
|
102
|
-
position: -webkit-sticky;
|
|
103
|
-
position: sticky;
|
|
104
|
-
top: 0;
|
|
105
|
-
padding: 2em 1em;
|
|
106
|
-
max-width: 600px;
|
|
107
|
-
}
|
|
108
|
-
#se-solution-engine .se-grid #wizard-main {
|
|
109
|
-
-ms-grid-row: 1;
|
|
110
|
-
-ms-grid-column: 2;
|
|
111
|
-
}
|
|
112
|
-
#se-solution-engine .se-grid #wizard-navigation {
|
|
113
|
-
-ms-grid-row: 2;
|
|
114
|
-
-ms-grid-column: 2;
|
|
115
|
-
}
|
|
116
|
-
#se-solution-engine .se-grid #wizard-progress {
|
|
117
|
-
-ms-grid-row: 1;
|
|
118
|
-
-ms-grid-row-span: 2;
|
|
119
|
-
-ms-grid-column: 1;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
@media (min-width: 768px) {
|
|
123
|
-
#se-solution-engine .se-grid #wizard-progress {
|
|
124
|
-
-ms-grid-row: 1;
|
|
125
|
-
-ms-grid-row-span: 2;
|
|
126
|
-
-ms-grid-column: 1;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
@media (min-width: 992px) {
|
|
130
|
-
#se-solution-engine .se-grid #wizard-aside {
|
|
131
|
-
-ms-grid-row: 1;
|
|
132
|
-
-ms-grid-row-span: 2;
|
|
133
|
-
-ms-grid-column: 3;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@media (min-width: 1350px) {
|
|
138
|
-
#se-solution-engine .se-grid {
|
|
139
|
-
-ms-grid-columns: 13.5% 2.5fr 2fr;
|
|
140
|
-
grid-template-columns: 13.5% 2.5fr 2fr;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
@media (min-width: 1680px) {
|
|
145
|
-
#se-solution-engine .se-grid {
|
|
146
|
-
-ms-grid-columns: 20% 2.5fr 2fr;
|
|
147
|
-
grid-template-columns: 20% 2.5fr 2fr;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
@media (min-width: 2000px) {
|
|
153
|
-
#se-solution-engine .se-grid {
|
|
154
|
-
-ms-grid-columns: 25% 2.5fr 2fr;
|
|
155
|
-
grid-template-columns: 25% 2.5fr 2fr;
|
|
156
|
-
}
|
|
157
|
-
} */
|
|
158
|
-
|
|
159
|
-
/* Reorganize all of the CSS (prime example) */
|
|
160
|
-
/* #se-solution-engine .se-grid button.btn-app,
|
|
161
|
-
#se-solution-engine .se-grid .btn-app[role="button"] {
|
|
162
|
-
padding: .375rem 1rem;
|
|
163
|
-
border-radius: 4px;
|
|
164
|
-
} */
|
|
165
|
-
|
|
166
|
-
/* Layout - progress section */
|
|
167
|
-
/* #se-solution-engine .se-grid #wizard-progress .wizard-progress-content {
|
|
168
|
-
display: -webkit-box;
|
|
169
|
-
display: -ms-flexbox;
|
|
170
|
-
display: flex;
|
|
171
|
-
-webkit-box-orient: vertical;
|
|
172
|
-
-webkit-box-direction: normal;
|
|
173
|
-
-ms-flex-direction: column;
|
|
174
|
-
flex-direction: column;
|
|
175
|
-
-webkit-box-align: end;
|
|
176
|
-
-ms-flex-align: end;
|
|
177
|
-
align-items: flex-end;
|
|
178
|
-
-webkit-box-pack: center;
|
|
179
|
-
-ms-flex-pack: center;
|
|
180
|
-
justify-content: center;
|
|
181
|
-
position: -webkit-sticky;
|
|
182
|
-
position: sticky;
|
|
183
|
-
top: 0;
|
|
184
|
-
margin: 0;
|
|
185
|
-
padding: 2.5rem 2rem;
|
|
186
|
-
list-style: none;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.se-grid #wizard-progress .wizard-progress-content li {
|
|
190
|
-
position: relative;
|
|
191
|
-
padding-bottom: 1rem;
|
|
192
|
-
width: 1.5rem;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.se-grid #wizard-progress .wizard-progress-content li::after {
|
|
196
|
-
display: block;
|
|
197
|
-
position: absolute;
|
|
198
|
-
bottom: 0;
|
|
199
|
-
left: 11px;
|
|
200
|
-
content: "";
|
|
201
|
-
background-color: #8b8d8f;
|
|
202
|
-
height: 1rem;
|
|
203
|
-
width: 1px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.se-grid #wizard-progress .wizard-progress-content li:last-child::after {
|
|
207
|
-
display: none;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.se-grid #wizard-progress .wizard-progress-content li button {
|
|
211
|
-
display: block;
|
|
212
|
-
width: 1.5rem;
|
|
213
|
-
height: 1.5rem;
|
|
214
|
-
background-color: #d2d2d2;
|
|
215
|
-
border: 1px solid #d2d2d2;
|
|
216
|
-
border-radius: 50%;
|
|
217
|
-
padding: inherit;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.se-grid #wizard-progress .wizard-progress-content li.on button {
|
|
221
|
-
background-color: #06c;
|
|
222
|
-
border-color: #06c;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.se-grid #wizard-progress .wizard-progress-content li.next button,
|
|
226
|
-
.se-grid #wizard-progress .wizard-progress-content li.future button {
|
|
227
|
-
background-color: #8b8d8f;
|
|
228
|
-
border-color: #8b8d8f;
|
|
229
|
-
} */
|
|
230
|
-
|
|
231
|
-
/* .se-grid #wizard-progress .wizard-progress-content li.next::after,
|
|
232
|
-
.se-grid #wizard-progress .wizard-progress-content li.future::after {
|
|
233
|
-
background-color: #8b8d8f;
|
|
234
|
-
} */
|
|
235
|
-
|
|
236
|
-
/* .se-grid #wizard-progress .wizard-progress-content li.completed button {
|
|
237
|
-
background-color: #06c;
|
|
238
|
-
border-color: #06c;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.se-grid #wizard-progress .wizard-progress-content li.completed button::before {
|
|
242
|
-
position: absolute;
|
|
243
|
-
top: 6px;
|
|
244
|
-
left: 6px;
|
|
245
|
-
color: #fff;
|
|
246
|
-
content: "\61";
|
|
247
|
-
font-family: "portalicons";
|
|
248
|
-
font-size: 12px;
|
|
249
|
-
line-height: 1;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.se-grid #wizard-progress .wizard-progress-content li.completed::after {
|
|
253
|
-
background-color: #06c;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.se-grid #wizard-progress .wizard-progress-content li button[disabled] {
|
|
257
|
-
background-color: #d2d2d2;
|
|
258
|
-
border-color: #8b8d8f;
|
|
259
|
-
color: #8b8d8f;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.se-grid #wizard-progress .wizard-progress-content li.completed button[disabled]::before {
|
|
263
|
-
color: #8d8e8f;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.se-grid #wizard-progress.section-disabled .wizard-progress-content li.completed::after {
|
|
267
|
-
background-color: #d2d2d2;
|
|
268
|
-
} */
|
|
269
|
-
|
|
270
|
-
/* Layout - main section */
|
|
271
|
-
/* #wizard-main > .wizard-main-section {
|
|
272
|
-
min-height: 50vh;
|
|
273
|
-
padding: 2rem .5rem;
|
|
274
|
-
outline: none;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
#wizard-main > .wizard-main-active-section {
|
|
278
|
-
min-height: 100vh;
|
|
279
|
-
outline: none;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
#wizard-main > .visited-line,
|
|
283
|
-
#wizard-main > .togo-line {
|
|
284
|
-
margin-bottom: 5rem;
|
|
285
|
-
} /* ONLY until step refactoring */
|
|
286
|
-
|
|
287
|
-
/* #wizard-main > .wizard-main-section > header {
|
|
288
|
-
margin-bottom: 1.8rem;
|
|
289
|
-
} */
|
|
290
|
-
|
|
291
|
-
/* .wizard-main-section header + p {
|
|
292
|
-
margin-bottom: .65rem;
|
|
293
|
-
} */
|
|
294
|
-
|
|
295
|
-
/* Layout - navigation section */
|
|
296
|
-
/* #se-solution-engine .se-grid #wizard-navigation button:first-child {
|
|
297
|
-
margin-right: 1em;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
#se-solution-engine .se-grid #wizard-navigation button:last-child {
|
|
301
|
-
margin-left: auto;
|
|
302
|
-
} */
|
|
303
|
-
|
|
304
|
-
/* Layout - aside section */
|
|
305
|
-
/* .wizard-aside-content header {
|
|
306
|
-
display: -webkit-box;
|
|
307
|
-
display: -ms-flexbox;
|
|
308
|
-
display: flex;
|
|
309
|
-
-webkit-box-align: center;
|
|
310
|
-
-ms-flex-align: center;
|
|
311
|
-
align-items: center;
|
|
312
|
-
margin-bottom: 1rem;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.wizard-aside-content header h3 {
|
|
316
|
-
margin-bottom: 0;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.wizard-aside-content header h2 {
|
|
320
|
-
margin-bottom: 0;
|
|
321
|
-
font-size: 18px;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.wizard-aside-content header button {
|
|
325
|
-
height: 28px;
|
|
326
|
-
margin-left: auto;
|
|
327
|
-
padding: 5px 1rem;
|
|
328
|
-
border: 0;
|
|
329
|
-
background: none;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.wizard-aside-content header button:hover,
|
|
333
|
-
.wizard-aside-content header button:focus {
|
|
334
|
-
color: #06c;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.wizard-aside-content header button .fa {
|
|
338
|
-
font-size: 20px;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
@font-face {
|
|
342
|
-
font-family: 'Red Hat Text';
|
|
343
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatText-Regular.ttf') format('truetype');
|
|
344
|
-
font-weight: 300;
|
|
345
|
-
font-style: 'normal';
|
|
346
|
-
text-rendering: optimizeLegibility;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
@font-face {
|
|
350
|
-
font-family: 'Red Hat Text';
|
|
351
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatText-Medium.ttf') format('truetype');
|
|
352
|
-
font-weight: 500;
|
|
353
|
-
font-style: 'normal';
|
|
354
|
-
text-rendering: optimizeLegibility;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
@font-face {
|
|
358
|
-
font-family: 'Red Hat Text';
|
|
359
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatText-MediumItalic.ttf') format('truetype');
|
|
360
|
-
font-weight: 500;
|
|
361
|
-
font-style: italic;
|
|
362
|
-
text-rendering: optimizeLegibility;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
@font-face {
|
|
366
|
-
font-family: 'Red Hat Text';
|
|
367
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatText-Medium.ttf') format('truetype');
|
|
368
|
-
font-weight: 700;
|
|
369
|
-
font-style: 'normal';
|
|
370
|
-
text-rendering: optimizeLegibility;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
@font-face {
|
|
374
|
-
font-family: 'Red Hat Text';
|
|
375
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatText-MediumItalic.ttf') format('truetype');
|
|
376
|
-
font-weight: 700;
|
|
377
|
-
font-style: italic;
|
|
378
|
-
text-rendering: optimizeLegibility;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
@font-face {
|
|
382
|
-
font-family: 'Red Hat Display';
|
|
383
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatDisplay-Regular.ttf') format('truetype');
|
|
384
|
-
font-weight: 300;
|
|
385
|
-
font-style: 'normal';
|
|
386
|
-
text-rendering: optimizeLegibility;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
@font-face {
|
|
390
|
-
font-family: 'Red Hat Display';
|
|
391
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatDisplay-Regular.ttf') format('truetype');
|
|
392
|
-
font-weight: 400;
|
|
393
|
-
font-style: 'normal';
|
|
394
|
-
text-rendering: optimizeLegibility;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
@font-face {
|
|
398
|
-
font-family: 'Red Hat Display';
|
|
399
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatDisplay-Medium.ttf') format('truetype');
|
|
400
|
-
font-weight: 700;
|
|
401
|
-
font-style: 'normal';
|
|
402
|
-
text-rendering: optimizeLegibility;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
@font-face {
|
|
406
|
-
font-family: 'Red Hat Display';
|
|
407
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatDisplay-MediumItalic.ttf') format('truetype');
|
|
408
|
-
font-weight: 700;
|
|
409
|
-
font-style: italic;
|
|
410
|
-
text-rendering: optimizeLegibility;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
@font-face {
|
|
414
|
-
font-family: 'Red Hat Display';
|
|
415
|
-
src: url('/webassets/avalon/f/nimbus/redhat/RedHatDisplay-Bold.ttf') format('truetype');
|
|
416
|
-
font-weight: 900;
|
|
417
|
-
font-style: 'normal';
|
|
418
|
-
text-rendering: optimizeLegibility;
|
|
419
|
-
}*/
|
|
420
|
-
|
|
421
4
|
/* Open Case section */
|
|
422
5
|
.open-case-product-wrapper {
|
|
423
6
|
display: -webkit-box;
|
|
@@ -661,21 +244,6 @@ input[type='checkbox'] {
|
|
|
661
244
|
cursor: pointer;
|
|
662
245
|
}
|
|
663
246
|
|
|
664
|
-
/* .more::after,
|
|
665
|
-
.less::after {
|
|
666
|
-
margin-left: 8px;
|
|
667
|
-
font-family: 'FontAwesome';
|
|
668
|
-
color: #06c;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
.more::after {
|
|
672
|
-
content: '\f103';
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
.less::after {
|
|
676
|
-
content: '\f102';
|
|
677
|
-
} */
|
|
678
|
-
|
|
679
247
|
.text-error {
|
|
680
248
|
margin-top: 1rem;
|
|
681
249
|
color: #c9190b !important;
|
|
@@ -686,19 +254,6 @@ input[type='checkbox'] {
|
|
|
686
254
|
overflow-y: visible;
|
|
687
255
|
}
|
|
688
256
|
|
|
689
|
-
/* .more-less-wrapper:not(.open)::after {
|
|
690
|
-
content: "";
|
|
691
|
-
position: absolute;
|
|
692
|
-
bottom: 50px;
|
|
693
|
-
height: 50px;
|
|
694
|
-
width: 100%;
|
|
695
|
-
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0)),to(#ffffff));
|
|
696
|
-
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,#ffffff 100%);
|
|
697
|
-
background-image: linear-gradient(to bottom, rgba(255,255,255,0) 0%,#ffffff 100%);
|
|
698
|
-
display: block;
|
|
699
|
-
background-size: 100%;
|
|
700
|
-
} */
|
|
701
|
-
|
|
702
257
|
#review h3 {
|
|
703
258
|
display: -webkit-box;
|
|
704
259
|
display: -ms-flexbox;
|
|
@@ -712,11 +267,6 @@ input[type='checkbox'] {
|
|
|
712
267
|
align-items: center;
|
|
713
268
|
}
|
|
714
269
|
|
|
715
|
-
/* #review [role="button"] {
|
|
716
|
-
padding: 0 !important;
|
|
717
|
-
margin-left: auto;
|
|
718
|
-
} */
|
|
719
|
-
|
|
720
270
|
#review .list-flat pre {
|
|
721
271
|
margin-bottom: 0.5rem;
|
|
722
272
|
padding: 0.2rem 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,kBAAkB;;EAoCjC"}
|
|
@@ -4,14 +4,12 @@ import { AttachmentDispatchContext, resetAttachment } from '../components/shared
|
|
|
4
4
|
import { useCaseDispatch } from '../context/CaseContext';
|
|
5
5
|
import { ClusterRecommendationsDispatchContext } from '../context/ClusterRecommendationsContext';
|
|
6
6
|
import { useRecommendationDispatchContext } from '../context/RecommendationContext';
|
|
7
|
-
import { RouteDispatchContext } from '../context/RouteContext';
|
|
8
7
|
import { RulesDispatchContext } from '../context/RulesContext';
|
|
9
8
|
import { TCDispatchContext } from '../context/TopContentContext';
|
|
10
9
|
import { CaseReducerConstants } from '../reducers/CaseConstNTypes';
|
|
11
10
|
import { setCaseAccountNumber, setCaseOwner } from '../reducers/CaseReducer';
|
|
12
11
|
import { resetClusterRecommendations } from '../reducers/ClusterRecommendationsReducer';
|
|
13
12
|
import { resetRecommendations } from '../reducers/RecommendationsReducer';
|
|
14
|
-
import { RouteReducerConstants } from '../reducers/RouteReducer';
|
|
15
13
|
import { resetEARules } from '../reducers/RulesReducer';
|
|
16
14
|
import { resetTopContent } from '../reducers/TopContentReducer';
|
|
17
15
|
export function useResetCaseCreate() {
|
|
@@ -20,7 +18,6 @@ export function useResetCaseCreate() {
|
|
|
20
18
|
const recommendationsDispatch = useRecommendationDispatchContext();
|
|
21
19
|
const caseDispatch = useCaseDispatch();
|
|
22
20
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
23
|
-
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
24
21
|
const rulesDispatch = useContext(RulesDispatchContext);
|
|
25
22
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
26
23
|
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -34,7 +31,6 @@ export function useResetCaseCreate() {
|
|
|
34
31
|
fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
|
|
35
32
|
setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
|
|
36
33
|
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), '', undefined, undefined, true);
|
|
37
|
-
dispatchToRouteReducer({ type: RouteReducerConstants.resetRouteState });
|
|
38
34
|
resetEARules(rulesDispatch);
|
|
39
35
|
resetClusterRecommendations(clusterRecommendationsDispatch);
|
|
40
36
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWizard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWizard.tsx"],"names":[],"mappings":"AA+BA,wBAAgB,SAAS,CAAC,UAAU,KAAA;iCAuNG,OAAO;EAwC7C"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { AlertMessage, AlertType, LoadingIndicator } 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, { Suspense, useContext } from 'react';
|
|
6
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
7
|
+
import CaseInformation from '../components/CaseInformation/CaseInformation';
|
|
8
|
+
import CaseManagement from '../components/CaseManagement/CaseManagement';
|
|
9
|
+
import IdeaInformation from '../components/IdeaInformation/IdeaInformtion';
|
|
10
|
+
import OpenCase from '../components/OpenCase/OpenCase';
|
|
11
|
+
import ProductSelector from '../components/ProductSelector/ProductSelector';
|
|
12
|
+
import Review from '../components/Review/Review';
|
|
13
|
+
import { useIsSectionValid } from '../components/shared/useIsSectionValid';
|
|
14
|
+
import TroubleshootSection from '../components/TroubleshootSection/TroubleshootSection';
|
|
15
|
+
import MainSection from '../components/wizardLayout/MainSection';
|
|
16
|
+
import { useCaseSelector } from '../context/CaseContext';
|
|
17
|
+
import { RecommendationStateContext } from '../context/RecommendationContext';
|
|
18
|
+
import { RouteContext } from '../context/RouteContext';
|
|
19
|
+
import { TCStateContext } from '../context/TopContentContext';
|
|
20
|
+
import { AppRouteSections, openCaseNonTechnicalSequence, openCaseRouteSectionSequence, searchIntentRouteSectionSequence, troubleshootNonTechnicalSequence, troubleshootRouteSectionsSequence, } from '../reducers/RouteConstNTypes';
|
|
21
|
+
import RouteUtils from '../utils/routeUtils';
|
|
22
|
+
export function useWizard(routeProps) {
|
|
23
|
+
const { routeState: { activeSection, isSearchIntent, isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
24
|
+
// state value was available later - reading dirctly from url
|
|
25
|
+
const isCaseCreate = RouteUtils.getQueryParams(routeProps).caseCreate === 'true';
|
|
26
|
+
const { recommendationState: { isLoadingRecommendations }, } = useContext(RecommendationStateContext);
|
|
27
|
+
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
28
|
+
const { isSelectedAccounntSecureSupport, summary, caseType } = useCaseSelector((state) => ({
|
|
29
|
+
isSelectedAccounntSecureSupport: state.selectedAccountDetails.data.secureSupport,
|
|
30
|
+
summary: state.caseDetails.summary,
|
|
31
|
+
caseType: state.caseDetails.caseType,
|
|
32
|
+
}), isEqual);
|
|
33
|
+
const { t } = useTranslation();
|
|
34
|
+
const { isSectionValidFn, isActiveSectionValid } = useIsSectionValid(activeSection);
|
|
35
|
+
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
36
|
+
const defaultRouteConfiguration = {
|
|
37
|
+
canJumpTo: true,
|
|
38
|
+
enableNext: false,
|
|
39
|
+
nextButtonLabel: 'Continue',
|
|
40
|
+
};
|
|
41
|
+
const alertMessage = () => {
|
|
42
|
+
// alert title and variant based on multiple conditions for two different sections
|
|
43
|
+
const title = topContent.isFetching || (isLoadingRecommendations && summary)
|
|
44
|
+
? t('Please wait while recommendations are loading')
|
|
45
|
+
: t('Please address the errors to proceed');
|
|
46
|
+
return (React.createElement(AlertMessage, { show: isNextBtnClickedToShowValidationError && !isActiveSectionValid, variant: (isLoadingRecommendations && summary) || topContent.isFetching ? AlertType.INFO : AlertType.DANGER, isInline: true, title: title, className: "pf-u-mb-lg" }));
|
|
47
|
+
};
|
|
48
|
+
// components that are used in wizard steps
|
|
49
|
+
const appRouteConfugurations = {
|
|
50
|
+
[AppRouteSections.GET_SUPPORT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.GET_SUPPORT, name: 'Get support', component: (React.createElement(MainSection, { section: AppRouteSections.GET_SUPPORT, title: t('Why are you opening a case?'), description: t('Select the best category for your issue.') },
|
|
51
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
52
|
+
alertMessage(),
|
|
53
|
+
React.createElement(OpenCase, { routeProps: routeProps })))), canJumpTo: isSectionValidFn(AppRouteSections.GET_SUPPORT) || activeSection === AppRouteSections.GET_SUPPORT }),
|
|
54
|
+
[AppRouteSections.SUMMARIZE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.SUMMARIZE, name: 'Summarize', component: (React.createElement(MainSection, { section: AppRouteSections.SUMMARIZE, title: t('What are you having an issue with?') },
|
|
55
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
56
|
+
alertMessage(),
|
|
57
|
+
React.createElement(ProductSelector, { routeProps: routeProps })))), canJumpTo: isSectionValidFn(AppRouteSections.SUMMARIZE) || activeSection === AppRouteSections.SUMMARIZE }),
|
|
58
|
+
[AppRouteSections.TROUBLESHOOT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.TROUBLESHOOT, name: 'Troubleshoot', component: (React.createElement(MainSection, { section: AppRouteSections.TROUBLESHOOT, title: t('Recommendations') },
|
|
59
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
60
|
+
alertMessage(),
|
|
61
|
+
React.createElement(TroubleshootSection, null)))), canJumpTo: isSectionValidFn(AppRouteSections.TROUBLESHOOT) || activeSection === AppRouteSections.TROUBLESHOOT, nextButtonLabel: isCaseCreate ? t('Continue') : t('Get support') }),
|
|
62
|
+
[AppRouteSections.DESCRIBE_MORE]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_MORE, name: 'Describe more', component: (React.createElement(MainSection, { section: AppRouteSections.DESCRIBE_MORE, title: React.createElement(React.Fragment, null,
|
|
63
|
+
t('Case information'),
|
|
64
|
+
isEmpty(RouteUtils.seBasePath) && isSelectedAccounntSecureSupport && (React.createElement("span", { className: "secured-support" },
|
|
65
|
+
React.createElement(Trans, null, "Secured Support")))), description: t('Provide the details of your issue.') },
|
|
66
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
67
|
+
alertMessage(),
|
|
68
|
+
React.createElement(CaseInformation, { routeProps: routeProps })))), canJumpTo: isSectionValidFn(AppRouteSections.DESCRIBE_MORE) || activeSection === AppRouteSections.DESCRIBE_MORE }),
|
|
69
|
+
[AppRouteSections.DESCRIBE_IDEA]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.DESCRIBE_IDEA, name: 'Describe more', component: (React.createElement(MainSection, { section: AppRouteSections.DESCRIBE_IDEA, title: t('Idea information'), description: t("We'll be in contact with you shortly. Look for updates on this case.") },
|
|
70
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
71
|
+
alertMessage(),
|
|
72
|
+
React.createElement(IdeaInformation, null)))), canJumpTo: isSectionValidFn(AppRouteSections.DESCRIBE_IDEA) || activeSection === AppRouteSections.DESCRIBE_IDEA, nextButtonLabel: 'Submit', disableOtherSections: false }),
|
|
73
|
+
[AppRouteSections.MANAGEMENT]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.MANAGEMENT, name: 'Management', component: (React.createElement(MainSection, { section: AppRouteSections.MANAGEMENT, title: t('Case management'), descriptionClassName: "text-medium-grey" },
|
|
74
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
75
|
+
alertMessage(),
|
|
76
|
+
React.createElement(CaseManagement, null)))), canJumpTo: isSectionValidFn(AppRouteSections.MANAGEMENT) || activeSection === AppRouteSections.MANAGEMENT }),
|
|
77
|
+
[AppRouteSections.REVIEW]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.REVIEW, name: 'Review', component: (React.createElement(MainSection, { section: AppRouteSections.REVIEW, title: t('Preview case'), description: t('Before submitting, review the information you entered.') },
|
|
78
|
+
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
79
|
+
alertMessage(),
|
|
80
|
+
React.createElement(Review, { routeProps: routeProps })))), canJumpTo: isSectionValidFn(AppRouteSections.REVIEW) || activeSection === AppRouteSections.REVIEW, nextButtonLabel: 'Submit' }),
|
|
81
|
+
[AppRouteSections.BREAK]: Object.assign(Object.assign({}, defaultRouteConfiguration), { id: AppRouteSections.BREAK, name: 'break', component: React.createElement(React.Fragment, null) }),
|
|
82
|
+
};
|
|
83
|
+
const getSteps = (routeSequence, showRest) => {
|
|
84
|
+
if (showRest)
|
|
85
|
+
return routeSequence.filter((r) => r.id !== AppRouteSections.BREAK);
|
|
86
|
+
const steps = [];
|
|
87
|
+
for (let i = 0, max = routeSequence.length; i < max; i++) {
|
|
88
|
+
if (routeSequence[i].id === AppRouteSections.BREAK) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
steps.push(routeSequence[i]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return steps;
|
|
96
|
+
};
|
|
97
|
+
// get wizard steps
|
|
98
|
+
const getStepsSequece = (showRest = false) => {
|
|
99
|
+
let routeSequence = isSearchIntent
|
|
100
|
+
? searchIntentRouteSectionSequence
|
|
101
|
+
: isCaseCreate
|
|
102
|
+
? openCaseRouteSectionSequence
|
|
103
|
+
: troubleshootRouteSectionsSequence;
|
|
104
|
+
if (isIdea) {
|
|
105
|
+
if (isCaseCreate) {
|
|
106
|
+
routeSequence = openCaseNonTechnicalSequence;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
routeSequence = troubleshootNonTechnicalSequence;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const stepsArray = [];
|
|
113
|
+
// here we add showRestOnNext and hidRestOnBack properties to step object
|
|
114
|
+
// these two properties used to partially hide or show steps based on position of
|
|
115
|
+
// AppRouteSections.BREAK in steps sequence
|
|
116
|
+
for (let j = 0, maxArr = routeSequence.length; j < maxArr; j++) {
|
|
117
|
+
stepsArray[j] = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, appRouteConfugurations[routeSequence[j]]), { order: j }), (j === routeSequence.length - 1 && { isLastStep: true })), (routeSequence[j + 1] &&
|
|
118
|
+
routeSequence[j + 2] &&
|
|
119
|
+
routeSequence[j + 1] === AppRouteSections.BREAK && { showRestOnNext: true })), (routeSequence[j - 1] &&
|
|
120
|
+
routeSequence[j - 2] &&
|
|
121
|
+
routeSequence[j - 1] === AppRouteSections.BREAK && { hidRestOnBack: true }));
|
|
122
|
+
}
|
|
123
|
+
return getSteps(stepsArray, showRest);
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
getStepsSequece,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WizardStep } from '@patternfly/react-core';
|
|
1
2
|
export interface IRouteQueryParams {
|
|
2
3
|
product?: string;
|
|
3
4
|
version?: string;
|
|
@@ -6,6 +7,19 @@ export interface IRouteQueryParams {
|
|
|
6
7
|
seSessionId?: string;
|
|
7
8
|
summary?: string;
|
|
8
9
|
}
|
|
10
|
+
export interface ISectionConfiguration extends WizardStep {
|
|
11
|
+
id: number | string;
|
|
12
|
+
stepName: string;
|
|
13
|
+
nextButtonLabel: string;
|
|
14
|
+
order: number;
|
|
15
|
+
isLastStep?: boolean;
|
|
16
|
+
revealNextStep?: boolean;
|
|
17
|
+
hidRestOnBack?: boolean;
|
|
18
|
+
showRestOnNext?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ISectionConfigurations {
|
|
21
|
+
[key: string]: Partial<ISectionConfiguration>;
|
|
22
|
+
}
|
|
9
23
|
export interface IRouteUrlParams {
|
|
10
24
|
}
|
|
11
25
|
export declare enum AppRouteSections {
|
|
@@ -16,8 +30,14 @@ export declare enum AppRouteSections {
|
|
|
16
30
|
DESCRIBE_IDEA = "describe-idea",
|
|
17
31
|
MANAGEMENT = "management",
|
|
18
32
|
REVIEW = "review",
|
|
19
|
-
SUBMIT_CASE = "submit-case"
|
|
33
|
+
SUBMIT_CASE = "submit-case",
|
|
34
|
+
BREAK = "break"
|
|
20
35
|
}
|
|
36
|
+
export declare const openCaseNonTechnicalSequence: AppRouteSections[];
|
|
37
|
+
export declare const troubleshootNonTechnicalSequence: AppRouteSections[];
|
|
38
|
+
export declare const troubleshootRouteSectionsSequence: AppRouteSections[];
|
|
39
|
+
export declare const searchIntentRouteSectionSequence: AppRouteSections[];
|
|
40
|
+
export declare const openCaseRouteSectionSequence: AppRouteSections[];
|
|
21
41
|
export declare const sessionRestoreCardSections: AppRouteSections[];
|
|
22
42
|
export declare const hideFileUploadSidebarWidgetSections: AppRouteSections[];
|
|
23
43
|
export declare const showSidebarRecommendationsSections: AppRouteSections[];
|