@freelog/tools-lib 0.1.153 → 0.1.154
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/dist/i18n/I18nNext.d.ts +3 -0
- package/dist/tools-lib.cjs.development.js +5 -0
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +5 -0
- package/dist/tools-lib.esm.js.map +1 -1
- package/package.json +2 -1
- package/src/i18n/I18nNext.ts +162 -155
- package/src/service-API/collections.ts +80 -80
- package/src/service-API/resources.ts +644 -644
- package/src/utils/hooks.ts +17 -17
- package/src/utils/index.ts +22 -22
- package/src/utils/linkTo.ts +439 -439
- package/src/utils/regexp.ts +60 -60
package/dist/tools-lib.esm.js
CHANGED
|
@@ -5,6 +5,7 @@ import { lib, SHA1 } from 'crypto-js';
|
|
|
5
5
|
import { useState, useRef } from 'react';
|
|
6
6
|
import i18next from 'i18next';
|
|
7
7
|
import Cookies from 'js-cookie';
|
|
8
|
+
import htmlReactParser from 'html-react-parser';
|
|
8
9
|
|
|
9
10
|
// import {ContractEntity} from '@freelog/resource-policy-lang/dist/tools/ContractTool';
|
|
10
11
|
// const {compile} = require('@freelog/resource-policy-lang');
|
|
@@ -3405,6 +3406,10 @@ var I18nNext = /*#__PURE__*/function () {
|
|
|
3405
3406
|
return i18next.t(key.trim(), options);
|
|
3406
3407
|
};
|
|
3407
3408
|
|
|
3409
|
+
_proto.tJSXElement = function tJSXElement(key, options) {
|
|
3410
|
+
return htmlReactParser(i18next.t(key.trim(), options));
|
|
3411
|
+
};
|
|
3412
|
+
|
|
3408
3413
|
_proto.changeLanguage = function changeLanguage(lng) {
|
|
3409
3414
|
// return i18next.changeLanguage(lng);
|
|
3410
3415
|
// window.localStorage.setItem(localStorage_i18nextLng_key, lng)
|