@rh-support/troubleshoot 1.0.8 → 1.0.10
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/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +7 -3
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -2
- package/lib/esm/components/Suggestions/Suggestions.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +5 -3
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA2QrC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -10,12 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Alert, AlertVariant } from '@patternfly/react-core';
|
|
11
11
|
import { AlertMessage, AlertType, Dropdown, ToastNotification, usePrevious } from '@rh-support/components';
|
|
12
12
|
import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
|
|
13
|
-
import { haventLoadedMetadata, toOption, toOptions } from '@rh-support/utils';
|
|
13
|
+
import { getUniqueSortedVersions, haventLoadedMetadata, toOption, toOptions, } from '@rh-support/utils';
|
|
14
14
|
import filter from 'lodash/filter';
|
|
15
15
|
import findIndex from 'lodash/findIndex';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import isEqual from 'lodash/isEqual';
|
|
18
|
-
import uniq from 'lodash/uniq';
|
|
19
18
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
20
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
21
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
@@ -192,6 +191,11 @@ function ProductNVersion(props) {
|
|
|
192
191
|
}, [caseDispatch, product]);
|
|
193
192
|
// To check if version in invalid
|
|
194
193
|
const checkIfVersionIsInvalid = isVersionInvalid && isEmpty(selectedVersionLocal);
|
|
194
|
+
const versionsListMemo = useMemo(() => {
|
|
195
|
+
return getUniqueSortedVersions(versions);
|
|
196
|
+
}, [versions]);
|
|
197
|
+
// Versions List
|
|
198
|
+
const versionsList = toOptions(versionsListMemo);
|
|
195
199
|
return (React.createElement(React.Fragment, null,
|
|
196
200
|
React.createElement(AlertMessage, { show: !allProducts.isFetching && allProducts.isError, title: t('There was an error loading products.'), variant: AlertType.DANGER }),
|
|
197
201
|
isEmpty(selectedVersionLocal) && (selectedVersionLocal === null || selectedVersionLocal === void 0 ? void 0 : selectedVersionLocal.length) < 2 && (React.createElement(Alert, { isInline: true, className: "pf-u-mb-md", variant: AlertVariant.danger, title: React.createElement(Trans, null, "Please clear the errors to change the product on your case") })),
|
|
@@ -211,6 +215,6 @@ function ProductNVersion(props) {
|
|
|
211
215
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
212
216
|
React.createElement("label", { htmlFor: "version-dropdown" },
|
|
213
217
|
React.createElement(Trans, null, "Version")),
|
|
214
|
-
React.createElement(Dropdown, { className: "open-case-version", id: "version-dropdown", selectedItem: toOption(selectedVersionLocal), list:
|
|
218
|
+
React.createElement(Dropdown, { className: "open-case-version", id: "version-dropdown", selectedItem: toOption(selectedVersionLocal), list: versionsList, title: t(`Select a version`), isInValid: checkIfVersionIsInvalid, disabled: isVersionUpdating || (allProducts.isFetching && !allProducts.isError), onChange: onVersionChange, isLoadingList: isVersionUpdating, "data-tracking-id": "case-details-version-selector" }))))));
|
|
215
219
|
}
|
|
216
220
|
export default ProductNVersion;
|
|
@@ -133,11 +133,10 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
133
133
|
!topContent.isFetching &&
|
|
134
134
|
topContent.data.length !== 0 && (React.createElement("button", { className: "btn btn-bordered-blue btn-slim pull-top-narrow push-bottom-narrow", "data-tracking-id": "suggested-fixes-trigger", onClick: toggleTCModal, type: "button" },
|
|
135
135
|
React.createElement(Trans, null, "Suggested fixes"))),
|
|
136
|
-
props.loadTCOnChange && !topContent.isFetching && topContent.data.length !== 0 && (React.createElement(Modal, { className: "feedback-modal", title: t('Suggested fixes'), "aria-describedby": "Feedback Form", isOpen: isModalOpen, variant: ModalVariant.large, onClose: toggleTCModal, actions: [
|
|
136
|
+
props.loadTCOnChange && !topContent.isFetching && topContent.data.length !== 0 && (React.createElement(Modal, { className: "feedback-modal", title: t('Suggested fixes'), description: t('There are new updates to suggested fixes after changing your product.'), "aria-describedby": "Feedback Form", isOpen: isModalOpen, variant: ModalVariant.large, onClose: toggleTCModal, actions: [
|
|
137
137
|
React.createElement("button", { key: "cancel", onClick: toggleTCModal, className: "btn btn-app btn-primary" },
|
|
138
138
|
React.createElement(Trans, null, "Cancel")),
|
|
139
139
|
] },
|
|
140
|
-
React.createElement("p", { className: "push-bottom" }, "There are new updates to suggested fixes after changing your product."),
|
|
141
140
|
React.createElement(Suggestions, { showMax: 6 })))));
|
|
142
141
|
});
|
|
143
142
|
AllProductsSelector.defaultProps = defaultProps;
|
|
@@ -40,8 +40,8 @@ export default function Suggestions(props) {
|
|
|
40
40
|
(_b = accordionRef.current) === null || _b === void 0 ? void 0 : _b.collapseAll();
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
return (React.createElement(
|
|
44
|
-
!isTCSearchEnabled && (React.createElement("p", { className: "
|
|
43
|
+
return (React.createElement("div", null,
|
|
44
|
+
!isTCSearchEnabled && (React.createElement("p", { className: "pf-u-mb-sm" },
|
|
45
45
|
React.createElement(Trans, null, "Here are some common suggestions:"))),
|
|
46
46
|
isTCSearchEnabled && (React.createElement(TopContentSearch, { topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true })),
|
|
47
47
|
React.createElement("pfe-accordion", { ref: accordionRef }, map(filteredTC.slice(0, maxTC), (sug, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAuCA,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAuCA,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA+YxD"}
|
|
@@ -193,10 +193,12 @@ export default function UpdateSeverityModal(props) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
catch (e) {
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
onClose();
|
|
197
|
+
yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
|
|
198
|
+
severity: caseDetails.caseSeverity,
|
|
198
199
|
});
|
|
199
|
-
|
|
200
|
+
setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
|
|
201
|
+
reUpdateSeverity(caseDetails.caseSeverity);
|
|
200
202
|
caseUpdateError.showError(e, t('Severity failed to update'));
|
|
201
203
|
}
|
|
202
204
|
finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.202.16",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/components": "1.2.
|
|
77
|
-
"@rh-support/react-context": "1.0.
|
|
76
|
+
"@rh-support/components": "1.2.6",
|
|
77
|
+
"@rh-support/react-context": "1.0.7",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
|
-
"@rh-support/user-permissions": "1.0.
|
|
80
|
-
"@rh-support/utils": "1.0.
|
|
79
|
+
"@rh-support/user-permissions": "1.0.6",
|
|
80
|
+
"@rh-support/utils": "1.0.4",
|
|
81
81
|
"@types/react-redux": "^7.1.12",
|
|
82
82
|
"@types/redux": "^3.6.0",
|
|
83
83
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "ed558b84b303574cb44630c9fd651416280deb98"
|
|
146
146
|
}
|