@e1011/es-kit 1.0.220 → 1.0.224
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/hooks/esm/index.css +28 -28
- package/dist/hooks/esm/src/core/hooks/index.js +1 -1
- package/dist/hooks/index.css +28 -28
- package/dist/hooks/src/core/hooks/index.js +1 -1
- package/dist/lib/cjs/src/index.js +1 -1
- package/dist/lib/esm/src/index.js +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/hooks/index.d.ts +0 -1
- package/dist/types/src/core/hooks/index.d.ts.map +1 -1
- package/dist/utils/esm/index.css +28 -28
- package/dist/utils/index.css +28 -28
- package/package.json +5 -10
- package/dist/hooks/esm/src/core/hooks/useTranslations.js +0 -2
- package/dist/hooks/esm/src/core/hooks/useTranslations.js.map +0 -1
- package/dist/hooks/src/core/hooks/useTranslations.js +0 -2
- package/dist/hooks/src/core/hooks/useTranslations.js.map +0 -1
- package/dist/lib/cjs/src/core/hooks/useTranslations.js +0 -2
- package/dist/lib/cjs/src/core/hooks/useTranslations.js.map +0 -1
- package/dist/lib/esm/src/core/hooks/useTranslations.js +0 -2
- package/dist/lib/esm/src/core/hooks/useTranslations.js.map +0 -1
- package/dist/types/src/core/hooks/useTranslations.d.ts +0 -10
- package/dist/types/src/core/hooks/useTranslations.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA"}
|
package/dist/utils/esm/index.css
CHANGED
|
@@ -28,6 +28,34 @@
|
|
|
28
28
|
width: var(--height);
|
|
29
29
|
height: var(--width);
|
|
30
30
|
}
|
|
31
|
+
.errorBoundary-module_errorBoundary__gk9ps {
|
|
32
|
+
background: #EFEFEF;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.errorBoundary-module_StyledIcon__IYHiU {
|
|
38
|
+
margin-right: 10px;
|
|
39
|
+
}
|
|
40
|
+
.divider-module_divider-line__6CesR {
|
|
41
|
+
position: relative;
|
|
42
|
+
display: block;
|
|
43
|
+
transition: opacity, width, height 250ms ease-in-out;
|
|
44
|
+
background-color: var(--color);
|
|
45
|
+
opacity: var(--opacity);
|
|
46
|
+
}
|
|
47
|
+
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
48
|
+
height: var(--length);
|
|
49
|
+
left: var(--left);
|
|
50
|
+
width: var(--width);
|
|
51
|
+
margin: var(--margin);
|
|
52
|
+
}
|
|
53
|
+
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
54
|
+
width: var(--length);
|
|
55
|
+
left: var(--left);
|
|
56
|
+
height: var(--height);
|
|
57
|
+
margin: var(--margin);
|
|
58
|
+
}
|
|
31
59
|
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
32
60
|
transform-origin: 0% 0%;
|
|
33
61
|
opacity: 0;
|
|
@@ -61,34 +89,6 @@
|
|
|
61
89
|
max-width: var(--prop-value);
|
|
62
90
|
opacity: 1;
|
|
63
91
|
}
|
|
64
|
-
.errorBoundary-module_errorBoundary__gk9ps {
|
|
65
|
-
background: #EFEFEF;
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.errorBoundary-module_StyledIcon__IYHiU {
|
|
71
|
-
margin-right: 10px;
|
|
72
|
-
}
|
|
73
|
-
.divider-module_divider-line__6CesR {
|
|
74
|
-
position: relative;
|
|
75
|
-
display: block;
|
|
76
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
77
|
-
background-color: var(--color);
|
|
78
|
-
opacity: var(--opacity);
|
|
79
|
-
}
|
|
80
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
81
|
-
height: var(--length);
|
|
82
|
-
left: var(--left);
|
|
83
|
-
width: var(--width);
|
|
84
|
-
margin: var(--margin);
|
|
85
|
-
}
|
|
86
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
87
|
-
width: var(--length);
|
|
88
|
-
left: var(--left);
|
|
89
|
-
height: var(--height);
|
|
90
|
-
margin: var(--margin);
|
|
91
|
-
}
|
|
92
92
|
.layoutBox-module_layout-box__ZIID8 {
|
|
93
93
|
display: flex;
|
|
94
94
|
position: relative;
|
package/dist/utils/index.css
CHANGED
|
@@ -28,6 +28,34 @@
|
|
|
28
28
|
width: var(--height);
|
|
29
29
|
height: var(--width);
|
|
30
30
|
}
|
|
31
|
+
.errorBoundary-module_errorBoundary__gk9ps {
|
|
32
|
+
background: #EFEFEF;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.errorBoundary-module_StyledIcon__IYHiU {
|
|
38
|
+
margin-right: 10px;
|
|
39
|
+
}
|
|
40
|
+
.divider-module_divider-line__6CesR {
|
|
41
|
+
position: relative;
|
|
42
|
+
display: block;
|
|
43
|
+
transition: opacity, width, height 250ms ease-in-out;
|
|
44
|
+
background-color: var(--color);
|
|
45
|
+
opacity: var(--opacity);
|
|
46
|
+
}
|
|
47
|
+
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
48
|
+
height: var(--length);
|
|
49
|
+
left: var(--left);
|
|
50
|
+
width: var(--width);
|
|
51
|
+
margin: var(--margin);
|
|
52
|
+
}
|
|
53
|
+
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
54
|
+
width: var(--length);
|
|
55
|
+
left: var(--left);
|
|
56
|
+
height: var(--height);
|
|
57
|
+
margin: var(--margin);
|
|
58
|
+
}
|
|
31
59
|
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
32
60
|
transform-origin: 0% 0%;
|
|
33
61
|
opacity: 0;
|
|
@@ -61,34 +89,6 @@
|
|
|
61
89
|
max-width: var(--prop-value);
|
|
62
90
|
opacity: 1;
|
|
63
91
|
}
|
|
64
|
-
.errorBoundary-module_errorBoundary__gk9ps {
|
|
65
|
-
background: #EFEFEF;
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.errorBoundary-module_StyledIcon__IYHiU {
|
|
71
|
-
margin-right: 10px;
|
|
72
|
-
}
|
|
73
|
-
.divider-module_divider-line__6CesR {
|
|
74
|
-
position: relative;
|
|
75
|
-
display: block;
|
|
76
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
77
|
-
background-color: var(--color);
|
|
78
|
-
opacity: var(--opacity);
|
|
79
|
-
}
|
|
80
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
81
|
-
height: var(--length);
|
|
82
|
-
left: var(--left);
|
|
83
|
-
width: var(--width);
|
|
84
|
-
margin: var(--margin);
|
|
85
|
-
}
|
|
86
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
87
|
-
width: var(--length);
|
|
88
|
-
left: var(--left);
|
|
89
|
-
height: var(--height);
|
|
90
|
-
margin: var(--margin);
|
|
91
|
-
}
|
|
92
92
|
.layoutBox-module_layout-box__ZIID8 {
|
|
93
93
|
display: flex;
|
|
94
94
|
position: relative;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e1011/es-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.224",
|
|
4
4
|
"main": "dist/lib/cjs/src/index.js",
|
|
5
5
|
"module": "dist/lib/esm/src/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
"reflect-metadata": "^0.1.13",
|
|
129
129
|
"reselect": "^4.1.8",
|
|
130
130
|
"rollup": "^4.9.2",
|
|
131
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
131
132
|
"rollup-plugin-postcss": "^4.0.2",
|
|
132
133
|
"rollup-plugin-tsconfig-paths": "^1.5.2",
|
|
133
134
|
"sass": "^1.59.3",
|
|
@@ -136,30 +137,24 @@
|
|
|
136
137
|
"ts-jest": "^29.0.5",
|
|
137
138
|
"ts-node": "^10.9.1",
|
|
138
139
|
"typed-scss-modules": "^8.0.0",
|
|
139
|
-
"typescript": "^5.3.3"
|
|
140
|
+
"typescript": "^5.3.3",
|
|
141
|
+
"vite": "^5.2.6"
|
|
140
142
|
},
|
|
141
143
|
"dependencies": {
|
|
142
144
|
"core-js": "^3.20.2",
|
|
143
145
|
"dayjs": "^1.10.7",
|
|
144
|
-
"i18next": "^21.6.14",
|
|
145
146
|
"lodash-es": "^4.17.21",
|
|
146
147
|
"ramda": "^0.27.1",
|
|
147
148
|
"react": "^17.0.2 || ^18.2.0",
|
|
148
|
-
"react-dom": "^17.0.2 || ^18.2.0",
|
|
149
|
-
"react-i18next": "^11.16.2",
|
|
150
149
|
"sanitize-html": "^2.6.1",
|
|
151
|
-
"styled-components": "^6.1.8"
|
|
152
|
-
"vite": "^5.2.6"
|
|
150
|
+
"styled-components": "^6.1.8"
|
|
153
151
|
},
|
|
154
152
|
"peerDdependencies": {
|
|
155
153
|
"core-js": "^3.20.2",
|
|
156
154
|
"dayjs": "^1.10.7",
|
|
157
|
-
"i18next": "^21.6.14",
|
|
158
155
|
"lodash-es": "^4.17.21",
|
|
159
156
|
"ramda": "^0.27.1",
|
|
160
157
|
"react": "^17.0.2 || ^18.2.0",
|
|
161
|
-
"react-dom": "^17.0.2 || ^18.2.0",
|
|
162
|
-
"react-i18next": "^11.16.2",
|
|
163
158
|
"sanitize-html": "^2.6.1",
|
|
164
159
|
"styled-components": "^6.1.8"
|
|
165
160
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{useTranslation as t}from"react-i18next";const e=new Map;let r=t;const o=t=>{r=t},n=t=>{if(e.has(t))return e.get(t);const r=(e,r)=>{if(!e)return"";const o=e.split(" ");return 2===o.length?t(o[0],{...r,limit:o[1]}):t(e,r)};return e.set(t,r),r},s=t=>{const{t:e}=r(t);return{t:n(e)}};export{n as createSafeT,o as setUseTranslation,s as useTranslations};
|
|
2
|
-
//# sourceMappingURL=useTranslations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslations.js","sources":["../../../../../../src/core/hooks/useTranslations.ts"],"sourcesContent":["import { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\n\ntype tValuFunction = (key: string | undefined, params?: Record<string, any>) => string\nconst cache: Map<TFunction, tValuFunction> = new Map()\n\nlet resolvedUseTranslation = useTranslation\n\nexport const setUseTranslation = (useTrans: any): void => {\n resolvedUseTranslation = useTrans\n}\n\nexport const createSafeT = (t: TFunction): tValuFunction => {\n if (cache.has(t)) {\n return cache.get(t) as tValuFunction\n }\n const value: tValuFunction = ((key: string | undefined, params?: Record<string, any>): string => {\n if (!key) {\n return ''\n }\n const limits = key.split(' ')\n\n if (limits.length === 2) {\n return t(limits[0], { ...params, limit: limits[1] })\n }\n return t(key, params)\n })\n\n cache.set(t, value)\n return value\n}\n\ntype safeTF = { t: (key: string | undefined, params?: Record<string, any>) => string }\n\n// TODO memoize\nexport const useTranslations = (namespaces: string[]): safeTF => {\n const { t } = resolvedUseTranslation(namespaces)\n\n return { t: createSafeT(t) as tValuFunction }\n}\n"],"names":["cache","Map","resolvedUseTranslation","useTranslation","setUseTranslation","useTrans","createSafeT","t","has","get","value","key","params","limits","split","length","limit","set","useTranslations","namespaces"],"mappings":"6HAIA,MAAMA,EAAuC,IAAIC,IAEjD,IAAIC,EAAyBC,EAEhBC,MAAAA,EAAqBC,IAChCH,EAAyBG,CAAQ,EAGtBC,EAAeC,IAC1B,GAAIP,EAAMQ,IAAID,GACZ,OAAOP,EAAMS,IAAIF,GAEnB,MAAMG,EAAwBA,CAACC,EAAyBC,KACtD,IAAKD,EACH,MAAO,GAET,MAAME,EAASF,EAAIG,MAAM,KAEzB,OAAsB,IAAlBD,EAAOE,OACFR,EAAEM,EAAO,GAAI,IAAKD,EAAQI,MAAOH,EAAO,KAE1CN,EAAEI,EAAKC,EAAO,EAIvB,OADAZ,EAAMiB,IAAIV,EAAGG,GACNA,CAAK,EAMDQ,EAAmBC,IAC9B,MAAMZ,EAAEA,GAAML,EAAuBiB,GAErC,MAAO,CAAEZ,EAAGD,EAAYC,GAAqB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";require("../../../node_modules/core-js/modules/web.dom-collections.iterator.js");var e=require("react-i18next");const t=new Map;let r=e.useTranslation;const s=e=>{if(t.has(e))return t.get(e);const r=(t,r)=>{if(!t)return"";const s=t.split(" ");return 2===s.length?e(s[0],{...r,limit:s[1]}):e(t,r)};return t.set(e,r),r};exports.createSafeT=s,exports.setUseTranslation=e=>{r=e},exports.useTranslations=e=>{const{t:t}=r(e);return{t:s(t)}};
|
|
2
|
-
//# sourceMappingURL=useTranslations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslations.js","sources":["../../../../../src/core/hooks/useTranslations.ts"],"sourcesContent":["import { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\n\ntype tValuFunction = (key: string | undefined, params?: Record<string, any>) => string\nconst cache: Map<TFunction, tValuFunction> = new Map()\n\nlet resolvedUseTranslation = useTranslation\n\nexport const setUseTranslation = (useTrans: any): void => {\n resolvedUseTranslation = useTrans\n}\n\nexport const createSafeT = (t: TFunction): tValuFunction => {\n if (cache.has(t)) {\n return cache.get(t) as tValuFunction\n }\n const value: tValuFunction = ((key: string | undefined, params?: Record<string, any>): string => {\n if (!key) {\n return ''\n }\n const limits = key.split(' ')\n\n if (limits.length === 2) {\n return t(limits[0], { ...params, limit: limits[1] })\n }\n return t(key, params)\n })\n\n cache.set(t, value)\n return value\n}\n\ntype safeTF = { t: (key: string | undefined, params?: Record<string, any>) => string }\n\n// TODO memoize\nexport const useTranslations = (namespaces: string[]): safeTF => {\n const { t } = resolvedUseTranslation(namespaces)\n\n return { t: createSafeT(t) as tValuFunction }\n}\n"],"names":["cache","Map","resolvedUseTranslation","useTranslation","setUseTranslation","createSafeT","t","has","get","value","key","params","limits","split","length","limit","set","useTrans","namespaces"],"mappings":"6HAIA,MAAMA,EAAuC,IAAIC,IAEjD,IAAIC,EAAyBC,EAAAA,eAEhBC,MAIAC,EAAeC,IAC1B,GAAIN,EAAMO,IAAID,GACZ,OAAON,EAAMQ,IAAIF,GAEnB,MAAMG,EAAwBA,CAACC,EAAyBC,KACtD,IAAKD,EACH,MAAO,GAET,MAAME,EAASF,EAAIG,MAAM,KAEzB,OAAsB,IAAlBD,EAAOE,OACFR,EAAEM,EAAO,GAAI,IAAKD,EAAQI,MAAOH,EAAO,KAE1CN,EAAEI,EAAKC,EAAO,EAIvB,OADAX,EAAMgB,IAAIV,EAAGG,GACNA,CAAK,kDArBoBQ,IAChCf,EAAyBe,CAAQ,0BA0BHC,IAC9B,MAAMZ,EAAEA,GAAMJ,EAAuBgB,GAErC,MAAO,CAAEZ,EAAGD,EAAYC,GAAqB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";require("../../../node_modules/core-js/modules/web.dom-collections.iterator.js");var e=require("react-i18next");const t=new Map;let r=e.useTranslation;const s=e=>{if(t.has(e))return t.get(e);const r=(t,r)=>{if(!t)return"";const s=t.split(" ");return 2===s.length?e(s[0],{...r,limit:s[1]}):e(t,r)};return t.set(e,r),r};exports.createSafeT=s,exports.setUseTranslation=e=>{r=e},exports.useTranslations=e=>{const{t:t}=r(e);return{t:s(t)}};
|
|
2
|
-
//# sourceMappingURL=useTranslations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslations.js","sources":["../../../../../../src/core/hooks/useTranslations.ts"],"sourcesContent":["import { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\n\ntype tValuFunction = (key: string | undefined, params?: Record<string, any>) => string\nconst cache: Map<TFunction, tValuFunction> = new Map()\n\nlet resolvedUseTranslation = useTranslation\n\nexport const setUseTranslation = (useTrans: any): void => {\n resolvedUseTranslation = useTrans\n}\n\nexport const createSafeT = (t: TFunction): tValuFunction => {\n if (cache.has(t)) {\n return cache.get(t) as tValuFunction\n }\n const value: tValuFunction = ((key: string | undefined, params?: Record<string, any>): string => {\n if (!key) {\n return ''\n }\n const limits = key.split(' ')\n\n if (limits.length === 2) {\n return t(limits[0], { ...params, limit: limits[1] })\n }\n return t(key, params)\n })\n\n cache.set(t, value)\n return value\n}\n\ntype safeTF = { t: (key: string | undefined, params?: Record<string, any>) => string }\n\n// TODO memoize\nexport const useTranslations = (namespaces: string[]): safeTF => {\n const { t } = resolvedUseTranslation(namespaces)\n\n return { t: createSafeT(t) as tValuFunction }\n}\n"],"names":["cache","Map","resolvedUseTranslation","useTranslation","setUseTranslation","createSafeT","t","has","get","value","key","params","limits","split","length","limit","set","useTrans","namespaces"],"mappings":"6HAIA,MAAMA,EAAuC,IAAIC,IAEjD,IAAIC,EAAyBC,EAAAA,eAEhBC,MAIAC,EAAeC,IAC1B,GAAIN,EAAMO,IAAID,GACZ,OAAON,EAAMQ,IAAIF,GAEnB,MAAMG,EAAwBA,CAACC,EAAyBC,KACtD,IAAKD,EACH,MAAO,GAET,MAAME,EAASF,EAAIG,MAAM,KAEzB,OAAsB,IAAlBD,EAAOE,OACFR,EAAEM,EAAO,GAAI,IAAKD,EAAQI,MAAOH,EAAO,KAE1CN,EAAEI,EAAKC,EAAO,EAIvB,OADAX,EAAMgB,IAAIV,EAAGG,GACNA,CAAK,kDArBoBQ,IAChCf,EAAyBe,CAAQ,0BA0BHC,IAC9B,MAAMZ,EAAEA,GAAMJ,EAAuBgB,GAErC,MAAO,CAAEZ,EAAGD,EAAYC,GAAqB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{useTranslation as t}from"react-i18next";const e=new Map;let r=t;const o=t=>{r=t},n=t=>{if(e.has(t))return e.get(t);const r=(e,r)=>{if(!e)return"";const o=e.split(" ");return 2===o.length?t(o[0],{...r,limit:o[1]}):t(e,r)};return e.set(t,r),r},s=t=>{const{t:e}=r(t);return{t:n(e)}};export{n as createSafeT,o as setUseTranslation,s as useTranslations};
|
|
2
|
-
//# sourceMappingURL=useTranslations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslations.js","sources":["../../../../../../src/core/hooks/useTranslations.ts"],"sourcesContent":["import { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\n\ntype tValuFunction = (key: string | undefined, params?: Record<string, any>) => string\nconst cache: Map<TFunction, tValuFunction> = new Map()\n\nlet resolvedUseTranslation = useTranslation\n\nexport const setUseTranslation = (useTrans: any): void => {\n resolvedUseTranslation = useTrans\n}\n\nexport const createSafeT = (t: TFunction): tValuFunction => {\n if (cache.has(t)) {\n return cache.get(t) as tValuFunction\n }\n const value: tValuFunction = ((key: string | undefined, params?: Record<string, any>): string => {\n if (!key) {\n return ''\n }\n const limits = key.split(' ')\n\n if (limits.length === 2) {\n return t(limits[0], { ...params, limit: limits[1] })\n }\n return t(key, params)\n })\n\n cache.set(t, value)\n return value\n}\n\ntype safeTF = { t: (key: string | undefined, params?: Record<string, any>) => string }\n\n// TODO memoize\nexport const useTranslations = (namespaces: string[]): safeTF => {\n const { t } = resolvedUseTranslation(namespaces)\n\n return { t: createSafeT(t) as tValuFunction }\n}\n"],"names":["cache","Map","resolvedUseTranslation","useTranslation","setUseTranslation","useTrans","createSafeT","t","has","get","value","key","params","limits","split","length","limit","set","useTranslations","namespaces"],"mappings":"6HAIA,MAAMA,EAAuC,IAAIC,IAEjD,IAAIC,EAAyBC,EAEhBC,MAAAA,EAAqBC,IAChCH,EAAyBG,CAAQ,EAGtBC,EAAeC,IAC1B,GAAIP,EAAMQ,IAAID,GACZ,OAAOP,EAAMS,IAAIF,GAEnB,MAAMG,EAAwBA,CAACC,EAAyBC,KACtD,IAAKD,EACH,MAAO,GAET,MAAME,EAASF,EAAIG,MAAM,KAEzB,OAAsB,IAAlBD,EAAOE,OACFR,EAAEM,EAAO,GAAI,IAAKD,EAAQI,MAAOH,EAAO,KAE1CN,EAAEI,EAAKC,EAAO,EAIvB,OADAZ,EAAMiB,IAAIV,EAAGG,GACNA,CAAK,EAMDQ,EAAmBC,IAC9B,MAAMZ,EAAEA,GAAML,EAAuBiB,GAErC,MAAO,CAAEZ,EAAGD,EAAYC,GAAqB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TFunction } from 'i18next';
|
|
2
|
-
type tValuFunction = (key: string | undefined, params?: Record<string, any>) => string;
|
|
3
|
-
export declare const setUseTranslation: (useTrans: any) => void;
|
|
4
|
-
export declare const createSafeT: (t: TFunction) => tValuFunction;
|
|
5
|
-
type safeTF = {
|
|
6
|
-
t: (key: string | undefined, params?: Record<string, any>) => string;
|
|
7
|
-
};
|
|
8
|
-
export declare const useTranslations: (namespaces: string[]) => safeTF;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=useTranslations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslations.d.ts","sourceRoot":"","sources":["../../../../../src/core/hooks/useTranslations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,KAAK,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAA;AAKtF,eAAO,MAAM,iBAAiB,aAAc,GAAG,KAAG,IAEjD,CAAA;AAED,eAAO,MAAM,WAAW,MAAO,SAAS,KAAG,aAkB1C,CAAA;AAED,KAAK,MAAM,GAAG;IAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAA;CAAE,CAAA;AAGtF,eAAO,MAAM,eAAe,eAAgB,MAAM,EAAE,KAAG,MAItD,CAAA"}
|