nuxeo-development-framework 0.6.9 → 0.7.0

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.
@@ -18986,6 +18986,7 @@
18986
18986
  this.actionClicked = false; // used to know if there is action clicked outside to start edit mode or not
18987
18987
  this.DOCUMENT_TYPE = 'application/pdf';
18988
18988
  this.fitMode = 'FitWidth';
18989
+ this.events = new i0.EventEmitter();
18989
18990
  }
18990
18991
  PdftronComponent.prototype.ngOnInit = function () {
18991
18992
  return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
@@ -19015,10 +19016,11 @@
19015
19016
  forceClientSideInit: true,
19016
19017
  streaming: true,
19017
19018
  licenseKey: this.environment.pdftronLicenceKey,
19018
- disabledElements: ['downloadButton'],
19019
+ disabledElements: ['downloadButton', 'printButton'],
19019
19020
  }, this.viewerRef.nativeElement).then(function (instance) { return __awaiter(_this, void 0, void 0, function () {
19020
19021
  return __generator(this, function (_a) {
19021
19022
  this.pdftronService.instance = this.webViewerInstance = instance;
19023
+ this.addPrintButton();
19022
19024
  this.addDownloadButton();
19023
19025
  this.loadDocument();
19024
19026
  return [2 /*return*/];
@@ -19048,12 +19050,27 @@
19048
19050
  document.body.appendChild(link);
19049
19051
  link.click();
19050
19052
  document.body.removeChild(link);
19053
+ _this.events.next('download');
19051
19054
  });
19052
19055
  }
19053
19056
  },
19054
19057
  });
19055
19058
  });
19056
19059
  };
19060
+ PdftronComponent.prototype.addPrintButton = function () {
19061
+ var _this = this;
19062
+ this.webViewerInstance.setHeaderItems(function (header) {
19063
+ header.push({
19064
+ type: 'actionButton',
19065
+ 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>',
19066
+ title: 'Print',
19067
+ onClick: function () {
19068
+ _this.pdftronService.instance.UI.print();
19069
+ _this.events.next('print');
19070
+ },
19071
+ });
19072
+ });
19073
+ };
19057
19074
  PdftronComponent.prototype.addWatermark = function () {
19058
19075
  var userinfo = this.nuxeo.nuxeoClient.user.properties;
19059
19076
  this.pdftronService.addWatermark(userinfo.username + " "
@@ -19185,7 +19202,7 @@
19185
19202
  return PdftronComponent;
19186
19203
  }());
19187
19204
  PdftronComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PdftronComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService$1 }, { token: i3.APP_BASE_HREF }, { token: SecurePipe }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Component });
19188
- PdftronComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", 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" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
19205
+ PdftronComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", 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" }, outputs: { events: "events" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
19189
19206
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PdftronComponent, decorators: [{
19190
19207
  type: i0.Component,
19191
19208
  args: [{
@@ -19227,6 +19244,8 @@
19227
19244
  type: i0.Input
19228
19245
  }], secrecyProperty: [{
19229
19246
  type: i0.Input
19247
+ }], events: [{
19248
+ type: i0.Output
19230
19249
  }] } });
19231
19250
 
19232
19251
  var PdfTronModule = /** @class */ (function () {