@rh-support/troubleshoot 2.6.48 → 2.6.55

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 (111) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -31
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +34 -33
  6. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -3
  8. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +0 -1
  10. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +18 -14
  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 +22 -16
  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 +102 -53
  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 +21 -23
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -4
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +4 -7
  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 +9 -7
  30. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
  31. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +1 -1
  32. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  33. package/lib/esm/components/CaseInformation/Fts.js +2 -6
  34. package/lib/esm/components/CaseInformation/Severity.js +1 -1
  35. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  36. package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
  37. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -3
  38. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  39. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +24 -16
  40. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  41. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +7 -5
  42. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
  43. package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +18 -20
  44. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  45. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +9 -6
  46. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  47. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +15 -22
  48. package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
  49. package/lib/esm/components/Cve/CveModal.js +3 -2
  50. package/lib/esm/components/Cve/CveSidebar.js +1 -1
  51. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
  52. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  53. package/lib/esm/components/ProductSelector/AllProductsSelector.js +9 -6
  54. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  55. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +10 -1
  56. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  57. package/lib/esm/components/Recommendations/AsideResults.js +2 -2
  58. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
  59. package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -4
  60. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
  61. package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +3 -1
  62. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  63. package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
  64. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +9 -2
  65. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
  66. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
  67. package/lib/esm/components/Recommendations/Recommendations.js +1 -1
  68. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  69. package/lib/esm/components/Recommendations/RulesModal.js +7 -4
  70. package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
  71. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
  72. package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -3
  73. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  74. package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
  75. package/lib/esm/components/Suggestions/Suggestions.js +17 -12
  76. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  77. package/lib/esm/components/Suggestions/TopContent.js +13 -13
  78. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -1
  79. package/lib/esm/components/TroubleshootSection/AskRedHat.js +62 -27
  80. package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -1
  81. package/lib/esm/components/TroubleshootSection/ResponseActions.js +1 -1
  82. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +1 -1
  83. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +1 -0
  84. package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -1
  85. package/lib/esm/components/TroubleshootSection/UserFeedback.js +2 -2
  86. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
  87. package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
  88. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +1 -0
  89. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  90. package/lib/esm/components/shared/input/ContactSelectorInternal.js +6 -1
  91. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  92. package/lib/esm/components/shared/useIsSectionValid.js +7 -1
  93. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  94. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -2
  95. package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
  96. package/lib/esm/components/wizardLayout/WizardMain.d.ts +3 -0
  97. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  98. package/lib/esm/components/wizardLayout/WizardMain.js +34 -56
  99. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -2
  100. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  101. package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -10
  102. package/lib/esm/css/AskRedHat.css +50 -8
  103. package/lib/esm/css/app.css +5 -4
  104. package/lib/esm/css/case.css +44 -7
  105. package/lib/esm/css/results.css +2 -2
  106. package/lib/esm/hooks/useARHResponse.d.ts +15 -0
  107. package/lib/esm/hooks/useARHResponse.d.ts.map +1 -0
  108. package/lib/esm/hooks/useARHResponse.js +50 -0
  109. package/lib/esm/scss/_main.scss +74 -13
  110. package/lib/esm/scss/_pf-overrides.scss +53 -10
  111. package/package.json +6 -6
