tnx-shared 5.3.380 → 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 +11 -0
- 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/esm2015/services/common.service.js +12 -1
- package/fesm2015/tnx-shared.js +11 -0
- 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
|
@@ -5081,6 +5081,17 @@
|
|
|
5081
5081
|
var temp = s.normalize('NFD');
|
|
5082
5082
|
return temp.replace(regex, '').replace('\u0111', 'd').replace('\u0110', 'D');
|
|
5083
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
|
+
};
|
|
5084
5095
|
return CommonService;
|
|
5085
5096
|
}());
|
|
5086
5097
|
CommonService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CommonService_Factory() { return new CommonService(i0__namespace.ɵɵinject(ModuleConfigService)); }, token: CommonService, providedIn: "root" });
|