@rh-support/troubleshoot 2.6.27 → 2.6.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -31
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +34 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -3
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +15 -11
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +22 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +102 -53
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +20 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +5 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +9 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -6
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +13 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +8 -5
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -7
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +3 -2
- package/lib/esm/components/Cve/CveSidebar.js +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +9 -6
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +10 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +2 -2
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -4
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +3 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +9 -2
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
- package/lib/esm/components/Recommendations/Recommendations.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +7 -4
- package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -3
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +17 -12
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +13 -13
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +0 -7
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -96
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.js +6 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +7 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -2
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +4 -6
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +1 -5
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +18 -147
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -4
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +16 -13
- package/lib/esm/components/wizardLayout/index.d.ts +0 -1
- package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/index.js +0 -1
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +6 -8
- package/lib/esm/css/app.css +5 -4
- package/lib/esm/css/case.css +12 -0
- package/lib/esm/css/results.css +2 -2
- package/lib/esm/hooks/useWizard.d.ts +0 -6
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -2
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +0 -2
- package/lib/esm/scss/_main.scss +54 -8
- package/lib/esm/scss/_pf-overrides.scss +18 -6
- package/package.json +6 -7
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +0 -7
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +0 -73
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +0 -9
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +0 -9
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +0 -9
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +0 -1
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +0 -17
- package/lib/esm/context/AIResponseContext.d.ts +0 -10
- package/lib/esm/context/AIResponseContext.d.ts.map +0 -1
- package/lib/esm/context/AIResponseContext.js +0 -26
- package/lib/esm/css/AskRedHat.css +0 -338
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts +0 -48
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +0 -1
- package/lib/esm/reducers/AIResponseConstNTypes.js +0 -16
- package/lib/esm/reducers/AIResponseReducer.d.ts +0 -9
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +0 -1
- package/lib/esm/reducers/AIResponseReducer.js +0 -43
|
@@ -100,6 +100,7 @@ function RHAssociatesSelector(props) {
|
|
|
100
100
|
onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })], true);
|
|
101
101
|
});
|
|
102
102
|
const removeCurrentUser = () => {
|
|
103
|
+
console.log(isCurrentUserSelectedInternalNotifiedUser());
|
|
103
104
|
if (isCurrentUserSelectedInternalNotifiedUser()) {
|
|
104
105
|
onNotifiedUserChange(filter(selectedNotificationContacts, (contact) => contact.ssoUsername !== loggedInUser.data.ssoUsername));
|
|
105
106
|
}
|
|
@@ -110,21 +111,23 @@ function RHAssociatesSelector(props) {
|
|
|
110
111
|
};
|
|
111
112
|
const canNotifyRHAssociates = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.NOTIFY_RH_ASSOCIATES);
|
|
112
113
|
const toolTipRef = useRef();
|
|
114
|
+
const contactsToExclude = !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [];
|
|
113
115
|
if (!canNotifyRHAssociates)
|
|
114
116
|
return React.createElement(React.Fragment, null);
|
|
115
117
|
return (React.createElement(React.Fragment, null, canNotifyRHAssociates && (React.createElement("div", { className: "form-group" },
|
|
116
118
|
React.createElement("label", { className: "react-typeahead-label-wrapper", htmlFor: "get-support-notifications" },
|
|
117
119
|
React.createElement(Trans, null, "Internal Contacts"),
|
|
118
|
-
React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude:
|
|
120
|
+
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: {
|
|
119
121
|
internal: false, // to get non-ldap contacts only
|
|
120
122
|
isInternalContact: true,
|
|
121
123
|
}, placeholder: t(`Add an internal associate to watch this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating, "data-tracking-id": "case-contact-select-rh-watcher" })),
|
|
122
|
-
caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher" },
|
|
124
|
+
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 },
|
|
123
125
|
React.createElement(Trans, null, "Add me as a watcher"))),
|
|
124
|
-
caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", {
|
|
126
|
+
caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
|
|
125
127
|
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") }),
|
|
126
|
-
React.createElement(
|
|
127
|
-
React.createElement(
|
|
128
|
+
React.createElement("div", { ref: toolTipRef },
|
|
129
|
+
React.createElement(Button, { className: "remove-watcher-button", variant: "tertiary", onClick: removeCurrentUser, isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
|
|
130
|
+
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 },
|
|
128
131
|
React.createElement(Trans, null, "Remove me as a watcher")))))))));
|
|
129
132
|
}
|
|
130
133
|
export { RHAssociatesSelector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAodzC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -17,7 +17,6 @@ import differenceBy from 'lodash/differenceBy';
|
|
|
17
17
|
import filter from 'lodash/filter';
|
|
18
18
|
import find from 'lodash/find';
|
|
19
19
|
import intersection from 'lodash/intersection';
|
|
20
|
-
import intersectionBy from 'lodash/intersectionBy';
|
|
21
20
|
import isEmpty from 'lodash/isEmpty';
|
|
22
21
|
import isEqual from 'lodash/isEqual';
|
|
23
22
|
import map from 'lodash/map';
|
|
@@ -112,7 +111,7 @@ function CaseContactSelector(props) {
|
|
|
112
111
|
});
|
|
113
112
|
const processCaseContacts = (selectedContacts) => __awaiter(this, void 0, void 0, function* () {
|
|
114
113
|
const toAdd = filter(differenceBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => item.ssoUsername !== contactSsoUsername);
|
|
115
|
-
const toRemove = filter(
|
|
114
|
+
const toRemove = filter(differenceBy(selectedNotificationContacts, selectedContacts, 'ssoUsername'), (item) => !item.isInternal && item.ssoUsername !== contactSsoUsername);
|
|
116
115
|
(toAdd.length || toRemove.length) && clearErrorState();
|
|
117
116
|
if ((toAdd || []).length > 0) {
|
|
118
117
|
if (loggedInUserRights.data.isOrgAdmin()) {
|
|
@@ -267,7 +266,7 @@ function CaseContactSelector(props) {
|
|
|
267
266
|
React.createElement(CaseContactsSelectorExternal, { isDisabled: isUpdatingCustomEmails || isAssociatesUpdating, groupContactsAndEmails: true, allowCustomEmailAdd: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: [
|
|
268
267
|
...customEmailsList.data,
|
|
269
268
|
...filter(selectedNotificationContacts, (c) => !c.isInternal),
|
|
270
|
-
], contactsToExclude: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onNotifiedUserChange, clearButton: true, multiple: true, placeholder: t(
|
|
269
|
+
], 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 ||
|
|
271
270
|
customEmailsList.isFetching ||
|
|
272
271
|
isUpdatingCustomEmails ||
|
|
273
272
|
isCaseOwnerUpdating, isExportingPDF: isExportingPDF, customEmails: accountCustomEmails.data || [], canAddNew: onAddNew, getCreateNewText: getCreateNewText })),
|
|
@@ -284,12 +283,13 @@ function CaseContactSelector(props) {
|
|
|
284
283
|
" is not listed under your account. You can always",
|
|
285
284
|
' ',
|
|
286
285
|
React.createElement(Button, { variant: "link", isInline: true, component: "span", onClick: onAddEmailToAccountBtnClick }, "add them at the account level"))))),
|
|
287
|
-
caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher" },
|
|
286
|
+
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 },
|
|
288
287
|
React.createElement(Trans, null, "Add me as a watcher"))),
|
|
289
|
-
caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", {
|
|
288
|
+
caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
|
|
290
289
|
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") }),
|
|
291
|
-
React.createElement(
|
|
292
|
-
React.createElement(
|
|
290
|
+
React.createElement("div", { className: "pf-v6-u-display-inline-block", ref: toolTipRef },
|
|
291
|
+
React.createElement(Button, { className: "remove-watcher-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, { className: "remove-watcher-button", variant: "secondary", onClick: removeCurrentUser, isDisabled: isUpdatingCustomEmails || isAssociatesUpdating, type: "button", "data-tracking-id": "case-remove-me-watcher" },
|
|
293
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: [
|
|
294
294
|
...customEmailsList.data,
|
|
295
295
|
...filter(selectedNotificationContacts, (c) => !c.isInternal),
|
package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,qBA2MxD"}
|
|
@@ -144,7 +144,7 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
144
144
|
const isContactOption = isContact(option);
|
|
145
145
|
const isCurrentUserCaseContact = isContactOption && option.ssoUsername === props.contactSsoUsername;
|
|
146
146
|
const isDisabled = (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact;
|
|
147
|
-
return (React.createElement(Label, { key: getKey(option) || index, onClose:
|
|
147
|
+
return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline" }, getHydraContactLabel(option)));
|
|
148
148
|
})));
|
|
149
149
|
};
|
|
150
150
|
const menu = (React.createElement(Menu, { ref: menuRef },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { Badge, Button, Flex, FlexItem, Modal, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Badge, Button, Flex, FlexItem, Modal, ModalBody, 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,7 +37,8 @@ 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(
|
|
40
|
+
React.createElement(ModalBody, null,
|
|
41
|
+
React.createElement(CvePanel, null)),
|
|
41
42
|
React.createElement(ModalFooter, null,
|
|
42
43
|
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() },
|
|
43
44
|
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-
|
|
17
|
+
React.createElement("div", { className: "card card-white card-support file-diag pf-v6-u-mb-lg" },
|
|
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${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 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 },
|
|
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,
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Modal, ModalBody, ModalFooter, ModalHeader, 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,11 +114,14 @@ 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",
|
|
118
|
-
React.createElement(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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 })),
|
|
122
125
|
React.createElement(ModalFooter, null,
|
|
123
126
|
React.createElement("button", { key: "cancel", onClick: toggleTCModal, className: "btn btn-app btn-primary", type: "button" },
|
|
124
127
|
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;
|
|
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"}
|
|
@@ -7,11 +7,15 @@ 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
|
+
};
|
|
10
14
|
export const NewProductDropdownSelector = (props) => {
|
|
11
15
|
const { t } = useTranslation();
|
|
12
16
|
const [isOpen, setIsOpen] = useState(false);
|
|
13
17
|
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
14
|
-
const [isSelectedProductSupportedForCustomer] = useState(true);
|
|
18
|
+
const [isSelectedProductSupportedForCustomer, setIsSelectedProductSupportedForCustomer] = useState(true);
|
|
15
19
|
const [filteredProducts, setFilteredProducts] = useState(props.products);
|
|
16
20
|
const [shouldFilter, setShouldFilter] = useState(false);
|
|
17
21
|
const textInputRef = useRef();
|
|
@@ -40,6 +44,11 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
40
44
|
setFilteredProducts(productsToFilter);
|
|
41
45
|
}
|
|
42
46
|
}, [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]);
|
|
43
52
|
const onToggleClick = () => {
|
|
44
53
|
var _a;
|
|
45
54
|
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,
|
|
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"}
|
|
@@ -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-
|
|
134
|
+
return (React.createElement(Card, { className: "pf-v6-u-mt-lg pf-v6-u-mb-0" },
|
|
135
135
|
React.createElement(CardHeader, null,
|
|
136
136
|
React.createElement("h3", null, isIdea ? (React.createElement(Trans, null, "Search recommendations")) : (React.createElement(Trans, null, "Articles recommended by OpenShift AI")))),
|
|
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:
|
|
140
|
+
return (React.createElement("li", { className: `result${index !== 0 && 'pf-v6-u-mt-sm'}`, 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,
|
|
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"}
|
|
@@ -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, ModalFooter } from '@patternfly/react-core';
|
|
11
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } 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,9 +53,12 @@ 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",
|
|
57
|
-
React.createElement(
|
|
58
|
-
|
|
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 })),
|
|
59
62
|
React.createElement(ModalFooter, null,
|
|
60
63
|
!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'))),
|
|
61
64
|
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":"
|
|
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,5 +1,6 @@
|
|
|
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';
|
|
3
4
|
import React, { useContext, useState } from 'react';
|
|
4
5
|
import { Trans } from 'react-i18next';
|
|
5
6
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
|
|
@@ -13,12 +14,13 @@ export function EARuleInfoAccordion({ rule, showNewTag, rank }) {
|
|
|
13
14
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
14
15
|
return (React.createElement(EARule, { rule: rule, ruleRank: rank },
|
|
15
16
|
React.createElement(AccordionItem, { isExpanded: isExpanded },
|
|
16
|
-
React.createElement(AccordionToggle, { id: "ea-rule-accordion-toggle", onClick: () => {
|
|
17
|
+
React.createElement(AccordionToggle, { id: "ea-rule-accordion-toggle", onClick: (e) => {
|
|
17
18
|
!isExpanded &&
|
|
18
19
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [
|
|
19
20
|
getSessResFromRules(rule.cta, SessionResourceVisibility.PRESENTED_TAB, rank, rule.rule_id),
|
|
20
21
|
]);
|
|
21
22
|
setIsExpanded(!isExpanded);
|
|
23
|
+
haltEvent(e);
|
|
22
24
|
} },
|
|
23
25
|
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" },
|
|
24
26
|
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-
|
|
256
|
+
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "pf-v6-u-mb-lg" })),
|
|
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":"
|
|
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"}
|
|
@@ -2,6 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Label, LabelGroup } from '@patternfly/react-core';
|
|
3
3
|
import BullseyeIcon from '@patternfly/react-icons/dist/js/icons/bullseye-icon';
|
|
4
4
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
5
|
+
import { haltEvent } from '@rh-support/utils';
|
|
5
6
|
import DOMPurify from 'dompurify';
|
|
6
7
|
import isEmpty from 'lodash/isEmpty';
|
|
7
8
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -69,7 +70,10 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
|
69
70
|
React.createElement(AccordionContent, null,
|
|
70
71
|
React.createElement(Accordion, { asDefinitionList: false, className: "push-bottom-narrow" },
|
|
71
72
|
React.createElement(AccordionItem, { isExpanded: isIssueExpanded },
|
|
72
|
-
React.createElement(AccordionToggle, { onClick: () =>
|
|
73
|
+
React.createElement(AccordionToggle, { onClick: (e) => {
|
|
74
|
+
haltEvent(e);
|
|
75
|
+
setIsIssueExpanded(!isIssueExpanded);
|
|
76
|
+
}, id: `${doc.id}-detected-issue` },
|
|
73
77
|
React.createElement(BullseyeIcon, { className: "pf-v6-u-mr-sm" }),
|
|
74
78
|
React.createElement(Trans, null, "Detected issues")),
|
|
75
79
|
React.createElement(AccordionContent, null,
|
|
@@ -78,7 +82,10 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
|
78
82
|
'N/A'),
|
|
79
83
|
} }))),
|
|
80
84
|
((_f = ruleData === null || ruleData === void 0 ? void 0 : ruleData.more_info) !== null && _f !== void 0 ? _f : false) && (React.createElement(AccordionItem, { isExpanded: isAdditionalExpanded },
|
|
81
|
-
React.createElement(AccordionToggle, { onClick: () =>
|
|
85
|
+
React.createElement(AccordionToggle, { onClick: (e) => {
|
|
86
|
+
haltEvent(e);
|
|
87
|
+
setIsAdditionalExpanded(!isAdditionalExpanded);
|
|
88
|
+
}, id: `${doc.id}-additional-info` },
|
|
82
89
|
React.createElement(InfoCircleIcon, { className: "pf-v6-u-mr-sm" }),
|
|
83
90
|
React.createElement(Trans, null, "Additional info")),
|
|
84
91
|
React.createElement(AccordionContent, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationFeedbackModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationFeedbackModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RecommendationFeedbackModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationFeedbackModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACxB;AACD,wBAAgB,2BAA2B,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,EAAE,MAAM,qBA4BnG"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Button, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Button, Modal, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
|
-
import { Link } from 'react-router-dom';
|
|
5
4
|
export function RecommendationFeedbackModal({ isModalOpen, handleModalToggle, modalContent }) {
|
|
6
5
|
return (React.createElement(Modal, { variant: ModalVariant.small, id: "resolved-feedback-modal", "aria-describedby": "rec-feedback-modal", "aria-label": "Feedback modal", isOpen: isModalOpen, onClose: handleModalToggle },
|
|
7
|
-
React.createElement(
|
|
6
|
+
React.createElement(ModalHeader, null,
|
|
7
|
+
React.createElement("h2", { id: "rec-feedback-modal" }, modalContent)),
|
|
8
8
|
React.createElement(ModalFooter, null,
|
|
9
|
-
React.createElement(
|
|
9
|
+
React.createElement(Button, { "data-tracking-id": "resolved-feedback-cases", key: "view", component: "a", href: "#/case/list" },
|
|
10
10
|
React.createElement(Trans, null, "View your cases")),
|
|
11
11
|
React.createElement(Button, { "data-tracking-id": "resolved-feedback-continue", key: "continue", variant: "link", onClick: handleModalToggle },
|
|
12
12
|
React.createElement(Trans, null, "Continue troubleshooting")))));
|
|
@@ -184,7 +184,7 @@ export default function Recommendations(props) {
|
|
|
184
184
|
isATestvariation
|
|
185
185
|
? (recommendationState.visibleDocs.length !== 0 ||
|
|
186
186
|
recommendationState.isLoadingRecommendations) && (React.createElement("div", { className: `${recommendationState.isLoadingRecommendations ? 'gradient' : ''} label-container-icon` },
|
|
187
|
-
React.createElement(Label, { id: "DeepPurpleColorAILabel",
|
|
187
|
+
React.createElement(Label, { id: "DeepPurpleColorAILabel", color: "purple" },
|
|
188
188
|
recommendationState.isLoadingRecommendations ? (React.createElement(React.Fragment, null,
|
|
189
189
|
React.createElement("span", { className: "loading-text" },
|
|
190
190
|
React.createElement(Spinner, { size: "sm", className: "pf-v6-u-mr-xs" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAqM/C"}
|
|
@@ -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 { Accordion, Button, Card, CardBody, CardExpandableContent, CardHeader, CardTitle, Modal, ModalFooter, } from '@patternfly/react-core';
|
|
11
|
+
import { Accordion, Button, Card, CardBody, CardExpandableContent, CardHeader, CardTitle, Modal, ModalBody, ModalFooter, ModalHeader, } from '@patternfly/react-core';
|
|
12
12
|
import { useFetch } from '@rh-support/components';
|
|
13
13
|
import { getResTypeFromUrl } from '@rh-support/utils';
|
|
14
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -107,9 +107,12 @@ export function InsightResultModal(props) {
|
|
|
107
107
|
}
|
|
108
108
|
return (React.createElement(React.Fragment, null,
|
|
109
109
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
110
|
-
React.createElement(Modal, { className: "critical-solutions-modal",
|
|
111
|
-
React.createElement(
|
|
112
|
-
|
|
110
|
+
React.createElement(Modal, { className: "critical-solutions-modal", "data-tracking-id": "critical-solutions-modal-body", onClose: props.onModalToggle, isOpen: props.isOpen },
|
|
111
|
+
React.createElement(ModalHeader, null,
|
|
112
|
+
React.createElement("h2", null, t('Critical solutions for your system'))),
|
|
113
|
+
React.createElement(ModalBody, null,
|
|
114
|
+
React.createElement("p", null, t('Solutions have been triggered for you based on file upload or common issues that currently have high visibility.')),
|
|
115
|
+
React.createElement(Accordion, { className: "push-top-narrow rules-modal-items", headingLevel: "h2", asDefinitionList: false, isBordered: true }, props.insightResults.map((doc, index) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc, rank: index + 1 }))))),
|
|
113
116
|
React.createElement(ModalFooter, null,
|
|
114
117
|
React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "solved-my-issue-critical-solutions-modal" }, t('I solved my issue')),
|
|
115
118
|
React.createElement(Button, { onClick: props.onModalToggle, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-critical-solutions-modal" }, t('Cancel'))))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export const WatsonxAiIcon = (props) => {
|
|
3
3
|
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "17", viewBox: "0 0 16 17", fill: "none" },
|
|
4
|
-
React.createElement("g", {
|
|
4
|
+
React.createElement("g", { clipPath: "url(#clip0_2742_18241)" },
|
|
5
5
|
React.createElement("path", { d: "M13 12.5007C12.4477 12.5007 12 12.9484 12 13.5007C12 13.5389 12.0071 13.5751 12.0112 13.6122C10.8708 14.5103 9.47165 15.0007 8 15.0007C5.86915 15.0007 4 13.0146 4 10.7507C4 8.40722 5.9065 6.50072 8.25 6.50072H8.5V5.50072H8.25C5.3552 5.50072 3 7.85592 3 10.7507C3 11.6927 3.2652 12.5955 3.71855 13.379C2.3619 12.1868 1.5 10.4445 1.5 8.50072C1.5 7.44312 1.74585 6.43432 2.23095 5.50292L1.34375 5.04102C0.79175 6.10157 0.5 7.29787 0.5 8.50072C0.5 12.6362 3.8645 16.0007 8 16.0007C9.6872 16.0007 11.2909 15.4411 12.6024 14.4176C12.7244 14.4706 12.8586 14.5007 13 14.5007C13.5523 14.5007 14 14.053 14 13.5007C14 12.9484 13.5523 12.5007 13 12.5007Z", fill: "#1F0066" }),
|
|
6
6
|
React.createElement("path", { d: "M6.5 11.5V10.5H5.5V11.5H6.5Z", fill: "#1F0066" }),
|
|
7
7
|
React.createElement("path", { d: "M10.5 6.5V5.5H9.5V6.5H10.5Z", fill: "#1F0066" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RestoreLastSessionModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/RestoreLastSessionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAGnF,OAAc,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAQ9C,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"RestoreLastSessionModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/RestoreLastSessionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAGnF,OAAc,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAQ9C,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,MAAM,CAuE9C,CAAC"}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Button, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
10
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
11
11
|
import isEqual from 'lodash/isEqual';
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
13
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -38,8 +38,10 @@ export const RestoreLastSessionModal = ({ onRestore, errorSession }) => {
|
|
|
38
38
|
updateCaseCreationErrorStatus(caseDispatch, false);
|
|
39
39
|
updateSession(sessionDispatch, errorSession.session.id, errorSession.sessionDetails, Object.assign(Object.assign({}, errorSession.session), { caseCreationError: false }));
|
|
40
40
|
};
|
|
41
|
-
return (React.createElement(Modal, { "data-tracking-id": "restore-session-modal", variant: ModalVariant.small,
|
|
42
|
-
React.createElement(
|
|
41
|
+
return (React.createElement(Modal, { "data-tracking-id": "restore-session-modal", variant: ModalVariant.small, isOpen: !caseCreationError && caseCreation500ErrorStatus, onClose: onOpenNewCase, "aria-labelledby": "restore-session-modal-title", "aria-describedby": "restore-session-modal-body" },
|
|
42
|
+
React.createElement(ModalHeader, { title: t('Restore last session?'), labelId: "restore-session-modal-title" }),
|
|
43
|
+
React.createElement(ModalBody, { id: "restore-session-modal-body" },
|
|
44
|
+
React.createElement(Trans, null, "It looks like an error prevented your last case from being submitted. Would you like to restore the last session or open a new case?")),
|
|
43
45
|
React.createElement(ModalFooter, null,
|
|
44
46
|
React.createElement(Button, { key: "restore", variant: "primary", onClick: onRestoreClick, "data-tracking-id": "restore-session-button" },
|
|
45
47
|
React.createElement(Trans, null, " Restore")),
|
|
@@ -305,7 +305,7 @@ export function SessionRestore(props) {
|
|
|
305
305
|
], 1000);
|
|
306
306
|
if (!sessionRestoreCardSections.includes(activeSection))
|
|
307
307
|
return React.createElement(React.Fragment, null);
|
|
308
|
-
return (React.createElement("div", { className: "pf-v6-u-mb-
|
|
308
|
+
return (React.createElement("div", { className: "pf-v6-u-mb-lg pf-v6-u-mt-0" },
|
|
309
309
|
' ',
|
|
310
310
|
React.createElement(SessionRestoreCard, { onRestore: restoreSession, previousSessions: previousSessions, onCardDismiss: onSessionRestoreCardDismiss }),
|
|
311
311
|
React.createElement(RestoreLastSessionModal, { onRestore: restoreSession, errorSession: sessionRestore.sessionOfCaseCreationError })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAgIhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
|
-
import { Tooltip } from '@patternfly/react-core';
|
|
2
|
+
import { Accordion, Tooltip } from '@patternfly/react-core';
|
|
3
3
|
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
4
4
|
import { TopContentSearch } from '@rh-support/components';
|
|
5
5
|
import { FeatureFlagKey, useIsFeatureAvailable } from '@rh-support/react-context';
|
|
@@ -17,6 +17,7 @@ export default function Suggestions(props) {
|
|
|
17
17
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
18
18
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
19
19
|
const accordionRef = useRef(null);
|
|
20
|
+
const toggleButtonRefs = useRef([]);
|
|
20
21
|
const { version, product } = useCaseSelector((state) => ({
|
|
21
22
|
version: state.caseDetails.version,
|
|
22
23
|
product: state.caseDetails.product,
|
|
@@ -35,28 +36,32 @@ export default function Suggestions(props) {
|
|
|
35
36
|
setMaxTC(topContent.data.length);
|
|
36
37
|
};
|
|
37
38
|
const onSearchChange = (searchTerm, filteredData) => {
|
|
38
|
-
var _a, _b;
|
|
39
39
|
setFilteredTC(filteredData);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
const shouldBeExpanded = Boolean(searchTerm);
|
|
42
|
+
for (const id of toggleButtonRefs.current) {
|
|
43
|
+
const button = document.getElementById(`${id}`);
|
|
44
|
+
const isExpanded = (button === null || button === void 0 ? void 0 : button.getAttribute('aria-expanded')) === 'true';
|
|
45
|
+
if (button && isExpanded !== shouldBeExpanded) {
|
|
46
|
+
button.click();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
46
50
|
};
|
|
47
51
|
return (React.createElement("div", { className: "top-content-suggestion-accordion" },
|
|
48
52
|
showTitleDescription && (React.createElement("div", { className: "card card-support top-content-card-wrapper" },
|
|
49
|
-
|
|
53
|
+
isTCSearchEnabled && (React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" },
|
|
50
54
|
props.title
|
|
51
55
|
? props.title
|
|
52
56
|
: t('i18nKeyPopularSolutions', 'Red Hat hand picked support articles'),
|
|
53
57
|
React.createElement(Tooltip, { content: React.createElement("div", null,
|
|
54
58
|
React.createElement(Trans, null, "Support articles are matched to the product and version details you selected, not the problem details you entered.")) },
|
|
55
59
|
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm", "aria-label": t('More info about how support articles are matched') })))),
|
|
56
|
-
isTCSearchEnabled && (React.createElement("div", { className: "card-body" },
|
|
57
|
-
React.createElement(TopContentSearch, { topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true }))))),
|
|
58
|
-
React.createElement(
|
|
60
|
+
!isTCSearchEnabled && (React.createElement("div", { className: "card-body" },
|
|
61
|
+
React.createElement(TopContentSearch, { className: "pf-v6-u-text-color-regular", topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true }))))),
|
|
62
|
+
React.createElement(Accordion, { className: "pf-v6-u-ml-sm pf-v6-u-mr-sm" }, map(filteredTC.slice(0, maxTC), (sug, index) => {
|
|
59
63
|
var _a, _b;
|
|
64
|
+
toggleButtonRefs.current.push(index);
|
|
60
65
|
return (React.createElement(TopContent, { seSessionId: activeSessionId, seResourceOriginID: (_b = (_a = sessionResourceTracking[SessionResourceSource.TOP_CONTENT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', topContentIndex: index, onResourceClick: onResourceClick, name: sug.categoryName, key: sug.categoryName, items: sug.content, helperText: (sug === null || sug === void 0 ? void 0 : sug.helperText) || '' }));
|
|
61
66
|
})),
|
|
62
67
|
showMax && filteredTC.length > maxTC && (React.createElement("div", { className: "text-right" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAKxF,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAmI/C"}
|