@@ -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: () => setIsIssueExpanded(!isIssueExpanded), id: `${doc.id}-detected-issue` },
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: () => setIsAdditionalExpanded(!isAdditionalExpanded), id: `${doc.id}-additional-info` },
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;AAI1B,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,qBA+BnG"}
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("h1", { id: "rec-feedback-modal" }, modalContent),
6
+ React.createElement(ModalHeader, null,
7
+ React.createElement("h2", { id: "rec-feedback-modal" }, modalContent)),
8
8
  React.createElement(ModalFooter, null,
9
- React.createElement(Link, { "data-tracking-id": "resolved-feedback-cases", key: "view", className: "pf-v6-c-button pf-m-primary", to: "/case/list" },
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("div", { id: "DeepPurpleColorAILabel", className: "pf-v6-u-mb-md", color: "purple" },
187
+ React.createElement("div", { id: "DeepPurpleColorAILabel" },
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":"AAcA,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,qBAiM/C"}
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", title: t('Critical solutions for your system'), "data-tracking-id": "critical-solutions-modal-body", onClose: props.onModalToggle, isOpen: props.isOpen },
111
- React.createElement("p", null, t('Solutions have been triggered for you based on file upload or common issues that currently have high visibility.')),
112
- 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 })))),
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", { "clip-path": "url(#clip0_2742_18241)" },
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,CAmE9C,CAAC"}
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, title: t('Restore last session?'), isOpen: !caseCreationError && caseCreation500ErrorStatus, onClose: onOpenNewCase },
42
- 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?"),
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-md pf-v6-u-mt-0" },
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,qBAqHhD"}
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
- if (searchTerm) {
41
- (_a = accordionRef.current) === null || _a === void 0 ? void 0 : _a.expandAll();
42
- }
43
- else {
44
- (_b = accordionRef.current) === null || _b === void 0 ? void 0 : _b.collapseAll();
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
- !isTCSearchEnabled && (React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" },
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("pfe-accordion", { ref: accordionRef }, map(filteredTC.slice(0, maxTC), (sug, index) => {
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;AAIxF,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,qBAsI/C"}
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"}
@@ -1,5 +1,6 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
- import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Tooltip } from '@patternfly/react-core';
2
+ import { AccordionContent, AccordionItem, AccordionToggle, Tooltip } from '@patternfly/react-core';
3
+ import { haltEvent } from '@rh-support/utils';
3
4
  import isEqual from 'lodash/isEqual';
4
5
  import map from 'lodash/map';
5
6
  import React, { useState } from 'react';
@@ -44,23 +45,22 @@ export default function TopContent(props) {
44
45
  }));
45
46
  };
46
47
  return (React.createElement(React.Fragment, null, props.helperText ? (React.createElement(Tooltip, { content: React.createElement("div", null, props.helperText) },
47
- React.createElement(Accordion, { className: "top-content-accordion" },
48
- React.createElement(AccordionItem, { isExpanded: expanded === `${props.topContentIndex}` },
49
- React.createElement(AccordionToggle, { onClick: () => {
50
- onToggle(`${props.topContentIndex}`);
51
- }, "data-tracking-id": `top-content-accordion-header-${props.topContentIndex}`, id: `${props.topContentIndex}` },
52
- React.createElement("h3", null, props.name)),
53
- React.createElement(AccordionContent, { id: `${props.topContentIndex}` },
54
- React.createElement("ul", { className: "list-flushleft", style: { listStyleType: 'disc' } }, map(props.items, (item, i) => (React.createElement("li", { key: i + item.contentTitle },
55
- React.createElement("p", null,
56
- React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle))))))))))) : (React.createElement(Accordion, null,
57
48
  React.createElement(AccordionItem, { isExpanded: expanded === `${props.topContentIndex}` },
58
- React.createElement(AccordionToggle, { onClick: () => {
49
+ React.createElement(AccordionToggle, { onClick: (e) => {
50
+ haltEvent(e);
59
51
  onToggle(`${props.topContentIndex}`);
60
52
  }, "data-tracking-id": `top-content-accordion-header-${props.topContentIndex}`, id: `${props.topContentIndex}` },
61
53
  React.createElement("h3", null, props.name)),
62
54
  React.createElement(AccordionContent, { id: `${props.topContentIndex}` },
63
55
  React.createElement("ul", { className: "list-flushleft", style: { listStyleType: 'disc' } }, map(props.items, (item, i) => (React.createElement("li", { key: i + item.contentTitle },
64
56
  React.createElement("p", null,
65
- React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle))))))))))));
57
+ React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle)))))))))) : (React.createElement(AccordionItem, { isExpanded: expanded === `${props.topContentIndex}` },
58
+ React.createElement(AccordionToggle, { onClick: () => {
59
+ onToggle(`${props.topContentIndex}`);
60
+ }, "data-tracking-id": `top-content-accordion-header-${props.topContentIndex}`, id: `${props.topContentIndex}` },
61
+ React.createElement("h3", null, props.name)),
62
+ React.createElement(AccordionContent, { id: `${props.topContentIndex}` },
63
+ React.createElement("ul", { className: "list-flushleft", style: { listStyleType: 'disc' } }, map(props.items, (item, i) => (React.createElement("li", { key: i + item.contentTitle },
64
+ React.createElement("p", null,
65
+ React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle)))))))))));
66
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAYhD,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA+StC,CAAC"}
1
+ {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAe5D,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAsVtC,CAAC"}
@@ -9,10 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { Env } from '@cee-eng/hydrajs';
11
11
  import { sendRHDirectMessageFeedback } from '@ifd-ui/ask-redhat-core';
12
- import { Button, Card, CardBody, CardHeader, Modal, ModalVariant, Spinner } from '@patternfly/react-core';
13
- import React, { useRef, useState } from 'react';
12
+ import { Button, Card, CardBody, CardHeader, Content, ContentVariants, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateVariant, Icon, Modal, ModalVariant, Skeleton, Spinner, } from '@patternfly/react-core';
13
+ import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
+ import isEqual from 'lodash/isEqual';
15
+ import React, { useContext, useRef, useState } from 'react';
14
16
  import { MODAL_MESSAGES, QUICK_RESPONSES, TOOLTIP_MESSAGES } from '../../constants/askRedHatMessages';
15
17
  import { useAIResponseState } from '../../context/AIResponseContext';
18
+ import { useCaseSelector } from '../../context/CaseContext';
19
+ import { RouteContext } from '../../context/RouteContext';
20
+ import { useARHResponse } from '../../hooks/useARHResponse';
16
21
  import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
17
22
  import { appSourceId_ARH } from '../../reducers/CaseConstNTypes';
18
23
  import { CollapseIcon } from './icons/CollapseIcon';
@@ -27,8 +32,32 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
27
32
  const [showFeedbackComplete, setShowFeedbackComplete] = useState(false);
28
33
  const [feedbackType, setFeedbackType] = useState('');
29
34
  const [submittedFeedbackTypes, setSubmittedFeedbackTypes] = useState([]);
35
+ const [isSubmittingFeedback, setIsSubmittingFeedback] = useState(false);
30
36
  const aiResponseState = useAIResponseState();
31
37
  const contentRef = useRef(null);
38
+ const { routeState: { isCaseCreate, activeSection }, } = useContext(RouteContext);
39
+ const { product, version, summary, issue, caseType } = useCaseSelector((state) => ({
40
+ product: state.caseDetails.product,
41
+ version: state.caseDetails.version,
42
+ summary: state.caseDetails.summary,
43
+ issue: state.caseDetails.issue,
44
+ caseType: state.caseDetails.caseType,
45
+ }), isEqual);
46
+ const config = {
47
+ appSourceId: appSourceId_ARH,
48
+ authToken: (_b = (_a = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _a === void 0 ? void 0 : _a.getEncodedToken()) !== null && _b !== void 0 ? _b : '',
49
+ packageVersion: (_c = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _c === void 0 ? void 0 : _c.packageVersion,
50
+ appEnv: Env.getEnvName(),
51
+ };
52
+ const { fetchARHResponse } = useARHResponse({
53
+ activeSection,
54
+ product,
55
+ version,
56
+ summary,
57
+ issue,
58
+ caseType,
59
+ config,
60
+ });
32
61
  const onToggle = () => {
33
62
  if (isExpanded && contentRef.current) {
34
63
  contentRef.current.scrollTop = 0;
@@ -49,27 +78,25 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
49
78
  const isLoading = aiResponseState.isStreaming && aiResponseState.accumulatedResponse === '';
50
79
  const isStreaming = aiResponseState.isStreaming;
51
80
  const { parseMarkdown } = useParseRuleMarkdown();
52
- const config = {
53
- appSourceId: appSourceId_ARH,
54
- packageVersion: (_a = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _a === void 0 ? void 0 : _a.packageVersion,
55
- authToken: (_c = (_b = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _b === void 0 ? void 0 : _b.getEncodedToken()) !== null && _c !== void 0 ? _c : '',
56
- appEnv: Env.getEnvName(),
57
- };
58
81
  const handleFeedbackSubmit = (selectedResponse, additionalFeedback) => __awaiter(void 0, void 0, void 0, function* () {
59
- setShowFeedbackCard(false);
82
+ setIsSubmittingFeedback(true);
60
83
  try {
61
84
  const payload = {
62
85
  rating: (feedbackType === 'positive' ? 'positive' : 'negative'),
63
- freeform: additionalFeedback || undefined,
64
- predefined_response: selectedResponse,
86
+ freeform: additionalFeedback || '',
87
+ predefined_response: selectedResponse || '',
65
88
  };
66
89
  yield sendRHDirectMessageFeedback(conversationId, messageId, payload, config);
90
+ setShowFeedbackCard(false);
67
91
  setShowFeedbackComplete(true);
68
92
  setSubmittedFeedbackTypes((prev) => [...prev, feedbackType]);
69
93
  }
70
94
  catch (error) {
71
95
  setShowFeedbackCard(false);
72
96
  }
97
+ finally {
98
+ setIsSubmittingFeedback(false);
99
+ }
73
100
  });
74
101
  const responseActions = {
75
102
  positive: Object.assign({ onClick: () => {
@@ -84,15 +111,32 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
84
111
  navigator.clipboard.writeText(answer);
85
112
  } }, TOOLTIP_MESSAGES.copy),
86
113
  };
87
- if (isLoading) {
114
+ if (aiResponseState.error) {
88
115
  return (React.createElement("div", { className: "ask-redhat" },
89
116
  React.createElement("p", { className: "ask-redhat-title" },
90
117
  React.createElement(StarIcon, { width: 20, height: 20 }),
91
118
  "Resolve your issue now with AI insights"),
119
+ React.createElement("div", { className: "ask-redhat-content-wrapper ask-redhat-error" },
120
+ React.createElement(EmptyState, { variant: EmptyStateVariant.xs, titleText: "", headingLevel: "h4" },
121
+ React.createElement("h4", null,
122
+ React.createElement(Icon, { iconSize: "lg", status: "danger", className: "pf-v6-u-mr-sm" },
123
+ React.createElement(ExclamationCircleIcon, null)),
124
+ ' ',
125
+ "Error while loading AI insights"),
126
+ React.createElement(EmptyStateBody, null,
127
+ React.createElement(Content, { component: ContentVariants.p }, "AI insights is currently unavailable, try reloading.")),
128
+ React.createElement(EmptyStateFooter, null,
129
+ React.createElement(Button, { variant: "tertiary", size: "sm", onClick: fetchARHResponse }, "Reload"))))));
130
+ }
131
+ if (isLoading) {
132
+ return (React.createElement("div", { className: "ask-redhat" },
133
+ React.createElement("p", { className: "ask-redhat-title" },
134
+ React.createElement(StarIcon, { width: 20, height: 20 }),
135
+ isCaseCreate ? 'Resolve your issue now with AI insights' : 'Troubleshoot with AI insights'),
92
136
  React.createElement("div", { className: "ask-redhat-content-wrapper" },
93
- React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
94
- React.createElement(Spinner, { size: "lg" }),
95
- React.createElement("p", { style: { marginTop: '1rem' } }, "Getting AI insights..."))),
137
+ React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-column pf-v6-u-justify-content-space-between" }, [...Array(3)].map((_, i) => (React.createElement("div", { className: "pf-v6-u-mb-sm", key: `AI-insights-loading-${i}` },
138
+ React.createElement(Skeleton, { width: "100%", screenreaderText: "Getting AI insights..." }),
139
+ React.createElement("br", null)))))),
96
140
  !aiResponseState.isStreaming && (React.createElement("div", { className: "ask-redhat-toggle-button" },
97
141
  React.createElement(Button, { variant: "link", onClick: handleChatWithAIClick, className: "ask-redhat-chat-button" }, "Chat with AI to get started")))));
98
142
  }
@@ -116,20 +160,10 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
116
160
  isExpanded ? React.createElement(CollapseIcon, null) : React.createElement(StarIcon, { width: 20, height: 20 }),
117
161
  isExpanded ? '' : 'Read more'))));
