@rh-support/troubleshoot 2.2.94 → 2.2.95

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.
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
11
  import { Button, ButtonVariant, Checkbox, Modal } from '@patternfly/react-core';
12
12
  import { Select, SelectOption } from '@patternfly/react-core/deprecated';
13
- import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
13
+ import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
14
14
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
15
15
  import { ToastNotification, useFetch } from '@rh-support/components';
16
16
  import React, { useEffect, useState } from 'react';
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
11
  import { Button, ButtonVariant, Checkbox, Modal } from '@patternfly/react-core';
12
12
  import { Select, SelectOption } from '@patternfly/react-core/deprecated';
13
- import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
13
+ import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
14
14
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
15
15
  import { ToastNotification, useFetch } from '@rh-support/components';
16
16
  import React, { useEffect, useState } from 'react';
@@ -64,7 +64,7 @@ export default function CaseSbrGroups() {
64
64
  }
65
65
  });
66
66
  return (React.createElement("div", { className: "form-group" },
67
- React.createElement("label", { htmlFor: "case-sbr-groups-selector" },
68
- React.createElement(Trans, null, "SBR Groups")),
69
- React.createElement(Typeahead, { id: "case-sbr-groups-selector", multiple: true, options: caseSbrGroups.data ? toOptions(caseSbrGroups.data) : [], selected: sbrGroups ? toOptions(sbrGroups) : [], placeholder: t(`Select SBRs`), onChange: onCaseSbrGroupsChange, disabled: isSbrGroupsUpdating, isLoading: isSbrGroupsUpdating, "data-tracking-id": "case-sbr-groups-selector" })));
67
+ React.createElement("label", { className: "react-typeahead-label-wrapper", htmlFor: "case-sbr-groups-selector" },
68
+ React.createElement(Trans, null, "SBR Groups"),
69
+ React.createElement(Typeahead, { id: "case-sbr-groups-selector", multiple: true, options: caseSbrGroups.data ? toOptions(caseSbrGroups.data) : [], selected: sbrGroups ? toOptions(sbrGroups) : [], placeholder: t(`Select SBRs`), onChange: onCaseSbrGroupsChange, disabled: isSbrGroupsUpdating, isLoading: isSbrGroupsUpdating, "data-tracking-id": "case-sbr-groups-selector" }))));
70
70
  }
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { Badge, EmptyState, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Pagination, SearchInput, ToggleGroup, ToggleGroupItem, } from '@patternfly/react-core';
11
- import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
11
+ import CubesIcon from '@patternfly/react-icons/dist/js/icons/cubes-icon';
12
12
  import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
13
13
  import isEqual from 'lodash/isEqual';
14
14
  import React, { useEffect, useState } from 'react';
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
11
  import { Button, ButtonVariant, Checkbox, Modal } from '@patternfly/react-core';
12
12
  import { Select, SelectOption } from '@patternfly/react-core/deprecated';
13
- import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
13
+ import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
14
14
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
15
15
  import { useFetch } from '@rh-support/components';
16
16
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA+DzC;kBA/DQ,mBAAmB;;;AAkE5B,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAsEzC;kBAtEQ,mBAAmB;;;AAyE5B,eAAe,mBAAmB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Card, CardBody, CardHeader, CardTitle } from '@patternfly/react-core';
2
2
  import { ErrorBoundary, LoadingDots } from '@rh-support/components';
3
+ import { PreviousCaseTypes } from '@rh-support/utils';
3
4
  import isEmpty from 'lodash/isEmpty';
4
5
  import isEqual from 'lodash/isEqual';
5
6
  import React, { useContext } from 'react';
@@ -8,6 +9,7 @@ import { useCaseSelector } from '../../context/CaseContext';
8
9
  import { TCStateContext } from '../../context/TopContentContext';
9
10
  import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
10
11
  import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
12
+ import InsightsResults from '../Recommendations/InsightsResults';
11
13
  import Suggestions from '../Suggestions/Suggestions';
