@rh-support/troubleshoot 2.6.46 → 2.6.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +1 -0
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +31 -5
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +33 -34
  6. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +3 -2
  8. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -0
  10. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +14 -18
  12. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -1
  13. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +16 -22
  15. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
  17. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +53 -102
  19. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
  21. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +23 -21
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +4 -2
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +7 -4
  26. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -1
  28. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +7 -9
  30. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +0 -8
  31. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  32. package/lib/esm/components/CaseInformation/Fts.js +6 -2
  33. package/lib/esm/components/CaseInformation/Severity.js +1 -1
  34. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  35. package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
  36. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +3 -0
  37. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  38. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +15 -20
  39. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  40. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +5 -7
  41. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
  42. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +20 -18
  43. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  44. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +6 -9
  45. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  46. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +22 -15
  47. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  48. package/lib/esm/components/Cve/CveModal.js +2 -3
  49. package/lib/esm/components/Cve/CveSidebar.js +1 -1
  50. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
  51. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  52. package/lib/esm/components/ProductSelector/AllProductsSelector.js +6 -9
  53. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  54. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +1 -10
  55. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  56. package/lib/esm/components/Recommendations/AsideResults.js +3 -3
  57. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
  58. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +4 -7
  59. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
  60. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +1 -3
  61. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  62. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  63. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +2 -9
  64. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
  65. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
  66. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  67. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  68. package/lib/esm/components/Recommendations/RulesModal.js +4 -7
  69. package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
  70. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
  71. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +3 -5
  72. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  73. package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
  74. package/lib/esm/components/Suggestions/Suggestions.js +12 -17
  75. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  76. package/lib/esm/components/Suggestions/TopContent.js +13 -13
  77. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +7 -0
  78. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -0
  79. package/lib/esm/components/TroubleshootSection/AskRedHat.js +176 -0
  80. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts +9 -0
  81. package/lib/esm/components/TroubleshootSection/CloseButton.d.ts.map +1 -0
  82. package/lib/esm/components/TroubleshootSection/CloseButton.js +5 -0
  83. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts +15 -0
  84. package/lib/esm/components/TroubleshootSection/QuickResponse.d.ts.map +1 -0
  85. package/lib/esm/components/TroubleshootSection/QuickResponse.js +26 -0
  86. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts +18 -0
  87. package/lib/esm/components/TroubleshootSection/ResponseActionButton.d.ts.map +1 -0
  88. package/lib/esm/components/TroubleshootSection/ResponseActionButton.js +28 -0
  89. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts +20 -0
  90. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -0
  91. package/lib/esm/components/TroubleshootSection/ResponseActions.js +52 -0
  92. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +7 -0
  93. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  94. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +99 -13
  95. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +12 -0
  96. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -0
  97. package/lib/esm/components/TroubleshootSection/UserFeedback.js +44 -0
  98. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts +10 -0
  99. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts.map +1 -0
  100. package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.js +46 -0
  101. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +9 -0
  102. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +1 -0
  103. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +9 -0
  104. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +9 -0
  105. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +1 -0
  106. package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +17 -0
  107. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
  108. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +0 -1
  109. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +0 -1
  110. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  111. package/lib/esm/components/shared/input/ContactSelectorInternal.js +1 -6
  112. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  113. package/lib/esm/components/shared/useIsSectionValid.js +1 -7
  114. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  115. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +2 -8
  116. package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
  117. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  118. package/lib/esm/components/wizardLayout/WizardLayout.js +9 -6
  119. package/lib/esm/components/wizardLayout/WizardMain.d.ts +7 -1
  120. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  121. package/lib/esm/components/wizardLayout/WizardMain.js +217 -18
  122. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +4 -2
  123. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  124. package/lib/esm/components/wizardLayout/WizardNavigation.js +13 -16
  125. package/lib/esm/components/wizardLayout/index.d.ts +1 -0
  126. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  127. package/lib/esm/components/wizardLayout/index.js +1 -0
  128. package/lib/esm/constants/askRedHatMessages.d.ts +35 -0
  129. package/lib/esm/constants/askRedHatMessages.d.ts.map +1 -0
  130. package/lib/esm/constants/askRedHatMessages.js +36 -0
  131. package/lib/esm/context/AIResponseContext.d.ts +10 -0
  132. package/lib/esm/context/AIResponseContext.d.ts.map +1 -0
  133. package/lib/esm/context/AIResponseContext.js +26 -0
  134. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  135. package/lib/esm/context/RootTroubleshootProvider.js +8 -6
  136. package/lib/esm/css/AskRedHat.css +359 -0
  137. package/lib/esm/css/app.css +4 -5
  138. package/lib/esm/css/case.css +6 -39
  139. package/lib/esm/css/results.css +2 -2
  140. package/lib/esm/hooks/useWizard.d.ts +6 -0
  141. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  142. package/lib/esm/hooks/useWizard.js +1 -1
  143. package/lib/esm/reducers/AIResponseConstNTypes.d.ts +48 -0
  144. package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -0
  145. package/lib/esm/reducers/AIResponseConstNTypes.js +18 -0
  146. package/lib/esm/reducers/AIResponseReducer.d.ts +9 -0
  147. package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -0
  148. package/lib/esm/reducers/AIResponseReducer.js +42 -0
  149. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -0
  150. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  151. package/lib/esm/reducers/CaseConstNTypes.js +2 -0
  152. package/lib/esm/scss/_main.scss +22 -84
  153. package/lib/esm/scss/_pf-overrides.scss +10 -37
  154. package/package.json +7 -6
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { cloud } from '@cee-eng/hydrajs';
11
- import { Button, Divider, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
11
+ import { Button, Checkbox, Divider, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
12
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
13
13
  import { useLRUCache, useSelectKeyboardNavigator } from '@rh-support/components';
14
14
  import debounce from 'lodash/debounce';
@@ -19,6 +19,12 @@ import { Trans, useTranslation } from 'react-i18next';
19
19
  import { getDisplayNameForCluster } from '../../utils/caseOpenshiftClusterIdUtils';
20
20
  import { PDFContext } from '../CaseEditView/PDFContainer';
21
21
  import CaseOpenShiftPopover from '../CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover';
22
+ const defaultProps = {
23
+ className: '',
24
+ id: '',
25
+ isDisabled: false,
26
+ openshiftDisplayName: '',
27
+ };
22
28
  const createState = (external_cluster_id, display_name, openshift_version) => {
23
29
  return {
24
30
  display_name,
@@ -78,14 +84,13 @@ function OpenshiftDropdownV4(props) {
78
84
  setClustersSelectOptions(getClusterOptions(clusterResponse));
79
85
  });
80
86
  const onSelect = (event, selectedCluster) => __awaiter(this, void 0, void 0, function* () {
87
+ setInputVal('');
81
88
  if (selectedCluster.type === 'checkbox') {
82
- console.log('from ccc1');
83
89
  setShowArchivedClusters(!showArchivedClusters);
84
90
  props.onClusterClear();
85
91
  setClustersRawResponse([]);
86
- setInputVal('');
87
92
  }
88
- else if (selectedCluster !== 'loader') {
93
+ else {
89
94
  props.onClusterIdStateUpdate(selectedCluster);
90
95
  const displayName = selectedCluster.display_name || selectedCluster.toString();
91
96
  setInputVal(displayName);
@@ -122,7 +127,8 @@ function OpenshiftDropdownV4(props) {
122
127
  },
123
128
  });
124
129
  const dropdownHeaderOptions = useMemo(() => [
125
- React.createElement(SelectOption, { hasCheckbox: true, key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", className: "archived-clusters-checkbox", "data-tracking-id": "show-hide-archived-clusters", value: { type: 'checkbox' }, isSelected: showArchivedClusters }, t('Show archived clusters')),
130
+ React.createElement(SelectOption, { key: 'show-hide-archived-clusters', value: { type: 'checkbox' } },
131
+ React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters || false, className: "archived-clusters-checkbox" })),
126
132
  React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
127
133
  React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")), "data-tracking-id": "dont-have-cluster-id", isFocused: focusedItemIndex === 1 }, "I don't have my Cluster ID"),
128
134
  ...(props.isV3
@@ -147,15 +153,15 @@ function OpenshiftDropdownV4(props) {
147
153
  const clusterOptions = [];
148
154
  domainNames.forEach((domain, index) => {
149
155
  domain !== '' &&
150
- clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-v6-u-font-weight-bold pf-v6-u-color-400", value: createState(domain, domain), key: domain + index }, domain));
156
+ clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-v6-u-font-weight-bold pf-v6-u-color-400", value: createState(domain, domain), key: domain + index }));
151
157
  clustersResponseGrouped[domain] &&
152
158
  clustersResponseGrouped[domain].forEach((cluster, i) => {
153
- clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, getDisplayNameForCluster(cluster) || cluster.external_cluster_id, cluster.openshift_version) }, getDisplayNameForCluster(cluster) || cluster.external_cluster_id));
159
+ clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, getDisplayNameForCluster(cluster) || cluster.external_cluster_id, cluster.openshift_version) }));
154
160
  });
155
161
  clusterOptions.push(React.createElement(Divider, { component: "div", key: index + domain }));
156
162
  });
157
163
  if (!isFetchingClusters && clustersRawResponse.length < totalResultsNo) {
158
- clusterOptions.push(React.createElement(SelectOption, { isLoadButton: true, onClick: onViewMoreClick, value: "loader" }, "Display additional results"));
164
+ clusterOptions.push(React.createElement(SelectOption, { key: "load-more-option", value: {}, onClick: onViewMoreClick, isDisabled: false, className: "pf-v6-u-font-weight-bold" }, "Display additional results"));
159
165
  }
160
166
  return [
161
167
  ...dropdownHeaderOptions,
@@ -258,18 +264,6 @@ function OpenshiftDropdownV4(props) {
258
264
  // no dependency here as we want to run this once on load
259
265
  // eslint-disable-next-line react-hooks/exhaustive-deps
260
266
  }, []);
261
- useEffect(() => {
262
- if (!isEmpty(props.openshiftClusterIDState)) {
263
- const displayName = getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState);
264
- if (isEmpty(inputVal) || inputVal !== displayName) {
265
- setInputVal(displayName);
266
- }
267
- }
268
- else if (!isEmpty(inputVal)) {
269
- setInputVal('');
270
- }
271
- // eslint-disable-next-line react-hooks/exhaustive-deps
272
- }, [props.openshiftClusterIDState, props.openshiftDisplayName, props.noClusterIdReasonExplanation]);
273
267
  // need to get clusters when user opens the dropdown