118
162
  }
119
- if (aiResponseState.error) {
120
- return (React.createElement("div", { className: "ask-redhat" },
121
- React.createElement("p", { className: "ask-redhat-title" },
122
- React.createElement(StarIcon, { width: 20, height: 20 }),
123
- "Resolve your issue now with AI insights"),
124
- React.createElement("div", { className: "ask-redhat-content-wrapper" },
125
- React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
126
- React.createElement("p", { style: { color: '#d73502', marginBottom: '1rem' } }, "Unable to get AI insights. Please try again later."),
127
- React.createElement(Button, { variant: "link", onClick: handleChatWithAIClick, className: "ask-redhat-chat-button", icon: React.createElement(StarIcon, null) }, "Try again with AI Chat")))));
128
- }
129
163
  return (React.createElement("div", { className: "ask-redhat" },
130
164
  React.createElement("p", { className: "ask-redhat-title" },
131
165
  React.createElement(StarIcon, { width: 20, height: 20 }),
132
- "Resolve your issue now with AI insights"),
166
+ isCaseCreate ? 'Resolve your issue now with AI insights' : 'Troubleshoot with AI insights'),
133
167
  React.createElement("div", { className: "ask-redhat-content-wrapper" },
134
168
  React.createElement("div", { ref: contentRef, className: `ask-redhat-content ${isExpanded ? 'ask-redhat-content--expanded' : ''}` },
135
169
  React.createElement("div", { className: `ask-redhat-content-scrollable ${isExpanded ? 'ask-redhat-content--expanded-scrollable' : ''}` },
@@ -158,13 +192,14 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
158
192
  React.createElement(Modal, { variant: ModalVariant.small, isOpen: showFeedbackCard, onClose: () => {
159
193
  setShowFeedbackCard(false);
160
194
  setFeedbackType('');
195
+ setIsSubmittingFeedback(false);
161
196
  } },
162
197
  React.createElement(UserFeedback, { title: feedbackType === 'positive'
163
198
  ? MODAL_MESSAGES.feedback.positive
164
199
  : MODAL_MESSAGES.feedback.negative, hasTextArea: true, quickResponses: feedbackType === 'positive' ? QUICK_RESPONSES.positive : QUICK_RESPONSES.negative, onSubmit: handleFeedbackSubmit, onClose: () => {
165
200
  setShowFeedbackCard(false);
166
201
  setFeedbackType('');
167
- } })),
202
+ }, isSubmitting: isSubmittingFeedback })),
168
203
  React.createElement(Modal, { variant: ModalVariant.small, isOpen: showFeedbackComplete, onClose: () => {
169
204
  setShowFeedbackComplete(false);
170
205
  setFeedbackType('');
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/ResponseActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAA+B,MAAM,OAAO,CAAC;AAIpG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,IAAI,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,mBAAmB,CA4FlE,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ResponseActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/ResponseActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAA+B,MAAM,OAAO,CAAC;AAIpG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,IAAI,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,mBAAmB,CAyFlE,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -3,7 +3,7 @@ import OutlinedThumbsDownIcon from '@patternfly/react-icons/dist/esm/icons/outli
3
3
  import OutlinedThumbsUpIcon from '@patternfly/react-icons/dist/esm/icons/outlined-thumbs-up-icon';
4
4
  import React, { useEffect, useRef, useState } from 'react';
5
5
  import ResponseActionButton from './ResponseActionButton';
6
- export const ResponseActions = ({ actions, submittedFeedbackTypes = [], }) => {
6
+ export const ResponseActions = ({ actions, submittedFeedbackTypes = [] }) => {
7
7
  var _a, _b, _c, _d, _e, _f;
8
8
  const [activeButton, setActiveButton] = useState();
9
9
  const [clickStatePersisted, setClickStatePersisted] = useState(false);
@@ -127,7 +127,7 @@ function TroubleshootSection(props) {
127
127
  return (React.createElement(React.Fragment, null, isAIChatMode ? (React.createElement(React.Fragment, null,
128
128
  React.createElement(AskRedHatChat, { initConfig: initConfig }),
129
129
  React.createElement("div", { className: "fullscreen-chat-footer" },
130
- React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Return to resources'))))) : (React.createElement(React.Fragment, null,
130
+ React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Back to resources'))))) : (React.createElement(React.Fragment, null,
131
131
  React.createElement("section", null,
132
132
  shouldShowARHUI() && React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick }),
133
133
  !isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
@@ -6,6 +6,7 @@ export interface UserFeedbackProps extends Omit<CardProps, 'onSubmit'>, OUIAProp
6
6
  hasTextArea?: boolean;
7
7
  onSubmit: (selectedResponse?: string, additionalFeedback?: string) => void;
8
8
  onClose: () => void;
9
+ isSubmitting?: boolean;
9
10
  }
10
11
  declare const UserFeedback: FunctionComponent<UserFeedbackProps>;
11
12
  export default UserFeedback;
@@ -1 +1 @@
1
- {"version":3,"file":"UserFeedback.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/UserFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,SAAS,EAET,SAAS,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAc,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGhE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS;IAC7E,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAqEtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"UserFeedback.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/UserFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,SAAS,EAET,SAAS,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAc,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGhE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS;IAC7E,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA4EtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -14,7 +14,7 @@ import React, { useState } from 'react';
14
14
  import CloseButton from './CloseButton';
15
15
  import QuickResponse from './QuickResponse';
16
16
  const UserFeedback = (_a) => {
17
- var { title = 'Why did you choose this rating?', hasTextArea, quickResponses, onSubmit, onClose, isCompact } = _a, props = __rest(_a, ["title", "hasTextArea", "quickResponses", "onSubmit", "onClose", "isCompact"]);
17
+ var { title = 'Why did you choose this rating?', hasTextArea, quickResponses, onSubmit, onClose, isCompact, isSubmitting = false } = _a, props = __rest(_a, ["title", "hasTextArea", "quickResponses", "onSubmit", "onClose", "isCompact", "isSubmitting"]);
18
18
  const [selectedResponse, setSelectedResponse] = useState();
19
19
  const [value, setValue] = useState('');
20
20
  return (React.createElement(Card, Object.assign({ isCompact: isCompact, className: "pf-chatbot__feedback-card" }, props),
@@ -39,6 +39,6 @@ const UserFeedback = (_a) => {
39
39
  React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" }, "Red Hat Privacy Statement"),
40
40
  ".")))),
41
41
  React.createElement(ActionGroup, null,
42
- React.createElement(Button, { onClick: () => onSubmit(selectedResponse, value) }, "Send Feedback"))))));
42
+ React.createElement(Button, { onClick: () => onSubmit(selectedResponse, value), isDisabled: isSubmitting, isLoading: isSubmitting }, "Send Feedback"))))));
43
43
  };
