@rh-support/troubleshoot 2.6.14 → 2.6.15

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 (194) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.js +4 -4
  2. package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +21 -18
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +45 -34
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +13 -19
  9. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +8 -8
  12. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +1 -1
  13. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +1 -1
  15. package/lib/esm/components/CaseEditView/CaseOverview/index.js +8 -8
  16. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +20 -19
  18. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  20. package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.js +3 -3
  21. package/lib/esm/components/CaseEditView/CaseSubscriptionAbuseAlert.js +1 -1
  22. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  23. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +33 -23
  24. package/lib/esm/components/CaseEditView/PDFContainer.js +19 -15
  25. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +9 -8
  27. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +13 -16
  29. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -94
  31. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +9 -8
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +36 -31
  35. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -3
  37. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +2 -2
  38. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +9 -7
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftV3Popover.js +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +1 -1
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +2 -2
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +3 -3
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +2 -2
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.js +3 -4
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +2 -2
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +2 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseChat.js +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +1 -1
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +2 -2
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseExternalTrackerUpdate.js +1 -1
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +2 -3
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +5 -5
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +23 -17
  61. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +19 -4
  62. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +5 -8
  64. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  65. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -4
  66. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  67. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +4 -6
  68. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +4 -6
  70. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +2 -3
  73. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  74. package/lib/esm/components/CaseInformation/CaseGroup.js +1 -2
  75. package/lib/esm/components/CaseInformation/CaseInformation.js +3 -3
  76. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
  77. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +1 -1
  78. package/lib/esm/components/CaseInformation/Description.js +4 -4
  79. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  80. package/lib/esm/components/CaseInformation/Fts.js +13 -9
  81. package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
  82. package/lib/esm/components/CaseInformation/Severity.js +1 -1
  83. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  84. package/lib/esm/components/CaseInformation/SupportLevel.js +16 -10
  85. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  86. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +14 -11
  87. package/lib/esm/components/CaseManagement/CaseManagement.js +4 -4
  88. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  89. package/lib/esm/components/CaseManagement/Cep.js +44 -41
  90. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +1 -1
  91. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +50 -42
  92. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  93. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +39 -63
  94. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
  95. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  96. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +62 -36
  97. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +1 -1
  98. package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.d.ts.map +1 -1
  99. package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.js +8 -8
  100. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
  101. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +10 -10
  102. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +2 -2
  103. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  104. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +57 -16
  105. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  106. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +12 -27
  107. package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.d.ts.map +1 -1
  108. package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.js +1 -1
  109. package/lib/esm/components/Cve/CveItem.d.ts.map +1 -1
  110. package/lib/esm/components/Cve/CveItem.js +10 -11
  111. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  112. package/lib/esm/components/Cve/CveModal.js +10 -11
  113. package/lib/esm/components/Cve/CvePanel.d.ts.map +1 -1
  114. package/lib/esm/components/Cve/CvePanel.js +3 -3
  115. package/lib/esm/components/Cve/CveSidebar.js +2 -2
  116. package/lib/esm/components/IdeaInformation/IdeaInformation.js +7 -7
  117. package/lib/esm/components/ImproveCase/KtQuestions.js +6 -6
  118. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  119. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +6 -13
  120. package/lib/esm/components/ProductSelector/AllProductsSelector.js +8 -7
  121. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
  122. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  123. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +80 -53
  124. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  125. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +14 -10
  126. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -1
  127. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +4 -4
  128. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  129. package/lib/esm/components/Recommendations/AsideResults.js +5 -3
  130. package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
  131. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
  132. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
  133. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -11
  134. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
  135. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +4 -4
  136. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +7 -7
  137. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  138. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  139. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +16 -16
  140. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +6 -6
  141. package/lib/esm/components/Recommendations/RecommendationInfoBox.d.ts.map +1 -1
  142. package/lib/esm/components/Recommendations/RecommendationInfoBox.js +7 -7
  143. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  144. package/lib/esm/components/Recommendations/Recommendations.js +23 -20
  145. package/lib/esm/components/Recommendations/RecommendationsLoader.js +1 -1
  146. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  147. package/lib/esm/components/Recommendations/RulesModal.js +7 -9
  148. package/lib/esm/components/Recommendations/WatsonxAiIcon.d.ts.map +1 -1
  149. package/lib/esm/components/Recommendations/WatsonxAiIcon.js +9 -10
  150. package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
  151. package/lib/esm/components/Review/Review.js +4 -4
  152. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -5
  153. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  154. package/lib/esm/components/SessionRestore/SessionRestoreCard.js +1 -1
  155. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  156. package/lib/esm/components/SubmitCase/SubmitCase.js +21 -21
  157. package/lib/esm/components/Suggestions/Suggestions.js +2 -2
  158. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  159. package/lib/esm/components/Suggestions/TopContent.js +8 -8
  160. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  161. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -14
  162. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  163. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +20 -16
  164. package/lib/esm/components/shared/Rule.js +6 -6
  165. package/lib/esm/components/shared/fileUpload/FileLister.js +6 -6
  166. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  167. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +7 -6
  168. package/lib/esm/components/shared/fileUpload/common/FileUploaderInfoIcon.js +1 -1
  169. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
  170. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
  171. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
  172. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +4 -4
  173. package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +2 -2
  174. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +15 -6
  175. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  176. package/lib/esm/components/shared/input/ContactSelectorInternal.js +128 -23
  177. package/lib/esm/components/wizardLayout/MainSection.js +2 -2
  178. package/lib/esm/components/wizardLayout/NewFeatureModal.d.ts.map +1 -1
  179. package/lib/esm/components/wizardLayout/NewFeatureModal.js +6 -6
  180. package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
  181. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  182. package/lib/esm/components/wizardLayout/WizardMain.js +61 -19
  183. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  184. package/lib/esm/components/wizardLayout/WizardNavigation.js +7 -13
  185. package/lib/esm/css/app.css +13 -13
  186. package/lib/esm/css/case.css +23 -16
  187. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  188. package/lib/esm/hooks/useWizard.js +1 -3
  189. package/lib/esm/reducers/RouteConstNTypes.d.ts +1 -2
  190. package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
  191. package/lib/esm/reducers/RulesReducer.d.ts.map +1 -1
  192. package/lib/esm/scss/_main.scss +183 -88
  193. package/lib/esm/scss/_pf-overrides.scss +150 -140
  194. package/package.json +11 -11
