nuxeo-development-framework 0.7.4 → 0.7.5
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 +19 -20
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +32 -21
- package/fesm2015/nuxeo-development-framework.js +31 -20
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/package.json +1 -1
|
@@ -19026,12 +19026,12 @@
|
|
|
19026
19026
|
forceClientSideInit: true,
|
|
19027
19027
|
streaming: true,
|
|
19028
19028
|
licenseKey: this.environment.pdftronLicenceKey,
|
|
19029
|
-
disabledElements: ['printButton'],
|
|
19029
|
+
disabledElements: ['downloadButton', 'printButton'],
|
|
19030
19030
|
}, this.viewerRef.nativeElement).then(function (instance) { return __awaiter(_this, void 0, void 0, function () {
|
|
19031
19031
|
return __generator(this, function (_a) {
|
|
19032
19032
|
this.pdftronService.instance = this.webViewerInstance = instance;
|
|
19033
19033
|
this.addPrintButton();
|
|
19034
|
-
|
|
19034
|
+
this.addDownloadButton();
|
|
19035
19035
|
this.loadDocument();
|
|
19036
19036
|
return [2 /*return*/];
|
|
19037
19037
|
});
|
|
@@ -19047,23 +19047,22 @@
|
|
|
19047
19047
|
type: 'actionButton',
|
|
19048
19048
|
img: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-file-earmark-arrow-down" viewBox="0 0 16 16"> <path d="M8.5 6.5a.5.5 0 0 0-1 0v3.793L6.354 9.146a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0-.708-.708L8.5 10.293V6.5z"/> <path d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z"/></svg>',
|
|
19049
19049
|
title: 'Download',
|
|
19050
|
-
onClick: function () {
|
|
19051
|
-
var
|
|
19052
|
-
|
|
19053
|
-
|
|
19054
|
-
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19065
|
-
|
|
19066
|
-
},
|
|
19050
|
+
onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
19051
|
+
var _a, DocumentViewer, AnnotationManager, SaveOptions, saveOptions, options;
|
|
19052
|
+
return __generator(this, function (_b) {
|
|
19053
|
+
_a = this.webViewerInstance.CoreControls, DocumentViewer = _a.DocumentViewer, AnnotationManager = _a.AnnotationManager, SaveOptions = _a.SaveOptions;
|
|
19054
|
+
saveOptions = SaveOptions;
|
|
19055
|
+
options = {
|
|
19056
|
+
filename: this.correspondance.title ? this.correspondance.title : 'myDocument.pdf',
|
|
19057
|
+
// xfdfString,
|
|
19058
|
+
flags: saveOptions.LINEARIZED,
|
|
19059
|
+
downloadType: 'pdf'
|
|
19060
|
+
};
|
|
19061
|
+
this.pdftronService.instance.downloadPdf(options);
|
|
19062
|
+
this.events.next('download');
|
|
19063
|
+
return [2 /*return*/];
|
|
19064
|
+
});
|
|
19065
|
+
}); },
|
|
19067
19066
|
});
|
|
19068
19067
|
});
|
|
19069
19068
|
};
|
|
@@ -19127,7 +19126,7 @@
|
|
|
19127
19126
|
// if we need to check on secrecy level for adding water mark or not
|
|
19128
19127
|
if (this.environment.enableViewerWaterMark && this.secrecyProperty) {
|
|
19129
19128
|
// check for secrecy level befor adding watermark
|
|
19130
|
-
if (this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
|
|
19129
|
+
if (this.correspondance.properties[this.secrecyProperty] && this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
|
|
19131
19130
|
this.addWatermark();
|
|
19132
19131
|
}
|
|
19133
19132
|
}
|