@rh-support/troubleshoot 0.2.115-beta.0 → 0.2.116
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/ConfirmationModals/ReopenCaseModal.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +14 -2
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +1 -0
- package/lib/esm/scss/_pf4-overrides.scss +1 -1
- package/package.json +9 -9
|
@@ -15,7 +15,7 @@ import React, { useState } from 'react';
|
|
|
15
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
16
16
|
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
17
17
|
const reasonWithDescription = ['Other'];
|
|
18
|
-
const reasonWithoutDescription = [
|
|
18
|
+
const reasonWithoutDescription = ['I am experiencing the same issue', 'My case has been closed prematurely'];
|
|
19
19
|
const reasonsList = [...reasonWithoutDescription, ...reasonWithDescription];
|
|
20
20
|
export function ReopenCaseModal(props) {
|
|
21
21
|
const { t } = useTranslation();
|
|
@@ -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;AAmB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,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,
|
|
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;AAmB1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,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,eAugBnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,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":"AAqCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,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,eAmdxC"}
|
|
@@ -70,6 +70,7 @@ export function PostComment(props) {
|
|
|
70
70
|
const [isCommentTooLong, setIsCommentTooLong] = useState(false);
|
|
71
71
|
const canEditCase = useCanEditCase();
|
|
72
72
|
const componentRef = useRef(null);
|
|
73
|
+
let passedReply = props.commentText;
|
|
73
74
|
const { getRootProps, getInputProps, open } = useDropzone({
|
|
74
75
|
onDrop: (files) => onFileAttach(files, isPublic),
|
|
75
76
|
multiple: false,
|
|
@@ -150,6 +151,12 @@ export function PostComment(props) {
|
|
|
150
151
|
useEffect(() => {
|
|
151
152
|
isPublicRef.current = isPublic;
|
|
152
153
|
}, [isPublic]);
|
|
154
|
+
useEffect(() => {
|
|
155
|
+
if (isCommentEmpty) {
|
|
156
|
+
props.onCommentClear && props.onCommentClear();
|
|
157
|
+
}
|
|
158
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
159
|
+
}, [commentText]);
|
|
153
160
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
154
161
|
const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
|
|
155
162
|
if (canEditCase.alert())
|
|
@@ -266,8 +273,13 @@ export function PostComment(props) {
|
|
|
266
273
|
const onBtnClick = () => {
|
|
267
274
|
setIsModalOpen(true);
|
|
268
275
|
};
|
|
269
|
-
//
|
|
276
|
+
// To check is commment is empty
|
|
270
277
|
const isCommentEmpty = isEmpty(commentText === null || commentText === void 0 ? void 0 : commentText.trim());
|
|
278
|
+
// To check is comment reply is empty and disable if it is
|
|
279
|
+
const isReplyDisabled = () => {
|
|
280
|
+
let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
|
|
281
|
+
return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
|
|
282
|
+
};
|
|
271
283
|
return (React.createElement("div", { className: "pf-u-mb-md hide-in-pdf", ref: componentRef },
|
|
272
284
|
React.createElement(MarkdownEditor, { className: `${!isPublic ? '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 ? 'Add a comment using markdown' : 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic ? 'Add a comment to this case' : 'Add a comment or attach a file privately', fileSelectorProps: {
|
|
273
285
|
showFileSelectorInToolbar: allowInlineImagesInMarkdown && !loggedInUsersAccount.data.secureSupport,
|
|
@@ -281,7 +293,7 @@ export function PostComment(props) {
|
|
|
281
293
|
} }),
|
|
282
294
|
isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-l-flex post-comment-btn-group push-top-narrow" },
|
|
283
295
|
isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
284
|
-
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isCommentEmpty || isPostCommentDisabled, className: "postcomment-submit" },
|
|
296
|
+
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isReplyDisabled() || isCommentEmpty || isPostCommentDisabled, className: "postcomment-submit" },
|
|
285
297
|
React.createElement(Trans, null, "Submit")),
|
|
286
298
|
canAddAttachments &&
|
|
287
299
|
(isPublic && canPostPrivateComments ? (React.createElement(Tooltip, { content: t('You can attach files privately') }, fileUploadButton)) : (fileUploadButton)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAgC,MAAM,sCAAsC,CAAC;AAE1G,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAWjF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACzC;AAQD,QAAA,MAAM,qBAAqB,cAAqB,MAAM,qEASrD,CAAC;AAeF,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAgC,MAAM,sCAAsC,CAAC;AAE1G,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAWjF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACzC;AAQD,QAAA,MAAM,qBAAqB,cAAqB,MAAM,qEASrD,CAAC;AAeF,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAmTzC;kBAnTQ,mBAAmB;;;AAsT5B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -162,6 +162,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
162
162
|
var _a, _b;
|
|
163
163
|
return ({
|
|
164
164
|
display_name: getDisplayNameForCluster(item),
|
|
165
|
+
external_cluster_id: item.external_cluster_id,
|
|
165
166
|
openshift_version: ((_b = (_a = item === null || item === void 0 ? void 0 : item.metrics) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.openshift_version) || '',
|
|
166
167
|
});
|
|
167
168
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.116",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.10.
|
|
29
|
+
"@cee-eng/hydrajs": "4.10.2",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.185.1",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react-virtualized": "^9.21.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@cee-eng/hydrajs": "4.10.
|
|
66
|
+
"@cee-eng/hydrajs": "4.10.2",
|
|
67
67
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
68
68
|
"@patternfly/patternfly": "4.185.1",
|
|
69
69
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -73,12 +73,12 @@
|
|
|
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/api": "0.3.21
|
|
77
|
-
"@rh-support/components": "1.1.69
|
|
78
|
-
"@rh-support/react-context": "0.2.
|
|
76
|
+
"@rh-support/api": "0.3.21",
|
|
77
|
+
"@rh-support/components": "1.1.69",
|
|
78
|
+
"@rh-support/react-context": "0.2.74",
|
|
79
79
|
"@rh-support/types": "0.2.0",
|
|
80
|
-
"@rh-support/user-permissions": "0.2.58
|
|
81
|
-
"@rh-support/utils": "0.2.43
|
|
80
|
+
"@rh-support/user-permissions": "0.2.58",
|
|
81
|
+
"@rh-support/utils": "0.2.43",
|
|
82
82
|
"@types/react-redux": "^7.1.12",
|
|
83
83
|
"@types/redux": "^3.6.0",
|
|
84
84
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "1b7928a0e111e756b4fe781c440d3c859299bebf"
|
|
147
147
|
}
|