tnx-shared 5.3.318 → 5.3.319

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.
@@ -19392,7 +19392,7 @@
19392
19392
  valueBefore: valueBefore,
19393
19393
  valueAfter: valueAfter,
19394
19394
  enumLogType: (control instanceof EditorControlSchema || control instanceof TextAreaControlSchema)
19395
- ? exports.EnumLogType.Table
19395
+ ? exports.EnumLogType.Html
19396
19396
  : exports.EnumLogType.Normal
19397
19397
  }));
19398
19398
  }
@@ -28239,6 +28239,60 @@
28239
28239
  });
28240
28240
  });
28241
28241
  };
28242
+ ListBase.prototype._exportAllDataWithTemplateCode = function (templateCode, isViewOnline) {
28243
+ if (isViewOnline === void 0) { isViewOnline = false; }
28244
+ var _a;
28245
+ return __awaiter(this, void 0, void 0, function () {
28246
+ var lstRawData, lstVisibleField, lstData, data, sheet, file, _templateInstanceService;
28247
+ var _this = this;
28248
+ return __generator(this, function (_b) {
28249
+ switch (_b.label) {
28250
+ case 0: return [4 /*yield*/, this.setting.baseService.getDataCustomRoute(this.plusUrl, this.currentGridInfo.filters, this.currentGridInfo.fields, this.currentGridInfo.sorts, -1, 1)];
28251
+ case 1:
28252
+ lstRawData = (_a = (_b.sent()).data) !== null && _a !== void 0 ? _a : [];
28253
+ lstVisibleField = this.setting.cols
28254
+ .filter(function (item) { return item.visible && item.dataType !== 'trangThaiV5'; })
28255
+ .map(function (item) { return item.field; });
28256
+ return [4 /*yield*/, this.beforeExportAllData(lstRawData, lstVisibleField)];
28257
+ case 2:
28258
+ _b.sent();
28259
+ return [4 /*yield*/, this._crudService.getRefDataInDatasource(lstRawData, this.setting.fieldNeedGetRef)];
28260
+ case 3:
28261
+ _b.sent();
28262
+ lstData = lstRawData.map(function (rowData) { return _this.modifyRowDataForExport(rowData); });
28263
+ data = {
28264
+ lstData: lstData
28265
+ };
28266
+ sheet = new ExportItem({
28267
+ type: exports.ExportItemType.ExcelSheet,
28268
+ templateCode: templateCode,
28269
+ data: this.stringifyData(data),
28270
+ name: 'Sheet1'
28271
+ });
28272
+ file = new ExportItem({
28273
+ type: exports.ExportItemType.ExcelFile,
28274
+ name: this.setting.title ? this.setting.title : "Danh s\u00E1ch " + this.setting.objectName.toLocaleLowerCase()
28275
+ });
28276
+ file.children = [sheet];
28277
+ return [4 /*yield*/, this.modifyDataForExportAll(data)];
28278
+ case 4:
28279
+ _b.sent();
28280
+ _templateInstanceService = this._injector.get(TemplateInstanceService);
28281
+ return [2 /*return*/, _templateInstanceService.exportNormal(file)];
28282
+ }
28283
+ });
28284
+ });
28285
+ };
28286
+ ListBase.prototype.modifyDataForExportAll = function (data) {
28287
+ return __awaiter(this, void 0, void 0, function () {
28288
+ return __generator(this, function (_b) {
28289
+ return [2 /*return*/];
28290
+ });
28291
+ });
28292
+ };
28293
+ ListBase.prototype.modifyRowDataForExport = function (rowData) {
28294
+ return rowData;
28295
+ };
28242
28296
  return ListBase;
28243
28297
  }(ComponentBaseWithButton));
28244
28298
  ListBase.decorators = [