nuxeo-development-framework 5.9.6 → 5.9.9
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 +48 -25
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +28 -10
- package/fesm2015/nuxeo-development-framework.js +27 -9
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/pdf-tron/pdftron/pdftron.component.d.ts +4 -1
- package/package.json +1 -1
|
@@ -35521,7 +35521,9 @@ class PdftronComponent {
|
|
|
35521
35521
|
this.allowDownloadSecretFile = true; // allow or prevent download screct files
|
|
35522
35522
|
this.allowPrintSecretFile = true; // allow or prevent print screct files
|
|
35523
35523
|
this.negelectAddingWaterMark = false; // don't add watermark here whatever eas the conditions (we may add it from outside or not add it at all)
|
|
35524
|
+
this.flattenAnotation = false; // used to flatten anotation into the document to avoid editing on them after saving
|
|
35524
35525
|
this.isSignedDocument = false; // flage to indicate if this document is signed with outside platform to enable diffrent way of downloading it
|
|
35526
|
+
this.allowPrintFromOutSide = false; //flage to indicate if to use print of pdftron or emit the event outside to handle printfrom outside
|
|
35525
35527
|
this.onDownloadingSignedDocument = new EventEmitter(); // used to tell outside we need download signed document to download it with proper way diffrent from export of pdftron
|
|
35526
35528
|
this.onAddingAnotation = new EventEmitter(); // used to export all anotations to outside
|
|
35527
35529
|
this.events = new EventEmitter();
|
|
@@ -35624,6 +35626,7 @@ class PdftronComponent {
|
|
|
35624
35626
|
path: this.baseHref + '/assets/pdftrons',
|
|
35625
35627
|
forceClientSideInit: true,
|
|
35626
35628
|
streaming: true,
|
|
35629
|
+
fullAPI: this.importFullApi(),
|
|
35627
35630
|
licenseKey: this.environment.pdftronLicenceKey,
|
|
35628
35631
|
css: this.isArabic
|
|
35629
35632
|
? this.baseHref + '/assets/styles/ar-mypdftron.css'
|
|
@@ -35636,6 +35639,16 @@ class PdftronComponent {
|
|
|
35636
35639
|
}
|
|
35637
35640
|
});
|
|
35638
35641
|
}
|
|
35642
|
+
// funtion to check to import the full api or not according to action of add sticker exist or not
|
|
35643
|
+
importFullApi() {
|
|
35644
|
+
let useFullApi = false;
|
|
35645
|
+
// let actionExist = ['addQrcode' , 'selectQrcode'].some(item => this.correspondance.contextParameters.actions.includes(item));
|
|
35646
|
+
let lockModeExist = this.pdftronService.mode === 'addQrcode';
|
|
35647
|
+
if (this.flattenAnotation && lockModeExist) {
|
|
35648
|
+
useFullApi = true;
|
|
35649
|
+
}
|
|
35650
|
+
return useFullApi;
|
|
35651
|
+
}
|
|
35639
35652
|
importAnotationsFromOutside() {
|
|
35640
35653
|
const documentViewer = this.webViewerInstance.docViewer;
|
|
35641
35654
|
documentViewer.on('documentLoaded', () => {
|
|
@@ -35754,15 +35767,11 @@ class PdftronComponent {
|
|
|
35754
35767
|
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
35755
35768
|
// if wasn't signed document then download it using pdftron normal donwnload
|
|
35756
35769
|
if (!this.isSignedDocument) {
|
|
35757
|
-
const
|
|
35758
|
-
// const xfdfString = await AnnotationManager.exportAnnotations();
|
|
35759
|
-
const saveOptions = SaveOptions;
|
|
35770
|
+
const xfdfString = yield this.pdftronService.instance.annotManager.exportAnnotations();
|
|
35760
35771
|
const options = {
|
|
35761
35772
|
filename: this.correspondance.title ? this.correspondance.title : 'myDocument.pdf',
|
|
35762
|
-
|
|
35773
|
+
xfdfString,
|
|
35763
35774
|
includeAnnotations: true,
|
|
35764
|
-
flatten: true,
|
|
35765
|
-
flags: saveOptions.LINEARIZED,
|
|
35766
35775
|
downloadType: 'pdf'
|
|
35767
35776
|
};
|
|
35768
35777
|
this.pdftronService.instance.downloadPdf(options);
|
|
@@ -35804,8 +35813,13 @@ class PdftronComponent {
|
|
|
35804
35813
|
img: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.cls-1{fill:#abb0c4;}</style></defs><title>icon - header - print - line</title><path class="cls-1" d="M20,6H18V2H6V6H4A2,2,0,0,0,2,8v9a2,2,0,0,0,2,2H6v3H18V19h2a2,2,0,0,0,2-2V8A2,2,0,0,0,20,6ZM8,4h8V6H8Zm8,16H8V16h8Zm4-3H18V14H6v3H4V8H20Zm-4-7h2v2H16Zm-3,0h2v2H13Z"></path></svg>',
|
|
35805
35814
|
title: this.isArabic ? 'طباعة' : 'Print',
|
|
35806
35815
|
onClick: () => {
|
|
35807
|
-
this.
|
|
35808
|
-
|
|
35816
|
+
if (this.allowPrintFromOutSide) {
|
|
35817
|
+
this.events.next('print');
|
|
35818
|
+
}
|
|
35819
|
+
else {
|
|
35820
|
+
this.pdftronService.instance.print();
|
|
35821
|
+
this.events.next('print');
|
|
35822
|
+
}
|
|
35809
35823
|
}
|
|
35810
35824
|
});
|
|
35811
35825
|
});
|
|
@@ -36237,7 +36251,7 @@ _PdftronComponent_docLoaded = new WeakMap(), _PdftronComponent_instances = new W
|
|
|
36237
36251
|
// maybe will need to reset signature & annotations
|
|
36238
36252
|
};
|
|
36239
36253
|
PdftronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PdftronComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService }, { token: APP_BASE_HREF }, { token: TranslationService }, { token: SilentPdfTronService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
|
|
36240
|
-
PdftronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PdftronComponent, selector: "app-pdftron", inputs: { editMode: "editMode", actionClicked: "actionClicked", fileTitle: "fileTitle", docId: "docId", DOCUMENT_TYPE: "DOCUMENT_TYPE", fileData: "fileData", fitMode: "fitMode", authHeader: "authHeader", fileURL: "fileURL", correspondance: "correspondance", secrecyProperty: "secrecyProperty", editingType: "editingType", userSignatures: "userSignatures", searchString: "searchString", trackSignature: "trackSignature", useOutsideAnotations: "useOutsideAnotations", importedAnotations: "importedAnotations", allowDownloadSecretFile: "allowDownloadSecretFile", allowPrintSecretFile: "allowPrintSecretFile", negelectAddingWaterMark: "negelectAddingWaterMark", recognizedJson: "recognizedJson", isSignedDocument: "isSignedDocument" }, outputs: { onSignatureTracking: "onSignatureTracking", onDownloadingSignedDocument: "onDownloadingSignedDocument", onAddingAnotation: "onAddingAnotation", events: "events", SignatureEvent: "SignatureEvent" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
|
|
36254
|
+
PdftronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PdftronComponent, selector: "app-pdftron", inputs: { editMode: "editMode", actionClicked: "actionClicked", fileTitle: "fileTitle", docId: "docId", DOCUMENT_TYPE: "DOCUMENT_TYPE", fileData: "fileData", fitMode: "fitMode", authHeader: "authHeader", fileURL: "fileURL", correspondance: "correspondance", secrecyProperty: "secrecyProperty", editingType: "editingType", userSignatures: "userSignatures", searchString: "searchString", trackSignature: "trackSignature", useOutsideAnotations: "useOutsideAnotations", importedAnotations: "importedAnotations", allowDownloadSecretFile: "allowDownloadSecretFile", allowPrintSecretFile: "allowPrintSecretFile", negelectAddingWaterMark: "negelectAddingWaterMark", flattenAnotation: "flattenAnotation", recognizedJson: "recognizedJson", isSignedDocument: "isSignedDocument", allowPrintFromOutSide: "allowPrintFromOutSide" }, outputs: { onSignatureTracking: "onSignatureTracking", onDownloadingSignedDocument: "onDownloadingSignedDocument", onAddingAnotation: "onAddingAnotation", events: "events", SignatureEvent: "SignatureEvent" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
|
|
36241
36255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PdftronComponent, decorators: [{
|
|
36242
36256
|
type: Component,
|
|
36243
36257
|
args: [{
|
|
@@ -36297,10 +36311,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
36297
36311
|
type: Input
|
|
36298
36312
|
}], negelectAddingWaterMark: [{
|
|
36299
36313
|
type: Input
|
|
36314
|
+
}], flattenAnotation: [{
|
|
36315
|
+
type: Input
|
|
36300
36316
|
}], recognizedJson: [{
|
|
36301
36317
|
type: Input
|
|
36302
36318
|
}], isSignedDocument: [{
|
|
36303
36319
|
type: Input
|
|
36320
|
+
}], allowPrintFromOutSide: [{
|
|
36321
|
+
type: Input
|
|
36304
36322
|
}], onDownloadingSignedDocument: [{
|
|
36305
36323
|
type: Output
|
|
36306
36324
|
}], onAddingAnotation: [{
|