tnx-shared 5.3.379 → 5.3.381
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 +15 -2
- 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/list-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/esm2015/classes/base/list-base.js +2 -1
- package/esm2015/classes/form-schema.js +2 -1
- package/esm2015/components/common-search-form/common-search-form.component.js +3 -3
- package/esm2015/services/common.service.js +12 -1
- package/fesm2015/tnx-shared.js +15 -2
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/common.service.d.ts +1 -0
- package/services/common.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -1106,6 +1106,7 @@
|
|
|
1106
1106
|
this.entityKey = 'id';
|
|
1107
1107
|
this.modelSchemas = [];
|
|
1108
1108
|
this.cols = [];
|
|
1109
|
+
this.rawCols = [];
|
|
1109
1110
|
this.commonSchemas = [];
|
|
1110
1111
|
this.columnSetting = new ColumnSetting();
|
|
1111
1112
|
this.pageSetting = new PageSetting();
|
|
@@ -5080,6 +5081,17 @@
|
|
|
5080
5081
|
var temp = s.normalize('NFD');
|
|
5081
5082
|
return temp.replace(regex, '').replace('\u0111', 'd').replace('\u0110', 'D');
|
|
5082
5083
|
};
|
|
5084
|
+
CommonService.prototype.extractInnerText = function (htmlString) {
|
|
5085
|
+
if (!htmlString)
|
|
5086
|
+
return '';
|
|
5087
|
+
var withoutComments = htmlString.replace(/<!--[\s\S]*?-->/g, '');
|
|
5088
|
+
// Tạo một DOM element từ chuỗi HTML đã loại bỏ comment
|
|
5089
|
+
var parser = new DOMParser();
|
|
5090
|
+
var doc = parser.parseFromString(withoutComments, 'text/html');
|
|
5091
|
+
var result = doc.body.innerText.trim();
|
|
5092
|
+
doc = null; // Dọn dẹp tham chiếu (không cần thiết nếu scope kết thúc)
|
|
5093
|
+
return result;
|
|
5094
|
+
};
|
|
5083
5095
|
return CommonService;
|
|
5084
5096
|
}());
|
|
5085
5097
|
CommonService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CommonService_Factory() { return new CommonService(i0__namespace.ɵɵinject(ModuleConfigService)); }, token: CommonService, providedIn: "root" });
|
|
@@ -27376,6 +27388,7 @@
|
|
|
27376
27388
|
this.model.baseReady = false;
|
|
27377
27389
|
if (this.setting.cols) {
|
|
27378
27390
|
this.setting.cols = this.setting.cols.filter(function (q) { return !q.removeOnInit; });
|
|
27391
|
+
Object.assign(this.setting.rawCols, this.setting.cols);
|
|
27379
27392
|
}
|
|
27380
27393
|
this.setting.customGetData = this.customGetData;
|
|
27381
27394
|
this.mergeInfoToColumnSchema();
|
|
@@ -33399,7 +33412,7 @@
|
|
|
33399
33412
|
this.mdWidth = this.parentSetting.mdWidthCommonSearch;
|
|
33400
33413
|
this.setting.baseService = this.parentSetting.baseService;
|
|
33401
33414
|
this.isCustomGenerateSearch = this.parentSetting.commonSchemas.length > 0;
|
|
33402
|
-
var columnFilters = this.parentSetting.
|
|
33415
|
+
var columnFilters = this.parentSetting.rawCols.filter(function (p) { return p.allowFilter && !p.field.startsWith('str'); }).sort(function (a, b) {
|
|
33403
33416
|
if (a.order < b.order) {
|
|
33404
33417
|
return -1;
|
|
33405
33418
|
}
|
|
@@ -33626,7 +33639,7 @@
|
|
|
33626
33639
|
var _a;
|
|
33627
33640
|
if (!data.hasOwnProperty(item) || (!data[item] || data[item].length < 1))
|
|
33628
33641
|
return;
|
|
33629
|
-
var valueField = ((_a = _this.parentSetting.
|
|
33642
|
+
var valueField = ((_a = _this.parentSetting.rawCols.find(function (p) { return p.field === item; })) === null || _a === void 0 ? void 0 : _a.valueField) || 'id';
|
|
33630
33643
|
if (data[item].length) {
|
|
33631
33644
|
data[item] = data[item].map(function (p) { return p[valueField]; });
|
|
33632
33645
|
}
|