@@ -8,20 +8,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { contacts } from '@cee-eng/hydrajs';
11
+ import { Button, Label, LabelGroup, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
+ import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
11
13
  import assign from 'lodash/assign';
12
14
  import differenceBy from 'lodash/differenceBy';
13
15
  import filter from 'lodash/filter';
14
16
  import isEmpty from 'lodash/isEmpty';
15
17
  import unionBy from 'lodash/unionBy';
16
18
  import React from 'react';
17
- import { AsyncTypeahead, Highlighter } from 'react-bootstrap-typeahead';
18
- // https://github.com/ericgio/react-bootstrap-typeahead/blob/master/docs/Props.md
19
19
  export class ContactSelectorInternal extends React.Component {
20
20
  constructor(props) {
21
21
  super(props);
22
+ this.searchTimeout = null;
23
+ this.inputRef = React.createRef();
22
24
  this.getSelectedLabel = (contact) => {
23
25
  if (!contact) {
24
- return undefined;
26
+ return '';
25
27
  }
26
28
  const userName = contact.internalSso || contact.ssoUsername || '';
27
29
  const fullName = contact.fullNameCustom
@@ -31,7 +33,7 @@ export class ContactSelectorInternal extends React.Component {
31
33
  };
32
34
  this.getContactsSelected = (contacts) => {
33
35
  if (!contacts)
34
- return undefined;
36
+ return [];
35
37
  return filter(contacts, (c) => this.isValidContactForQuery(c));
36
38
  };
37
39
  this.isValidContactForQuery = (c) => {
@@ -43,11 +45,6 @@ export class ContactSelectorInternal extends React.Component {
43
45
  this.props.onSelect(contacts);
44
46
  }
45
47
  });
46
- this.onFocus = (event) => {
47
- if (!this.state.selectedContacts && isEmpty(this.state.options) && this.props.contactListParams) {
48
- this.handleSearch('');
49
- }
50
- };
51
48
  this.handleSearch = (query) => __awaiter(this, void 0, void 0, function* () {
52
49
  if (query == null) {
53
50
  return;
@@ -73,7 +70,7 @@ export class ContactSelectorInternal extends React.Component {
73
70
  const response = yield contacts.getSFDCContacts(queryParams, this.controller.signal);
74
71
  const options = response && response.items && response.items.length ? this.getContactsSelected(response.items) : [];
75
72
  this.setState({
76
- options: differenceBy(options, this.props.contactsToExclude, 'ssoUsername'),
73
+ options: differenceBy(options, this.props.contactsToExclude || [], 'ssoUsername'),
77
74
  isLoading: false,
78
75
  });
79
76
  }
@@ -85,35 +82,143 @@ export class ContactSelectorInternal extends React.Component {
85
82
  });
86
83
  }
87
84
  });
88
- this.renderMenuItemChildren = (option, p) => (React.createElement(Highlighter, { key: option.ssoUsername, search: p.text }, this.getSelectedLabel(option)));
89
- this.typeahead = React.createRef();
85
+ this.handleInputChange = (value) => {
86
+ this.setState({ searchValue: value });
87
+ // Clear existing timeout
88
+ if (this.searchTimeout) {
89
+ clearTimeout(this.searchTimeout);
90
+ }
91
+ // Set new timeout for debounced search
92
+ this.searchTimeout = setTimeout(() => {
93
+ if (value.length >= (this.props.minLength || 0)) {
94
+ this.handleSearch(value);
95
+ this.setState({ isOpen: true });
96
+ }
97
+ else if (value.length === 0) {
98
+ this.setState({ options: [], isOpen: false });
99
+ }
100
+ }, this.props.debounceDelay || 300);
101
+ };
102
+ this.handleSelect = (event, selection) => {
103
+ if (this.props.multiple) {
104
+ const currentSelected = this.state.selectedContacts || [];
105
+ const isAlreadySelected = currentSelected.some((c) => c.ssoUsername === selection.ssoUsername);
106
+ if (isAlreadySelected) {
107
+ const newSelected = currentSelected.filter((c) => c.ssoUsername !== selection.ssoUsername);
108
+ this.onChange(newSelected);
109
+ }
110
+ else {
111
+ const newSelected = [...currentSelected, selection];
112
+ this.onChange(newSelected);
113
+ }
114
+ // Clear search value after selection in multiple mode
115
+ this.setState({ searchValue: '' });
116
+ }
117
+ else {
118
+ this.onChange([selection]);
119
+ this.setState({ isOpen: false, searchValue: '' });
120
+ }
121
+ };
122
+ this.handleRemoveContact = (contactToRemove) => {
123
+ const currentSelected = this.state.selectedContacts || [];
124
+ const newSelected = currentSelected.filter((c) => c.ssoUsername !== contactToRemove.ssoUsername);
125
+ this.onChange(newSelected);
126
+ };
127
+ this.handleKeyDown = (event) => {
128
+ const { options, focusedItemIndex, isOpen } = this.state;
129
+ if (!isOpen || options.length === 0)
130
+ return;
131
+ switch (event.key) {
132
+ case 'ArrowDown':
133
+ event.preventDefault();
134
+ this.setState((prevState) => ({
135
+ focusedItemIndex: prevState.focusedItemIndex === null || prevState.focusedItemIndex >= options.length - 1
136
+ ? 0
137
+ : prevState.focusedItemIndex + 1,
138
+ }));
139
+ break;
140
+ case 'ArrowUp':
141
+ event.preventDefault();
142
+ this.setState((prevState) => ({
143
+ focusedItemIndex: prevState.focusedItemIndex === null || prevState.focusedItemIndex <= 0
144
+ ? options.length - 1
145
+ : prevState.focusedItemIndex - 1,
146
+ }));
147
+ break;
148
+ case 'Enter':
149
+ event.preventDefault();
150
+ if (focusedItemIndex !== null && options[focusedItemIndex]) {
151
+ this.handleSelect(null, options[focusedItemIndex]);
152
+ }
153
+ break;
154
+ case 'Escape':
155
+ this.setState({ isOpen: false, focusedItemIndex: null });
156
+ break;
157
+ }
158
+ };
159
+ this.handleFocus = () => {
160
+ if (this.state.searchValue.length >= (this.props.minLength || 0)) {
161
+ this.setState({ isOpen: true });
162
+ }
163
+ };
164
+ this.handleBlur = () => {
165
+ // Delay closing to allow for clicks on menu items
166
+ setTimeout(() => {
167
+ this.setState({ isOpen: false, focusedItemIndex: null });
168
+ }, 150);
169
+ };
170
+ this.handleClear = () => {
171
+ this.setState({ searchValue: '', options: [], isOpen: false });
172
+ this.onChange([]);
173
+ };
174
+ this.onToggle = () => {
175
+ this.setState((prevState) => ({ isOpen: !prevState.isOpen }));
176
+ };
90
177
  this.state = {
91
178
  isLoading: false,
92
- selectedContacts: this.getContactsSelected(props.selectedContacts),
179
+ selectedContacts: this.getContactsSelected(props.selectedContacts || []),
93
180
  options: [],
181
+ isOpen: false,
182
+ searchValue: '',
183
+ focusedItemIndex: null,
94
184
  };
95
185
  }
96
186
  componentDidUpdate(prevProps) {
97
- if (!isEmpty(prevProps.selectedContacts) && isEmpty(this.props.selectedContacts)) {
187
+ if (!isEmpty(prevProps.selectedContacts || []) && isEmpty(this.props.selectedContacts || [])) {
98
188
  this.setState({ selectedContacts: [], options: [] });
99
- this.typeahead.current.clear();
100
189
  }
101
190
  if (this.props.showSelectedContacts) {
102
- if (prevProps.selectedContacts.length !== this.props.selectedContacts.length) {
103
- this.setState({ selectedContacts: this.getContactsSelected(this.props.selectedContacts) });
191
+ const prevSelected = prevProps.selectedContacts || [];
192
+ const currentSelected = this.props.selectedContacts || [];
193
+ if (prevSelected.length !== currentSelected.length) {
194
+ this.setState({ selectedContacts: this.getContactsSelected(currentSelected) });
104
195
  }
105
196
  else {
106
- const unionOldNew = unionBy(prevProps.selectedContacts, this.props.selectedContacts, 'ssoUsername');
107
- if (unionOldNew.length !== this.props.selectedContacts.length ||
108
- prevProps.selectedContacts.length !== this.props.selectedContacts.length) {
109
- this.setState({ selectedContacts: this.getContactsSelected(this.props.selectedContacts) });
197
+ const unionOldNew = unionBy(prevSelected, currentSelected, 'ssoUsername');
198
+ if (unionOldNew.length !== currentSelected.length || prevSelected.length !== currentSelected.length) {
199
+ this.setState({ selectedContacts: this.getContactsSelected(currentSelected) });
110
200
  }
111
201
  }
112
202
  }
113
203
  }
114
204
  render() {
115
- const conditionalProps = Object.assign({}, (this.props.renderToken ? { renderToken: this.props.renderToken } : undefined));
116
- return (React.createElement(AsyncTypeahead, Object.assign({ id: this.props.id + '-contact-select', className: `${this.props.className} contact-select`, defaultInputValue: "", autoFocus: this.props.autoFocus, clearButton: this.props.clearButton, isLoading: this.state.isLoading || this.props.isUpdating, options: this.state.options, selected: !isEmpty(this.state.selectedContacts) ? this.state.selectedContacts : [], onChange: this.onChange, onFocus: this.onFocus, labelKey: this.getSelectedLabel, onSearch: this.handleSearch, delay: this.props.debounceDelay, maxResults: this.props.maxResults, placeholder: this.props.placeholder, ref: this.typeahead, renderMenuItemChildren: this.renderMenuItemChildren, size: this.props.typeAheadSize, useCache: this.props.useCache, minLength: this.props.minLength, disabled: this.props.disabled || this.props.isUpdating, multiple: this.props.multiple }, conditionalProps)));
205
+ const { selectedContacts = [], options, isLoading, isOpen, searchValue, focusedItemIndex } = this.state;
206
+ // For multiple selection, always show the search value so typed text is visible
207
+ // For single selection, show selected contact label or search value
208
+ const displayValue = this.props.multiple
209
+ ? searchValue
210
+ : selectedContacts[0]
211
+ ? this.getSelectedLabel(selectedContacts[0])
212
+ : searchValue;
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 },
214
+ React.createElement(TextInputGroup, { isPlain: true },
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))))))),
216
+ React.createElement(TextInputGroupUtilities, null,
217
+ isLoading && React.createElement(Spinner, { size: "sm" }),
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" }))))));
219
+ return (React.createElement("div", { className: `${this.props.className} contact-select` },
220
+ React.createElement(Select, { id: this.props.id + '-contact-select', isOpen: isOpen, selected: this.props.multiple ? selectedContacts : selectedContacts[0] || null, onSelect: this.handleSelect, onOpenChange: (isOpen) => this.setState({ isOpen }), toggle: toggle, shouldFocusFirstItemOnOpen: false, shouldFocusToggleOnSelect: false, popperProps: { direction: 'down', enableFlip: false }, isScrollable: true, onBlur: this.handleBlur, "data-tracking-id": "external-case-contact-selector" },
221
+ React.createElement(SelectList, { isAriaMultiselectable: this.props.multiple }, options.length > 0 ? (options.map((contact, index) => (React.createElement(SelectOption, { key: contact.ssoUsername, value: contact, isFocused: focusedItemIndex === index, isSelected: selectedContacts.some((c) => c.ssoUsername === contact.ssoUsername) }, this.getSelectedLabel(contact))))) : (React.createElement(SelectOption, { isDisabled: true }, isLoading ? 'Searching...' : searchValue ? 'No matches found.' : 'Type to search...'))))));
117
222
  }
