@colijnit/sharedcomponents 259.1.11 → 259.1.12

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.
@@ -3199,7 +3199,9 @@
3199
3199
  },
3200
3200
  set: function (value) {
3201
3201
  this._reportingDocumentEmailSignDocBaseRequest = value;
3202
- this.selectedEmailAddresses = this._reportingDocumentEmailSignDocBaseRequest.toAddresses.split(';');
3202
+ if (this._reportingDocumentEmailSignDocBaseRequest.toAddresses && this._reportingDocumentEmailSignDocBaseRequest.toAddresses.length !== 0) {
3203
+ this.selectedEmailAddresses = this._reportingDocumentEmailSignDocBaseRequest.toAddresses.split(';');
3204
+ }
3203
3205
  this.reportingDocumentEmailSignDocBaseRequestChanged.next(this._reportingDocumentEmailSignDocBaseRequest);
3204
3206
  },
3205
3207
  enumerable: false,
@@ -3392,17 +3394,14 @@
3392
3394
  this.navigationItems.nativeElement.scrollLeft = this.pdfItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
3393
3395
  }
3394
3396
  if (this.transactionType !== 'salesOrderOverview') {
3395
- return;
3396
- }
3397
- if (this.activeSendMethod.code === sendMethodType_enum.SendMethodType.Print) {
3398
- this.showFilePreview.emit(this.reportingDocumentPrintRequest.reportId);
3399
- }
3400
- else if (this.activeSendMethod.code === sendMethodType_enum.SendMethodType.Email) {
3401
- this.showFilePreview.emit(this.reportingDocumentEmailRequest.reportId);
3402
- }
3403
- else if (this.activeSendMethod.code === sendMethodType_enum.SendMethodType.Pdf) {
3404
- this.showFilePreview.emit(this.reportingDocumentPdfRequest.reportId);
3405
3397
  }
3398
+ /* if (this.activeSendMethod.code === SendMethodType.Print) {
3399
+ this.showFilePreview.emit(this.reportingDocumentPrintRequest.reportId);
3400
+ } else if (this.activeSendMethod.code === SendMethodType.Email) {
3401
+ this.showFilePreview.emit(this.reportingDocumentEmailRequest.reportId);
3402
+ } else if (this.activeSendMethod.code === SendMethodType.Pdf) {
3403
+ this.showFilePreview.emit(this.reportingDocumentPdfRequest.reportId);
3404
+ }*/
3406
3405
  };
3407
3406
  SendMethodDialogComponent.prototype._initDefaultSendMethod = function () {
3408
3407
  var _this = this;
@@ -4131,6 +4130,7 @@
4131
4130
  var PdfPreviewComponent = /** @class */ (function () {
4132
4131
  function PdfPreviewComponent(iconCacheService) {
4133
4132
  this.iconCacheService = iconCacheService;
4133
+ this._waitingToShowDialog = false;
4134
4134
  this.disablePdfPreview = false;
4135
4135
  this.showFilePreview = new i0.EventEmitter();
4136
4136
  this.icons = exports["ɵcf"];
@@ -4146,20 +4146,28 @@
4146
4146
  set: function (value) {
4147
4147
  if (value !== this._pdfDoc) {
4148
4148
  this._pdfDoc = value;
4149
+ if (this._waitingToShowDialog) {
4150
+ this._waitingToShowDialog = false;
4151
+ this.showDialog = true;
4152
+ }
4149
4153
  }
4150
4154
  },
4151
4155
  enumerable: false,
4152
4156
  configurable: true
4153
4157
  });
4154
4158
  PdfPreviewComponent.prototype.ngOnInit = function () {
4159
+ //this.showFilePreview.emit(0);
4160
+ };
4161
+ PdfPreviewComponent.prototype.dialogRequested = function () {
4155
4162
  this.showFilePreview.emit(0);
4163
+ this._waitingToShowDialog = true;
4156
4164
  };
4157
4165
  return PdfPreviewComponent;
4158
4166
  }());
4159
4167
  PdfPreviewComponent.decorators = [
4160
4168
  { type: i0.Component, args: [{
4161
4169
  selector: "co-pdf-preview",
4162
- template: "\n <div class=\"pdf-preview-button\" [class.disabled]=\"disablePdfPreview\" (click)=\"showDialog = true\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.FileMagnifyingGlass)\"></co-icon>\n </div>\n <co-preview-pdf-dialog\n *ngIf=\"showDialog\"\n [pdfDoc]=\"pdfDoc\"\n (closePDFDialog)=\"showDialog = false\">\n </co-preview-pdf-dialog>\n ",
4170
+ template: "\n <div class=\"pdf-preview-button\" [class.disabled]=\"disablePdfPreview\" (click)=\"dialogRequested()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.FileMagnifyingGlass)\"></co-icon>\n </div>\n <co-preview-pdf-dialog\n *ngIf=\"showDialog\"\n [pdfDoc]=\"pdfDoc\"\n (closePDFDialog)=\"showDialog = false\">\n </co-preview-pdf-dialog>\n ",
4163
4171
  encapsulation: i0.ViewEncapsulation.None
4164
4172
  },] }
4165
4173
  ];