@rh-support/troubleshoot 2.6.357 → 2.6.361
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/AccountInfo/OwnerSelector.js +5 -5
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +16 -6
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +11 -7
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -0
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +19 -8
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +23 -19
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +7 -5
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +7 -5
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +6 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +8 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +6 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +41 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +11 -11
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +1 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +5 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +33 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +6 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +210 -35
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +11 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +5 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +2 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +4 -11
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +6 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +1 -0
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +6 -2
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseLabels.js +21 -16
- package/lib/esm/components/CaseInformation/Fts.js +2 -2
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +16 -15
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +52 -21
- package/lib/esm/components/CaseManagement/Cep.js +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +1 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +6 -12
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +4 -2
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +4 -2
- package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
- package/lib/esm/components/EditDescription/EditDescription.js +3 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +11 -3
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +52 -46
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +126 -54
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +6 -3
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +2 -1
- package/lib/esm/css/case.css +154 -8
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +5 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +6 -1
- package/lib/esm/hooks/useCaseComments/index.d.ts +2 -1
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/types.d.ts +8 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +12 -3
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +84 -9
- package/lib/esm/hooks/useCaseHistory.d.ts +2 -2
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseHistory.js +16 -7
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +2 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +21 -28
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +9 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +103 -16
- package/lib/esm/models/caseHistory.d.ts +6 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +2 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +26 -4
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +5 -3
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +6 -2
- package/lib/esm/utils/caseHistoryUtils.d.ts +19 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseHistoryUtils.js +31 -0
- package/lib/esm/utils/linkifyHtmlTextNodes.d.ts +8 -0
- package/lib/esm/utils/linkifyHtmlTextNodes.d.ts.map +1 -0
- package/lib/esm/utils/linkifyHtmlTextNodes.js +37 -0
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAqBxE,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAqBxE,wBAAgB,sBAAsB,sBAmZrC"}
|
|
@@ -55,6 +55,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
55
55
|
const [isClusterIdUpdating, setIsClusterIdUpdating] = useState(false);
|
|
56
56
|
const [isReasonUpdating, setIsReasonUpdating] = useState(false);
|
|
57
57
|
const [displayName, setDisplayName] = useState('');
|
|
58
|
+
const [localReasonExplanation, setLocalReasonExplanation] = useState('');
|
|
58
59
|
const previousLocalOpenshiftClusterIDState = usePrevious(localOpenshiftClusterIDState);
|
|
59
60
|
const previousSelectedReason = usePrevious(selectedReason);
|
|
60
61
|
const previousProduct = usePrevious(product);
|
|
@@ -99,6 +100,9 @@ export function CaseOpenshiftClusterId() {
|
|
|
99
100
|
]);
|
|
100
101
|
const resolvedNoClusterIdReason = resolvedNoClusterFields.reason;
|
|
101
102
|
const resolvedNoClusterIdReasonExplanation = resolvedNoClusterFields.explanation;
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
setLocalReasonExplanation(resolvedNoClusterIdReasonExplanation || '');
|
|
105
|
+
}, [resolvedNoClusterIdReasonExplanation]);
|
|
102
106
|
const shouldShowNoClusterReasonSelector = resolvedNoClusterIdReasonExplanation !== 'v3-cluster' &&
|
|
103
107
|
(clusterDropdownId === 'dont-have-id' || dontKnowSelected);
|
|
104
108
|
const clusterStateReset = () => {
|
|
@@ -206,7 +210,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
206
210
|
setLocalOpenshiftClusterIDState(previousLocalOpenshiftClusterIDState);
|
|
207
211
|
if (showToast) {
|
|
208
212
|
setIsClusterIdUpdating(false);
|
|
209
|
-
caseUpdateError.
|
|
213
|
+
caseUpdateError.showFieldError(e, t('OpenShift Cluster ID'), () => clusterIdUpdate(caseDetails, showToast));
|
|
210
214
|
}
|
|
211
215
|
}
|
|
212
216
|
});
|
|
@@ -264,9 +268,9 @@ export function CaseOpenshiftClusterId() {
|
|
|
264
268
|
const clusterIdDropdownFormInstructions = () => {
|
|
265
269
|
const errorMessage = isClusterIdInvalid
|
|
266
270
|
? isInvalidErrorMessage()
|
|
267
|
-
: isEmpty(clusterDropdownId)
|
|
268
|
-
?
|
|
269
|
-
:
|
|
271
|
+
: isEmpty(clusterDropdownId)
|
|
272
|
+
? discoverV4ClusterIdLinkError()
|
|
273
|
+
: null;
|
|
270
274
|
const infoMessage = isDedicatedV3() ? v3Message() : discoverV4ClusterIdLink();
|
|
271
275
|
return errorMessage ? errorMessage : infoMessage;
|
|
272
276
|
};
|
|
@@ -308,7 +312,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
308
312
|
setIsReasonUpdating(false);
|
|
309
313
|
});
|
|
310
314
|
const isInVaidNoClusterIdReason = isEmpty(resolvedNoClusterIdReason) ||
|
|
311
|
-
(resolvedNoClusterIdReason === 'Other' && isEmpty((
|
|
315
|
+
(resolvedNoClusterIdReason === 'Other' && isEmpty((localReasonExplanation || '').trim()));
|
|
312
316
|
if (!showClusterId || isFetchingCaseDetails) {
|
|
313
317
|
return null;
|
|
314
318
|
}
|
|
@@ -317,12 +321,8 @@ export function CaseOpenshiftClusterId() {
|
|
|
317
321
|
}
|
|
318
322
|
else {
|
|
319
323
|
return (React.createElement(React.Fragment, null,
|
|
320
|
-
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName, setOpenshiftDisplayName: onDisplayNameChange, openshiftClusterIDState: clusterDropdownId || '', onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: isEmpty(clusterDropdownId) ||
|
|
321
|
-
|
|
322
|
-
clusterDropdownId === 'v3-cluster'
|
|
323
|
-
? false
|
|
324
|
-
: isClusterIdInvalid, clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isV3: product === 'OpenShift Container Platform', isDisabled: isClusterIdUpdating || isCaseReadOnly, noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '' }),
|
|
325
|
-
shouldShowNoClusterReasonSelector && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '', noClusterIdReason: resolvedNoClusterIdReason || '', onReasonInputBoxBlur: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating || isCaseReadOnly })),
|
|
324
|
+
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName, setOpenshiftDisplayName: onDisplayNameChange, openshiftClusterIDState: clusterDropdownId || '', onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: isClusterIdInvalid || isEmpty(clusterDropdownId), clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isDisabled: isClusterIdUpdating || isCaseReadOnly, noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '' }),
|
|
325
|
+
shouldShowNoClusterReasonSelector && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '', noClusterIdReason: resolvedNoClusterIdReason || '', onReasonInputBoxChanged: setLocalReasonExplanation, onReasonInputBoxBlur: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating || isCaseReadOnly })),
|
|
326
326
|
React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
|
|
327
327
|
}
|
|
328
328
|
}
|
|
@@ -44,7 +44,7 @@ export function CaseContactPhoneNumberAlert(props) {
|
|
|
44
44
|
}
|
|
45
45
|
catch (e) {
|
|
46
46
|
setCasUpdating(false);
|
|
47
|
-
caseUpdateError.
|
|
47
|
+
caseUpdateError.showFieldError(e, t('Phone number'), () => onCaseDetailsChange(caseDetails));
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
const goToPhoneField = () => {
|
|
@@ -70,7 +70,7 @@ export default function CaseReferenceNumber(props) {
|
|
|
70
70
|
setIsUpdating(false);
|
|
71
71
|
}
|
|
72
72
|
catch (e) {
|
|
73
|
-
caseUpdateError.
|
|
73
|
+
caseUpdateError.showFieldError(e, t('Personal reference number'), updateReferenceNumber);
|
|
74
74
|
setIsUpdating(false);
|
|
75
75
|
throw e;
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSbrGroups.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseSbrGroups.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,MAAM,CAAC,OAAO,UAAU,aAAa,sBAqEpC"}
|
|
@@ -18,9 +18,11 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
18
18
|
import { Typeahead } from 'react-bootstrap-typeahead';
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
21
|
+
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
21
22
|
import { setCaseDetails } from '../../../../reducers/CaseReducer';
|
|
22
23
|
export default function CaseSbrGroups() {
|
|
23
24
|
const { t } = useTranslation();
|
|
25
|
+
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
24
26
|
const { caseDetails } = useCaseSelector((state) => ({
|
|
25
27
|
caseDetails: {
|
|
26
28
|
sbrGroups: state.caseDetails.sbrGroups,
|
|
@@ -60,7 +62,7 @@ export default function CaseSbrGroups() {
|
|
|
60
62
|
}
|
|
61
63
|
catch (e) {
|
|
62
64
|
setIsSbrGroupsUpdating(false);
|
|
63
|
-
|
|
65
|
+
caseUpdateError.showFieldError(e, t('SBR Groups'), () => onCaseSbrGroupsChange(selection));
|
|
64
66
|
}
|
|
65
67
|
});
|
|
66
68
|
return (React.createElement("div", { className: "form-group" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA2CA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAehF,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA2CA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAehF,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBAobrC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -173,12 +173,7 @@ function ProductNVersion(props) {
|
|
|
173
173
|
setInputValue(product);
|
|
174
174
|
setIsProductUpdating(false);
|
|
175
175
|
setIsVersionUpdating(false);
|
|
176
|
-
|
|
177
|
-
caseUpdateError.showError(e, t('Version failed to update'));
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
caseUpdateError.showError(e, t('Your product failed to update'));
|
|
181
|
-
}
|
|
176
|
+
caseUpdateError.showFieldError(e, onlyVersionChanged ? t('Version') : t('Product'), () => updateProductVerstion(selectedProduct, selectedVersion));
|
|
182
177
|
}
|
|
183
178
|
});
|
|
184
179
|
// To check if version in invalid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCustomEmails.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAwB,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"useCustomEmails.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAwB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAavE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM;+BA4ED,MAAM;+BArCN,MAAM,UAAU,MAAM,IAAI;;;;;8CAbX,MAAM;EAmGhE"}
|
|
@@ -18,11 +18,13 @@ import isEqual from 'lodash/isEqual';
|
|
|
18
18
|
import React, { useContext, useEffect } from 'react';
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
21
|
+
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
21
22
|
import { getCustomNotificationEmails, updateEmailListState } from '../../../../reducers/CaseReducer';
|
|
22
23
|
import { AddCustomEmailToAccount } from '../../../CaseManagement/SendNotifications/AddCustomEmailToAccountModal';
|
|
23
24
|
import { PDFContext } from '../../PDFContainer';
|
|
24
25
|
export function useCustomEmails(props) {
|
|
25
26
|
const { t } = useTranslation();
|
|
27
|
+
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
26
28
|
const { caseNumber } = props;
|
|
27
29
|
const { globalMetadataState: { managedAccounts, accountCustomEmails }, } = useContext(GlobalMetadataStateContext);
|
|
28
30
|
const canManageAccountCustomEmails = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_ACCOUNT_CUSTOM_EMAILS);
|
|
@@ -72,7 +74,7 @@ export function useCustomEmails(props) {
|
|
|
72
74
|
updateEmailListState(caseDispatch, lowerCaseEmailVal, customEmailsList, updateEmailInstruction);
|
|
73
75
|
}
|
|
74
76
|
catch (e) {
|
|
75
|
-
|
|
77
|
+
caseUpdateError.showFieldError(e, t('Notification email'), () => addCustomEmail(emailVal, onAdd, skipAccountCheck));
|
|
76
78
|
}
|
|
77
79
|
});
|
|
78
80
|
const deleteCustomEmail = (email) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -87,7 +89,7 @@ export function useCustomEmails(props) {
|
|
|
87
89
|
updateEmailListState(caseDispatch, email, customEmailsList, updateEmailInstruction);
|
|
88
90
|
}
|
|
89
91
|
catch (e) {
|
|
90
|
-
|
|
92
|
+
caseUpdateError.showFieldError(e, t('Notification email'), () => deleteCustomEmail(email));
|
|
91
93
|
}
|
|
92
94
|
});
|
|
93
95
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAoBxE,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAoBxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,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,cAAc,4EA8QlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -17,6 +17,7 @@ import { deleteCaseAttachment, formatDateTime, humanizeSize, updateCaseAttachmen
|
|
|
17
17
|
import isEmpty from 'lodash/isEmpty';
|
|
18
18
|
import React, { useContext, useRef, useState } from 'react';
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
|
+
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
20
21
|
import { ATTACHMENT_DESCRIPTION_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
21
22
|
import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
22
23
|
import { PDFContext } from '../../PDFContainer';
|
|
@@ -25,6 +26,7 @@ import { JumpAndCopyLink } from './JumpAndCopyLink';
|
|
|
25
26
|
const CaseAttachment = React.forwardRef((props, ref) => {
|
|
26
27
|
var _a;
|
|
27
28
|
const { t } = useTranslation();
|
|
29
|
+
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
28
30
|
const clipboardRef = useRef(null);
|
|
29
31
|
const { clipboardText, copyToClipboard } = useCopyToClipboard(clipboardRef);
|
|
30
32
|
const { request, isFetching: isDeleting } = useFetch(deleteCaseAttachment, { propgateErrors: true });
|
|
@@ -39,7 +41,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
39
41
|
const canEditCase = useCanEditCase();
|
|
40
42
|
const onDescriptionSave = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
43
|
if (!apolloClient.mutate) {
|
|
42
|
-
|
|
44
|
+
caseUpdateError.showFieldError({}, t('Attachment description'));
|
|
43
45
|
return;
|
|
44
46
|
}
|
|
45
47
|
setIsUpdating(true);
|
|
@@ -47,8 +49,8 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
47
49
|
const updatedAttachment = yield updateCaseAttachmentDescriptionByGraphQL(apolloClient, props.attachment, attachmentDescription);
|
|
48
50
|
props.onMetadataUpdate && props.onMetadataUpdate(props.attachment.uuid, updatedAttachment);
|
|
49
51
|
}
|
|
50
|
-
catch (
|
|
51
|
-
|
|
52
|
+
catch (e) {
|
|
53
|
+
caseUpdateError.showFieldError(e, t('Attachment description'), onDescriptionSave);
|
|
52
54
|
}
|
|
53
55
|
finally {
|
|
54
56
|
setIsUpdating(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA2BvE,OAAO,KAAwC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA2BvE,OAAO,KAAwC,MAAM,OAAO,CAAC;AAW7D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,iBAAiB,CAAC,EAAE,OAAO,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,4EAgXhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -25,6 +25,7 @@ import { Trans } from 'react-i18next';
|
|
|
25
25
|
// TODO: Re-enable after GraphQL migration of feedback
|
|
26
26
|
// import { useTranslation } from 'react-i18next';
|
|
27
27
|
import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
28
|
+
import { linkifyHtmlTextNodes } from '../../../../utils/linkifyHtmlTextNodes';
|
|
28
29
|
import { PDFContext } from '../../PDFContainer';
|
|
29
30
|
import { DiscussionItemLink } from './DiscussionItemLink';
|
|
30
31
|
import { JumpAndCopyLink } from './JumpAndCopyLink';
|
|
@@ -149,6 +150,34 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
149
150
|
return React.createElement(Trans, null, "Automated comment");
|
|
150
151
|
}
|
|
151
152
|
};
|
|
153
|
+
// Tags the Quill RTE legitimately produces — everything else was typed
|
|
154
|
+
// literally by the user or injected from an external source (SFDC) and
|
|
155
|
+
// should render as visible text, not interpreted as HTML formatting.
|
|
156
|
+
const QUILL_TAGS = new Set([
|
|
157
|
+
'p',
|
|
158
|
+
'br',
|
|
159
|
+
'strong',
|
|
160
|
+
'em',
|
|
161
|
+
'u',
|
|
162
|
+
's',
|
|
163
|
+
'ul',
|
|
164
|
+
'ol',
|
|
165
|
+
'li',
|
|
166
|
+
'a',
|
|
167
|
+
'img',
|
|
168
|
+
'h1',
|
|
169
|
+
'h2',
|
|
170
|
+
'h3',
|
|
171
|
+
'h4',
|
|
172
|
+
'h5',
|
|
173
|
+
'h6',
|
|
174
|
+
'span',
|
|
175
|
+
'pre',
|
|
176
|
+
'blockquote',
|
|
177
|
+
'sub',
|
|
178
|
+
'sup',
|
|
179
|
+
]);
|
|
180
|
+
const escapeNonQuillTags = (html) => html.replace(/<(\/?)([\w-]+)([^>]*)>/g, (match, slash, tag, attrs) => QUILL_TAGS.has(tag.toLowerCase()) ? match : `<${slash}${tag}${attrs}>`);
|
|
152
181
|
const sanitizeHtml = (html) => {
|
|
153
182
|
DOMPurify.addHook('afterSanitizeAttributes', (node) => {
|
|
154
183
|
if (node.tagName === 'A') {
|
|
@@ -156,7 +185,7 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
156
185
|
node.setAttribute('rel', 'noopener noreferrer');
|
|
157
186
|
}
|
|
158
187
|
});
|
|
159
|
-
const clean = DOMPurify.sanitize(html, { ADD_ATTR: ['target', 'rel'] });
|
|
188
|
+
const clean = DOMPurify.sanitize(escapeNonQuillTags(html), { ADD_ATTR: ['target', 'rel'] });
|
|
160
189
|
DOMPurify.removeHook('afterSanitizeAttributes');
|
|
161
190
|
return clean;
|
|
162
191
|
};
|
|
@@ -216,6 +245,7 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
216
245
|
}
|
|
217
246
|
// HTML comments (new rich text or legacy markdown — both stored as HTML)
|
|
218
247
|
let htmlString = comment.commentBody;
|
|
248
|
+
htmlString = linkifyHtmlTextNodes(htmlString);
|
|
219
249
|
if (isExportingPDF) {
|
|
220
250
|
htmlString = formatMarkdownHtmlForPDF(htmlString);
|
|
221
251
|
}
|
|
@@ -251,8 +281,8 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
251
281
|
React.createElement("span", { className: "pull-right pf-v6-l-flex pf-m-align-items-center" },
|
|
252
282
|
props.showJumpToComment && (React.createElement(DiscussionItemLink, { onClick: onJumpToComment(props.comment.id), discussionType: DiscussionType.COMMENT, itemId: props.comment.id, caseNumber: caseNumber, isCopyLink: false },
|
|
253
283
|
React.createElement(Trans, null, "Jump to comment"))),
|
|
254
|
-
React.createElement(JumpAndCopyLink, { caseNumber: caseNumber, cardId: props.comment.id, discussionType: DiscussionType.COMMENT }),
|
|
255
284
|
React.createElement("button", { onClick: () => props.onReply(props.comment.lastModifiedById, props.comment.id, props.comment.lastModifiedDate), className: `btn btn-app btn-link case-reply-button ${isExportingPDF ? 'hide-in-pdf' : ''}`, "data-tracking-id": "case-comment-reply", type: "button" },
|
|
256
|
-
React.createElement(Trans, null, "Reply"))
|
|
285
|
+
React.createElement(Trans, null, "Reply")),
|
|
286
|
+
React.createElement(JumpAndCopyLink, { caseNumber: caseNumber, cardId: props.comment.id, discussionType: DiscussionType.COMMENT })))));
|
|
257
287
|
});
|
|
258
288
|
export default CaseComments;
|
|
@@ -9,6 +9,12 @@ interface IProps {
|
|
|
9
9
|
tabRef: React.MutableRefObject<HTMLDivElement>;
|
|
10
10
|
isDiscussionTab: boolean;
|
|
11
11
|
refetchComments: () => Promise<unknown> | void;
|
|
12
|
+
fetchMore?: () => Promise<unknown> | void;
|
|
13
|
+
hasNextPage?: boolean;
|
|
14
|
+
isLoadingMore?: boolean;
|
|
15
|
+
loadMoreError?: boolean;
|
|
16
|
+
loadMoreRetryCount?: number;
|
|
17
|
+
retryLoadMore?: () => Promise<unknown> | void;
|
|
12
18
|
}
|
|
13
19
|
export default function CaseDiscussion(props: IProps): React.JSX.Element;
|
|
14
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAoBvE,OAAO,KAA6E,MAAM,OAAO,CAAC;AAwClG,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAyzBnD"}
|