nuxeo-development-framework 4.5.2 → 4.5.3
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/bundles/nuxeo-development-framework.umd.js +60 -58
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/correspondence-relation/components/versions/versions.component.js +2 -2
- package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +54 -52
- package/fesm2015/nuxeo-development-framework.js +58 -56
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/package.json +1 -1
|
@@ -6924,7 +6924,7 @@
|
|
|
6924
6924
|
};
|
|
6925
6925
|
VersionsComponent.prototype.getFileSize = function (version) {
|
|
6926
6926
|
var file = version.properties['file:content'] || version.properties.content;
|
|
6927
|
-
if (file.length) {
|
|
6927
|
+
if (file && file.length) {
|
|
6928
6928
|
var length = +file.length;
|
|
6929
6929
|
if (length < 1000000) {
|
|
6930
6930
|
// trnasfer to KB
|
|
@@ -29868,64 +29868,66 @@
|
|
|
29868
29868
|
var _this = this;
|
|
29869
29869
|
return __generator(this, function (_a) {
|
|
29870
29870
|
this.recivedSearchStringsArray = this.searchString.trim() ? this.searchString.split(',') : [];
|
|
29871
|
-
if (this.fileTitle
|
|
29872
|
-
this.
|
|
29873
|
-
|
|
29874
|
-
|
|
29875
|
-
this.
|
|
29876
|
-
|
|
29877
|
-
|
|
29878
|
-
|
|
29879
|
-
this.
|
|
29880
|
-
|
|
29881
|
-
|
|
29882
|
-
this.
|
|
29883
|
-
|
|
29884
|
-
|
|
29885
|
-
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
return
|
|
29895
|
-
this
|
|
29896
|
-
|
|
29897
|
-
|
|
29898
|
-
this.
|
|
29899
|
-
|
|
29900
|
-
|
|
29901
|
-
|
|
29902
|
-
|
|
29903
|
-
|
|
29904
|
-
|
|
29905
|
-
|
|
29906
|
-
|
|
29907
|
-
|
|
29908
|
-
|
|
29909
|
-
|
|
29910
|
-
|
|
29911
|
-
|
|
29912
|
-
|
|
29913
|
-
|
|
29914
|
-
this.
|
|
29915
|
-
|
|
29916
|
-
|
|
29917
|
-
|
|
29918
|
-
|
|
29919
|
-
|
|
29920
|
-
|
|
29871
|
+
if (this.fileTitle) {
|
|
29872
|
+
if (this.fileTitle.endsWith('.ppt')) {
|
|
29873
|
+
this.DOCUMENT_TYPE = 'application/vnd.ms-powerpoint';
|
|
29874
|
+
}
|
|
29875
|
+
else if (this.fileTitle.endsWith('.pptx')) {
|
|
29876
|
+
this.DOCUMENT_TYPE =
|
|
29877
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
29878
|
+
}
|
|
29879
|
+
else if (this.fileTitle.endsWith('.doc')) {
|
|
29880
|
+
this.DOCUMENT_TYPE = 'application/msword';
|
|
29881
|
+
}
|
|
29882
|
+
else if (this.fileTitle.endsWith('.docx')) {
|
|
29883
|
+
this.DOCUMENT_TYPE =
|
|
29884
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
29885
|
+
}
|
|
29886
|
+
WebViewer__default["default"]({
|
|
29887
|
+
path: this.baseHref + '/assets/pdftrons',
|
|
29888
|
+
forceClientSideInit: true,
|
|
29889
|
+
streaming: true,
|
|
29890
|
+
licenseKey: this.environment.pdftronLicenceKey,
|
|
29891
|
+
css: this.isArabic ? (this.baseHref + '/assets/styles/ar-mypdftron.css') : (this.baseHref + '/assets/styles/en-mypdftron.css'),
|
|
29892
|
+
annotationUser: this.nuxeo.nuxeoClient.user.properties.firstName + ' ' + this.nuxeo.nuxeoClient.user.properties.lastName,
|
|
29893
|
+
disabledElements: ['downloadButton', 'printButton'],
|
|
29894
|
+
}, this.viewerRef.nativeElement).then(function (instance) { return __awaiter(_this, void 0, void 0, function () {
|
|
29895
|
+
return __generator(this, function (_a) {
|
|
29896
|
+
this.isArabic ? instance.setLanguage('ar') : instance.setLanguage('en');
|
|
29897
|
+
this.pdftronService.instance = this.webViewerInstance = instance;
|
|
29898
|
+
if (this.correspondance.facets.indexOf('ctocr') > -1) {
|
|
29899
|
+
this.fileWithOcr = true;
|
|
29900
|
+
this.pages = JSON.parse(this.correspondance.properties['ctocr:recognizedJson']);
|
|
29901
|
+
// override search funtion to use our search in ocr not defult search
|
|
29902
|
+
instance.overrideSearchExecution(this.searchFn);
|
|
29903
|
+
}
|
|
29904
|
+
else {
|
|
29905
|
+
// if no ocr then add search lisner to lisne to internal search and catch results
|
|
29906
|
+
this.addSearchListner();
|
|
29907
|
+
}
|
|
29908
|
+
this.addPrintButton();
|
|
29909
|
+
this.addDownloadButton();
|
|
29910
|
+
this.importSignature();
|
|
29911
|
+
this.exportingSignature();
|
|
29912
|
+
this.deleteAnnotation();
|
|
29913
|
+
this.exportingSavedSignature();
|
|
29914
|
+
if (this.useOutsideAnotations) {
|
|
29915
|
+
this.importAnotationsFromOutside();
|
|
29916
|
+
this.exportAnotationsToOutside();
|
|
29917
|
+
}
|
|
29918
|
+
this.webViewerInstance.docViewer.setSearchHighlightColors({
|
|
29919
|
+
// setSearchHighlightColors accepts both Annotations.Color objects or 'rgba' strings
|
|
29920
|
+
searchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
|
|
29921
|
+
activeSearchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
|
|
29922
|
+
});
|
|
29923
|
+
if (this.recivedSearchStringsArray.length !== 0) {
|
|
29924
|
+
this.automaticSearch(this.recivedSearchStringsArray);
|
|
29925
|
+
}
|
|
29926
|
+
this.loadDocument();
|
|
29927
|
+
return [2 /*return*/];
|
|
29921
29928
|
});
|
|
29922
|
-
|
|
29923
|
-
|
|
29924
|
-
}
|
|
29925
|
-
this.loadDocument();
|
|
29926
|
-
return [2 /*return*/];
|
|
29927
|
-
});
|
|
29928
|
-
}); });
|
|
29929
|
+
}); });
|
|
29930
|
+
}
|
|
29929
29931
|
return [2 /*return*/];
|
|
29930
29932
|
});
|
|
29931
29933
|
});
|