118
223
  }
119
224
  ContactSelectorInternal.defaultProps = {
@@ -21,7 +21,7 @@ const MainSection = (props) => {
21
21
  React.createElement("section", { id: `${props.section}-section`, tabIndex: -1, "aria-labelledby": `${props.section}-heading`, "aria-describedby": `${props.section}-description`, className: `main-step-content ${props.className ? props.className : ''}` },
22
22
  isConfirmedStateSideSupport && props.section !== AppRouteSections.SUBMIT_CASE && (React.createElement(Alert, { isInline: true, variant: "warning", title: ((_c = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _c === void 0 ? void 0 : _c.hasConfirmedStatesideSupport)
23
23
  ? 'You have a confirmed stateside support account'
24
- : 'This is a confirmed stateside support account', className: "pf-v5-u-mb-lg" },
24
+ : 'This is a confirmed stateside support account', className: "pf-v6-u-mb-lg" },
25
25
  React.createElement("p", null,
26
26
  "To adhere to data regulations, open this case through",
27
27
  ' ',
@@ -31,7 +31,7 @@ const MainSection = (props) => {
31
31
  "instead of traditional support."))),
32
32
  React.createElement(LoadingIndicator, { show: props.isLoading, size: "lg" }),
33
33
  !props.isLoading && (React.createElement(React.Fragment, null,
34
- React.createElement("header", { className: "pf-v5-u-display-none-on-sm" },
34
+ React.createElement("header", { className: "pf-v6-u-display-none-on-sm" },
35
35
  props.title && (React.createElement("h2", { "aria-label": props.stepNumber &&
36
36
  `Step ${props.stepNumber} of ${props.totalSteps}: ${props.section}`, id: `${props.section}-heading` }, props.title)),
37
37
  props.description && (React.createElement("p", { id: `${props.section}-description`, className: `${props.descriptionClassName ? props.descriptionClassName : ''}` }, props.description))),
@@ -1 +1 @@
1
- {"version":3,"file":"NewFeatureModal.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/NewFeatureModal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,QAAA,MAAM,eAAe,yBA8EpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"NewFeatureModal.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/NewFeatureModal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,QAAA,MAAM,eAAe,yBA6EpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Button, Checkbox, Modal, Title } from '@patternfly/react-core';
1
+ import { Button, Checkbox, Modal, ModalFooter, Title } from '@patternfly/react-core';
2
2
  import { useLocalStorage, useSessionStorage } from '@rh-support/components';
3
3
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
4
  import { getConfigField, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
@@ -27,12 +27,12 @@ const NewFeatureModal = () => {
27
27
  const onBannerCheckboxChange = () => {
28
28
  setCheckedToNotShowModal(!checkedToNotShowModal);
29
29
  };
30
- return (React.createElement(React.Fragment, null, !shouldNotShowModal && isNewFeatureBannerVisible && showModal && (React.createElement(Modal, { className: "newFeatureModal", width: "45%", "aria-label": t('New feature modal'), isOpen: showModal, onClose: handleModalToggle, actions: [
31
- React.createElement(Button, { key: "close", variant: "primary", "data-tracking-id": "new-feature-modal-close", onClick: handleModalToggle }, t('Close')),
32
- ], showClose: false },
30
+ return (React.createElement(React.Fragment, null, !shouldNotShowModal && isNewFeatureBannerVisible && showModal && (React.createElement(Modal, { className: "newFeatureModal", width: "45%", "aria-label": t('New feature modal'), isOpen: showModal, onClose: handleModalToggle },
33
31
  React.createElement(RedHatCustomerPortalIcon, null),
34
- React.createElement(Title, { headingLevel: "h2", className: "pf-v5-u-font-weight-bold" }, t('Change: Application Announcement For KT Question Update')),
32
+ React.createElement(Title, { headingLevel: "h2", className: "pf-v6-u-font-weight-bold" }, t('Change: Application Announcement For KT Question Update')),
35
33
  React.createElement(Trans, null, "Welcome back! To improve your troubleshooting experience, we've updated how you create cases, changed the questions we ask, and given you more chances to edit your problem. We want to help you solve your technical challenges quickly."),
36
- React.createElement(Checkbox, { className: "pf-v5-u-mt-md", id: "new-feature-modal-checkbox", label: t(`I don't want to see this modal again`), isChecked: checkedToNotShowModal, onChange: onBannerCheckboxChange, "data-tracking-id": "new-feature-modal-checkbox" })))));
34
+ React.createElement(Checkbox, { className: "pf-v6-u-mt-md", id: "new-feature-modal-checkbox", label: t(`I don't want to see this modal again`), isChecked: checkedToNotShowModal, onChange: onBannerCheckboxChange, "data-tracking-id": "new-feature-modal-checkbox" }),
35
+ React.createElement(ModalFooter, null,
36
+ React.createElement(Button, { key: "close", variant: "primary", "data-tracking-id": "new-feature-modal-close", onClick: handleModalToggle }, t('Close')))))));
37
37
  };
38
38
  export default NewFeatureModal;
@@ -39,14 +39,14 @@ function WizardAside(props) {
39
39
  React.createElement("section", { className: "grid-aside-content" },
40
40
  canUseSessionManagement && !isCreatingCase && activeSection !== AppRouteSections.SUBMIT_CASE && (React.createElement(SessionRestore, { routeProps: props.routeProps })),
41
41
  canShowFileUploadWidget() && React.createElement(InsightsResults, null),
42
- canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v5-u-mb-md" }),
42
+ canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v6-u-mb-md" }),
43
43
  activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
44
44
  !isCveModalOpened && React.createElement(CveSidebar, null),
45
45
  activeSection === AppRouteSections.RESOURCES && React.createElement(CveSidebar, null),
46
46
  canShowEARuleWidget && React.createElement(EARuleWidget, null),
47
- !(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v5-u-mb-md pf-v5-u-mt-0" })),
47
+ !(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-md pf-v6-u-mt-0" })),
48
48
  canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
49
- React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v5-u-mb-md pf-v5-u-mt-0" }))));
49
+ React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-md pf-v6-u-mt-0" }))));
50
50
  }
51
51
  WizardAside.defaultProps = defaultProps;
52
52
  export default WizardAside;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgJhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAwMhC;AACD,eAAe,UAAU,CAAC"}
@@ -1,12 +1,23 @@
1
- import { Wizard, WizardContextConsumer, WizardFooter } from '@patternfly/react-core/deprecated';
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 { useWizardContext, Wizard, WizardNav, WizardNavItem, WizardStep } from '@patternfly/react-core';
2
13
  import { LoadingIndicator } from '@rh-support/components';
3
14
  import isEqual from 'lodash/isEqual';
4
- import React, { Suspense, useContext, useRef, useState } from 'react';
15
+ import React, { Suspense, useContext, useEffect, useRef, useState } from 'react';
5
16
  import { useTranslation } from 'react-i18next';
6
17
  import { Route } from 'react-router-dom';
7
18
  import { useCaseSelector } from '../../context/CaseContext';
8
19
  import { RecommendationDispatchContext } from '../../context/RecommendationContext';
9
- import { RouteDispatchContext } from '../../context/RouteContext';
20
+ import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
10
21
  import { useWizard } from '../../hooks/useWizard';
11
22
  import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
12
23
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
@@ -22,10 +33,14 @@ function WizardMain(props) {
22
33
  const { isCreatingCase } = useCaseSelector((state) => ({
23
34
  isCreatingCase: state.isCreatingCase,
24
35
  }), isEqual);
36
+ const { routeState: { isCaseCreate }, } = useContext(RouteContext);
25
37
  const [userSeenRecommendations, setUserSeenRecommendations] = useState(false);
26
38
  const [userClickedNextonRecommendations, setUserClickedNextonRecommendations] = useState(false);
27
39
  const [userScrolledLabel, setUserScrolledLabel] = useState(false);
28
40
  const [userCanNavigateToTroubleshoot, setUserCanNavigateToTroubleshoot] = useState(false);
41
+ const [isNextButtonClicked, setIsNextButtonClicked] = useState(false);
42
+ const isNextButtonClickedRef = useRef(false);
43
+ const isBackButtonClickedRef = useRef(false);
29
44
  const resultsRowRef = useRef(null);
30
45
  const { getStepsSequece } = useWizard(props.routeProps, {
31
46
  userSeenRecommendationsfn: setUserSeenRecommendations,
@@ -37,6 +52,9 @@ function WizardMain(props) {
37
52
  });
38
53
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
39
54
  const { t } = useTranslation();
55
+ useEffect(() => {
56
+ setActiveSectionChanged(dispatchToRouteReducer, isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT, '');
57
+ }, [isCaseCreate, dispatchToRouteReducer]);
40
58
  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" },
41
59
  React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
42
60
  React.createElement(SubmitCase, { routeProps: props.routeProps }))));
@@ -54,13 +72,13 @@ function WizardMain(props) {
54
72
  // isLoadingRecommendations needs to be set to false on back when the previous step is the summary
55
73
  // step because it can cause the next button to be permanently disabled if the debounce is not called
56
74
  // before going back a step. This can be caused if navigating quickly to then away from the recommendations page.
57
- if (prevStep.prevId === AppRouteSections.SUMMARIZE) {
75
+ if (prevStep.id === AppRouteSections.SUMMARIZE) {
58
76
  recommendationDispatch({
59
77
  type: RecommendationsConstants.setIsLoadingRecommendations,
60
78
  payload: { isLoadingRecommendations: false },
61
79
  });
62
80
  }
63
- var regex = new RegExp('/' + prevStep.prevId + '$');
81
+ var regex = new RegExp('/' + prevStep.id + '$');
64
82
  RouteUtils.navigateToSection(props.routeProps, props.routeProps.location.pathname.replace(regex, ''), false);
65
83
  };
66
84
  const onSubmit = () => {
@@ -68,26 +86,50 @@ function WizardMain(props) {
68
86
  props.submitCaseAndNavigate(false);
69
87
  return;
70
88
  };
71
- const onCurrentStepChanged = (step) => {
72
- setActiveSectionChanged(dispatchToRouteReducer, step.id, step.name);
89
+ const onCurrentStepChanged = (event, currentStep, prevStep, scope) => {
90
+ if (isNextButtonClickedRef.current) {
91
+ onNext(currentStep);
92
+ }
93
+ if (isBackButtonClickedRef.current) {
94
+ onBack(currentStep, prevStep);
95
+ }
96
+ setActiveSectionChanged(dispatchToRouteReducer, currentStep.id, currentStep.name);
73
97
  updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
98
+ isNextButtonClickedRef.current = false;
99
+ isBackButtonClickedRef.current = false;
100
+ setIsNextButtonClicked(false);
101
+ };
102
+ const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
103
+ return (React.createElement(WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: activeStep.id === step.id, isDisabled: !step.canJumpTo, stepIndex: step.index, onClick: () => goToStepByIndex(step.index) }));
104
+ })));
105
+ const CustomFooter = () => {
106
+ const { activeStep, goToNextStep, goToPrevStep, steps, goToStepByIndex } = useWizardContext(); // Correctly using the context
107
+ useEffect(() => {
108
+ if (steps.length > 2 && activeStep.index === 2 && isNextButtonClicked) {
109
+ goToStepByIndex(3);
110
+ }
111
+ }, [activeStep, steps.length, goToStepByIndex]);
112
+ return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: () => {
113
+ isNextButtonClickedRef.current = true;
114
+ setIsNextButtonClicked(true);
115
+ goToNextStep();
116
+ focusWizardMainPanel();
117
+ }, onBack: () => {
118
+ isBackButtonClickedRef.current = true;
119
+ goToPrevStep();
120
+ focusWizardMainPanel();
121
+ }, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel }));
74
122
  };
75
- const CustomFooter = (React.createElement(WizardFooter, null,
76
- React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
77
- return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: () => {
78
- onNext();
79
- focusWizardMainPanel();
80
- }, onBack: () => {
81
- onBack();
82
- focusWizardMainPanel();
83
- }, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel }));
84
- })));
123
+ const steps = getStepsSequece(showRestFlag);
124
+ const wizardSteps = steps.map((step) => {
125
+ const { component } = step, rest = __rest(step, ["component"]);
126
+ return (React.createElement(WizardStep, Object.assign({ key: step.id }, rest), component));
127
+ });
85
128
  // To add a new step to wizard first need to add the component to appRouteConfugurations
