@rh-support/troubleshoot 1.1.4 → 1.1.6
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/ActiveCustomerEscalation/RequestEscalationModal.js +1 -1
- package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +13 -3
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +2 -2
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +1 -1
- package/lib/esm/components/Recommendations/AlertToastWrapper.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AlertToastWrapper.js +10 -2
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +1 -1
- package/package.json +4 -4
|
@@ -126,7 +126,7 @@ export function RequestEscalationModal(props) {
|
|
|
126
126
|
t('Submit')),
|
|
127
127
|
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: createEscalationFetch.isFetching || isPostingComment || isUpdatingCase, "aria-label": t('Cancel') }, t('Cancel')),
|
|
128
128
|
];
|
|
129
|
-
const header = (React.createElement(Title, { id: "custom-header-label", headingLevel: "h1" },
|
|
129
|
+
const header = (React.createElement(Title, { className: "pf-u-mb-0", id: "custom-header-label", headingLevel: "h1" },
|
|
130
130
|
React.createElement(Trans, null, "Request an escalation"),
|
|
131
131
|
React.createElement(Popover, { showClose: false, position: 'top', hasAutoWidth: true, bodyContent: () => (React.createElement("a", { href: "/support/escalation", target: "_blank", "aria-label": t('Learn more about escalation cases.') },
|
|
132
132
|
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAYA,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,
|
|
1
|
+
{"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAYA,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,eAkGnC;kBAlGQ,aAAa;;;AAqGtB,eAAe,aAAa,CAAC"}
|
|
@@ -43,13 +43,23 @@ function OpenCaseIssue(props) {
|
|
|
43
43
|
limit: SUMMARY_LENGTH_LIMIT,
|
|
44
44
|
});
|
|
45
45
|
return (React.createElement(React.Fragment, null,
|
|
46
|
-
React.createElement(InlineEdit, { labelProps: {
|
|
46
|
+
React.createElement(InlineEdit, { labelProps: {
|
|
47
|
+
htmlFor: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
|
|
48
|
+
? 'get-support-title'
|
|
49
|
+
: 'get-support-summary',
|
|
50
|
+
}, labelContent: React.createElement(React.Fragment, null,
|
|
47
51
|
React.createElement(Trans, null, supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT ? 'Title' : 'Summary'),
|
|
48
52
|
' ',
|
|
49
53
|
!!props.required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: !!props.initialIsEditing, saveOnBlur: true, collapseOnBlur: !!props.collapseOnBlur && !isSummaryInValid, content: summary },
|
|
50
|
-
React.createElement("input", { type: "text", id:
|
|
54
|
+
React.createElement("input", { type: "text", id: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
|
|
55
|
+
? 'get-support-title'
|
|
56
|
+
: 'get-support-summary', className: `form-control${isSummaryInValid || hasLargeSummary || (showValidationErrorAlert && !summary)
|
|
51
57
|
? ' form-invalid'
|
|
52
|
-
: ''}`, "aria-invalid": isSummaryInValid, "aria-required": !!props.required, required: !!props.required, name:
|
|
58
|
+
: ''}`, "aria-invalid": isSummaryInValid, "aria-required": !!props.required, required: !!props.required, name: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
|
|
59
|
+
? 'get-support-title'
|
|
60
|
+
: 'get-support-summary', placeholder: t("Summarize what you're experiencing today"), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
|
|
61
|
+
? 'get-support-title'
|
|
62
|
+
: 'get-support-summary' })),
|
|
53
63
|
((_a = summary) === null || _a === void 0 ? void 0 : _a.length) > SUMMARY_LENGTH_LIMIT && (React.createElement("div", { className: "pull-top" },
|
|
54
64
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
55
65
|
React.createElement(Trans, null, maxLengthErrorMessage))))));
|
|
@@ -51,11 +51,11 @@ export default function CaseLanguageSelector(props) {
|
|
|
51
51
|
props.isManageStep,
|
|
52
52
|
]);
|
|
53
53
|
return (React.createElement("div", { className: "form-group" },
|
|
54
|
-
React.createElement("label", { htmlFor: "
|
|
54
|
+
React.createElement("label", { htmlFor: "get-support-language" },
|
|
55
55
|
React.createElement(Trans, null, "Preferred language"),
|
|
56
56
|
' ',
|
|
57
57
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
58
|
-
React.createElement(Select, { variant: SelectVariant.single, "aria-label": t(`Select a language`), onToggle: onToggle, onSelect: onLanguageChange, selections: caseLanguage, isOpen: isOpen, "aria-labelledby": '
|
|
58
|
+
React.createElement(Select, { variant: SelectVariant.single, "aria-label": t(`Select a language`), onToggle: onToggle, onSelect: onLanguageChange, selections: caseLanguage, isOpen: isOpen, "aria-labelledby": 'get-support-language', isDisabled: caseLanguages.isError, validated: caseLanguages.isError ? ValidatedOptions.error : ValidatedOptions.default }, caseLanguages.data.map((sla, index) => (React.createElement(SelectOption, { value: sla, key: index }, Constants.languagesMap[sla])))),
|
|
59
59
|
React.createElement("p", { className: "form-instructions" },
|
|
60
60
|
React.createElement(Trans, null, "Select a language for communicating with our support engineers."))));
|
|
61
61
|
}
|
|
@@ -105,7 +105,7 @@ function RHAssociatesSelector(props) {
|
|
|
105
105
|
if (!canNotifyRHAssociates)
|
|
106
106
|
return React.createElement(React.Fragment, null);
|
|
107
107
|
return (React.createElement(React.Fragment, null, canNotifyRHAssociates && (React.createElement("div", { className: "form-group" },
|
|
108
|
-
React.createElement("label", { htmlFor: "
|
|
108
|
+
React.createElement("label", { htmlFor: "get-support-notifications" },
|
|
109
109
|
React.createElement(Trans, null, "Red Hat associates")),
|
|
110
110
|
React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [], id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
|
|
111
111
|
internal: false,
|
|
@@ -115,7 +115,7 @@ function RHAssociatesSelector(props) {
|
|
|
115
115
|
React.createElement(Trans, null, "Add me as a watcher"))),
|
|
116
116
|
caseNumber && showRemoveWatchButton() && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
|
|
117
117
|
React.createElement(Tooltip, { trigger: 'mouseenter focus', reference: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
|
|
118
|
-
React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher" },
|
|
118
|
+
React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
|
|
119
119
|
React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-rh-watcher" },
|
|
120
120
|
React.createElement(Trans, null, "Remove me as a watcher")))))))));
|
|
121
121
|
}
|
|
@@ -246,7 +246,7 @@ function CaseContactSelector(props) {
|
|
|
246
246
|
if (!canSeeEmailNotifications)
|
|
247
247
|
return React.createElement(React.Fragment, null);
|
|
248
248
|
return (React.createElement("div", { className: "form-group" },
|
|
249
|
-
React.createElement("label", { htmlFor: "
|
|
249
|
+
React.createElement("label", { htmlFor: "get-support-notifications" },
|
|
250
250
|
React.createElement(Trans, null, "Send notifications")),
|
|
251
251
|
loggedInUserRights.data.isOrgAdmin() ? (React.createElement(React.Fragment, null,
|
|
252
252
|
React.createElement("div", { "data-tracking-id": "send-notification-listbox" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAUnE,UAAU,MAAM;IACZ,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,MAAM,CA8BjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
* We need to wrap Critical solution toast notification and Cluster recommendation toast notification so they don't get overlapped.
|
|
3
3
|
*/
|
|
4
4
|
import { AlertGroup } from '@patternfly/react-core';
|
|
5
|
-
import React, { useContext, useState } from 'react';
|
|
5
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
6
|
+
import { isUploadedAndAnalyzed } from '../../components/shared/fileUpload/reducer/AttachmentHelper';
|
|
6
7
|
import { RouteContext } from '../../context/RouteContext';
|
|
7
8
|
import { hideSideBarClusterIdRuleToast } from '../../reducers/RouteConstNTypes';
|
|
9
|
+
import { AttachmentStateContext } from '../shared/fileUpload';
|
|
8
10
|
import { ResubmitToast } from '../SubmitCase/ResubmitToast';
|
|
9
11
|
import ClusterRecommendationToast from './ClusterRecommendationToast';
|
|
10
12
|
import CriticalSolutionsToast from './CriticalSolutionsToast';
|
|
11
13
|
const AlertToastWrapper = ({ submitCaseAndNavigate }) => {
|
|
12
14
|
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
13
|
-
const hideClusterIdReportModal = hideSideBarClusterIdRuleToast.includes(activeSection);
|
|
14
15
|
const [isCriticalSolutionsVisible, setIsCriticalSolutionsVisible] = useState(true);
|
|
16
|
+
const { attachmentState } = useContext(AttachmentStateContext);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const isEveryFileFinished = attachmentState.caseFiles.selectedLocalFiles.every((file) => isUploadedAndAnalyzed(file));
|
|
19
|
+
isEveryFileFinished && setIsCriticalSolutionsVisible(true);
|
|
20
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
|
+
}, [attachmentState.caseFiles.selectedLocalFiles]);
|
|
22
|
+
const hideClusterIdReportModal = hideSideBarClusterIdRuleToast.includes(activeSection);
|
|
15
23
|
const userClosed = () => {
|
|
16
24
|
setIsCriticalSolutionsVisible(false);
|
|
17
25
|
};
|
|
@@ -11,7 +11,7 @@ function WidgetFileSelectorImage({ id = '', className = '', isSessionId, isPriva
|
|
|
11
11
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
12
12
|
const { getRootProps, getInputProps, isDragActive, inputRef, rejectedFiles } = useDropzone({
|
|
13
13
|
onDrop: onDrop(dispatchToAttachmentReducer, isSessionId, isPrivate),
|
|
14
|
-
accept: '
|
|
14
|
+
accept: ['.jpeg', '.png', '.jpg', '.gif'],
|
|
15
15
|
maxSize: MAX_SIZE,
|
|
16
16
|
});
|
|
17
17
|
const onLabelClick = (evt) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,8 +73,8 @@
|
|
|
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.3.
|
|
77
|
-
"@rh-support/react-context": "1.1.
|
|
76
|
+
"@rh-support/components": "1.3.1",
|
|
77
|
+
"@rh-support/react-context": "1.1.2",
|
|
78
78
|
"@rh-support/types": "0.2.1-beta.58",
|
|
79
79
|
"@rh-support/user-permissions": "1.1.0",
|
|
80
80
|
"@rh-support/utils": "1.0.10-beta.58",
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"not ie <= 11",
|
|
146
146
|
"not op_mini all"
|
|
147
147
|
],
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "8c85bdb8941ddb7070c5356a3c89c1c676c147fb"
|
|
149
149
|
}
|