tnx-shared 5.3.385 → 5.3.387

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.
@@ -10289,6 +10289,17 @@
10289
10289
  };
10290
10290
  return this.defaultPost(url, model);
10291
10291
  };
10292
+ DownloadLinkService.prototype.convertToPdfBase64 = function (fileName, fileInstanceId, fileVersionInstanceId) {
10293
+ var url = this.serviceUri + "/ConvertDocumentToPdfBase64";
10294
+ var model = {
10295
+ fileName: fileName,
10296
+ fileInstanceId: fileInstanceId,
10297
+ fileVersionInstanceId: fileVersionInstanceId,
10298
+ outputType: this.convertModelType.pdf,
10299
+ toBase64: true
10300
+ };
10301
+ return this.defaultPost(url, model);
10302
+ };
10292
10303
  /**
10293
10304
  * Lấy danh sách file trong một thư mục
10294
10305
  * @param serviceCode : mã dịch vụ
@@ -34634,11 +34645,16 @@
34634
34645
  }
34635
34646
  // Trường hợp select all
34636
34647
  else {
34637
- var tmpDataSource = __spreadArray([], __read(this.dataSourceInternal));
34648
+ var arrValueSelected_1 = event.value.map(function (p) { return p[_this.control.valueField]; });
34649
+ var tmpDataSource = __spreadArray([], __read(this.dataSourceInternal.filter(function (p) { return arrValueSelected_1.includes(p.value[_this.control.valueField]); })));
34638
34650
  if (this.dataSourceInternal.some(function (p) { return p.hasOwnProperty('inactive'); })) {
34639
34651
  tmpDataSource = tmpDataSource.filter(function (p) { return !p.inactive; });
34640
34652
  }
34641
- this._value = tmpDataSource.map(function (q) { return q.value; });
34653
+ var arrValue = tmpDataSource.map(function (q) { return q.value; });
34654
+ if (this._returnValue && Array.isArray(this._returnValue) && this._returnValue.length) {
34655
+ arrValue.push.apply(arrValue, __spreadArray([], __read(this._returnValue.filter(function (p) { return !Array.isArray(p); }))));
34656
+ }
34657
+ this._value = this._commonService.distinctArray(arrValue);
34642
34658
  }
34643
34659
  }
34644
34660
  else if (this.control.selectDescendant) {
@@ -50101,12 +50117,12 @@
50101
50117
  };
50102
50118
  FileViewerComponent.prototype.print = function () {
50103
50119
  var _this = this;
50104
- this._downloadLinkService.convertToPdf(this.data.name, this.data.fileId, this.data.fileVersionId)
50120
+ this._downloadLinkService.convertToPdfBase64(this.data.name, this.data.fileId, this.data.fileVersionId)
50105
50121
  .then(function (rs) {
50106
- if (!rs.success || !rs.data || !rs.data.contentBase64) {
50122
+ if (!rs.success || !rs.data) {
50107
50123
  return;
50108
50124
  }
50109
- _this._fileExplorerService.print(rs.data.contentBase64);
50125
+ _this._fileExplorerService.print(rs.data);
50110
50126
  });
50111
50127
  };
50112
50128
  FileViewerComponent.prototype.download = function () {