tnx-shared 5.3.314 → 5.3.315
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/tnx-shared.umd.js +27 -7
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/data-form-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts +6 -1
- package/classes/form-schema.d.ts.map +1 -1
- package/esm2015/classes/base/data-form-base.js +22 -8
- package/esm2015/classes/form-schema.js +8 -2
- package/esm2015/models/export-item.js +1 -1
- package/fesm2015/tnx-shared.js +28 -8
- package/fesm2015/tnx-shared.js.map +1 -1
- package/models/export-item.d.ts.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -2567,13 +2567,19 @@
|
|
|
2567
2567
|
var LogColumn = /** @class */ (function () {
|
|
2568
2568
|
function LogColumn(init) {
|
|
2569
2569
|
this.visible = true;
|
|
2570
|
-
this.
|
|
2570
|
+
this.enumLogType = 1;
|
|
2571
2571
|
for (var key in init) {
|
|
2572
2572
|
this[key] = init[key];
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
2575
|
return LogColumn;
|
|
2576
2576
|
}());
|
|
2577
|
+
exports.EnumLogType = void 0;
|
|
2578
|
+
(function (EnumLogType) {
|
|
2579
|
+
EnumLogType[EnumLogType["Normal"] = 1] = "Normal";
|
|
2580
|
+
EnumLogType[EnumLogType["Html"] = 2] = "Html";
|
|
2581
|
+
EnumLogType[EnumLogType["Table"] = 3] = "Table";
|
|
2582
|
+
})(exports.EnumLogType || (exports.EnumLogType = {}));
|
|
2577
2583
|
exports.DataType = void 0;
|
|
2578
2584
|
(function (DataType) {
|
|
2579
2585
|
DataType["date"] = "date";
|
|
@@ -19088,7 +19094,7 @@
|
|
|
19088
19094
|
_this.logSetting.arrValueAfterUpdate.push(new LogColumn({
|
|
19089
19095
|
field: control.field,
|
|
19090
19096
|
label: control.label,
|
|
19091
|
-
valueBefore: control._component.dataSource.map(function (p) { return p.label; }).join(', '),
|
|
19097
|
+
valueBefore: control._component.dataSource.map(function (p) { return p.label; }).join(', ') || _this.logSetting.emptyValue,
|
|
19092
19098
|
visible: false,
|
|
19093
19099
|
valueAfter: ''
|
|
19094
19100
|
}));
|
|
@@ -19259,7 +19265,7 @@
|
|
|
19259
19265
|
});
|
|
19260
19266
|
};
|
|
19261
19267
|
DataFormBase.prototype.getSingleLabel = function (control, dataSource, valueParam) {
|
|
19262
|
-
var result = dataSource.find(function (p) { return p.value[control.valueField] == valueParam; });
|
|
19268
|
+
var result = dataSource.find(function (p) { return (p === null || p === void 0 ? void 0 : p.value[control.valueField]) == valueParam; });
|
|
19263
19269
|
if (!!result) {
|
|
19264
19270
|
var funcGetLabel = control.funcGetLabel;
|
|
19265
19271
|
if (funcGetLabel) {
|
|
@@ -19355,8 +19361,18 @@
|
|
|
19355
19361
|
var oldValue = this.logSetting.valueBeforeUpdate[control.field];
|
|
19356
19362
|
var newValue = cloneModel[control.field];
|
|
19357
19363
|
var isMultiple = Array.isArray(oldValue);
|
|
19358
|
-
if (!this.isNullOrEmpty(oldValue) || !this.isNullOrEmpty(newValue))
|
|
19359
|
-
|
|
19364
|
+
if ((!this.isNullOrEmpty(oldValue) || !this.isNullOrEmpty(newValue))
|
|
19365
|
+
&& !(control instanceof FileManagerControlSchema)) {
|
|
19366
|
+
if (control instanceof TableSchema) {
|
|
19367
|
+
if (JSON.stringify(oldValue) != JSON.stringify(newValue)) {
|
|
19368
|
+
this.logSetting.arrValueAfterUpdate.push(new LogColumn({
|
|
19369
|
+
field: control.field,
|
|
19370
|
+
label: control.label,
|
|
19371
|
+
enumLogType: exports.EnumLogType.Table
|
|
19372
|
+
}));
|
|
19373
|
+
}
|
|
19374
|
+
}
|
|
19375
|
+
else if (control instanceof DropdownControlSchema || control instanceof AutoCompletePickerControlSchema) {
|
|
19360
19376
|
if (!isMultiple && oldValue != newValue) {
|
|
19361
19377
|
this.addSinglePropertyLog(control, oldValue, newValue);
|
|
19362
19378
|
}
|
|
@@ -19372,7 +19388,9 @@
|
|
|
19372
19388
|
label: control.label,
|
|
19373
19389
|
valueBefore: valueBefore,
|
|
19374
19390
|
valueAfter: valueAfter,
|
|
19375
|
-
|
|
19391
|
+
enumLogType: (control instanceof EditorControlSchema || control instanceof TextAreaControlSchema)
|
|
19392
|
+
? exports.EnumLogType.Table
|
|
19393
|
+
: exports.EnumLogType.Normal
|
|
19376
19394
|
}));
|
|
19377
19395
|
}
|
|
19378
19396
|
}
|
|
@@ -19423,7 +19441,9 @@
|
|
|
19423
19441
|
case 4:
|
|
19424
19442
|
// cấu hình thêm
|
|
19425
19443
|
_e.sent();
|
|
19426
|
-
this.model.data.logMetaData =
|
|
19444
|
+
this.model.data.logMetaData = this.logSetting.arrValueAfterUpdate.filter(function (p) { return p.visible; }).length
|
|
19445
|
+
? JSON.stringify(this.logSetting.arrValueAfterUpdate.filter(function (p) { return p.visible; }))
|
|
19446
|
+
: null;
|
|
19427
19447
|
_e.label = 5;
|
|
19428
19448
|
case 5: return [4 /*yield*/, this.onBeforeSave()];
|
|
19429
19449
|
case 6:
|