@kingteza/crud-component 1.14.8 → 1.14.9
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/locale/index.cjs.js +1 -1
- package/dist/locale/index.es.js +28 -28
- package/package.json +12 -2
package/dist/locale/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./hooks/translation-constants.cjs.js"),d=require("./translations/en.cjs.js"),r=require("i18next"),o=require("react-i18next"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./hooks/translation-constants.cjs.js"),d=require("./translations/en.cjs.js"),r=require("i18next"),o=require("react-i18next"),c={en:{[a.TRANSLATION_NAMESPACE]:d}};exports.i18nInstance=r;const u=(t={})=>{const{translations:n=c,language:e="en",i18nInstance:i}=t,s=i||r;return exports.i18nInstance=s,s.isInitialized?Object.entries(n).forEach(([T,N])=>{Object.entries(N).forEach(([A,I])=>{s.addResourceBundle(T,A,I,!0,!0)})}):s.use(o.initReactI18next).init({resources:n,lng:e,fallbackLng:"en",ns:a.TRANSLATION_NAMESPACE,interpolation:{escapeValue:!1}}),s},S=(t,n,e)=>{(e||r).addResourceBundle(t,a.TRANSLATION_NAMESPACE,n,!0,!0)},E=t=>{const n=exports.i18nInstance||r;return n.isInitialized||u({}),o.useTranslation(a.TRANSLATION_NAMESPACE,{...t,i18n:n})},f=t=>{const n=exports.i18nInstance||r;return n.isInitialized||u({}),o.useTranslation(void 0,{...t,i18n:n})},l=(t,n)=>{var e;return(e=exports.i18nInstance)==null?void 0:e.t(t,{ns:a.TRANSLATION_NAMESPACE,...n})},L=(t,n,e)=>{var s;const i=l(t,n);return i&&t&&i!==t?i:e||((s=exports.i18nInstance)==null?void 0:s.t(t,{ns:void 0,...n}))};exports.defaultTranslations=c;exports.setupI18n=u;exports.t=l;exports.tWithOrWithoutNS=L;exports.updateTranslations=S;exports.useTranslationLib=E;exports.useTranslationLibNoNS=f;
|
package/dist/locale/index.es.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { TRANSLATION_NAMESPACE as
|
|
1
|
+
import { TRANSLATION_NAMESPACE as o } from "./hooks/translation-constants.es.js";
|
|
2
2
|
import m from "./translations/en.es.js";
|
|
3
3
|
import a from "i18next";
|
|
4
|
-
import { initReactI18next as
|
|
5
|
-
const
|
|
4
|
+
import { initReactI18next as p, useTranslation as u } from "react-i18next";
|
|
5
|
+
const N = {
|
|
6
6
|
en: {
|
|
7
|
-
[
|
|
7
|
+
[o]: m
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
let e = a;
|
|
11
|
-
const
|
|
11
|
+
const c = (t = {}) => {
|
|
12
12
|
const {
|
|
13
|
-
translations: n =
|
|
14
|
-
language:
|
|
15
|
-
i18nInstance:
|
|
16
|
-
} = t,
|
|
17
|
-
return e =
|
|
13
|
+
translations: n = N,
|
|
14
|
+
language: i = "en",
|
|
15
|
+
i18nInstance: s
|
|
16
|
+
} = t, r = s || a;
|
|
17
|
+
return e = r, r.isInitialized ? Object.entries(n).forEach(([l, d]) => {
|
|
18
18
|
Object.entries(d).forEach(([f, T]) => {
|
|
19
|
-
|
|
19
|
+
r.addResourceBundle(l, f, T, !0, !0);
|
|
20
20
|
});
|
|
21
|
-
}) :
|
|
21
|
+
}) : r.use(p).init({
|
|
22
22
|
resources: n,
|
|
23
|
-
lng:
|
|
23
|
+
lng: i,
|
|
24
24
|
fallbackLng: "en",
|
|
25
|
-
ns:
|
|
25
|
+
ns: o,
|
|
26
26
|
interpolation: {
|
|
27
27
|
escapeValue: !1
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
30
|
-
}, E = (t, n,
|
|
31
|
-
(
|
|
29
|
+
}), r;
|
|
30
|
+
}, E = (t, n, i) => {
|
|
31
|
+
(i || a).addResourceBundle(
|
|
32
32
|
t,
|
|
33
|
-
|
|
33
|
+
o,
|
|
34
34
|
n,
|
|
35
35
|
!0,
|
|
36
36
|
!0
|
|
37
37
|
);
|
|
38
38
|
}, L = (t) => {
|
|
39
39
|
const n = e || a;
|
|
40
|
-
return n.isInitialized ||
|
|
40
|
+
return n.isInitialized || c({}), u(o, { ...t, i18n: n });
|
|
41
41
|
}, O = (t) => {
|
|
42
42
|
const n = e || a;
|
|
43
|
-
return n.isInitialized ||
|
|
44
|
-
},
|
|
45
|
-
ns:
|
|
43
|
+
return n.isInitialized || c({}), u(void 0, { ...t, i18n: n });
|
|
44
|
+
}, I = (t, n) => e == null ? void 0 : e.t(t, {
|
|
45
|
+
ns: o,
|
|
46
46
|
...n
|
|
47
|
-
}), R = (t, n,
|
|
48
|
-
const
|
|
49
|
-
return
|
|
47
|
+
}), R = (t, n, i) => {
|
|
48
|
+
const s = I(t, n);
|
|
49
|
+
return s && t && s !== t ? s : i || (e == null ? void 0 : e.t(t, {
|
|
50
50
|
ns: void 0,
|
|
51
51
|
...n
|
|
52
52
|
}));
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
N as defaultTranslations,
|
|
56
56
|
e as i18nInstance,
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
c as setupI18n,
|
|
58
|
+
I as t,
|
|
59
59
|
R as tWithOrWithoutNS,
|
|
60
60
|
E as updateTranslations,
|
|
61
61
|
L as useTranslationLib,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingteza/crud-component",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.9",
|
|
5
5
|
"description": "React CRUD component library with Ant Design",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -112,7 +112,17 @@
|
|
|
112
112
|
"antd": ">=5.22.6",
|
|
113
113
|
"react": ">=18.3.1",
|
|
114
114
|
"react-dom": ">=18.3.1",
|
|
115
|
-
"react-router-dom": ">=6.3.0"
|
|
115
|
+
"react-router-dom": ">=6.3.0",
|
|
116
|
+
"i18next": "^24.2.0",
|
|
117
|
+
"react-i18next": "^15.2.0"
|
|
118
|
+
},
|
|
119
|
+
"peerDependenciesMeta": {
|
|
120
|
+
"i18next": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"react-i18next": {
|
|
124
|
+
"optional": true
|
|
125
|
+
}
|
|
116
126
|
},
|
|
117
127
|
"scripts": {
|
|
118
128
|
"dev": "vite",
|