@rh-support/troubleshoot 2.6.5 → 2.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAsQ5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAoS5C"}
@@ -1,4 +1,6 @@
1
- import { Label, Tab, TabContent, Tabs, TabsComponent, TabTitleText, Text, TextContent, TextVariants, } from '@patternfly/react-core';
1
+ import { Label, Popover, Tab, TabContent, Tabs, TabsComponent, TabTitleText, Text, TextContent, TextVariants, } from '@patternfly/react-core';
2
+ import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
3
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
2
4
  import { ErrorBoundary, LoadingIndicator } from '@rh-support/components';
3
5
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
6
  import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -22,7 +24,7 @@ const RMEEscalationList = React.lazy(() => import(/* webpackChunkName: 'RMEEscal
22
24
  export function CaseDetailsTabs(props) {
23
25
  const { caseNumber } = props;
24
26
  const { activeTab } = useParams();
25
- const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount, viewAsCustomer }, } = useContext(GlobalMetadataStateContext);
27
+ const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount, pcmConfig, viewAsCustomer }, } = useContext(GlobalMetadataStateContext);
26
28
  const { accountNumber, chats, comments, status } = useCaseSelector((state) => ({
27
29
  accountNumber: state.caseDetails.accountNumberRef,
28
30
  chats: state.caseDetails.chats,
@@ -38,7 +40,6 @@ export function CaseDetailsTabs(props) {
38
40
  // resources.CASE_DETAILS,
39
41
  // CaseDetailsFields.CASE_DETAILS_BUGZILLAS
40
42
  // );
41
- const { globalMetadataState: { pcmConfig }, } = useContext(GlobalMetadataStateContext);
42
43
  const caseSummaryViewConfig = getConfigField(pcmConfig.data, 'is_case_summary_view_active', PCM_CONFIG_FIELD_TYPE.STRING);
43
44
  const isCaseSummaryViewActive = caseSummaryViewConfig === '1';
44
45
  const { isExportingPDF, pdfOption } = useContext(PDFContext);
@@ -58,6 +59,7 @@ export function CaseDetailsTabs(props) {
58
59
  setActiveTabKey(tabIndex);
59
60
  setSelectedTab(tabsToRender[tabIndex].title);
60
61
  };
62
+ const isCaseHistoryEnabled = getConfigField(pcmConfig.data, 'isCaseHistoryEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
61
63
  tabsToRender.push({
62
64
  'data-tracking-id': 'case-details-discussion-tab',
63
65
  key: 'discussions',
@@ -111,7 +113,7 @@ export function CaseDetailsTabs(props) {
111
113
  routePath: 'escalation',
112
114
  component: (React.createElement(RMEEscalationList, { escalations: caseEscalations.data, caseNumber: caseNumber, caseStatus: status, accountNumber: loggedInUserRights.data.getAccountNumber(), isInternal: loggedInUserRights.data.isInternal() })),
113
115
  });
114
- false &&
116
+ isCaseHistoryEnabled &&
115
117
  !loggedInUsersAccount.data.secureSupport &&
116
118
  tabsToRender.push({
117
119
  'data-tracking-id': 'case-history-tab',
@@ -138,14 +140,26 @@ export function CaseDetailsTabs(props) {
138
140
  const tabIndex = tabsToRender.findIndex((item) => item.routePath === activeTab);
139
141
  return tabIndex > -1 ? tabIndex : activeTabKey;
140
142
  };
141
- const isTabVisibleInPdfExport = (tab) => tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced' ? false : true;
143
+ const isTabVisibleInPdfExport = (tab) => (tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced') ||
144
+ tab.title === CaseDetailsTabsEnum.HISTORY
145
+ ? false
146
+ : true;
142
147
  return (React.createElement("div", { className: "case-details-tabs", role: "region", ref: props.tabdRef },
143
- React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick, "aria-label": t('Case details tabs') }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, { className: tab.title === CaseDetailsTabsEnum.GENERATE_AI_CASE_SUMMARY
148
+ React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick, "aria-label": t('Case details tabs') }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, { className: tab.title === CaseDetailsTabsEnum.GENERATE_AI_CASE_SUMMARY ||
149
+ tab.title === CaseDetailsTabsEnum.HISTORY
144
150
  ? 'tab-title-with-badge'
145
151
  : undefined },
146
152
  React.createElement(Trans, null, tab.title),
147
153
  tab.title === CaseDetailsTabsEnum.GENERATE_AI_CASE_SUMMARY && (React.createElement("div", { className: "gradient-border-badge" },
148
- React.createElement(Label, { className: "preview-label" }, "Preview")))) })))),
154
+ React.createElement(Label, { className: "preview-label" }, "Preview"))),
155
+ tab.title === CaseDetailsTabsEnum.HISTORY && (React.createElement(Popover, { "aria-label": "Track support case evolution with case history", triggerAction: "hover", bodyContent: React.createElement(React.Fragment, null,
156
+ React.createElement("p", null, "Track support case evolution with case history"),
157
+ React.createElement("a", { href: "https://access.redhat.com/articles/7120652", target: "_blank", rel: "noreferrer" },
158
+ "Case history article",
159
+ ' ',
160
+ React.createElement("span", { style: { marginLeft: '0.25rem' } },
161
+ React.createElement(ExternalLinkAltIcon, null)))) },
162
+ React.createElement(InfoCircleIcon, { color: "gray" })))) })))),
149
163
  React.createElement("div", { className: "case-details-tabs-content pf-v5-u-pt-xl" }, tabsToRender.map((tab, index) => {
150
164
  return index === getActiveTabKey() && !isExportingPDF ? (React.createElement(TabContent, { eventKey: index, key: tab.key, id: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
151
165
  React.createElement(ErrorBoundary, { errorMsgInfo: {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAwB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBAyKxC,CAAC"}
1
+ {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAwB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBA6KxC,CAAC"}
@@ -83,7 +83,7 @@ export const CaseSummary = (props) => {
83
83
  React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizedHtml } })));
84
84
  };
85
85
  return (React.createElement("section", { className: "card card-white" },
86
- React.createElement(Alert, { variant: AlertVariant.info, title: "Case summary uses AI. Check for mistakes.", isInline: true, actionLinks: React.createElement(AlertActionLink, { onClick: (e) => triggerAppFeedbackItem(e), href: "#" },
86
+ React.createElement(Alert, { variant: AlertVariant.info, title: "Case summary uses AI. Check for mistakes.", isInline: true, actionLinks: React.createElement(AlertActionLink, { onClick: (e) => triggerAppFeedbackItem(e), href: "#", "data-tracking-id": "send-feedback-button" },
87
87
  React.createElement(Trans, null, "Send Feedback")) },
88
88
  React.createElement("p", null, "By using this feature, your support case information will be used to create an AI-generated summary of your cases. Information may not be up-to-date or without error. Always review AI generated content prior to use. We encourage you to send feedback to improve the case summary feature")),
89
89
  caseSummaryState === CaseSummaryStates.NEW_CASE ? (React.createElement(EmptyState, { variant: EmptyStateVariant.lg },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.5",
3
+ "version": "2.6.7",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -58,11 +58,11 @@
58
58
  "@progress/kendo-licensing": "1.3.5",
59
59
  "@progress/kendo-react-pdf": "^5.16.0",
60
60
  "@redux-devtools/extension": "^3.3.0",
61
- "@rh-support/components": "2.5.19",
62
- "@rh-support/react-context": "2.5.21",
61
+ "@rh-support/components": "2.5.20",
62
+ "@rh-support/react-context": "2.5.22",
63
63
  "@rh-support/types": "2.0.5",
64
- "@rh-support/user-permissions": "2.5.12",
65
- "@rh-support/utils": "2.5.11",
64
+ "@rh-support/user-permissions": "2.5.13",
65
+ "@rh-support/utils": "2.5.12",
66
66
  "@types/react-redux": "^7.1.33",
67
67
  "@types/redux": "^3.6.0",
68
68
  "date-fns": "3.6.0",
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "3ef51f921b5d5b256a9fd9b0525c27c1cf4ee2ae"
137
+ "gitHead": "223261f3803b043e58594a1cff1d85383169ff1d"
138
138
  }