86
129
  // in useWizard file then add it to step squences in RouteConstNTypes
87
- const steps = getStepsSequece(showRestFlag);
88
130
  return (React.createElement(React.Fragment, null,
89
131
  React.createElement(NewFeatureModal, null),
90
- steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, 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 })) })),
132
+ steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { isVisitRequired: true, nav: customNav, navAriaLabel: ` navAriaLabel steps `, footer: React.createElement(CustomFooter, null), onStepChange: onCurrentStepChanged }, wizardSteps)) })),
91
133
  React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
92
134
  }
93
135
  export default WizardMain;
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,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,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA+UtC;kBA/UQ,gBAAgB;;;AAiVzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,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,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAyUtC;kBAzUQ,gBAAgB;;;AA2UzB,eAAe,gBAAgB,CAAC"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { pcm } from '@cee-eng/hydrajs';
11
- import { Button, ButtonVariant } from '@patternfly/react-core';
11
+ import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-core';
12
12
  import { useFetch } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
14
14
  import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
@@ -58,13 +58,6 @@ function WizardNavigation(props) {
58
58
  isFileRecommendationsTriggered: state.isFileRecommendationsTriggered,
59
59
  }), isEqual);
60
60
  const caseDispatch = useCaseDispatch();
61
- useEffect(() => {
62
- // we need this because when the user hits the troubleshoot tab, we only refresh the children but the state is managed in the parent
63
- props.setUserSeenRecommendations(false);
64
- props.userClickedNextonRecommendationsFn(false);
65
- props.setUserScrolledLabel(false);
66
- // eslint-disable-next-line react-hooks/exhaustive-deps
67
- }, [recommendationState.isLoadingRecommendations]);
68
61
  useEffect(() => {
69
62
  var _a;
70
63
  const isCreatingCase = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
@@ -255,11 +248,12 @@ function WizardNavigation(props) {
255
248
  };
256
249
  // To handle entitled products
257
250
  return (React.createElement(React.Fragment, null,
258
- props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack(), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
259
- React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
260
- activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))),
261
- React.createElement(RecommendationFeedbackModal, { isModalOpen: isRecsModalVisible, handleModalToggle: onRecsFeedbackModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
262
- activeSectionError ? (React.createElement("small", { className: "pf-v5-u-align-self-center pf-v5-u-ml-md text-red" }, activeSectionError)) : null));
251
+ React.createElement(WizardFooterWrapper, null,
252
+ props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack(), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
253
+ React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
254
+ activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))),
255
+ React.createElement(RecommendationFeedbackModal, { isModalOpen: isRecsModalVisible, handleModalToggle: onRecsFeedbackModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
256
+ activeSectionError ? (React.createElement("small", { className: "pf-v6-u-align-self-center pf-v6-u-ml-md text-red" }, activeSectionError)) : null)));
263
257
  }
