@rh-support/troubleshoot 2.2.85 → 2.2.87
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/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -11
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +2 -13
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -0
- package/lib/esm/css/productSelector.css +3 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAoB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAwCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBA4iBnD"}
|
|
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { caseAttachments } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Alert } from '@patternfly/react-core';
|
|
12
11
|
import { AlertMessage, AlertType, Dropdown, ErrorBoundary, LoadingIndicator, MultiSelectDropDownList, ToastNotification, } from '@rh-support/components';
|
|
13
12
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
14
13
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
@@ -42,7 +41,6 @@ let cellMeasureCache = new CellMeasurerCache({
|
|
|
42
41
|
defaultHeight: 100,
|
|
43
42
|
});
|
|
44
43
|
export default function CaseDiscussion(props) {
|
|
45
|
-
var _a;
|
|
46
44
|
const { t } = useTranslation();
|
|
47
45
|
const { isPostingRemoteRequestCommentCompleted, screenSessionRequested } = useCaseSelector((state) => ({
|
|
48
46
|
isPostingRemoteRequestCommentCompleted: state.isPostingRemoteRequestCommentCompleted,
|
|
@@ -55,7 +53,7 @@ export default function CaseDiscussion(props) {
|
|
|
55
53
|
(urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.chatId));
|
|
56
54
|
const activeDiscussionElementRef = useRef(null);
|
|
57
55
|
const { sort, discussionFiltersListState, allDiscussions, replyCommentText, replyCommentCreator } = useCaseDiscussionTabStateContext();
|
|
58
|
-
const { globalMetadataState: { loggedInUsersAccount,
|
|
56
|
+
const { globalMetadataState: { loggedInUsersAccount, navBarRef }, } = useGlobalStateContext();
|
|
59
57
|
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
60
58
|
const caseDispatch = useCaseDispatch();
|
|
61
59
|
const { caseDetailsPageState: { caseFeedbacksHydra, caseAttachmentHydra, caseExternalTrackersUpdate }, } = useCaseDetailsPageStateContext();
|
|
@@ -330,14 +328,6 @@ export default function CaseDiscussion(props) {
|
|
|
330
328
|
}, [isPostingRemoteRequestCommentCompleted]);
|
|
331
329
|
return (React.createElement(React.Fragment, null,
|
|
332
330
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading post comment section') } },
|
|
333
|
-
((_a = loggedInUserRights === null || loggedInUserRights === void 0 ? void 0 : loggedInUserRights.data) === null || _a === void 0 ? void 0 : _a.isInternal()) && (React.createElement(Alert, { variant: "warning", isInline: true, title: t('Critical reminder'), className: "pf-v5-u-mb-md" },
|
|
334
|
-
React.createElement("p", null,
|
|
335
|
-
React.createElement(Trans, null,
|
|
336
|
-
"Before posting any comments to a case ",
|
|
337
|
-
React.createElement("b", null, "confirm"),
|
|
338
|
-
" that your content and the case screen are for the ",
|
|
339
|
-
React.createElement("b", null, "correct"),
|
|
340
|
-
" customer case. This avoids accidental breaches of customer contracts and confidentiality obligations.")))),
|
|
341
331
|
React.createElement(AttachmentContextProvider, null,
|
|
342
332
|
React.createElement(PostComment, { caseNumber: caseNumber, allDiscussions: allDiscussions, onCommentAdded: onCommentAdded, onAttachmentAdded: onAttachmentAdded, commentText: replyCommentText, onCommentClear: resetReplyComment, commentCreator: replyCommentCreator, defaultIsPublic: replyingToPrivateComment === null ? replyingToPrivateComment : !replyingToPrivateComment }))),
|
|
343
333
|
React.createElement(LoadingIndicator, { className: "text-center", isInline: true, show: caseAttachmentHydra.isFetching ||
|
|
@@ -1 +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;AAMpE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBAuGvD,CAAC"}
|
|
@@ -4,17 +4,12 @@ import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
6
|
import React, { useContext, useEffect, useState } from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
9
|
-
const isProductSupportedForCustomer = (productName, productResults) => {
|
|
10
|
-
const foundItem = productResults.filter((item) => item.name === productName)[0];
|
|
11
|
-
return foundItem ? foundItem.supportedForCustomer : false;
|
|
12
|
-
};
|
|
13
9
|
export const NewProductDropdownSelector = (props) => {
|
|
14
10
|
const { t } = useTranslation();
|
|
15
11
|
const [isOpen, setIsOpen] = useState(false);
|
|
16
12
|
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
17
|
-
const [isSelectedProductSupportedForCustomer, setIsSelectedProductSupportedForCustomer] = useState(true);
|
|
18
13
|
const { product } = useCaseSelector((state) => ({
|
|
19
14
|
product: state.caseDetails.product,
|
|
20
15
|
}), isEqual);
|
|
@@ -64,15 +59,9 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
64
59
|
setIsOpen(false);
|
|
65
60
|
return;
|
|
66
61
|
}
|
|
67
|
-
selection &&
|
|
68
|
-
setIsSelectedProductSupportedForCustomer(isProductSupportedForCustomer(selection, allProducts.data.productsResult));
|
|
69
62
|
props.onProductChange(selection);
|
|
70
63
|
setIsOpen(false);
|
|
71
64
|
};
|
|
72
65
|
return (React.createElement("div", null,
|
|
73
|
-
React.createElement(Select, { variant: SelectVariant.typeahead, typeAheadAriaLabel: t('Search for or select a product'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Search for or select a product'), "aria-labelledby": t('Product-selector'), onFilter: onFilter, selections: product, validated: isEmpty(product) && showValidationLocal ? 'error' : 'default', "data-tracking-id": "get-support-product-dropdown-selector" }, getOptions())
|
|
74
|
-
!isSelectedProductSupportedForCustomer && (React.createElement("div", { className: "pf-v5-u-ml-xs pf-v5-u-mt-sm" },
|
|
75
|
-
React.createElement(Trans, null, "Red Hat must confirm your subscription status before providing support."),
|
|
76
|
-
React.createElement("br", null),
|
|
77
|
-
React.createElement(Trans, null, "We'll contact you if we have question.")))));
|
|
66
|
+
React.createElement(Select, { variant: SelectVariant.typeahead, typeAheadAriaLabel: t('Search for or select a product'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Search for or select a product'), "aria-labelledby": t('Product-selector'), onFilter: onFilter, selections: product, validated: isEmpty(product) && showValidationLocal ? 'error' : 'default', "data-tracking-id": "get-support-product-dropdown-selector" }, getOptions())));
|
|
78
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAQ,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAQ,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAmU/C"}
|
|
@@ -78,6 +78,7 @@ export default function SubmitCase(props) {
|
|
|
78
78
|
const onRemoteRiderClose = () => {
|
|
79
79
|
setIsRemoteRiderBannerVisible(false);
|
|
80
80
|
};
|
|
81
|
+
// conditions to show Remote Rider banner
|
|
81
82
|
const showRemoteRiderBanner = isRemoteRiderBannerVisible &&
|
|
82
83
|
!loggedInUser.data.isInternal &&
|
|
83
84
|
showRemoteRiderTermsInline &&
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
.all-product-selector-dropdown {
|
|
66
66
|
-ms-flex-direction: row;
|
|
67
67
|
flex-direction: row;
|
|
68
|
-
-ms-flex-align:
|
|
69
|
-
align-items:
|
|
68
|
+
-ms-flex-align: baseline;
|
|
69
|
+
align-items: baseline;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.all-product-selector-dropdown > * {
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
-ms-flex: 0 0 31%;
|
|
88
88
|
flex: 0 0 31%;
|
|
89
89
|
-ms-flex-item-align: center;
|
|
90
|
+
align-self: center;
|
|
90
91
|
margin-left: auto;
|
|
91
92
|
}
|
|
92
93
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.87",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"defaults and supports es6-module",
|
|
133
133
|
"maintained node versions"
|
|
134
134
|
],
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "77a16a73843997304f58e22ff3fa0b436c2a7344"
|
|
136
136
|
}
|