274
268
  // as the api response is cached np extra call is made on open/close
275
269
  // added observing props.isV3 because re-render
@@ -330,4 +324,5 @@ function OpenshiftDropdownV4(props) {
330
324
  React.createElement(SelectList, { id: "openshift-cluster-selector-listbox" }, clustersSelectOptions)),
331
325
  React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
332
326
  }
327
+ OpenshiftDropdownV4.defaultProps = defaultProps;
333
328
  export { OpenshiftDropdownV4 };
@@ -1 +1 @@
1
- {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAoN1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBA+M1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -110,23 +110,21 @@ function RHAssociatesSelector(props) {
110
110
  };
111
111
  const canNotifyRHAssociates = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.NOTIFY_RH_ASSOCIATES);
112
112
  const toolTipRef = useRef();
113
- const contactsToExclude = !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [];
114
113
  if (!canNotifyRHAssociates)
115
114
  return React.createElement(React.Fragment, null);
116
115
  return (React.createElement(React.Fragment, null, canNotifyRHAssociates && (React.createElement("div", { className: "form-group" },
117
116
  React.createElement("label", { className: "react-typeahead-label-wrapper", htmlFor: "get-support-notifications" },
118
117
  React.createElement(Trans, null, "Internal Contacts"),
119
- React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: contactsToExclude, disableContactRemoval: contactsToExclude, id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
118
+ React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [], id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
120
119
  internal: false, // to get non-ldap contacts only
121
120
  isInternalContact: true,
122
121
  }, placeholder: t(`Add an internal associate to watch this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating, "data-tracking-id": "case-contact-select-rh-watcher" })),
123
- caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { className: "add-watcher-button", variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher", isDisabled: isRHAssociatesUpdating },
122
+ caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher" },
124
123
  React.createElement(Trans, null, "Add me as a watcher"))),
125
- caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
124
+ caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
126
125
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
127
- React.createElement("div", { ref: toolTipRef },
128
- React.createElement(Button, { className: "remove-watcher-button", variant: "tertiary", onClick: removeCurrentUser, isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
129
- React.createElement(Trans, null, "Remove me as a watcher"))))) : (React.createElement(Button, { className: "remove-watcher-button", variant: "secondary", onClick: removeCurrentUser, "data-tracking-id": "case-remove-me-rh-watcher", isDisabled: isRHAssociatesUpdating },
126
+ React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
127
+ React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-rh-watcher" },
130
128
  React.createElement(Trans, null, "Remove me as a watcher")))))))));
131
129
  }
132
130
  export { RHAssociatesSelector };
@@ -1 +1 @@
1
- {"version":3,"file":"AddCustomEmailToAccountModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA+GpD"}
1
+ {"version":3,"file":"AddCustomEmailToAccountModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBAsGpD"}
@@ -8,11 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { customEmail } from '@cee-eng/hydrajs';
11
- import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
11
+ import { Button, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalFooter, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
12
12
  import { ToastNotification, useFetch } from '@rh-support/components';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import React, { useState } from 'react';
15
- import { useTranslation } from 'react-i18next';
15
+ import { Trans, useTranslation } from 'react-i18next';
16
16
  export function AddCustomEmailToAccount(props) {
17
17
  const { t } = useTranslation();
18
18
  const { request, isFetching } = useFetch(customEmail.addCustomEmailToAccount, { propgateErrors: true });
@@ -45,21 +45,23 @@ export function AddCustomEmailToAccount(props) {
45
45
  : isEmpty(firstName.trim())
46
46
  ? ValidatedOptions.error
47
47
  : ValidatedOptions.default;
48
- return (React.createElement(Modal, { isOpen: true, onClose: handleClose, variant: ModalVariant.medium, "aria-labelledby": "add-email-modal-title", "aria-describedby": "add-email-modal-body" },
49
- React.createElement(ModalHeader, { title: t('Add a notification email to your account'), labelId: "add-email-modal-title" }),
50
- React.createElement(ModalBody, { id: "add-email-modal-body" },
51
- React.createElement("p", { className: "pf-v6-u-mb-md" }, t('Note: This email will be added at an account level, not a case level.')),
52
- React.createElement(Form, null,
53
- React.createElement(FormGroup, { label: t('New email address'), fieldId: "custom-email-address", isRequired: true },
54
- React.createElement(TextInput, { id: "custom-email", isDisabled: true, value: props.customEmailAddress, isRequired: true, "aria-label": t('New email address') })),
55
- React.createElement(FormGroup, { label: t('First name'), fieldId: "custom-email-firstName", isRequired: true },
56
- React.createElement(TextInput, { id: "custom-email-firstName", value: firstName, isRequired: true, type: "text", validated: firstNameValidated, onChange: (_event, firstName) => onFirstNameChange(firstName), "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254 }),
57
- firstNameValidated === ValidatedOptions.error && (React.createElement(FormHelperText, null,
58
- React.createElement(HelperText, null,
59
- React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('First name cannot be empty')))))),
60
- React.createElement(FormGroup, { label: t('Last name'), fieldId: "custom-email-lastName" },
61
- React.createElement(TextInput, { id: "custom-email-lastName", value: lastName, type: "text", onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 })))),
48
+ return (React.createElement(Modal, { variant: ModalVariant.medium, title: t('Add a notification email to your account'), isOpen: true, onClose: handleClose, onEscapePress: handleClose },
49
+ React.createElement("p", { className: "pf-v6-u-mb-lg" },
50
+ React.createElement(Trans, null, "Note: This email will be added at an account level, not a case level.")),
51
+ React.createElement(Form, null,
52
+ React.createElement(FormGroup, { label: t('New email address'), fieldId: "custom-email-address", isRequired: true },
53
+ React.createElement(TextInput, { id: "custom-email", isDisabled: true, value: props.customEmailAddress, isRequired: true })),
54
+ React.createElement(FormGroup, { label: t('First name'), fieldId: "custom-email-firstName", isRequired: true },
55
+ firstNameValidated === 'error' && (React.createElement(FormHelperText, null,
56
+ React.createElement(HelperText, null,
57
+ React.createElement(HelperTextItem, { variant: "error" },
58
+ React.createElement(Trans, null, "First name cannot be empty"))))),
59
+ React.createElement(TextInput, { id: "custom-email-firstName", value: firstName, isRequired: true, type: "text", validated: firstNameValidated, onChange: (_event, firstName) => onFirstNameChange(firstName), "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254 })),
60
+ React.createElement(FormGroup, { label: t('Last name'), fieldId: "custom-email-lastName", className: "pf-v6-u-mb-md" },
61
+ React.createElement(TextInput, { id: "custom-email-lastName", value: lastName, type: "text", onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 }))),
62
62
  React.createElement(ModalFooter, null,
63
- React.createElement(Button, { key: "confirm", variant: ButtonVariant.primary, onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName.trim())), spinnerAriaValueText: isFetching ? t('Loading') : undefined, isLoading: isFetching }, t('Add to account')),
64
- React.createElement(Button, { key: "cancel", variant: ButtonVariant.link, onClick: handleClose, isDisabled: isFetching }, t('Cancel')))));
63
+ React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName.trim())) },
64
+ React.createElement(Trans, null, "Add to account")),
65
+ React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose, isDisabled: isFetching },
66
+ React.createElement(Trans, null, "Cancel")))));
65
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAsdzC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA4czC;AAED,eAAe,mBAAmB,CAAC"}
@@ -248,9 +248,7 @@ function CaseContactSelector(props) {
248
248
  return false;
249
249
  };
250
250
  const clearNonOrgTypeahead = () => {
251
- if (nonOrgTypeaheadRef.current) {
252
- nonOrgTypeaheadRef.current.value = '';
253
- }
251
+ nonOrgTypeaheadRef.current && nonOrgTypeaheadRef.current.clear();
254
252
  };
255
253
  const clearErrorState = () => {
256
254
  showGroupPermissionError && setShowGroupPermissionError(false);
@@ -269,7 +267,7 @@ function CaseContactSelector(props) {
269
267
  React.createElement(CaseContactsSelectorExternal, { isDisabled: isUpdatingCustomEmails || isAssociatesUpdating, groupContactsAndEmails: true, allowCustomEmailAdd: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: [
270
268
  ...customEmailsList.data,
271
269
  ...filter(selectedNotificationContacts, (c) => !c.isInternal),
272
- ], contactsToExclude: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onNotifiedUserChange, clearButton: true, multiple: true, placeholder: t('Search for an email address or username of the person you want to notify'), id: "open-case-notifications", name: "open-case-notifications", className: "react-select-custom", renderToken: renderToken, isUpdating: isAssociatesUpdating ||
270
+ ], contactsToExclude: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onNotifiedUserChange, clearButton: true, multiple: true, placeholder: t(`Search for an email address or username of the person you want to notify`), id: "open-case-notifications", name: "open-case-notifications", className: "react-select-custom", renderToken: renderToken, isUpdating: isAssociatesUpdating ||
273
271
  customEmailsList.isFetching ||
274
272
  isUpdatingCustomEmails ||
275
273
  isCaseOwnerUpdating, isExportingPDF: isExportingPDF, customEmails: accountCustomEmails.data || [], canAddNew: onAddNew, getCreateNewText: getCreateNewText })),
@@ -286,13 +284,12 @@ function CaseContactSelector(props) {
286
284
  " is not listed under your account. You can always",
287
285
  ' ',
288
286
  React.createElement(Button, { variant: "link", isInline: true, component: "span", onClick: onAddEmailToAccountBtnClick }, "add them at the account level"))))),
289
- caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { className: "add-watcher-button", variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher", isDisabled: isUpdatingCustomEmails || isAssociatesUpdating },
287
+ caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher" },
290
288
  React.createElement(Trans, null, "Add me as a watcher"))),
291
- caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
289
+ caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
292
290
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
293
- React.createElement("div", { className: "pf-v6-u-display-inline-block", ref: toolTipRef },
294
- React.createElement(Button, { className: "remove-watcher-button", variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
295
- React.createElement(Trans, null, "Remove me as a watcher"))))) : (React.createElement(Button, { className: "remove-watcher-button", variant: "secondary", onClick: removeCurrentUser, isDisabled: isUpdatingCustomEmails || isAssociatesUpdating, type: "button", "data-tracking-id": "case-remove-me-watcher" },
291
+ React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
292
+ React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-watcher" },
296
293
  React.createElement(Trans, null, "Remove me as a watcher"))))))) : (React.createElement(NonOrgCaseNotifyeesSelector, { id: "open-case-notifications", placeholder: t('Enter an email address or username for the person you want to notify'), isDisabled: isAssociatesUpdating || customEmailsList.isFetching || isUpdatingCustomEmails, selectedItems: [
297
294
  ...customEmailsList.data,
298
295
  ...filter(selectedNotificationContacts, (c) => !c.isInternal),
@@ -1 +1 @@
1
- {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAuMxD"}
1
+ {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAqCD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0MxD"}
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
19
19
  return t;
20
20
  };
21
21
  import { accounts } from '@cee-eng/hydrajs';
22
- import { Button, Flex, FlexItem, Label, LabelGroup, Menu, MenuContent, MenuItem, MenuList, Popper, TextInputGroup, TextInputGroupMain, } from '@patternfly/react-core';
22
+ import { Button, Flex, FlexItem, Label, LabelGroup, Menu, MenuContent, MenuItem, MenuList, Popper, TextInput, } from '@patternfly/react-core';
23
23
  import { getHydraContactLabel, useFetch } from '@rh-support/components';
24
24
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
25
25
  import React, { useContext, useEffect, useRef, useState } from 'react';
@@ -42,7 +42,7 @@ const CustomHighlighter = ({ search, children }) => {
42
42
  return React.createElement(React.Fragment, null, children);
43
43
  const regex = new RegExp(`(${search})`, 'gi');
44
44
  const parts = children.split(regex);
45
- return (React.createElement(React.Fragment, null, parts.map((part, index) => regex.test(part) ? (React.createElement("mark", { key: index, style: { backgroundColor: '#FFF3CD' } }, part)) : (part))));
45
+ return (React.createElement(React.Fragment, null, parts.map((part, index) => regex.test(part) ? (React.createElement("mark", { key: index, style: { backgroundColor: '#fff3cd' } }, part)) : (part))));
46
46
  };
47
47
  export function NonOrgCaseNotifyeesSelector(props) {
48
48
  const [inputVal, setInputVal] = useState('');
@@ -60,13 +60,15 @@ export function NonOrgCaseNotifyeesSelector(props) {
60
60
  }
61
61
  }, [props.typeaheadRef]);
62
62
  const onItemSelect = (option) => {
63
- props.onChange && props.onChange([option]);
63
+ const newSelected = [...props.selectedItems, option];
64
+ props.onChange && props.onChange(newSelected);
64
65
  setInputVal('');
65
66
  clearList();
66
67
  setIsDropdownOpen(false);
67
68
  };
68
69
  const onRemoveItem = (optionToRemove) => {
69
- props.onChange && props.onChange([optionToRemove]);
70
+ const newSelected = props.selectedItems.filter((item) => getKey(item) !== getKey(optionToRemove));
71
+ props.onChange && props.onChange(newSelected);
70
72
  };
71
73
  const onAddClick = () => __awaiter(this, void 0, void 0, function* () {
72
74
  var _a, _b, _c;
@@ -82,7 +84,11 @@ export function NonOrgCaseNotifyeesSelector(props) {
82
84
  const { ssoName } = c, rest = __rest(c, ["ssoName"]);
83
85
  return Object.assign({ ssoUsername: ssoName }, rest);
84
86
  });
85
- setNotifyeesList([...mappedContacts, { emailAddress: notificationAddress.email }]);
87
+ setNotifyeesList([
88
+ ...mappedContacts,
89
+ { emailAddress: notificationAddress.email, caseNumber: '' },
90
+ ]);
91
+ setIsDropdownOpen(true);
86
92
  }
87
93
  else {
88
94
  if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
@@ -134,11 +140,11 @@ export function NonOrgCaseNotifyeesSelector(props) {
134
140
  const renderSelectedItems = () => {
135
141
  if (props.selectedItems.length === 0)
136
142
  return null;
137
- return (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, props.selectedItems.map((option, index) => {
143
+ return (React.createElement(LabelGroup, { style: { marginBottom: '8px' } }, props.selectedItems.map((option, index) => {
138
144
  const isContactOption = isContact(option);
139
145
  const isCurrentUserCaseContact = isContactOption && option.ssoUsername === props.contactSsoUsername;
140
146
  const isDisabled = (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact;
141
- return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline", color: "blue" }, getHydraContactLabel(option)));
147
+ return (React.createElement(Label, { key: getKey(option) || index, onClose: !isDisabled ? () => onRemoveItem(option) : undefined, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline" }, getHydraContactLabel(option)));
142
148
  })));
143
149
  };
144
150
  const menu = (React.createElement(Menu, { ref: menuRef },
@@ -148,13 +154,11 @@ export function NonOrgCaseNotifyeesSelector(props) {
148
154
  return (React.createElement(Flex, null,
149
155
  React.createElement(FlexItem, { grow: { sm: 'grow' } },
150
156
  React.createElement("div", null,
151
- React.createElement(Flex, null,
152
- React.createElement(FlexItem, { grow: { sm: 'grow' } },
153
- React.createElement(Popper, { trigger: React.createElement(TextInputGroup, null,
154
- React.createElement(TextInputGroupMain, { ref: inputRef, id: props.id, "data-tracking-id": props.dataTrackingId, value: inputVal, onChange: (_, value) => onInputChange(value), placeholder: props.placeholder, disabled: props.isDisabled || isFetching, onBlur: onBlur }, renderSelectedItems())), popper: menu, isVisible: isDropdownOpen && notifyeesList.length > 0, position: "start" })),
155
- React.createElement(Button, { variant: "primary", onClick: onAddClick, isLoading: props.isDisabled || isFetching, spinnerAriaValueText: props.isDisabled ? 'Loading' : undefined, isDisabled: !(inputVal || '').trim() || props.isDisabled || isFetching, "data-tracking-id": `${props.dataTrackingId}-add-btn`, className: "send-notifications-add" },
156
- React.createElement(Trans, null, "Add")))),
157
- React.createElement("p", { className: "pf-v6-c-form__helper-text pf-m-error", style: { color: '#C9190B' } },
157
+ renderSelectedItems(),
158
+ React.createElement(Popper, { trigger: React.createElement(TextInput, { ref: inputRef, id: props.id, "data-tracking-id": props.dataTrackingId, value: inputVal, onChange: (event, value) => onInputChange(value), placeholder: props.placeholder, isDisabled: props.isDisabled || isFetching, onBlur: onBlur, validated: showGroupPermissionError || showAccountPermissionError ? 'error' : 'default' }), popper: menu, isVisible: isDropdownOpen && notifyeesList.length > 0, position: "start" })),
159
+ props.selectedItems.length > 0 && !showAccountPermissionError && !showAccountPermissionError && (React.createElement("p", { className: "form-instructions" },
160
+ React.createElement(Trans, null, "Enter an email address or username for the person you want to notify"))),
161
+ React.createElement("p", { className: "pf-v6-c-form__helper-text pf-m-error", style: { color: '#c9190b' } },
158
162
  showGroupPermissionError && (React.createElement(Trans, null,
159
163
  inputVal,
160
164
  " was not found under the selected group. Please contact your Org Admin to add them to this group.")),
@@ -162,5 +166,8 @@ export function NonOrgCaseNotifyeesSelector(props) {
162
166
  inputVal,
163
167
  " isn't associated with your account. Please contact Org Admin to add them to your account.")),
164
168
  !showGroupPermissionError && !showAccountPermissionError && (React.createElement("p", { className: "form-instructions" },
165
- React.createElement(Trans, null, "Include someone from your account to inform about the status of this case.")))))));
169
+ React.createElement(Trans, null, "Include someone from your account to inform about the status of this case."))))),
170
+ React.createElement(FlexItem, { style: { alignSelf: 'flex-start' } },
171
+ React.createElement(Button, { variant: "primary", onClick: onAddClick, isLoading: props.isDisabled || isFetching, spinnerAriaValueText: props.isDisabled ? 'Loading' : undefined, isDisabled: !(inputVal || '').trim() || props.isDisabled || isFetching, "data-tracking-id": `${props.dataTrackingId}-add-btn` },
172
+ React.createElement(Trans, null, "Add")))));
166
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,eAAO,MAAM,QAAQ,yBA2EpB,CAAC"}
1
+ {"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,eAAO,MAAM,QAAQ,yBAyEpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Badge, Button, Flex, FlexItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
1
+ import { Badge, Button, Flex, FlexItem, Modal, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
2
2
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
3
3
  import { getAccessHostname } from '@rh-support/utils';
4
4
  import isEqual from 'lodash/isEqual';
@@ -37,8 +37,7 @@ export const CveModal = () => {
37
37
  React.createElement(ModalHeader, { title: React.createElement(Flex, { alignItems: { default: 'alignItemsCenter' } },
38
38
  React.createElement(FlexItem, { spacer: { default: 'spacerSm' } }, cveWorkflowRecommendation.length > 1 ? (React.createElement(Trans, null, "Handpicked for these CVEs")) : (React.createElement(Trans, null, "Handpicked for this CVE"))),
39
39
  React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))) }),
40
- React.createElement(ModalBody, null,
41
- React.createElement(CvePanel, null)),
40
+ React.createElement(CvePanel, null),
42
41
  React.createElement(ModalFooter, null,
43
42
  React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, { className: "pf-v6-u-ml-sm" }), key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl() },
44
43
  React.createElement(Trans, null, "Red Hat CVE Checker")))));
@@ -14,7 +14,7 @@ export const CveSidebar = () => {
14
14
  return null;
15
15
  }
16
16
  return (React.createElement(React.Fragment, null,
17
- React.createElement("div", { className: "card card-white card-support file-diag pf-v6-u-mb-lg" },
17
+ React.createElement("div", { className: "card card-white card-support file-diag pf-v6-u-mb-md" },
18
18
  React.createElement("h3", { className: "card-heading popular-solutions green-card-heading card-header-bg" },
19
19
  React.createElement("span", { className: "pf-v6-u-mr-sm" }, cveWorkflowRecommendation.length > 1 ? (React.createElement(Trans, null, "Handpicked for these CVEs")) : (React.createElement(Trans, null, "Handpicked for this CVE"))),
20
20
  React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))),
@@ -132,7 +132,7 @@ export default function SupportTypeSelectorPage() {
132
132
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
133
133
  (allCaseTypes.isFetching || (isFetchingSelectedAccountDetails && haventLoadedMetadata(allCaseTypes))) && (React.createElement(LoadingIndicator, { size: "lg", show: true })),
134
134
  React.createElement(Gallery, { hasGutter: true, className: "pf-v6-u-mt-sm" }, SupportTypesArray.map((supportTypesArrayValues) => (React.createElement(GalleryItem, { key: supportTypesArrayValues.id },
135
- React.createElement(Card, { id: supportTypesArrayValues.oldSupportType, key: supportTypesArrayValues.oldSupportType, className: `support-types-card cursor-pointer${isNextBtnClickedToShowValidationError && !caseType ? ' support-types-invalid' : ''}`, isSelectable: true, onKeyDown: onKeyDown, onClick: onSupportTypeClick, isSelected: !!caseType && supportTypesArrayValues.oldSupportType === caseType, isFullHeight: true, "data-tracking-id": supportTypesArrayValues.dataTrackingID, tabIndex: 0 },
135
+ React.createElement(Card, { id: supportTypesArrayValues.oldSupportType, key: supportTypesArrayValues.oldSupportType, className: `support-types-card${isNextBtnClickedToShowValidationError && !caseType ? ' support-types-invalid' : ''}`, isSelectable: true, onKeyDown: onKeyDown, onClick: onSupportTypeClick, isSelected: !!caseType && supportTypesArrayValues.oldSupportType === caseType, isFullHeight: true, "data-tracking-id": supportTypesArrayValues.dataTrackingID, tabIndex: 0 },
136
136
  React.createElement(CardBody, null, supportTypesArrayValues.icon ? (React.createElement(Split, null,
137
137
  React.createElement(SplitItem, { className: "pf-v6-u-pr-lg" },
138
138
  React.createElement(Bullseye, null, supportTypesArrayValues.icon && supportTypesArrayValues.icon)),
@@ -1 +1 @@
1
- {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EA+KvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EA4KvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
1
+ import { Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
2
2
  import { AlertMessage, AlertType } from '@rh-support/components';
3
3
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
4
  import filter from 'lodash/filter';
@@ -114,14 +114,11 @@ const AllProductsSelector = forwardRef((props, ref) => {
114
114
  !topContent.isFetching &&
115
115
  topContent.data.length !== 0 && (React.createElement("button", { className: "btn btn-bordered-blue btn-slim pull-top-narrow push-bottom-narrow", "data-tracking-id": "suggested-fixes-trigger", onClick: toggleTCModal, type: "button" },
116
116
  React.createElement(Trans, null, "Suggested fixes"))),
117
- props.loadTCOnChange && !topContent.isFetching && topContent.data.length !== 0 && (React.createElement(Modal, { className: "feedback-modal", "aria-describedby": "Feedback Form", isOpen: isModalOpen, variant: ModalVariant.large },
118
- React.createElement(ModalHeader, null,
119
- React.createElement("h2", null, t('Suggested fixes'))),
120
- React.createElement(ModalBody, null,
121
- React.createElement("p", null, t('There are new updates to suggested fixes after changing your product.')),
122
- React.createElement("span", null,
123
- React.createElement(Trans, null, "Here are some common suggestions:")),
124
- React.createElement(Suggestions, { showTitleDescription: false, showMax: 6 })),
117
+ props.loadTCOnChange && !topContent.isFetching && topContent.data.length !== 0 && (React.createElement(Modal, { className: "feedback-modal", title: t('Suggested fixes'), "aria-describedby": "Feedback Form", isOpen: isModalOpen, variant: ModalVariant.large, onClose: toggleTCModal },
118
+ React.createElement("p", null, t('There are new updates to suggested fixes after changing your product.')),
119
+ React.createElement("span", null,
120
+ React.createElement(Trans, null, "Here are some common suggestions:")),
121
+ React.createElement(Suggestions, { showTitleDescription: false, showMax: 6 }),
125
122
  React.createElement(ModalFooter, null,
126
123
  React.createElement("button", { key: "cancel", onClick: toggleTCModal, className: "btn btn-app btn-primary", type: "button" },
127
124
  React.createElement(Trans, null, "Cancel")))))));
@@ -1 +1 @@
1
- {"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAoBpE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAUvE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBA8MvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAoBpE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBAsMvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -7,15 +7,11 @@ import isEqual from 'lodash/isEqual';
7
7
  import React, { useContext, useEffect, useRef, useState } from 'react';
8
8
  import { Trans, useTranslation } from 'react-i18next';
9
9
  import { useCaseSelector } from '../../context/CaseContext';
10
- const isProductSupportedForCustomer = (productName, productResults) => {
11
- const foundItem = productResults.filter((item) => item.name === productName)[0];
12
- return foundItem ? foundItem.supportedForCustomer : false;
13
- };
14
10
  export const NewProductDropdownSelector = (props) => {
15
11
  const { t } = useTranslation();
16
12
  const [isOpen, setIsOpen] = useState(false);
17
13
  const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
18
- const [isSelectedProductSupportedForCustomer, setIsSelectedProductSupportedForCustomer] = useState(true);
14
+ const [isSelectedProductSupportedForCustomer] = useState(true);
19
15
  const [filteredProducts, setFilteredProducts] = useState(props.products);
20
16
  const [shouldFilter, setShouldFilter] = useState(false);
21
17
  const textInputRef = useRef();
@@ -44,11 +40,6 @@ export const NewProductDropdownSelector = (props) => {
44
40
  setFilteredProducts(productsToFilter);
45
41
  }
46
42
  }, [inputValue, props.products, props.isCaseCreate, allProducts.data.productsResult]);
47
- useEffect(() => {
48
- product &&
49
- props.isOnSummaryPage &&
50
- setIsSelectedProductSupportedForCustomer(isProductSupportedForCustomer(product, allProducts.data.productsResult));
51
- }, [allProducts.data.productsResult, product, props.isOnSummaryPage]);
52
43
  const onToggleClick = () => {
53
44
  var _a;
54
45
  setIsOpen(!isOpen);
@@ -1 +1 @@
1
- {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA4MzC"}
1
+ {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAuMzC"}
@@ -131,13 +131,13 @@ export function AsideResults(props) {
131
131
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
132
132
  if (!canShowSideRecommendations())
133
133
  return React.createElement(React.Fragment, null);
134
- return (React.createElement(Card, { className: "pf-v6-u-mt-lg pf-v6-u-mb-0" },
134
+ return (React.createElement(Card, { className: "pf-v6-u-m-sm" },
135
135
  React.createElement(CardHeader, null,
136
- React.createElement("h3", null, isIdea ? (React.createElement(Trans, null, "Search recommendations")) : (React.createElement(Trans, null, "Articles recommended by OpenShift AI")))),
136
+ React.createElement("h3", null, isIdea ? React.createElement(Trans, null, "Search recommendations") : React.createElement(Trans, null, "Recommended search results"))),
137
137
  React.createElement(CardBody, null,
138
138
  React.createElement("ul", { className: "list-flat" }, recommendationState.sideRecommendation.map((doc, index) => {
139
139
  var _a, _b;
140
- return (React.createElement("li", { className: `result${index !== 0 && 'pf-v6-u-mt-sm'}`, key: doc.id },
140
+ return (React.createElement("li", { className: "result", key: doc.id },
141
141
  React.createElement("header", { className: "result-header" },
142
142
  React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS_ASIDE]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS_ASIDE)}`, className: "se-recommended ts-result-aside", "data-tracking-id": `se-recommended-sidebar-recommendations-${index}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, index), dangerouslySetInnerHTML: computeRecommendationTitle(doc) })),
143
143
  React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 150) })));
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAYpD,UAAU,MAAM;CAAG;AAEnB,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAyFxD"}
1
+ {"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAYpD,UAAU,MAAM;CAAG;AAEnB,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAqFxD"}
@@ -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, Modal, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core';
11
+ import { Button, Modal, ModalFooter } from '@patternfly/react-core';
12
12
  import { useFetch } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
14
14
  import { getResTypeFromUrl } from '@rh-support/utils';
@@ -53,12 +53,9 @@ export function ClusterRecommendationsModal(props) {
53
53
  };
54
54
  return (React.createElement(React.Fragment, null,
55
55
  React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
56
- React.createElement(Modal, { className: "critical-solutions-modal", "data-tracking-id": "cluster-recommendations-modal-body", onClose: onModalClose, isOpen: isClusterRecommendationsModalOpen },
57
- React.createElement(ModalHeader, null,
58
- React.createElement("h2", null, t('Cluster recommendations'))),
59
- React.createElement(ModalBody, null,
60
- React.createElement("p", null, t('Recommendations have been triggered for your cluster.')),
61
- React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data })),
56
+ React.createElement(Modal, { className: "critical-solutions-modal", title: t('Cluster recommendations'), "data-tracking-id": "cluster-recommendations-modal-body", onClose: onModalClose, isOpen: isClusterRecommendationsModalOpen },
57
+ React.createElement("p", null, t('Recommendations have been triggered for your cluster.')),
58
+ React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data }),
62
59
  React.createElement(ModalFooter, null,
63
60
  !isSecureSupportAccount && (React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "cluster-recommendations-solutions-modal" }, t('I solved my issue'))),
64
61
  React.createElement(Button, { onClick: onModalClose, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-cluster-recommendations-modal" }, t('Cancel'))))));
@@ -1 +1 @@
1
- {"version":3,"file":"EARuleInfoAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoAccordion.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,UAAU,MAAM;IACZ,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,MAAM,qBAiDrE"}
1
+ {"version":3,"file":"EARuleInfoAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoAccordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,UAAU,MAAM;IACZ,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,MAAM,qBAgDrE"}
@@ -1,6 +1,5 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
2
  import { AccordionContent, AccordionItem, AccordionToggle, Label } from '@patternfly/react-core';
3
- import { haltEvent } from '@rh-support/utils';
4
3
  import React, { useContext, useState } from 'react';
5
4
  import { Trans } from 'react-i18next';
6
5
  import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
@@ -14,13 +13,12 @@ export function EARuleInfoAccordion({ rule, showNewTag, rank }) {
14
13
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
15
14
  return (React.createElement(EARule, { rule: rule, ruleRank: rank },
16
15
  React.createElement(AccordionItem, { isExpanded: isExpanded },
17
- React.createElement(AccordionToggle, { id: "ea-rule-accordion-toggle", onClick: (e) => {
16
+ React.createElement(AccordionToggle, { id: "ea-rule-accordion-toggle", onClick: () => {
18
17
  !isExpanded &&
19
18
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [
20
19
  getSessResFromRules(rule.cta, SessionResourceVisibility.PRESENTED_TAB, rank, rule.rule_id),
21
20
  ]);
22
21
  setIsExpanded(!isExpanded);
23
- haltEvent(e);
24
22
  } },
25
23
  showNewTag && ((_a = rule === null || rule === void 0 ? void 0 : rule.isNew) !== null && _a !== void 0 ? _a : false) && (React.createElement(Label, { color: "green", className: "pf-v6-u-mr-md" },
26
24
  React.createElement(Trans, null, "NEW"))),
@@ -253,7 +253,7 @@ function InsightsResults(props) {
253
253
  }
254
254
  return (React.createElement(React.Fragment, null,
255
255
  !rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, variant: "custom", title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution-alert", children: React.createElement("p", null,
256
- React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "pf-v6-u-mb-lg" })),
256
+ React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "pf-v6-u-mb-md" })),
257
257
  React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
258
258
  }
259
259
  InsightsResults.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAOD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,qBAgLhF"}
1
+ {"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAOD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,qBA0KhF"}