264
258
  WizardNavigation.defaultProps = defaultProps;
265
259
  export default WizardNavigation;
@@ -54,7 +54,7 @@
54
54
 
55
55
  .btn.btn-app[disabled] {
56
56
  background: #d1d1d1;
57
- border-color: #d1d1d1;
57
+ border-color: #d1d1d1 !important;
58
58
  color: #8d8d8d;
59
59
  }
60
60
 
@@ -95,7 +95,7 @@ form textarea {
95
95
  resize: vertical !important;
96
96
  }
97
97
 
98
- .pf-v5-c-form-control.pf-m-warning {
98
+ .pf-v6-c-form-control.pf-m-warning {
99
99
  border-bottom-color: var(--pf-v5-c-form-control--m-warning--BorderBottomColor);
100
100
  border-bottom-width: 2px;
101
101
  }
@@ -282,17 +282,17 @@ input[type='checkbox'] {
282
282
  margin-left: 5px;
283
283
  }
284
284
 
285
- .pf-tippy-theme.tippy-tooltip .pf-v5-c-popover {
285
+ .pf-tippy-theme.tippy-tooltip .pf-v6-c-popover {
286
286
  background-color: #fff;
287
287
  -webkit-box-shadow: rgba(3, 3, 3, 0.05) 0px 1px 1px 0px, rgba(3, 3, 3, 0.06) 0px 4px 8px 4px;
288
288
  box-shadow: rgba(3, 3, 3, 0.05) 0px 1px 1px 0px, rgba(3, 3, 3, 0.06) 0px 4px 8px 4px;
289
289
  }
290
290
 
291
- .pf-v5-c-popover .pf-v5-c-popover__body > * {
291
+ .pf-v6-c-popover .pf-v6-c-popover__body > * {
292
292
  margin-bottom: 0;
293
293
  }
294
294
 
295
- /* .pf-v5-c-popover .pf-v5-c-button {
295
+ /* .pf-v6-c-popover .pf-v6-c-button {
296
296
  position: absolute;
297
297
  top: 8px;
298
298
  right: 2px;
@@ -312,14 +312,14 @@ input[type='checkbox'] {
312
312
  pointer-events: initial !important;
313
313
  }
314
314
 
315
- .pf-tippy-theme.tippy-tooltip .pf-v5-c-popover .pf-v5-c-popover__content {
315
+ .pf-tippy-theme.tippy-tooltip .pf-v6-c-popover .pf-v6-c-popover__content {
316
316
  position: relative;
317
317
  background-color: #fff;
318
318
  padding: 1.5rem;
319
319
  font-size: 16px;
320
320
  }
321
321
 
322
- .pf-tippy-theme.tippy-tooltip .pf-v5-c-popover .pf-v5-c-popover__arrow {
322
+ .pf-tippy-theme.tippy-tooltip .pf-v6-c-popover .pf-v6-c-popover__arrow {
323
323
  position: absolute;
324
324
  width: 25px;
325
325
  height: 25px;
@@ -426,21 +426,21 @@ input[type='checkbox'] {
426
426
  width: 100%;
427
427
  }
428
428
 
429
- #summary-progress-bar .pf-v5-c-progress__status-icon {
429
+ #summary-progress-bar .pf-v6-c-progress__status-icon {
430
430
  display: none;
431
431
  }
432
432
 
433
- #summary-progress-bar .pf-v5-c-progress__bar,
434
- #summary-progress-bar .pf-v5-c-progress__indicator {
433
+ #summary-progress-bar .pf-v6-c-progress__bar,
434
+ #summary-progress-bar .pf-v6-c-progress__indicator {
435
435
  height: 2px;
436
436
  }
437
437
 
438
- #summary-progress-bar.gray .pf-v5-c-progress__bar,
439
- #summary-progress-bar.gray .pf-v5-c-progress__bar::before {
438
+ #summary-progress-bar.gray .pf-v6-c-progress__bar,
439
+ #summary-progress-bar.gray .pf-v6-c-progress__bar::before {
440
440
  background-color: var(--pf-v5-global--palette--black-300) !important;
441
441
  }
442
442
 
443
- #summary-progress-bar .pf-v5-c-progress.pf-m-sm .pf-v5-c-progress__measure {
443
+ #summary-progress-bar .pf-v6-c-progress.pf-m-sm .pf-v6-c-progress__measure {
444
444
  font-size: 14px;
445
445
  }
446
446
 
@@ -26,7 +26,7 @@ pfe-collapse-toggle[aria-expanded='true'] h3:after {
26
26
  }
27
27
 
28
28
  button,
29
- .pf-v5-c-button,
29
+ .pf-v6-c-button,
30
30
  .btn.btn-app {
31
31
  font-size: 14px;
32
32
  }
@@ -35,6 +35,12 @@ button,
35
35
  grid-gap: 0px;
36
36
  }
37
37
 
38
+ .case-details-tabs .pf-v6-c-tabs__item.pf-m-current {
39
+ border-bottom: var(--pf-v6-c-tabs__item--m-current__link--after--BorderWidth) solid
40
+ var(--pf-v6-c-tabs__item--m-current__link--after--BorderColor);
41
+ background-color: var(--pf-v6-c-tabs__item--m-current--BackgroundColor);
42
+ }
43
+
38
44
  .case-details-tabs .case-details-tabs-content {
39
45
  background-color: #f0f0f0;
40
46
  margin-left: -1.8rem;
@@ -307,11 +313,7 @@ button,
307
313
  outline: none;
308
314
  }
309
315
 
310
- button.pf-v5-c-button.pf-m-secondary {
311
- background-color: #fff;
312
- }
313
-
314
- input[aria-invalid='true'].pf-v5-c-form-control {
316
+ input[aria-invalid='true'].pf-v6-c-form-control {
315
317
  border-bottom-width: 2px !important;
316
318
  }
317
319
 
@@ -327,21 +329,26 @@ input[aria-invalid='true'].pf-v5-c-form-control {
327
329
  gap: 8px;
328
330
  }
329
331
 
330
- .gradient-border-badge {
332
+ .preview-label {
333
+ border: 1px solid transparent; /* Needed for border space */
331
334
  border-radius: 18px;
332
- padding: 1px;
333
- background: linear-gradient(to right, #f56e6e, #5e40be);
334
- display: inline-block;
335
+ background: linear-gradient(to right, #f56e6e, #5e40be); /* Border gradient */
336
+ background-origin: border-box;
337
+ background-clip: padding-box, border-box;
338
+ box-shadow: none;
339
+
340
+ /* Inner white background */
341
+ background-image: linear-gradient(white, white), /* inner bg */ linear-gradient(to right, #f56e6e, #5e40be);
335
342
  }
336
343
 
337
- .preview-label {
338
- border-radius: 18px;
339
- background: white;
340
- padding: 0px 8px;
344
+ .preview-label .pf-v6-c-label__text {
345
+ max-height: 1rem;
346
+ display: flex;
347
+ align-items: center;
341
348
  }
342
349
 
343
- .preview-label .pf-v5-c-label__content {
344
- color: grey;
350
+ .preview-label .pf-v6-c-label__content {
351
+ font-weight: var(--pf-t--global--font--weight--body--bold);
345
352
  }
346
353
 
347
354
  /* Improves the sidebar loading */