@kingteza/crud-component 1.14.5 → 1.14.6
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 +37 -43
- package/package.json +1 -1
package/dist/locale/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./hooks/translation-constants.cjs.js"),I=require("./translations/en.cjs.js"),a=require("i18next"),o=require("react-i18next"),u={en:{[r.TRANSLATION_NAMESPACE]:I}};exports.i18nInstance=a;const S=(n={})=>{const{translations:t=u,language:e="en",i18nInstance:i}=n,s=i||a;return exports.i18nInstance=s,s.isInitialized?Object.entries(t).forEach(([l,T])=>{Object.entries(T).forEach(([N,A])=>{s.addResourceBundle(l,N,A,!0,!0)})}):s.use(o.initReactI18next).init({resources:t,lng:e,fallbackLng:"en",ns:r.TRANSLATION_NAMESPACE,interpolation:{escapeValue:!1}}),a},d=(n,t,e)=>{(e||a).addResourceBundle(n,r.TRANSLATION_NAMESPACE,t,!0,!0)},E=n=>o.useTranslation(r.TRANSLATION_NAMESPACE,{...n,i18n:exports.i18nInstance}),L=n=>o.useTranslation(void 0,{...n,i18n:exports.i18nInstance}),c=(n,t)=>{var e;return(e=exports.i18nInstance)==null?void 0:e.t(n,{ns:r.TRANSLATION_NAMESPACE,...t})},O=(n,t,e)=>{var s;const i=c(n,t);return i&&n&&i!==n?i:e||((s=exports.i18nInstance)==null?void 0:s.t(n,{ns:void 0,...t}))};exports.defaultTranslations=u;exports.setupI18n=S;exports.t=c;exports.tWithOrWithoutNS=O;exports.updateTranslations=d;exports.useTranslationLib=E;exports.useTranslationLibNoNS=L;
|
package/dist/locale/index.es.js
CHANGED
|
@@ -1,63 +1,57 @@
|
|
|
1
|
-
import { TRANSLATION_NAMESPACE as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { initReactI18next as
|
|
5
|
-
const
|
|
1
|
+
import { TRANSLATION_NAMESPACE as o } from "./hooks/translation-constants.es.js";
|
|
2
|
+
import T from "./translations/en.es.js";
|
|
3
|
+
import u from "i18next";
|
|
4
|
+
import { initReactI18next as m, useTranslation as a } from "react-i18next";
|
|
5
|
+
const p = {
|
|
6
6
|
en: {
|
|
7
|
-
[
|
|
7
|
+
[o]: T
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
let e =
|
|
11
|
-
const
|
|
10
|
+
let e = u;
|
|
11
|
+
const E = (t = {}) => {
|
|
12
12
|
const {
|
|
13
|
-
translations:
|
|
14
|
-
language:
|
|
13
|
+
translations: n = p,
|
|
14
|
+
language: r = "en",
|
|
15
15
|
i18nInstance: s
|
|
16
|
-
} =
|
|
17
|
-
return e =
|
|
18
|
-
Object.entries(
|
|
19
|
-
|
|
16
|
+
} = t, i = s || u;
|
|
17
|
+
return e = i, i.isInitialized ? Object.entries(n).forEach(([c, l]) => {
|
|
18
|
+
Object.entries(l).forEach(([d, f]) => {
|
|
19
|
+
i.addResourceBundle(c, d, f, !0, !0);
|
|
20
20
|
});
|
|
21
|
-
}) :
|
|
22
|
-
resources:
|
|
23
|
-
lng:
|
|
21
|
+
}) : i.use(m).init({
|
|
22
|
+
resources: n,
|
|
23
|
+
lng: r,
|
|
24
24
|
fallbackLng: "en",
|
|
25
|
-
ns:
|
|
25
|
+
ns: o,
|
|
26
26
|
interpolation: {
|
|
27
27
|
escapeValue: !1
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
30
|
-
},
|
|
31
|
-
(
|
|
32
|
-
n,
|
|
33
|
-
r,
|
|
29
|
+
}), u;
|
|
30
|
+
}, L = (t, n, r) => {
|
|
31
|
+
(r || u).addResourceBundle(
|
|
34
32
|
t,
|
|
33
|
+
o,
|
|
34
|
+
n,
|
|
35
35
|
!0,
|
|
36
36
|
!0
|
|
37
37
|
);
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}), l(r, { ...n, i18n: e })), O = (n) => l(void 0, { ...n, i18n: e }), g = (n, t) => e == null ? void 0 : e.t(n, {
|
|
45
|
-
ns: r,
|
|
46
|
-
...t
|
|
47
|
-
}), R = (n, t, i) => {
|
|
48
|
-
const s = g(n, t);
|
|
49
|
-
return s && n && s !== n ? s : i || (e == null ? void 0 : e.t(n, {
|
|
38
|
+
}, O = (t) => a(o, { ...t, i18n: e }), R = (t) => a(void 0, { ...t, i18n: e }), N = (t, n) => e == null ? void 0 : e.t(t, {
|
|
39
|
+
ns: o,
|
|
40
|
+
...n
|
|
41
|
+
}), S = (t, n, r) => {
|
|
42
|
+
const s = N(t, n);
|
|
43
|
+
return s && t && s !== t ? s : r || (e == null ? void 0 : e.t(t, {
|
|
50
44
|
ns: void 0,
|
|
51
|
-
...
|
|
45
|
+
...n
|
|
52
46
|
}));
|
|
53
47
|
};
|
|
54
48
|
export {
|
|
55
|
-
|
|
49
|
+
p as defaultTranslations,
|
|
56
50
|
e as i18nInstance,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
E as setupI18n,
|
|
52
|
+
N as t,
|
|
53
|
+
S as tWithOrWithoutNS,
|
|
54
|
+
L as updateTranslations,
|
|
55
|
+
O as useTranslationLib,
|
|
56
|
+
R as useTranslationLibNoNS
|
|
63
57
|
};
|