tnx-shared 5.3.314 → 5.3.316
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 +33 -10
- 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/esm2015/services/signalr.service.js +7 -4
- package/fesm2015/tnx-shared.js +34 -11
- package/fesm2015/tnx-shared.js.map +1 -1
- package/models/export-item.d.ts.map +1 -1
- package/package.json +2 -2
- package/services/signalr.service.d.ts +1 -0
- package/services/signalr.service.d.ts.map +1 -1
- 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";
|
|
@@ -5967,6 +5973,7 @@
|
|
|
5967
5973
|
this.maxRetryTimes = 10;
|
|
5968
5974
|
this.isInited = false;
|
|
5969
5975
|
this.isInitedFull = false;
|
|
5976
|
+
this.isSingleSignalR = false;
|
|
5970
5977
|
this.wait = function (ms) { return new Promise(function (r) { return setTimeout(r, ms); }); };
|
|
5971
5978
|
this._moduleConfig = this._moduleConfigService.getConfig();
|
|
5972
5979
|
this.hubsSetting = this._moduleConfig.environment.signalrConfig.hubs;
|
|
@@ -6013,7 +6020,7 @@
|
|
|
6013
6020
|
_a.label = 8;
|
|
6014
6021
|
case 8:
|
|
6015
6022
|
while (this.delayStarters.length > 0) {
|
|
6016
|
-
this.delayStarters.pop()
|
|
6023
|
+
this.delayStarters.pop();
|
|
6017
6024
|
}
|
|
6018
6025
|
this.connected = true;
|
|
6019
6026
|
return [2 /*return*/];
|
|
@@ -6026,6 +6033,7 @@
|
|
|
6026
6033
|
return __generator(this, function (_a) {
|
|
6027
6034
|
switch (_a.label) {
|
|
6028
6035
|
case 0:
|
|
6036
|
+
this.isSingleSignalR = true;
|
|
6029
6037
|
if (this.isInitedFull) {
|
|
6030
6038
|
return [2 /*return*/];
|
|
6031
6039
|
}
|
|
@@ -6051,7 +6059,7 @@
|
|
|
6051
6059
|
_a.sent();
|
|
6052
6060
|
this.autoReconnect(this.hubs['PublicHub']);
|
|
6053
6061
|
while (this.delayStarters.length > 0) {
|
|
6054
|
-
this.delayStarters.pop()
|
|
6062
|
+
this.delayStarters.pop();
|
|
6055
6063
|
}
|
|
6056
6064
|
this.connected = true;
|
|
6057
6065
|
return [2 /*return*/];
|
|
@@ -6079,7 +6087,8 @@
|
|
|
6079
6087
|
return (topic === 'CommonHub' && this.hubsSetting && this.hubsSetting.enableCommonHub)
|
|
6080
6088
|
|| (topic === 'ConsistencyHub' && this.hubsSetting && this.hubsSetting.enableConsistencyHub)
|
|
6081
6089
|
|| (topic === 'NotificationHub' && this.hubsSetting && this.hubsSetting.enableNotificationHub)
|
|
6082
|
-
|| (topic === 'PublicHub')
|
|
6090
|
+
|| (topic === 'PublicHub')
|
|
6091
|
+
|| this.isSingleSignalR;
|
|
6083
6092
|
};
|
|
6084
6093
|
SignalRService.prototype.stop = function () {
|
|
6085
6094
|
this._hubConnection.stop();
|
|
@@ -19088,7 +19097,7 @@
|
|
|
19088
19097
|
_this.logSetting.arrValueAfterUpdate.push(new LogColumn({
|
|
19089
19098
|
field: control.field,
|
|
19090
19099
|
label: control.label,
|
|
19091
|
-
valueBefore: control._component.dataSource.map(function (p) { return p.label; }).join(', '),
|
|
19100
|
+
valueBefore: control._component.dataSource.map(function (p) { return p.label; }).join(', ') || _this.logSetting.emptyValue,
|
|
19092
19101
|
visible: false,
|
|
19093
19102
|
valueAfter: ''
|
|
19094
19103
|
}));
|
|
@@ -19259,7 +19268,7 @@
|
|
|
19259
19268
|
});
|
|
19260
19269
|
};
|
|
19261
19270
|
DataFormBase.prototype.getSingleLabel = function (control, dataSource, valueParam) {
|
|
19262
|
-
var result = dataSource.find(function (p) { return p.value[control.valueField] == valueParam; });
|
|
19271
|
+
var result = dataSource.find(function (p) { return (p === null || p === void 0 ? void 0 : p.value[control.valueField]) == valueParam; });
|
|
19263
19272
|
if (!!result) {
|
|
19264
19273
|
var funcGetLabel = control.funcGetLabel;
|
|
19265
19274
|
if (funcGetLabel) {
|
|
@@ -19355,8 +19364,18 @@
|
|
|
19355
19364
|
var oldValue = this.logSetting.valueBeforeUpdate[control.field];
|
|
19356
19365
|
var newValue = cloneModel[control.field];
|
|
19357
19366
|
var isMultiple = Array.isArray(oldValue);
|
|
19358
|
-
if (!this.isNullOrEmpty(oldValue) || !this.isNullOrEmpty(newValue))
|
|
19359
|
-
|
|
19367
|
+
if ((!this.isNullOrEmpty(oldValue) || !this.isNullOrEmpty(newValue))
|
|
19368
|
+
&& !(control instanceof FileManagerControlSchema)) {
|
|
19369
|
+
if (control instanceof TableSchema) {
|
|
19370
|
+
if (JSON.stringify(oldValue) != JSON.stringify(newValue)) {
|
|
19371
|
+
this.logSetting.arrValueAfterUpdate.push(new LogColumn({
|
|
19372
|
+
field: control.field,
|
|
19373
|
+
label: control.label,
|
|
19374
|
+
enumLogType: exports.EnumLogType.Table
|
|
19375
|
+
}));
|
|
19376
|
+
}
|
|
19377
|
+
}
|
|
19378
|
+
else if (control instanceof DropdownControlSchema || control instanceof AutoCompletePickerControlSchema) {
|
|
19360
19379
|
if (!isMultiple && oldValue != newValue) {
|
|
19361
19380
|
this.addSinglePropertyLog(control, oldValue, newValue);
|
|
19362
19381
|
}
|
|
@@ -19372,7 +19391,9 @@
|
|
|
19372
19391
|
label: control.label,
|
|
19373
19392
|
valueBefore: valueBefore,
|
|
19374
19393
|
valueAfter: valueAfter,
|
|
19375
|
-
|
|
19394
|
+
enumLogType: (control instanceof EditorControlSchema || control instanceof TextAreaControlSchema)
|
|
19395
|
+
? exports.EnumLogType.Table
|
|
19396
|
+
: exports.EnumLogType.Normal
|
|
19376
19397
|
}));
|
|
19377
19398
|
}
|
|
19378
19399
|
}
|
|
@@ -19423,7 +19444,9 @@
|
|
|
19423
19444
|
case 4:
|
|
19424
19445
|
// cấu hình thêm
|
|
19425
19446
|
_e.sent();
|
|
19426
|
-
this.model.data.logMetaData =
|
|
19447
|
+
this.model.data.logMetaData = this.logSetting.arrValueAfterUpdate.filter(function (p) { return p.visible; }).length
|
|
19448
|
+
? JSON.stringify(this.logSetting.arrValueAfterUpdate.filter(function (p) { return p.visible; }))
|
|
19449
|
+
: null;
|
|
19427
19450
|
_e.label = 5;
|
|
19428
19451
|
case 5: return [4 /*yield*/, this.onBeforeSave()];
|
|
19429
19452
|
case 6:
|