@rh-support/troubleshoot 2.7.46 → 2.7.49
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/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +15 -0
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +7 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +7 -0
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +17 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +7 -1
- package/lib/esm/context/CaseDetailsPageContext.d.ts.map +1 -1
- package/lib/esm/css/case.css +21 -0
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +7 -6
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAuBvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAUvE,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAClF,eAAO,MAAM,wCAAwC,yBAAyB,CAAC;AAE/E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,E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AO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAqehB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -184,9 +184,24 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
184
184
|
'h6',
|
|
185
185
|
'span',
|
|
186
186
|
'pre',
|
|
187
|
+
'code',
|
|
187
188
|
'blockquote',
|
|
188
189
|
'sub',
|
|
189
190
|
'sup',
|
|
191
|
+
'div',
|
|
192
|
+
'b',
|
|
193
|
+
'i',
|
|
194
|
+
'hr',
|
|
195
|
+
'table',
|
|
196
|
+
'thead',
|
|
197
|
+
'tbody',
|
|
198
|
+
'tfoot',
|
|
199
|
+
'tr',
|
|
200
|
+
'th',
|
|
201
|
+
'td',
|
|
202
|
+
'caption',
|
|
203
|
+
'colgroup',
|
|
204
|
+
'col',
|
|
190
205
|
]);
|
|
191
206
|
const escapeNonQuillTags = (html) => html.replace(/<(\/?)([\w-]+)([^>]*)>/g, (match, slash, tag, attrs) => QUILL_TAGS.has(tag.toLowerCase()) ? match : `<${slash}${tag}${attrs}>`);
|
|
192
207
|
const sanitizeHtml = (html) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FileLister.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/FileLister.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAwB1B,OAAO,EAAiB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGxE,eAAO,MAAM,qBAAqB,2FAAyC,CAAC;AAiB5E,UAAU,MAAM;IACZ,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,UAAU,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACtG,YAAY,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAqS/C"}
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
import { Trans, useTranslation } from 'react-i18next';
|
|
12
12
|
import { useCaseSelector } from '../../../context/CaseContext';
|
|
13
13
|
import { ATTACHMENT_DESCRIPTION_LENGTH_LIMIT } from '../../../reducers/CaseConstNTypes';
|
|
14
|
-
import { isAnalysingFile, isAnalysisFailed, isFileDeleted, isUploadAborted, isUploadedAndAnalysisFailed, isUploadedAndAnalysisSkipped, isUploadedAndAnalyzed, isUploadFailed, isUploading, isUploadingAttachment, isUploadingOnCase, isUploadingOnSession, isUploadOnTrack, isVerifyingUpload, shouldHideDescription, shouldShowUploadProgressIndicator, } from './reducer/AttachmentHelper';
|
|
14
|
+
import { canShowUploadRetry, isAnalysingFile, isAnalysisFailed, isFileDeleted, isUploadAborted, isUploadedAndAnalysisFailed, isUploadedAndAnalysisSkipped, isUploadedAndAnalyzed, isUploadFailed, isUploading, isUploadingAttachment, isUploadingOnCase, isUploadingOnSession, isUploadOnTrack, isVerifyingUpload, shouldHideDescription, shouldShowUploadProgressIndicator, } from './reducer/AttachmentHelper';
|
|
15
15
|
import { FileStatusHelper } from './reducer/FileStatusHelper';
|
|
16
16
|
export const CaseDiagnosticsStatus = pcm.preCase.diag.CaseDiagnosticsStatus;
|
|
17
17
|
const analysisSteps = [
|
|
@@ -117,7 +117,8 @@ export default function FileLister(props) {
|
|
|
117
117
|
!shouldHideDescription(localFile, props.isSessionId) &&
|
|
118
118
|
((_a = localFile === null || localFile === void 0 ? void 0 : localFile.description) === null || _a === void 0 ? void 0 : _a.length) > 1 && (React.createElement("span", { className: "character-counter text-muted" }, 255 - ((_b = localFile.description) === null || _b === void 0 ? void 0 : _b.length))),
|
|
119
119
|
(isUploadFailed(localFile.uploadProgress.uploadStatus) ||
|
|
120
|
-
isUploadAborted(localFile.uploadProgress.uploadStatus)) &&
|
|
120
|
+
isUploadAborted(localFile.uploadProgress.uploadStatus)) &&
|
|
121
|
+
canShowUploadRetry(localFile, props.isSessionId) && (React.createElement("button", { type: "button", "aria-label": "Failed to upload, Retry", title: "Failed to upload, Retry", className: "btn btn-link btn-xs", "data-tracking-id": "file-lister-retry", onClick: onRetry(index) },
|
|
121
122
|
React.createElement(HistoryIcon, null))),
|
|
122
123
|
!isVerifyingUpload(localFile.uploadProgress.uploadStatus) &&
|
|
123
124
|
!isAnalysingFile(localFile.analysisMetadata.analysisStatus) && (React.createElement(React.Fragment, null,
|
|
@@ -137,9 +138,10 @@ export default function FileLister(props) {
|
|
|
137
138
|
React.createElement(Trans, null, "Try analyzing again.")))),
|
|
138
139
|
isUploadFailed(localFile.uploadProgress.uploadStatus) && (React.createElement("span", { className: "text-danger" },
|
|
139
140
|
React.createElement(Trans, null, "Upload failed. Please try again."),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
React.createElement(
|
|
141
|
+
canShowUploadRetry(localFile, props.isSessionId) && (React.createElement(React.Fragment, null,
|
|
142
|
+
' ',
|
|
143
|
+
React.createElement(Button, { onClick: onRetry(index), isInline: true, variant: ButtonVariant.link, "data-tracking-id": "upload-fail-try-again" },
|
|
144
|
+
React.createElement(Trans, null, "Try again"))))))));
|
|
143
145
|
})),
|
|
144
146
|
props.showSlowUploadMsg && isUploadingAttachment(props.selectedLocalFiles) && (React.createElement("span", { className: "text-muted" },
|
|
145
147
|
React.createElement(Trans, null, "We detected you are on a slow internet connection. This might take a while depending on the file size."))))));
|
|
@@ -25,6 +25,13 @@ export declare const isUploadComplete: (status: string) => status is UploadStatu
|
|
|
25
25
|
export declare const isUploadFailed: (status: string) => status is UploadStatusConstants.uploadOnCaseFailed | UploadStatusConstants.uploadOnSessionFailed;
|
|
26
26
|
export declare const isUploadAborted: (status: string) => status is UploadStatusConstants.aborted;
|
|
27
27
|
export declare const isFileDeleted: (status: string) => status is UploadStatusConstants.deleted;
|
|
28
|
+
/** True when local resume state still has a non-empty Hydra/S3 presigned URL (single PUT or multipart). */
|
|
29
|
+
export declare const hasRetryablePresignedUrl: (localFile: IFileLocal) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Session uploads do not use Hydra resume URLs — always allow retry.
|
|
32
|
+
* Case uploads only allow retry while we still have a local presigned URL (lost on refresh / remount).
|
|
33
|
+
*/
|
|
34
|
+
export declare const canShowUploadRetry: (localFile: IFileLocal, isSessionId?: boolean) => boolean;
|
|
28
35
|
export declare const hasUploadedSomeAttachments: (selectedLocalFiles: IFileLocal[]) => boolean;
|
|
29
36
|
export declare const hasAnalysedSomeAttachments: (selectedLocalFiles: IFileLocal[]) => boolean;
|
|
30
37
|
export declare const hasSomeUnUploadedAttachments: (selectedLocalFiles: IFileLocal[]) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,OAAO,EACH,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,OAAO,EACH,iBAAiB,EAYpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACH,uBAAuB,EAEvB,6BAA6B,EAK7B,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,eAAe,EAMf,qBAAqB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,MAAM,GACd,6BAA6B,6BAA6B,EAAE,aAAa,OAAO,EAAE,mBAAiB,MACnG,eAAe,IAAI,EAAE,SAkDrB,CAAC;AAiBN,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,uDAAwD,CAAC;AAC5G,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,oDAAqD,CAAC;AACtG,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,mDAAoD,CAAC;AACpG,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,2DAA4D,CAAC;AACpH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,wDAAyD,CAAC;AAC9G,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,wDAAyD,CAAC;AAC9G,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,kGACiC,CAAC;AACxF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,mDAAoD,CAAC;AACxG,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,0DAA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AC7C,QAAQ,KAAA,EACR,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,iBAAiB,EAChC,gBAAgB,CAAC,EAAE,MAAM,iBA4E5B;AAED,wBAAsB,uBAAuB,CAAC,QAAQ,KAAA,EAAE,SAAS,EAAE,MAAM,iBAgDxE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,WAEvE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,WAKzD;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,UAAU,KAAG,OAShE,CAAC;AAKF,eAAO,MAAM,2BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,oBAAoB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAQ,SASvC,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Config, pcm, sessionAttachments } from '@cee-eng/hydrajs';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, markCaseAttachmentUploadFailed, markCaseAttachmentUploadInProgress, MultipartUploadError, pollAttachmentUploadStatus, pollContentVersionStatus, uploadCaseAttachment, } from '@rh-support/utils';
|
|
12
|
+
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, markCaseAttachmentUploadFailed, markCaseAttachmentUploadInProgress, MultipartUploadError, pollAttachmentUploadStatus, pollContentVersionStatus, uploadCaseAttachment, USER_ABORTED_REQUEST_DESCRIPTION, } from '@rh-support/utils';
|
|
13
13
|
import find from 'lodash/find';
|
|
14
14
|
import includes from 'lodash/includes';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -95,6 +95,20 @@ export const isUploadComplete = (status) => isSessionUploadComplete(status) || i
|
|
|
95
95
|
export const isUploadFailed = (status) => isCaseUploadFailed(status) || isSessionUploadFailed(status);
|
|
96
96
|
export const isUploadAborted = (status) => status === UploadStatusConstants.aborted;
|
|
97
97
|
export const isFileDeleted = (status) => status === UploadStatusConstants.deleted;
|
|
98
|
+
/** True when local resume state still has a non-empty Hydra/S3 presigned URL (single PUT or multipart). */
|
|
99
|
+
export const hasRetryablePresignedUrl = (localFile) => {
|
|
100
|
+
var _a, _b, _c;
|
|
101
|
+
const singleUrl = (_b = (_a = localFile.uploadProgress.singlePutResumeState) === null || _a === void 0 ? void 0 : _a.presignedUrl) === null || _b === void 0 ? void 0 : _b.trim();
|
|
102
|
+
if (singleUrl)
|
|
103
|
+
return true;
|
|
104
|
+
const parts = (_c = localFile.uploadProgress.multipartResumeState) === null || _c === void 0 ? void 0 : _c.parts;
|
|
105
|
+
return Boolean(parts === null || parts === void 0 ? void 0 : parts.some((part) => { var _a; return Boolean((_a = part.presignedUrl) === null || _a === void 0 ? void 0 : _a.trim()); }));
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Session uploads do not use Hydra resume URLs — always allow retry.
|
|
109
|
+
* Case uploads only allow retry while we still have a local presigned URL (lost on refresh / remount).
|
|
110
|
+
*/
|
|
111
|
+
export const canShowUploadRetry = (localFile, isSessionId) => Boolean(isSessionId) || hasRetryablePresignedUrl(localFile);
|
|
98
112
|
export const hasUploadedSomeAttachments = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => isUploadComplete(localFile.uploadProgress.uploadStatus)));
|
|
99
113
|
export const hasAnalysedSomeAttachments = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => isAnalysisComplete(localFile.analysisMetadata.analysisStatus)));
|
|
100
114
|
export const hasSomeUnUploadedAttachments = (selectedLocalFiles) => !isEmpty(find(selectedLocalFiles, (localFile) => !isUploading(localFile.uploadProgress.uploadStatus) &&
|
|
@@ -451,6 +465,7 @@ needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient
|
|
|
451
465
|
const isUserAbort = userAborted || (error === null || error === void 0 ? void 0 : error.message) === 'Request aborted by user';
|
|
452
466
|
const attachmentIdFromError = (error instanceof MultipartUploadError && ((_d = error.resumeData) === null || _d === void 0 ? void 0 : _d.attachmentId)) ||
|
|
453
467
|
(error instanceof CaseAttachmentUploadError && error.attachmentId) ||
|
|
468
|
+
localFile.attachmentId ||
|
|
454
469
|
undefined;
|
|
455
470
|
if (attachmentIdFromError) {
|
|
456
471
|
updateAttachmentIdForFile(dispatch, attachmentIdFromError, index);
|
|
@@ -460,7 +475,7 @@ needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient
|
|
|
460
475
|
// Mark Failed in SFDC so status is not stuck at In Progress while nothing uploads.
|
|
461
476
|
// Keep resume state (SINGLE_PUT URL / MULTIPART parts) so Retry can continue.
|
|
462
477
|
if (!isSessionId && attachmentIdFromError && apolloClient && caseSalesforceId) {
|
|
463
|
-
void markCaseAttachmentUploadFailed(apolloClient, idToUploadTo, attachmentIdFromError);
|
|
478
|
+
void markCaseAttachmentUploadFailed(apolloClient, idToUploadTo, attachmentIdFromError, USER_ABORTED_REQUEST_DESCRIPTION);
|
|
464
479
|
}
|
|
465
480
|
const multipartResume = error instanceof MultipartUploadError ? error.resumeData : undefined;
|
|
466
481
|
const singlePutResume = error instanceof CaseAttachmentUploadError ? error.resumeData : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAiBnF,OAAO,EACH,UAAU,EAKb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAiBnF,OAAO,EACH,UAAU,EAKb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCAoKjB,MAAM;gCAYA,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBA9GzD,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BAyK3B,MAAM;kCAzEN,MAAM;EAiHhD"}
|
|
@@ -121,7 +121,13 @@ export function useFileUploader(props) {
|
|
|
121
121
|
prevSelectedFiles &&
|
|
122
122
|
selectedLocalFiles &&
|
|
123
123
|
selectedLocalFiles.length > prevSelectedFiles.length) {
|
|
124
|
-
|
|
124
|
+
// Skip server-restored Failed/In Progress stubs (empty File placeholders) —
|
|
125
|
+
// only auto-upload when the user actually selected file bytes.
|
|
126
|
+
const newlyAddedOriginals = caseFilesRef.current.selectedOriginalFiles.slice(prevSelectedFiles.length);
|
|
127
|
+
const hasUploadableNewFile = newlyAddedOriginals.some((file) => Boolean(file === null || file === void 0 ? void 0 : file.size));
|
|
128
|
+
if (hasUploadableNewFile) {
|
|
129
|
+
debouncedAutoUploadOnSelect();
|
|
130
|
+
}
|
|
125
131
|
}
|
|
126
132
|
}, [autoUploadOnSelect, debouncedAutoUploadOnSelect, prevSelectedFiles, selectedLocalFiles]);
|
|
127
133
|
const updateSessionAttachmentMetadata = useCallback((file, changes) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsPageContext.d.ts","sourceRoot":"","sources":["../../../src/context/CaseDetailsPageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EAEH,8BAA8B,EAC9B,cAAc,EAEjB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC1B,oBAAoB,EAAE,cAAc,CAAC;CACxC;AAMD,eAAO,MAAM,uBAAuB,8BAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseDetailsPageContext.d.ts","sourceRoot":"","sources":["../../../src/context/CaseDetailsPageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EAEH,8BAA8B,EAC9B,cAAc,EAEjB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC1B,oBAAoB,EAAE,cAAc,CAAC;CACxC;AAMD,eAAO,MAAM,uBAAuB,8BAA2C,CAAC;AAEhF,eAAO,MAAM,0BAA0B,+CAA6C,CAAC;AACrF,eAAO,MAAM,8BAA8B,qBAA4C,CAAC;AACxF,eAAO,MAAM,iCAAiC,sCAA+C,CAAC;AAE9F,wBAAgB,8BAA8B,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAO1D"}
|
package/lib/esm/css/case.css
CHANGED
|
@@ -687,6 +687,27 @@ input[aria-invalid='true'].pf-v6-c-form-control {
|
|
|
687
687
|
margin-top: 0;
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
+
.comment-richtext table {
|
|
691
|
+
width: 100%;
|
|
692
|
+
border-collapse: collapse;
|
|
693
|
+
margin: 0.5rem 0 1rem;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.comment-richtext th,
|
|
697
|
+
.comment-richtext td {
|
|
698
|
+
border: 1px solid #d2d2d2;
|
|
699
|
+
padding: 0.5rem 0.75rem;
|
|
700
|
+
vertical-align: top;
|
|
701
|
+
text-align: left;
|
|
702
|
+
word-break: normal;
|
|
703
|
+
overflow-wrap: normal;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.comment-richtext th {
|
|
707
|
+
font-weight: 600;
|
|
708
|
+
background-color: #f5f5f5;
|
|
709
|
+
}
|
|
710
|
+
|
|
690
711
|
.comment-body ul ul,
|
|
691
712
|
.comment-body ol ol,
|
|
692
713
|
.comment-body ul ol,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useS3Upload.d.ts","sourceRoot":"","sources":["../../../src/hooks/useS3Upload.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useS3Upload.d.ts","sourceRoot":"","sources":["../../../src/hooks/useS3Upload.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EAQpB,MAAM,mBAAmB,CAAC;AAU3B,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,MAAM;gEA0BpG;QACC,IAAI,EAAE,IAAI,CAAC;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;KAC7D;;EAkEJ"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { ToastNotification } from '@rh-support/components';
|
|
11
11
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
12
|
-
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, markCaseAttachmentUploadFailed, MultipartUploadError, pollAttachmentUploadStatus, uploadCaseAttachment, } from '@rh-support/utils';
|
|
12
|
+
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, markCaseAttachmentUploadFailed, MultipartUploadError, pollAttachmentUploadStatus, uploadCaseAttachment, USER_ABORTED_REQUEST_DESCRIPTION, } from '@rh-support/utils';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
// TODO: Re-enable when Hydra/GraphQL attachment APIs support secure support again
|
|
15
15
|
// Previously: useS3Upload(idToUploadTo, isSecureSupport) and passed isSecureSupport into uploadAttachmentS3
|
|
@@ -55,15 +55,16 @@ export function useS3Upload(caseNumber, apolloClient, caseSalesforceId) {
|
|
|
55
55
|
return attachmentId;
|
|
56
56
|
}
|
|
57
57
|
catch (error) {
|
|
58
|
-
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
58
|
+
const isUserAbort = error.message === 'Request aborted by user';
|
|
61
59
|
//mark ContentVersion as Failed in SCT so it does not stay "In Progress".
|
|
62
60
|
const attachmentIdFromError = (error instanceof MultipartUploadError && ((_c = error.resumeData) === null || _c === void 0 ? void 0 : _c.attachmentId)) ||
|
|
63
61
|
(error instanceof CaseAttachmentUploadError && error.attachmentId) ||
|
|
64
62
|
undefined;
|
|
65
|
-
if (attachmentIdFromError && apolloClient &&
|
|
66
|
-
void markCaseAttachmentUploadFailed(apolloClient, caseNumber, attachmentIdFromError, error === null || error === void 0 ? void 0 : error.message);
|
|
63
|
+
if (attachmentIdFromError && apolloClient && caseNumber) {
|
|
64
|
+
void markCaseAttachmentUploadFailed(apolloClient, caseNumber, attachmentIdFromError, isUserAbort ? USER_ABORTED_REQUEST_DESCRIPTION : error === null || error === void 0 ? void 0 : error.message);
|
|
65
|
+
}
|
|
66
|
+
if (isUserAbort) {
|
|
67
|
+
return;
|
|
67
68
|
}
|
|
68
69
|
throw error;
|
|
69
70
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.49",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@progress/kendo-licensing": "1.3.5",
|
|
53
53
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
54
54
|
"@redux-devtools/extension": "^3.3.0",
|
|
55
|
-
"@rh-support/components": "2.6.
|
|
56
|
-
"@rh-support/react-context": "2.6.
|
|
55
|
+
"@rh-support/components": "2.6.42",
|
|
56
|
+
"@rh-support/react-context": "2.6.44",
|
|
57
57
|
"@rh-support/types": "2.0.31",
|
|
58
|
-
"@rh-support/user-permissions": "2.6.
|
|
59
|
-
"@rh-support/utils": "2.6.
|
|
58
|
+
"@rh-support/user-permissions": "2.6.39",
|
|
59
|
+
"@rh-support/utils": "2.6.38",
|
|
60
60
|
"@types/react-redux": "^7.1.33",
|
|
61
61
|
"@types/redux": "^3.6.0",
|
|
62
62
|
"date-fns": "3.6.0",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"defaults and supports es6-module",
|
|
130
130
|
"maintained node versions"
|
|
131
131
|
],
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "4cb4cda4f8cac6f148aafddcde78bebcbbe65e81"
|
|
133
133
|
}
|