@rh-support/troubleshoot 1.0.47-beta.32 → 1.0.47-beta.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +11 -11
- package/lib/esm/components/ProductSelector/{NewProductSelectSelector.d.ts → NewProductDropdownSelector.d.ts} +3 -2
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/{NewProductSelectSelector.js → NewProductDropdownSelector.js} +11 -5
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +5 -5
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +2 -2
- package/lib/esm/scss/_main.scss +11 -0
- package/package.json +7 -7
- package/lib/esm/components/ProductSelector/NewProductSelectSelector.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Card, CardBody, Gallery, GalleryItem, Stack, StackItem } from '@patternfly/react-core';
|
|
2
2
|
import { LoadingIndicator } from '@rh-support/components';
|
|
3
3
|
import { fetchCaseTypes, useGlobalDispatchContext, useGlobalStateContext } from '@rh-support/react-context';
|
|
4
|
-
import { haventLoadedMetadata, PreviousCaseTypes } from '@rh-support/utils';
|
|
4
|
+
import { haventLoadedMetadata, NewCaseTypes, PreviousCaseTypes } from '@rh-support/utils';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
6
|
import React, { useContext, useEffect, useState } from 'react';
|
|
7
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -58,55 +58,55 @@ export default function SupportTypeSelectorPage() {
|
|
|
58
58
|
id: 0,
|
|
59
59
|
icon: React.createElement(BugIcon, null),
|
|
60
60
|
oldSupportType: t(PreviousCaseTypes.DEFECT_BUG),
|
|
61
|
-
supportTypeHeading: t(
|
|
61
|
+
supportTypeHeading: t(NewCaseTypes.BUG_DEFECT),
|
|
62
62
|
supportTypeDescription: t('Report an issue with a product'),
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
id: 1,
|
|
66
66
|
icon: React.createElement(CertificationIcon, null),
|
|
67
67
|
oldSupportType: t(PreviousCaseTypes.CERTIFICATION),
|
|
68
|
-
supportTypeHeading: t(
|
|
68
|
+
supportTypeHeading: t(NewCaseTypes.CERTIFICATION),
|
|
69
69
|
supportTypeDescription: t('Hardware and software certification support'),
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: 2,
|
|
73
73
|
icon: React.createElement(GearIcon, null),
|
|
74
74
|
oldSupportType: t(PreviousCaseTypes.CONFIGURATION_ISSUE),
|
|
75
|
-
supportTypeHeading: t(
|
|
75
|
+
supportTypeHeading: t(NewCaseTypes.USAGE_DOCS_HELP),
|
|
76
76
|
supportTypeDescription: t('Set-up and configuration support'),
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: 3,
|
|
80
80
|
icon: React.createElement(CustomerServiceIcon, null),
|
|
81
81
|
oldSupportType: t(PreviousCaseTypes.ACCOUNT_CUSTOMERSERVICE_REQUEST),
|
|
82
|
-
supportTypeHeading: t(
|
|
82
|
+
supportTypeHeading: t(NewCaseTypes.CUSTOMER_SERVICE),
|
|
83
83
|
supportTypeDescription: t('Account, billing, or subscription support'),
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
id: 4,
|
|
87
87
|
icon: React.createElement(DocumentationIcon, null),
|
|
88
|
-
oldSupportType: t(PreviousCaseTypes.
|
|
89
|
-
supportTypeHeading: t(
|
|
90
|
-
supportTypeDescription: t('
|
|
88
|
+
oldSupportType: t(PreviousCaseTypes.USAGE_DOCUMENTATION_HELP),
|
|
89
|
+
supportTypeHeading: t(NewCaseTypes.USAGE_DOCS_HELP),
|
|
90
|
+
supportTypeDescription: t('Get product help, or log a content issue'),
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
id: 5,
|
|
94
94
|
icon: React.createElement(IdeaIcon, null),
|
|
95
95
|
oldSupportType: t(PreviousCaseTypes.FEATURE_ENHANCEMENT),
|
|
96
|
-
supportTypeHeading: t(
|
|
96
|
+
supportTypeHeading: t(NewCaseTypes.IDEA),
|
|
97
97
|
supportTypeDescription: t('Request a feature or product enhancement'),
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
id: 6,
|
|
101
101
|
icon: React.createElement(RcaIcon, null),
|
|
102
102
|
oldSupportType: t(PreviousCaseTypes.RCA_ONLY),
|
|
103
|
-
supportTypeHeading: t(
|
|
103
|
+
supportTypeHeading: t(NewCaseTypes.ROOT_CAUSE_ANALYSIS),
|
|
104
104
|
supportTypeDescription: t('Only for identifying the source of an issue'),
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
id: 7,
|
|
108
108
|
oldSupportType: t(PreviousCaseTypes.OTHER),
|
|
109
|
-
supportTypeHeading: t(
|
|
109
|
+
supportTypeHeading: t(NewCaseTypes.OTHER),
|
|
110
110
|
},
|
|
111
111
|
];
|
|
112
112
|
return (React.createElement("div", { className: "form-group" },
|
|
@@ -7,7 +7,8 @@ interface IProps {
|
|
|
7
7
|
onProductChange: (product: Partial<ISEProduct>) => any;
|
|
8
8
|
selectedProduct: Partial<ISEProduct>;
|
|
9
9
|
onVersionChange: (version: string) => any;
|
|
10
|
+
showValidationErrorAlert: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const
|
|
12
|
+
export declare const NewProductDropdownSelector: (props: IProps) => JSX.Element;
|
|
12
13
|
export {};
|
|
13
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=NewProductDropdownSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAIjE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,WAAW,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,wBAAwB,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,gBAmHvD,CAAC"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { Divider, Select, SelectGroup, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import isEmpty from 'lodash/isEmpty';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
export const NewProductDropdownSelector = (props) => {
|
|
4
5
|
const [isOpen, setIsOpen] = useState(false);
|
|
5
6
|
const [selected, setSelected] = useState('');
|
|
6
7
|
const [selectProductOptions, setSelectProductOptions] = React.useState([]);
|
|
7
8
|
const [selectTopProductOptions, setSelectTopProductOptions] = React.useState([]);
|
|
8
|
-
|
|
9
|
+
const [showValidationLocal, setShowValidationLocal] = useState(props.showValidationErrorAlert);
|
|
10
|
+
useEffect(() => {
|
|
9
11
|
if (props.selectedProduct) {
|
|
10
12
|
setSelected(props.selectedProduct.name);
|
|
11
13
|
}
|
|
12
14
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13
15
|
}, [props.selectedProduct]);
|
|
14
|
-
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setShowValidationLocal(props.showValidationErrorAlert);
|
|
18
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
+
}, [props.showValidationErrorAlert]);
|
|
20
|
+
useEffect(() => {
|
|
15
21
|
const renderProducts = () => {
|
|
16
22
|
let productArray = [];
|
|
17
23
|
props.products.forEach((product, index) => {
|
|
@@ -72,5 +78,5 @@ export const NewProductSelectSelector = (props) => {
|
|
|
72
78
|
}
|
|
73
79
|
};
|
|
74
80
|
const titleId = 'Product-selector';
|
|
75
|
-
return (React.createElement(Select, { variant: SelectVariant.single, onToggle: onToggle, onSelect: onSelect, isOpen: isOpen, placeholderText: "Search for or select a product", "aria-labelledby": titleId, onFilter: onFilter, isGrouped: true, hasInlineFilter: true, selections: selected }, options));
|
|
81
|
+
return (React.createElement(Select, { variant: SelectVariant.single, onToggle: onToggle, onSelect: onSelect, isOpen: isOpen, placeholderText: "Search for or select a product", "aria-labelledby": titleId, onFilter: onFilter, isGrouped: true, hasInlineFilter: true, selections: selected, validated: isEmpty(selected) && showValidationLocal ? 'error' : 'default' }, options));
|
|
76
82
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Select, SelectGroup, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2
2
|
import isEmpty from 'lodash/isEmpty';
|
|
3
|
-
import React, { useState } from 'react';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
4
|
export const NewProductVersionSelector = (props) => {
|
|
5
5
|
const [isOpen, setIsOpen] = useState(false);
|
|
6
6
|
const [selected, setSelected] = useState('');
|
|
7
7
|
const [selectVersionOptions, setSelectVersionOptions] = React.useState([]);
|
|
8
8
|
const [showValidationLocal, setShowValidationLocal] = useState(props.showValidationErrorAlert);
|
|
9
|
-
|
|
9
|
+
useEffect(() => {
|
|
10
10
|
setShowValidationLocal(props.showValidationErrorAlert);
|
|
11
11
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12
12
|
}, [props.showValidationErrorAlert]);
|
|
13
|
-
|
|
13
|
+
useEffect(() => {
|
|
14
14
|
if (isEmpty(props.selectedProduct)) {
|
|
15
15
|
setSelected('');
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ export const NewProductVersionSelector = (props) => {
|
|
|
19
19
|
}
|
|
20
20
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
21
|
}, [props.selectedProduct]);
|
|
22
|
-
|
|
22
|
+
useEffect(() => {
|
|
23
23
|
const renderVersions = () => {
|
|
24
24
|
let versionArray = [];
|
|
25
25
|
props.selectedProduct.versions.forEach((version, index) => {
|
|
@@ -42,7 +42,7 @@ export const NewProductVersionSelector = (props) => {
|
|
|
42
42
|
setSelected(selection);
|
|
43
43
|
setIsOpen(false);
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
useEffect(() => {
|
|
46
46
|
const versionValidator = () => {
|
|
47
47
|
const confirmMatchVersion = props.selectedProduct.versions.find((version) => version === props.versionState);
|
|
48
48
|
if (isEmpty(confirmMatchVersion)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAOD,QAAA,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAOD,QAAA,MAAM,8BAA8B,wEA+ClC,CAAC;AAEH,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
|
2
2
|
import React, { forwardRef, useContext } from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
import { RouteContext } from '../../context/RouteContext';
|
|
5
|
-
import {
|
|
5
|
+
import { NewProductDropdownSelector } from './NewProductDropdownSelector';
|
|
6
6
|
import { NewProductVersionSelector } from './NewProductVersionSelector';
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
disabled: false,
|
|
@@ -18,7 +18,7 @@ const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
|
18
18
|
React.createElement(Trans, null, "Product"),
|
|
19
19
|
' ',
|
|
20
20
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
21
|
-
React.createElement(
|
|
21
|
+
React.createElement(NewProductDropdownSelector, { products: props.products, allProducts: allProducts, onProductChange: props.onProductChange, selectedProduct: props.selectedProduct, onVersionChange: props.onVersionChange, showValidationErrorAlert: showValidationErrorAlert })),
|
|
22
22
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
23
23
|
React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
|
|
24
24
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -962,3 +962,14 @@ p.pref-case-popover-text {
|
|
|
962
962
|
margin: 0 5px 0 0;
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
|
+
|
|
966
|
+
.support-type-section {
|
|
967
|
+
.support-types-card {
|
|
968
|
+
.support-types-card-body {
|
|
969
|
+
.support-types-card-split {
|
|
970
|
+
display: flex;
|
|
971
|
+
align-items: center;
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.47-beta.
|
|
3
|
+
"version": "1.0.47-beta.33",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.264.0",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/components": "1.2.22-beta.
|
|
77
|
-
"@rh-support/react-context": "1.0.30-beta.
|
|
78
|
-
"@rh-support/types": "0.2.1-beta.
|
|
79
|
-
"@rh-support/user-permissions": "1.0.12-beta.
|
|
80
|
-
"@rh-support/utils": "1.0.10-beta.
|
|
76
|
+
"@rh-support/components": "1.2.22-beta.33",
|
|
77
|
+
"@rh-support/react-context": "1.0.30-beta.33",
|
|
78
|
+
"@rh-support/types": "0.2.1-beta.33",
|
|
79
|
+
"@rh-support/user-permissions": "1.0.12-beta.33",
|
|
80
|
+
"@rh-support/utils": "1.0.10-beta.33",
|
|
81
81
|
"@types/react-redux": "^7.1.12",
|
|
82
82
|
"@types/redux": "^3.6.0",
|
|
83
83
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"not ie <= 11",
|
|
146
146
|
"not op_mini all"
|
|
147
147
|
],
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "c3fb875701950cd1d42175d1d526af01c1398ecf"
|
|
149
149
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NewProductSelectSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductSelectSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAGjE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,WAAW,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;CAC7C;AAED,eAAO,MAAM,wBAAwB,UAAW,MAAM,gBA2GrD,CAAC"}
|