44
44
  export default UserFeedback;
@@ -146,12 +146,12 @@ function WidgetFileUploader(props) {
146
146
  }
147
147
  }
148
148
  });
149
- return (React.createElement(Card, { id: "file-uploader-card", className: `file-diag pf-v6-u-m-sm`, onPaste: handlePaste },
149
+ return (React.createElement(Card, { id: "file-uploader-card", className: "file-diag pf-v6-u-mb-lg", onPaste: handlePaste },
150
150
  React.createElement(CardHeader, { "aria-label": t('File uploader') },
151
151
  React.createElement("h3", { id: "file-uploader-title" }, props.isIdea || props.isSecureSupport ? (React.createElement(Trans, null, "File uploader")) : (React.createElement(Trans, null, "Upload a file for Red Hat to analyze")))),
152
- React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body pf-v6-u-pt-md" },
152
+ React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body" },
153
153
  React.createElement(WidgetFileSelector, { isSessionId: props.isSessionId, isPrivate: props.isPrivate, isIdea: props.isIdea, showFileExceed: fileExceedInfo }),
154
- !hasSomeSelectedFiles(selectedLocalFiles) ? ((!props.isIdea && props.helperText) || (React.createElement("p", { className: "pf-v6-u-mt-sm" },
154
+ !hasSomeSelectedFiles(selectedLocalFiles) ? ((!props.isIdea && props.helperText) || (React.createElement("p", { className: "pf-v6-u-mt-md" },
155
155
  !props.isIdea ? (React.createElement(React.Fragment, null,
156
156
  React.createElement(Trans, null, "To help us provide the right guidance, upload a sosreport."),
157
157
  React.createElement("br", null),
@@ -73,6 +73,7 @@ i.web-icon-check {
73
73
  color: #06c;
74
74
  font-size: 14px;
75
75
  text-align: center;
76
+ margin-bottom: 0;
76
77
  }
77
78
 
78
79
  .file-diag .file-diag-dragndrop:hover,
@@ -8,6 +8,7 @@ export interface IProps {
8
8
  disabled?: boolean;
9
9
  selectedContacts?: IContact[];
10
10
  contactsToExclude?: IContact[];
11
+ disableContactRemoval?: IContact[];
11
12
  className?: string;
12
13
  id: string;
13
14
  typeAheadSize?: 'sm' | 'md' | 'lg';
@@ -1 +1 @@
1
- {"version":3,"file":"ContactSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/input/ContactSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAqBrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,MAAM;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,KAAK,KAAA,EAAE,GAAG,KAAA,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACxE,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAQ;IAC5C,QAAQ,oCAAuC;IAE/C,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAalC;gBAEU,KAAK,EAAE,MAAM;IAYzB,gBAAgB,YAAa,QAAQ,KAAG,MAAM,CAS5C;IAEF,mBAAmB,aAAc,QAAQ,EAAE,KAAG,QAAQ,EAAE,CAGtD;IAEF,sBAAsB,MAAO,QAAQ,KAAG,OAAO,CAE7C;IAEF,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAmBpC,QAAQ,aAAoB,QAAQ,EAAE,mBAKpC;IAEF,YAAY,UAAiB,MAAM,mBA0CjC;IAEF,iBAAiB,UAAW,MAAM,UAiBhC;IAEF,YAAY,UAAW,GAAG,aAAa,GAAG,UAkBxC;IAEF,mBAAmB,oBAAqB,QAAQ,UAI9C;IAEF,aAAa,UAAW,KAAK,CAAC,aAAa,UAkCzC;IAEF,WAAW,aAIT;IAEF,UAAU,aAKR;IAEF,WAAW,aAGT;IAEF,QAAQ,aAEN;IAEF,MAAM;CAqGT"}
1
+ {"version":3,"file":"ContactSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/input/ContactSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAsBrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,MAAM;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,qBAAqB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,KAAK,KAAA,EAAE,GAAG,KAAA,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACxE,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAQ;IAC5C,QAAQ,oCAAuC;IAE/C,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAalC;gBAEU,KAAK,EAAE,MAAM;IAYzB,gBAAgB,YAAa,QAAQ,KAAG,MAAM,CAS5C;IAEF,mBAAmB,aAAc,QAAQ,EAAE,KAAG,QAAQ,EAAE,CAGtD;IAEF,sBAAsB,MAAO,QAAQ,KAAG,OAAO,CAE7C;IAEF,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAmBpC,QAAQ,aAAoB,QAAQ,EAAE,mBAKpC;IAEF,YAAY,UAAiB,MAAM,mBA0CjC;IAEF,iBAAiB,UAAW,MAAM,UAiBhC;IAEF,YAAY,UAAW,GAAG,aAAa,GAAG,UAkBxC;IAEF,mBAAmB,oBAAqB,QAAQ,UAI9C;IAEF,aAAa,UAAW,KAAK,CAAC,aAAa,UAkCzC;IAEF,WAAW,aAIT;IAEF,UAAU,aAKR;IAEF,WAAW,aAGT;IAEF,QAAQ,aAEN;IAEF,MAAM;CA6GT"}
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { contacts } from '@cee-eng/hydrajs';
11
11
  import { Button, Label, LabelGroup, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
12
  import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
13
+ import { haltEvent } from '@rh-support/utils';
13
14
  import assign from 'lodash/assign';
14
15
  import differenceBy from 'lodash/differenceBy';
15
16
  import filter from 'lodash/filter';
@@ -212,7 +213,11 @@ export class ContactSelectorInternal extends React.Component {
212
213
  : searchValue;
213
214
  const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: this.onToggle, isExpanded: isOpen, isDisabled: this.props.disabled || this.props.isUpdating, isFullWidth: true },
214
215
  React.createElement(TextInputGroup, { isPlain: true },
215
- React.createElement(TextInputGroupMain, { value: displayValue, onChange: (_, value) => this.handleInputChange(value), onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, placeholder: this.props.placeholder || 'Search contact by name or username', ref: this.inputRef, autoComplete: "off", isExpanded: isOpen, role: "combobox" }, this.props.multiple && selectedContacts.length > 0 && (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, selectedContacts.map((contact, index) => (React.createElement(Label, { key: contact.ssoUsername, variant: "outline", color: "blue", onClose: () => this.handleRemoveContact(contact) }, this.getSelectedLabel(contact))))))),
216
+ React.createElement(TextInputGroupMain, { value: displayValue, onChange: (_, value) => this.handleInputChange(value), onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, placeholder: this.props.placeholder || 'Search contact by name or username', ref: this.inputRef, autoComplete: "off", isExpanded: isOpen, role: "combobox" }, this.props.multiple && selectedContacts.length > 0 && (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, selectedContacts.map((contact, index) => {
217
+ var _a, _b;
218
+ const isDisabled = !!((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.disableContactRemoval) === null || _b === void 0 ? void 0 : _b.find((v) => v.ssoUsername === contact.ssoUsername));
219
+ return (React.createElement(Label, { key: contact.ssoUsername, variant: "outline", color: "blue", onClick: haltEvent, onClose: () => this.handleRemoveContact(contact), isDisabled: isDisabled }, this.getSelectedLabel(contact)));
220
+ })))),
216
221
  React.createElement(TextInputGroupUtilities, null,
217
222
  isLoading && React.createElement(Spinner, { size: "sm" }),
218
223
  this.props.clearButton && (searchValue || selectedContacts.length > 0) && (React.createElement(Button, { variant: "plain", icon: React.createElement(TimesCircleIcon, null), onClick: this.handleClear, "aria-label": "Clear input" }))))));
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA8T9D"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAmU9D"}