12
14
  const defaultProps = {
13
15
  initialIsEditing: false,
@@ -20,14 +22,16 @@ function TroubleshootSection(props) {
20
22
  var _a;
21
23
  const { t } = useTranslation();
22
24
  const { topContentState: { topContent }, } = useContext(TCStateContext);
23
- const { product, version, summary, isCreatingCase } = useCaseSelector((state) => ({
25
+ const { product, version, summary, isCreatingCase, caseType } = useCaseSelector((state) => ({
24
26
  product: state.caseDetails.product,
25
27
  version: state.caseDetails.version,
26
28
  summary: state.caseDetails.summary,
27
29
  isCreatingCase: state.isCreatingCase,
30
+ caseType: state.caseDetails.caseType,
28
31
  }), isEqual);
29
32
  const canShowTopProducts = isEmpty(product);
30
33
  const canShowTopContent = !canShowTopProducts && ((_a = topContent === null || topContent === void 0 ? void 0 : topContent.data) === null || _a === void 0 ? void 0 : _a.length) > 0;
34
+ const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
31
35
  return (React.createElement(React.Fragment, null,
32
36
  React.createElement("section", null,
33
37
  React.createElement("header", null,
@@ -49,7 +53,8 @@ function TroubleshootSection(props) {
49
53
  React.createElement(CardBody, { "aria-label": t('No recommendations for this product'), className: "file-recs-no-recommendation pf-v5-u-mt-md" },
50
54
  React.createElement(Trans, null, "No recommendations for this product")))),
51
55
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } }, canShowTopContent && !isEmpty(version) && React.createElement(Suggestions, null)),
52
- !isCreatingCase && React.createElement(ClusterRecommendations, { className: "pf-v5-u-mt-lg" }))));
56
+ !isCreatingCase && React.createElement(ClusterRecommendations, { className: "pf-v5-u-mt-lg" })),
57
+ React.createElement("section", { className: "pf-v5-u-mt-lg" }, isNotAnIdea && (React.createElement(InsightsResults, { isDisplayOnMain: true, "data-tracking-id": "troubleshoot-section-file-recs" })))));
53
58
  }
54
59
  TroubleshootSection.defaultProps = defaultProps;
55
60
  export default TroubleshootSection;
@@ -698,4 +698,7 @@ label.react-typeahead-label-wrapper {
698
698
  .rbt-token.rbt-token-removeable {
699
699
  color: var(--pf-v5-global--palette--blue-400);
700
700
  }
701
+ .rbt-token.rbt-token-removeable.rbt-token-active {
702
+ color: #ffffff;
703
+ }
701
704
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.94",
3
+ "version": "2.2.95",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -11,7 +11,6 @@
11
11
  },
12
12
  "main": "lib/esm/index.js",
13
13
  "module": "lib/esm/index.js",
14
- "jsnext:main": "lib/esm/index.js",
15
14
  "types": "lib/esm/index.d.ts",
16
15
  "repository": {
17
16
  "type": "git",
@@ -61,11 +60,11 @@
61
60
  "@progress/kendo-licensing": "1.3.5",
62
61
  "@progress/kendo-react-pdf": "^5.16.0",
63
62
  "@redux-devtools/extension": "^3.3.0",
64
- "@rh-support/components": "2.1.49",
65
- "@rh-support/react-context": "2.1.55",
63
+ "@rh-support/components": "2.1.50",
64
+ "@rh-support/react-context": "2.1.56",
66
65
  "@rh-support/types": "2.0.3",
67
- "@rh-support/user-permissions": "2.1.36",
68
- "@rh-support/utils": "2.1.26",
66
+ "@rh-support/user-permissions": "2.1.37",
67
+ "@rh-support/utils": "2.1.27",
69
68
  "@types/react-redux": "^7.1.33",
70
69
  "@types/redux": "^3.6.0",
71
70
  "dompurify": "^2.2.6",
@@ -132,5 +131,5 @@
132
131
  "defaults and supports es6-module",
133
132
  "maintained node versions"
134
133
  ],
135
- "gitHead": "2b9a94184155a1387fa8b5f6c1a97259e7f00378"
134
+ "gitHead": "9428a86e921565225fd6ab7ee4ad358e29de43b3"
136
135
  }