@rh-support/troubleshoot 2.2.93 → 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';
@@ -1 +1 @@
1
- {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,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;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAqGnC;kBArGQ,aAAa;;;AAwGtB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,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;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAsGnC;kBAtGQ,aAAa;;;AAyGtB,eAAe,aAAa,CAAC"}
@@ -57,7 +57,7 @@ function OpenCaseIssue(props) {
57
57
  : 'get-support-summary', placeholder: t('i18nkeySummarizeExperience', "Please describe the problem you are facing, including any specific steps you've taken or error messages."), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
58
58
  ? 'get-support-title'
59
59
  : 'get-support-summary', rows: 6 }),
60
- React.createElement(Progress, { value: summary === null || summary === void 0 ? void 0 : summary.length, min: 0, max: SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, valueText: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.outside }))));
60
+ React.createElement(Progress, { value: summary === null || summary === void 0 ? void 0 : summary.length, min: 0, max: SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, valueText: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.outside, "aria-label": `Progress - ${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}` }))));
61
61
  }
62
62
  OpenCaseIssue.defaultProps = defaultProps;
63
63
  export default OpenCaseIssue;
@@ -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":"Hostname.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/Hostname.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,UAAU,MAAM;CAAG;AAEnB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAkDrC"}
1
+ {"version":3,"file":"Hostname.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/Hostname.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,UAAU,MAAM;CAAG;AAEnB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAyDrC"}
@@ -1,3 +1,4 @@
1
+ import { Button } from '@patternfly/react-core';
1
2
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
2
3
  import React, { useContext } from 'react';
3
4
  import { Trans, useTranslation } from 'react-i18next';
@@ -33,8 +34,7 @@ export function Hostname(props) {
33
34
  React.createElement("p", { className: "form-instructions" },
34
35
  React.createElement(Trans, { i18nKey: 'ChangeHostnamePrefLink' },
35
36
  "Hostname is ",
36
- React.createElement("strong", null, "private"),
37
+ React.createElement("span", { className: "form-instructions-bold" }, "private"),
37
38
  ". Red Hat does not have access to view hostnames unless you",
38
- ' ',
39
- React.createElement(Link, { to: '/manage/preferences' }, "choose to share")))));
39
+ React.createElement(Button, { className: "btn-choose-to-share", variant: "link", component: (props) => React.createElement(Link, Object.assign({}, props, { to: '/manage/preferences' })) }, "choose to share")))));
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SessionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAMnF,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,WAAW,EAAE,YAAY,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAwHxC"}
1
+ {"version":3,"file":"SessionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAMnF,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,WAAW,EAAE,YAAY,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBA0HxC"}
@@ -80,8 +80,8 @@ export function SessionItem(props) {
80
80
  askIfResolved && (React.createElement(React.Fragment, null,
81
81
  React.createElement("label", null,
82
82
  React.createElement(Trans, null, "Did you find a solution?")),
83
- React.createElement("button", { className: "btn btn-link btn-app", onClick: onResolve, disabled: isResolving, "data-tracking-id": "session-resolved-yes" }, isResolving ? React.createElement(LoadingIndicator, { isInline: true }) : React.createElement(OutlinedThumbsUpIcon, null)),
84
- React.createElement("button", { className: "btn btn-link btn-app", onClick: onUnResolve, "data-tracking-id": "session-resolved-no" },
83
+ React.createElement("button", { className: "btn btn-link btn-app", onClick: onResolve, disabled: isResolving, "data-tracking-id": "session-resolved-yes", "aria-label": "Thumbs up" }, isResolving ? React.createElement(LoadingIndicator, { isInline: true }) : React.createElement(OutlinedThumbsUpIcon, null)),
84
+ React.createElement("button", { className: "btn btn-link btn-app", onClick: onUnResolve, "data-tracking-id": "session-resolved-no", "aria-label": "Thumbs down" },
85
85
  React.createElement(OutlinedThumbsDownIcon, null)))),
86
86
  askToRestore && (React.createElement(React.Fragment, null,
87
87
  React.createElement("label", null,
@@ -13,7 +13,7 @@ export function SessionRestoreCard(props) {
13
13
  };
14
14
  if (dismissed || isEmpty(props.previousSessions))
15
15
  return React.createElement(React.Fragment, null);
16
- return (React.createElement(Alert, { variant: "custom", isInline: true, title: t('Restore a previous session'), actionClose: React.createElement(AlertActionCloseButton, { onClose: onCardDismiss }), component: "h3", className: "restore-session-alert" },
16
+ return (React.createElement(Alert, { variant: "custom", isInline: true, title: t('Restore a previous session'), actionClose: React.createElement(AlertActionCloseButton, { onClose: onCardDismiss }), component: "p", className: "restore-session-alert" },
17
17
  React.createElement("div", { className: "pf-v5-c-alert__description" },
18
18
  React.createElement("ul", { className: "restore-session-list" }, map(props.previousSessions, (sessionItem) => (React.createElement("li", { key: sessionItem.session.id },
19
19
  React.createElement(SessionItem, { onRestore: props.onRestore, sessionItem: sessionItem }))))))));
@@ -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;
@@ -956,3 +956,15 @@ svg.pf-v5-u-ml-xs.icon-size {
956
956
  background-color: var(--pf-v5-global--palette--black-600);
957
957
  border: 1px solid var(--pf-v5-global--palette--black-600);
958
958
  }
959
+
960
+ .form-group {
961
+ span.form-instructions-bold {
962
+ font-weight: 600;
963
+ }
964
+ a.pf-v5-c-button.pf-m-link.btn-choose-to-share {
965
+ --pf-v5-c-button--PaddingTop: var(--pf-v5-global--spacer--xs);
966
+ --pf-v5-c-button--PaddingRight: var(--pf-v5-global--spacer--xs);
967
+ --pf-v5-c-button--PaddingBottom: var(--pf-v5-global--spacer--xs);
968
+ --pf-v5-c-button--PaddingLeft: var(--pf-v5-global--spacer--xs);
969
+ }
970
+ }
@@ -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.93",
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": "860400c585c5440fafa0bdeeeed2bfbbf6e0fbd6"
134
+ "gitHead": "9428a86e921565225fd6ab7ee4ad358e29de43b3"
136
135
  }