@rh-support/troubleshoot 2.2.108 → 2.2.109
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/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +8 -1
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +14 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAkhBxC"}
|
|
@@ -34,6 +34,7 @@ import { PDFContext } from '../../PDFContainer';
|
|
|
34
34
|
import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
|
|
35
35
|
import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
|
|
36
36
|
export function PostComment(props) {
|
|
37
|
+
var _a;
|
|
37
38
|
const { t } = useTranslation();
|
|
38
39
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
39
40
|
let { caseNumber } = props;
|
|
@@ -77,8 +78,10 @@ export function PostComment(props) {
|
|
|
77
78
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
79
|
}, []);
|
|
79
80
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
81
|
+
const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
|
|
80
82
|
const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
|
|
81
83
|
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
84
|
+
const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
|
|
82
85
|
const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
|
|
83
86
|
caseNumber,
|
|
84
87
|
secureSupport: loggedInUsersAccount.data.secureSupport,
|
|
@@ -312,7 +315,10 @@ export function PostComment(props) {
|
|
|
312
315
|
let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
|
|
313
316
|
return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
|
|
314
317
|
};
|
|
315
|
-
const isSubmitDisabled = isReplyDisabled() ||
|
|
318
|
+
const isSubmitDisabled = isReplyDisabled() ||
|
|
319
|
+
isCommentEmpty ||
|
|
320
|
+
isPostCommentDisabled ||
|
|
321
|
+
(isConfirmedStateSideSupport && !cssCommentAgreed);
|
|
316
322
|
return (React.createElement("div", { className: `pf-v5-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
|
|
317
323
|
React.createElement(MarkdownEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic || !canPostPrivateComments
|
|
318
324
|
? 'Add a comment using markdown'
|
|
@@ -328,6 +334,7 @@ export function PostComment(props) {
|
|
|
328
334
|
isUploadingFile: isMarkdownFileUploadInProgress,
|
|
329
335
|
onClipboardPaste,
|
|
330
336
|
} }),
|
|
337
|
+
isConfirmedStateSideSupport && (React.createElement(Checkbox, { id: "css-case-comment-agreement", name: "css-case-comment-agreement", "data-tracking-id": "css-case-comment-agreement", className: "pf-v5-u-mt-md pf-v5-u-mb-xl", isRequired: true, label: t('I will not transmit controlled, unclassified information to or export it from the Red Hat Customer Portal.'), isChecked: cssCommentAgreed, onChange: (_, c) => setCssCommentAgreed(c) })),
|
|
331
338
|
isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-v5-l-flex post-comment-btn-group push-top-narrow" },
|
|
332
339
|
isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
333
340
|
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainSection.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/MainSection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MainSection.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/MainSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,UAAU,MAAM;IACZ,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC5C,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IACnD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,QAAA,MAAM,WAAW;;;CAoEhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
import { Alert } from '@patternfly/react-core';
|
|
1
2
|
import { ErrorBoundary, LoadingIndicator } from '@rh-support/components';
|
|
2
|
-
import
|
|
3
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
3
5
|
const defaultProps = {
|
|
4
6
|
isLoading: false,
|
|
5
7
|
};
|
|
6
8
|
const MainSection = (props) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
11
|
+
const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
|
|
7
12
|
return (React.createElement(ErrorBoundary, { isPageLevelError: true },
|
|
13
|
+
isConfirmedStateSideSupport && (React.createElement(Alert, { isInline: true, variant: "warning", title: "You have a confirmed stateside support account", className: "pf-v5-u-mb-lg" },
|
|
14
|
+
React.createElement("p", null,
|
|
15
|
+
"To adhere to data regulations, open this case through",
|
|
16
|
+
' ',
|
|
17
|
+
React.createElement("b", null,
|
|
18
|
+
React.createElement("a", { href: "https://css-redhat.zendesk.com", target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "stateside-support-link" }, "Confirmed Stateside Support")),
|
|
19
|
+
' ',
|
|
20
|
+
"instead of traditional support."))),
|
|
8
21
|
React.createElement("section", { id: `${props.section}-section`, tabIndex: -1, "aria-labelledby": `${props.section}-heading`, "aria-describedby": `${props.section}-description`, className: `main-step-content ${props.className ? props.className : ''}` },
|
|
9
22
|
React.createElement(LoadingIndicator, { show: props.isLoading, size: "lg" }),
|
|
10
23
|
!props.isLoading && (React.createElement(React.Fragment, null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.109",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
61
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
62
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
63
|
-
"@rh-support/components": "2.1.
|
|
64
|
-
"@rh-support/react-context": "2.1.
|
|
63
|
+
"@rh-support/components": "2.1.55",
|
|
64
|
+
"@rh-support/react-context": "2.1.61",
|
|
65
65
|
"@rh-support/types": "2.0.3",
|
|
66
66
|
"@rh-support/user-permissions": "2.1.39",
|
|
67
67
|
"@rh-support/utils": "2.1.29",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"defaults and supports es6-module",
|
|
132
132
|
"maintained node versions"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "78f502e76b6377132fe700672387f0da8f6d3dc3"
|
|
135
135
|
}
|