@hmcts/ccd-case-ui-toolkit 7.4.20 → 7.4.21
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.
|
@@ -14883,7 +14883,7 @@ class CaseFileViewFieldComponent {
|
|
|
14883
14883
|
}
|
|
14884
14884
|
setMediaViewerFile(document) {
|
|
14885
14885
|
const documentDetails = {
|
|
14886
|
-
document_binary_url:
|
|
14886
|
+
document_binary_url: document.document_binary_url,
|
|
14887
14887
|
document_filename: document.document_filename,
|
|
14888
14888
|
content_type: document.content_type
|
|
14889
14889
|
};
|
|
@@ -14898,19 +14898,6 @@ class CaseFileViewFieldComponent {
|
|
|
14898
14898
|
const mediaViewerInfo = this.documentManagementService.getMediaViewerInfo(documentDetails);
|
|
14899
14899
|
this.currentDocument = JSON.parse(mediaViewerInfo);
|
|
14900
14900
|
}
|
|
14901
|
-
withLegacyDocumentAccessContext(documentBinaryUrl) {
|
|
14902
|
-
if (!documentBinaryUrl || !this.caseId) {
|
|
14903
|
-
return documentBinaryUrl;
|
|
14904
|
-
}
|
|
14905
|
-
const [path, query = ''] = documentBinaryUrl.split('?');
|
|
14906
|
-
if (!/^\/documents\/[^/]+\/binary\/?$/.test(path)) {
|
|
14907
|
-
return documentBinaryUrl;
|
|
14908
|
-
}
|
|
14909
|
-
// XUI validates legacy document access against the case before proxying the binary request.
|
|
14910
|
-
const searchParams = new URLSearchParams(query);
|
|
14911
|
-
searchParams.set('caseId', this.caseId);
|
|
14912
|
-
return `${path}?${searchParams.toString()}`;
|
|
14913
|
-
}
|
|
14914
14901
|
moveDocument(data) {
|
|
14915
14902
|
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
14916
14903
|
const loadingToken = this.loadingService.register();
|