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
|
@@ -38067,7 +38067,9 @@
|
|
|
38067
38067
|
this.allowDownloadSecretFile = true; // allow or prevent download screct files
|
|
38068
38068
|
this.allowPrintSecretFile = true; // allow or prevent print screct files
|
|
38069
38069
|
this.negelectAddingWaterMark = false; // don't add watermark here whatever eas the conditions (we may add it from outside or not add it at all)
|
|
38070
|
+
this.flattenAnotation = false; // used to flatten anotation into the document to avoid editing on them after saving
|
|
38070
38071
|
this.isSignedDocument = false; // flage to indicate if this document is signed with outside platform to enable diffrent way of downloading it
|
|
38072
|
+
this.allowPrintFromOutSide = false; //flage to indicate if to use print of pdftron or emit the event outside to handle printfrom outside
|
|
38071
38073
|
this.onDownloadingSignedDocument = new i0.EventEmitter(); // used to tell outside we need download signed document to download it with proper way diffrent from export of pdftron
|
|
38072
38074
|
this.onAddingAnotation = new i0.EventEmitter(); // used to export all anotations to outside
|
|
38073
38075
|
this.events = new i0.EventEmitter();
|
|
@@ -38177,6 +38179,7 @@
|
|
|
38177
38179
|
path: this.baseHref + '/assets/pdftrons',
|
|
38178
38180
|
forceClientSideInit: true,
|
|
38179
38181
|
streaming: true,
|
|
38182
|
+
fullAPI: this.importFullApi(),
|
|
38180
38183
|
licenseKey: this.environment.pdftronLicenceKey,
|
|
38181
38184
|
css: this.isArabic
|
|
38182
38185
|
? this.baseHref + '/assets/styles/ar-mypdftron.css'
|
|
@@ -38195,6 +38198,16 @@
|
|
|
38195
38198
|
});
|
|
38196
38199
|
});
|
|
38197
38200
|
};
|
|
38201
|
+
// funtion to check to import the full api or not according to action of add sticker exist or not
|
|
38202
|
+
PdftronComponent.prototype.importFullApi = function () {
|
|
38203
|
+
var useFullApi = false;
|
|
38204
|
+
// let actionExist = ['addQrcode' , 'selectQrcode'].some(item => this.correspondance.contextParameters.actions.includes(item));
|
|
38205
|
+
var lockModeExist = this.pdftronService.mode === 'addQrcode';
|
|
38206
|
+
if (this.flattenAnotation && lockModeExist) {
|
|
38207
|
+
useFullApi = true;
|
|
38208
|
+
}
|
|
38209
|
+
return useFullApi;
|
|
38210
|
+
};
|
|
38198
38211
|
PdftronComponent.prototype.importAnotationsFromOutside = function () {
|
|
38199
38212
|
var _this = this;
|
|
38200
38213
|
var documentViewer = this.webViewerInstance.docViewer;
|
|
@@ -38322,29 +38335,30 @@
|
|
|
38322
38335
|
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>',
|
|
38323
38336
|
title: _this.isArabic ? 'تنزيل' : 'Download',
|
|
38324
38337
|
onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
38325
|
-
var
|
|
38326
|
-
return __generator(this, function (
|
|
38327
|
-
|
|
38328
|
-
|
|
38329
|
-
|
|
38330
|
-
|
|
38331
|
-
|
|
38332
|
-
|
|
38333
|
-
|
|
38334
|
-
|
|
38335
|
-
|
|
38336
|
-
|
|
38337
|
-
|
|
38338
|
-
|
|
38339
|
-
|
|
38340
|
-
|
|
38341
|
-
|
|
38342
|
-
|
|
38343
|
-
|
|
38344
|
-
|
|
38345
|
-
|
|
38338
|
+
var xfdfString, options;
|
|
38339
|
+
return __generator(this, function (_c) {
|
|
38340
|
+
switch (_c.label) {
|
|
38341
|
+
case 0:
|
|
38342
|
+
if (!!this.isSignedDocument) return [3 /*break*/, 2];
|
|
38343
|
+
return [4 /*yield*/, this.pdftronService.instance.annotManager.exportAnnotations()];
|
|
38344
|
+
case 1:
|
|
38345
|
+
xfdfString = _c.sent();
|
|
38346
|
+
options = {
|
|
38347
|
+
filename: this.correspondance.title ? this.correspondance.title : 'myDocument.pdf',
|
|
38348
|
+
xfdfString: xfdfString,
|
|
38349
|
+
includeAnnotations: true,
|
|
38350
|
+
downloadType: 'pdf'
|
|
38351
|
+
};
|
|
38352
|
+
this.pdftronService.instance.downloadPdf(options);
|
|
38353
|
+
this.events.next('download');
|
|
38354
|
+
return [3 /*break*/, 3];
|
|
38355
|
+
case 2:
|
|
38356
|
+
// if it was signed document then download it by function from outside to avoid
|
|
38357
|
+
// loosing signing information that happens if i download it from pdftron itself
|
|
38358
|
+
this.onDownloadingSignedDocument.emit();
|
|
38359
|
+
_c.label = 3;
|
|
38360
|
+
case 3: return [2 /*return*/];
|
|
38346
38361
|
}
|
|
38347
|
-
return [2 /*return*/];
|
|
38348
38362
|
});
|
|
38349
38363
|
}); }
|
|
38350
38364
|
});
|
|
@@ -38363,8 +38377,13 @@
|
|
|
38363
38377
|
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>',
|
|
38364
38378
|
title: _this.isArabic ? 'طباعة' : 'Print',
|
|
38365
38379
|
onClick: function () {
|
|
38366
|
-
_this.
|
|
38367
|
-
|
|
38380
|
+
if (_this.allowPrintFromOutSide) {
|
|
38381
|
+
_this.events.next('print');
|
|
38382
|
+
}
|
|
38383
|
+
else {
|
|
38384
|
+
_this.pdftronService.instance.print();
|
|
38385
|
+
_this.events.next('print');
|
|
38386
|
+
}
|
|
38368
38387
|
}
|
|
38369
38388
|
});
|
|
38370
38389
|
});
|
|
@@ -38812,7 +38831,7 @@
|
|
|
38812
38831
|
// maybe will need to reset signature & annotations
|
|
38813
38832
|
};
|
|
38814
38833
|
PdftronComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PdftronComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService }, { token: i4.APP_BASE_HREF }, { token: TranslationService }, { token: SilentPdfTronService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
38815
|
-
PdftronComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
|
|
38834
|
+
PdftronComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
|
|
38816
38835
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PdftronComponent, decorators: [{
|
|
38817
38836
|
type: i0.Component,
|
|
38818
38837
|
args: [{
|
|
@@ -38874,10 +38893,14 @@
|
|
|
38874
38893
|
type: i0.Input
|
|
38875
38894
|
}], negelectAddingWaterMark: [{
|
|
38876
38895
|
type: i0.Input
|
|
38896
|
+
}], flattenAnotation: [{
|
|
38897
|
+
type: i0.Input
|
|
38877
38898
|
}], recognizedJson: [{
|
|
38878
38899
|
type: i0.Input
|
|
38879
38900
|
}], isSignedDocument: [{
|
|
38880
38901
|
type: i0.Input
|
|
38902
|
+
}], allowPrintFromOutSide: [{
|
|
38903
|
+
type: i0.Input
|
|
38881
38904
|
}], onDownloadingSignedDocument: [{
|
|
38882
38905
|
type: i0.Output
|
|
38883
38906
|
}], onAddingAnotation: [{
|