@duxweb/dvha-core 1.0.18 → 1.0.20
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/cjs/components/loader/loader.cjs +1 -1
- package/dist/cjs/components/loader/remote/loader.cjs +1 -1
- package/dist/cjs/hooks/auth.cjs +1 -1
- package/dist/cjs/hooks/data.cjs +1 -1
- package/dist/cjs/hooks/export.cjs +1 -1
- package/dist/cjs/hooks/exportCsv.cjs +2 -2
- package/dist/cjs/hooks/form.cjs +1 -1
- package/dist/cjs/hooks/formExtend.cjs +1 -1
- package/dist/cjs/hooks/i18n.cjs +1 -1
- package/dist/cjs/hooks/list.cjs +1 -1
- package/dist/cjs/hooks/tree.cjs +1 -1
- package/dist/cjs/preset/i18nProvider.cjs +1 -1
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/stores/jsonSchema.cjs +1 -1
- package/dist/cjs/stores/route.cjs +1 -1
- package/dist/esm/components/loader/loader.js +19 -30
- package/dist/esm/components/loader/remote/loader.js +22 -24
- package/dist/esm/hooks/auth.js +26 -24
- package/dist/esm/hooks/data.js +272 -258
- package/dist/esm/hooks/export.js +12 -12
- package/dist/esm/hooks/exportCsv.js +16 -24
- package/dist/esm/hooks/form.js +48 -39
- package/dist/esm/hooks/formExtend.js +11 -9
- package/dist/esm/hooks/i18n.js +6 -2
- package/dist/esm/hooks/list.js +12 -12
- package/dist/esm/hooks/tree.js +20 -26
- package/dist/esm/preset/i18nProvider.js +14 -13
- package/dist/esm/provider/app.js +76 -77
- package/dist/esm/stores/jsonSchema.js +22 -26
- package/dist/esm/stores/route.js +26 -23
- package/dist/types/hooks/auth.d.ts +1 -1
- package/dist/types/hooks/export.d.ts +2 -3
- package/dist/types/hooks/form.d.ts +2 -2
- package/dist/types/hooks/formExtend.d.ts +1 -1
- package/dist/types/hooks/i18n.d.ts +1 -0
- package/dist/types/types/config.d.ts +0 -1
- package/dist/types/types/i18n.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/provider/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { OverlaysProvider as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { useCan as
|
|
5
|
-
import { useConfig as
|
|
1
|
+
import { defineComponent as T, inject as U, createVNode as V } from "vue";
|
|
2
|
+
import { OverlaysProvider as q } from "@overlastic/vue";
|
|
3
|
+
import { useRouter as B } from "vue-router";
|
|
4
|
+
import { useCan as G } from "../hooks/auth.js";
|
|
5
|
+
import { useConfig as H } from "../hooks/config.js";
|
|
6
6
|
import "@tanstack/vue-query";
|
|
7
|
-
import { useManage as
|
|
7
|
+
import { useManage as K } from "../hooks/manage.js";
|
|
8
8
|
import "json-2-csv";
|
|
9
9
|
import "lodash-es";
|
|
10
10
|
import "@vee-validate/rules";
|
|
11
11
|
import "vee-validate";
|
|
12
|
-
import { useAuthStore as
|
|
12
|
+
import { useAuthStore as Q } from "../stores/auth.js";
|
|
13
13
|
import { useI18nStore as W } from "../stores/i18n.js";
|
|
14
14
|
import "pinia";
|
|
15
15
|
import { useManageStore as X } from "../stores/manage.js";
|
|
@@ -22,49 +22,49 @@ import "colorizr";
|
|
|
22
22
|
import "axios";
|
|
23
23
|
import "clsx";
|
|
24
24
|
import { DuxError as x } from "../components/status/error.js";
|
|
25
|
-
import { DuxNotAuthorized as
|
|
26
|
-
import { DuxNotFound as
|
|
27
|
-
const
|
|
25
|
+
import { DuxNotAuthorized as tt } from "../components/status/notAuthorized.js";
|
|
26
|
+
import { DuxNotFound as ot } from "../components/status/notFound.js";
|
|
27
|
+
const Et = /* @__PURE__ */ T({
|
|
28
28
|
name: "DuxAppProvider",
|
|
29
29
|
props: {},
|
|
30
|
-
setup(
|
|
31
|
-
slots:
|
|
30
|
+
setup(et, {
|
|
31
|
+
slots: h
|
|
32
32
|
}) {
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
var
|
|
33
|
+
const l = U("dux.manage"), f = H(), d = B();
|
|
34
|
+
return d.beforeEach(async (n, rt, i) => {
|
|
35
|
+
var A, S, $, k, M, w, z, D, C, E, I, N, F, L;
|
|
36
36
|
const o = n.meta.manageName, J = n.meta.authorization === !1;
|
|
37
37
|
if (!o) {
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
path: `/${
|
|
38
|
+
const t = f.defaultManage || ((S = (A = f.manages) == null ? void 0 : A[0]) == null ? void 0 : S.name) || "";
|
|
39
|
+
return i({
|
|
40
|
+
path: `/${t}`,
|
|
41
41
|
replace: !0
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
if ((
|
|
49
|
-
const
|
|
50
|
-
|
|
44
|
+
l && (l.value = o);
|
|
45
|
+
const P = X(o);
|
|
46
|
+
P.isInit() || P.setConfig(($ = f.manages) == null ? void 0 : $.find((t) => t.name === o), f);
|
|
47
|
+
const c = Y(o), e = K(o), g = Q(o), v = W(o);
|
|
48
|
+
if ((k = e.config) != null && k.i18nProvider && !v.isInit()) {
|
|
49
|
+
const t = v.getLocale();
|
|
50
|
+
t && ((M = e.config) == null || M.i18nProvider.changeLocale(t));
|
|
51
51
|
}
|
|
52
|
-
if (Z(
|
|
53
|
-
return J ?
|
|
54
|
-
path:
|
|
52
|
+
if (Z(f, o), !g.isLogin())
|
|
53
|
+
return J ? i() : i({
|
|
54
|
+
path: e.getRoutePath("login"),
|
|
55
55
|
replace: !0
|
|
56
56
|
});
|
|
57
|
-
const
|
|
57
|
+
const R = (t) => t == null ? void 0 : t.map((p) => ({
|
|
58
58
|
...p,
|
|
59
|
-
path: p.path ?
|
|
59
|
+
path: p.path ? e.getRoutePath(p.path) : void 0
|
|
60
60
|
}));
|
|
61
|
-
if (!
|
|
62
|
-
const
|
|
63
|
-
|
|
61
|
+
if (!c.getRouteInit()) {
|
|
62
|
+
const t = ((w = e.config) == null ? void 0 : w.components) || {}, p = [];
|
|
63
|
+
return p.push({
|
|
64
64
|
name: `${o}.notFound`,
|
|
65
65
|
label: "404",
|
|
66
66
|
path: ":pathMatch(.*)*",
|
|
67
|
-
component:
|
|
67
|
+
component: t.notFound || ot,
|
|
68
68
|
hidden: !0,
|
|
69
69
|
meta: {
|
|
70
70
|
can: !1
|
|
@@ -73,7 +73,7 @@ const Ie = /* @__PURE__ */ U({
|
|
|
73
73
|
name: `${o}.notAuthorized`,
|
|
74
74
|
label: "403",
|
|
75
75
|
path: "notAuthorized",
|
|
76
|
-
component:
|
|
76
|
+
component: t.notAuthorized || tt,
|
|
77
77
|
hidden: !0,
|
|
78
78
|
meta: {
|
|
79
79
|
can: !1
|
|
@@ -82,79 +82,78 @@ const Ie = /* @__PURE__ */ U({
|
|
|
82
82
|
name: `${o}.error`,
|
|
83
83
|
label: "500",
|
|
84
84
|
path: "error",
|
|
85
|
-
component:
|
|
85
|
+
component: t.error || x,
|
|
86
86
|
hidden: !0,
|
|
87
87
|
meta: {
|
|
88
88
|
can: !1
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
meta: {
|
|
95
|
-
timeout: 5e3
|
|
96
|
-
}
|
|
97
|
-
}, r, d.getUser()).then((t) => {
|
|
98
|
-
i.appendRoutes(g(t.data || []));
|
|
99
|
-
}));
|
|
100
|
-
} catch (t) {
|
|
101
|
-
console.error(t);
|
|
90
|
+
}), c.setRoutes(R(((z = e.config) == null ? void 0 : z.menus) || [])), (D = e.config) != null && D.apiRoutePath && await ((I = (E = (C = e.config) == null ? void 0 : C.dataProvider) == null ? void 0 : E.default) == null ? void 0 : I.custom({
|
|
91
|
+
path: e.config.apiRoutePath,
|
|
92
|
+
meta: {
|
|
93
|
+
timeout: 5e3
|
|
102
94
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
}, e, g.getUser()).then((r) => {
|
|
96
|
+
c.appendRoutes(R(r.data || []));
|
|
97
|
+
}).catch((r) => {
|
|
98
|
+
var a, m, s;
|
|
99
|
+
throw (s = (m = (a = e.config) == null ? void 0 : a.authProvider) == null ? void 0 : m.onError) == null || s.call(m, r).then((u) => {
|
|
100
|
+
u != null && u.logout && (g.logout(), d.push(e.getRoutePath(u.redirectTo || "/login")));
|
|
101
|
+
}), r;
|
|
102
|
+
})), c.appendRoutes(p), c.getRoutes().forEach((r) => {
|
|
103
|
+
var m, s, u, _;
|
|
104
|
+
if (!r.path)
|
|
106
105
|
return;
|
|
107
|
-
const
|
|
108
|
-
name:
|
|
109
|
-
path:
|
|
110
|
-
meta:
|
|
106
|
+
const a = {
|
|
107
|
+
name: r.name,
|
|
108
|
+
path: r.path,
|
|
109
|
+
meta: r.meta
|
|
111
110
|
};
|
|
112
|
-
switch (
|
|
111
|
+
switch (r.loader) {
|
|
113
112
|
case "iframe":
|
|
114
|
-
|
|
113
|
+
a.component = ((s = (m = e.config) == null ? void 0 : m.components) == null ? void 0 : s.iframe) || (() => import("../components/loader/iframe.js"));
|
|
115
114
|
break;
|
|
116
115
|
case "remote":
|
|
117
|
-
|
|
116
|
+
a.component = ((_ = (u = e.config) == null ? void 0 : u.components) == null ? void 0 : _.remote) || (() => import("../components/loader/loader.js"));
|
|
118
117
|
break;
|
|
119
118
|
case "link":
|
|
120
|
-
|
|
119
|
+
a.beforeEnter = () => {
|
|
121
120
|
var j;
|
|
122
|
-
const
|
|
123
|
-
return
|
|
124
|
-
},
|
|
121
|
+
const y = ((j = r.meta) == null ? void 0 : j.url) || r.path;
|
|
122
|
+
return y && window.open(y, "_blank"), !1;
|
|
123
|
+
}, a.component = () => Promise.resolve({
|
|
125
124
|
template: "<div></div>"
|
|
126
125
|
});
|
|
127
126
|
break;
|
|
128
127
|
default:
|
|
129
|
-
|
|
128
|
+
r.component && (a.component = r.component);
|
|
130
129
|
break;
|
|
131
130
|
}
|
|
132
|
-
|
|
133
|
-
}),
|
|
134
|
-
path: ((
|
|
131
|
+
d.addRoute(`${o}.auth`, a);
|
|
132
|
+
}), i({
|
|
133
|
+
path: ((N = n.redirectedFrom) == null ? void 0 : N.path) || n.path,
|
|
135
134
|
replace: !0
|
|
136
135
|
});
|
|
137
136
|
}
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
return !(
|
|
142
|
-
path: (
|
|
137
|
+
const b = ["", "/", `/${o}`, `/${o}/`];
|
|
138
|
+
if (b.includes(n.path)) {
|
|
139
|
+
const t = c.getIndexRoute();
|
|
140
|
+
return !(t != null && t.path) || b.includes(t == null ? void 0 : t.path) ? (console.warn("[Dux] index route not found, skip redirect"), i()) : i({
|
|
141
|
+
path: (t == null ? void 0 : t.path) || "/",
|
|
143
142
|
replace: !0
|
|
144
143
|
});
|
|
145
144
|
}
|
|
146
|
-
const O =
|
|
147
|
-
return (((
|
|
145
|
+
const O = G(o);
|
|
146
|
+
return (((F = n.meta) == null ? void 0 : F.can) === void 0 || ((L = n.meta) == null ? void 0 : L.can) === !0) && !O(n.name) ? i({
|
|
148
147
|
name: `${o}.notAuthorized`
|
|
149
|
-
}) :
|
|
150
|
-
}), () => q
|
|
148
|
+
}) : i();
|
|
149
|
+
}), () => V(q, null, {
|
|
151
150
|
default: () => {
|
|
152
151
|
var n;
|
|
153
|
-
return [(n =
|
|
152
|
+
return [(n = h.default) == null ? void 0 : n.call(h)];
|
|
154
153
|
}
|
|
155
154
|
});
|
|
156
155
|
}
|
|
157
156
|
});
|
|
158
157
|
export {
|
|
159
|
-
|
|
158
|
+
Et as DuxAppProvider
|
|
160
159
|
};
|
|
@@ -1,43 +1,39 @@
|
|
|
1
1
|
import { defineStore as u } from "pinia";
|
|
2
|
-
import { inject as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
function y(t) {
|
|
8
|
-
const e = i("dux.manage");
|
|
9
|
-
if (t || (t = (e == null ? void 0 : e.value) || ""), !t)
|
|
2
|
+
import { inject as h, ref as a } from "vue";
|
|
3
|
+
function d(o) {
|
|
4
|
+
const e = h("dux.manage");
|
|
5
|
+
if (o || (o = (e == null ? void 0 : e.value) || ""), !o)
|
|
10
6
|
throw new Error("manage not found");
|
|
11
|
-
return
|
|
7
|
+
return i(o)();
|
|
12
8
|
}
|
|
13
|
-
function
|
|
14
|
-
return u(`jsonSchema-${
|
|
15
|
-
const e = a(/* @__PURE__ */ new Map()),
|
|
9
|
+
function i(o) {
|
|
10
|
+
return u(`jsonSchema-${o}`, () => {
|
|
11
|
+
const e = a(/* @__PURE__ */ new Map()), r = a(/* @__PURE__ */ new Map());
|
|
16
12
|
return {
|
|
17
13
|
componentCache: e,
|
|
18
|
-
componentsByName:
|
|
19
|
-
addComponent: (
|
|
20
|
-
const c =
|
|
14
|
+
componentsByName: r,
|
|
15
|
+
addComponent: (t, n, s) => {
|
|
16
|
+
const c = n;
|
|
21
17
|
return e.value.has(c) || (e.value.set(c, {
|
|
22
|
-
component:
|
|
23
|
-
name:
|
|
24
|
-
originalName: s ||
|
|
18
|
+
component: t,
|
|
19
|
+
name: n,
|
|
20
|
+
originalName: s || n,
|
|
25
21
|
cacheKey: c
|
|
26
|
-
}),
|
|
22
|
+
}), r.value.set(n, t)), c;
|
|
27
23
|
},
|
|
28
|
-
getComponent: (
|
|
29
|
-
var
|
|
30
|
-
return (
|
|
24
|
+
getComponent: (t) => {
|
|
25
|
+
var n;
|
|
26
|
+
return (n = e.value.get(t)) == null ? void 0 : n.component;
|
|
31
27
|
},
|
|
32
|
-
getComponentByName: (
|
|
33
|
-
hasComponent: (
|
|
28
|
+
getComponentByName: (t) => r.value.get(t),
|
|
29
|
+
hasComponent: (t) => e.value.has(t),
|
|
34
30
|
clearCache: () => {
|
|
35
|
-
e.value.clear(),
|
|
31
|
+
e.value.clear(), r.value.clear();
|
|
36
32
|
},
|
|
37
33
|
getCacheSize: () => e.value.size
|
|
38
34
|
};
|
|
39
35
|
});
|
|
40
36
|
}
|
|
41
37
|
export {
|
|
42
|
-
|
|
38
|
+
d as useJsonSchemaStore
|
|
43
39
|
};
|
package/dist/esm/stores/route.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineStore as w } from "pinia";
|
|
2
2
|
import { inject as j, ref as R } from "vue";
|
|
3
|
-
function b(
|
|
3
|
+
function b(u) {
|
|
4
4
|
const t = j("dux.manage");
|
|
5
|
-
if (
|
|
5
|
+
if (u || (u = (t == null ? void 0 : t.value) || ""), !u)
|
|
6
6
|
throw new Error("manage not found");
|
|
7
|
-
return E(
|
|
7
|
+
return E(u)();
|
|
8
8
|
}
|
|
9
|
-
function E(
|
|
10
|
-
return w(`routes-${
|
|
11
|
-
const t = R([]),
|
|
9
|
+
function E(u) {
|
|
10
|
+
return w(`routes-${u}`, () => {
|
|
11
|
+
const t = R([]), l = (e) => {
|
|
12
12
|
var o;
|
|
13
|
-
return (o = t.value) == null ? void 0 : o.find((
|
|
13
|
+
return (o = t.value) == null ? void 0 : o.find((s) => s.path === e);
|
|
14
14
|
}, p = (e) => {
|
|
15
15
|
var o;
|
|
16
|
-
return (o = t.value) == null ? void 0 : o.find((
|
|
16
|
+
return (o = t.value) == null ? void 0 : o.find((s) => s.name === e);
|
|
17
17
|
}, h = (e) => {
|
|
18
18
|
var o;
|
|
19
19
|
(o = t.value) == null || o.push(e);
|
|
@@ -24,27 +24,30 @@ function E(n) {
|
|
|
24
24
|
}, x = () => t.value, g = () => {
|
|
25
25
|
t.value = [];
|
|
26
26
|
}, m = () => {
|
|
27
|
-
var
|
|
28
|
-
const e = (
|
|
29
|
-
var
|
|
27
|
+
var s, d;
|
|
28
|
+
const e = (d = (s = t.value) == null ? void 0 : s.filter((r) => {
|
|
29
|
+
var n, c;
|
|
30
|
+
return !r.parent && !((n = r.name) != null && n.includes("404")) && !((c = r.name) != null && c.includes("403"));
|
|
31
|
+
})) == null ? void 0 : d.sort((r, n) => (r.sort || 0) - (n.sort || 0)), o = (r) => {
|
|
32
|
+
var c, v;
|
|
30
33
|
if (r.path)
|
|
31
34
|
return r;
|
|
32
|
-
const
|
|
33
|
-
for (const
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
35
|
+
const n = (v = (c = t.value) == null ? void 0 : c.filter((i) => i.parent === r.name)) == null ? void 0 : v.sort((i, a) => (i.sort || 0) - (a.sort || 0));
|
|
36
|
+
for (const i of n || []) {
|
|
37
|
+
const a = o(i);
|
|
38
|
+
if (a)
|
|
39
|
+
return a;
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
42
|
for (const r of e || []) {
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
return
|
|
43
|
+
const n = o(r);
|
|
44
|
+
if (n)
|
|
45
|
+
return n;
|
|
43
46
|
}
|
|
44
|
-
},
|
|
47
|
+
}, f = R(!1);
|
|
45
48
|
return {
|
|
46
49
|
routes: t,
|
|
47
|
-
searchRoute:
|
|
50
|
+
searchRoute: l,
|
|
48
51
|
searchRouteName: p,
|
|
49
52
|
appendRoute: h,
|
|
50
53
|
appendRoutes: S,
|
|
@@ -53,8 +56,8 @@ function E(n) {
|
|
|
53
56
|
clearRoutes: g,
|
|
54
57
|
getIndexRoute: m,
|
|
55
58
|
getRouteInit: () => {
|
|
56
|
-
const e =
|
|
57
|
-
return
|
|
59
|
+
const e = f.value;
|
|
60
|
+
return f.value = !0, e;
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
63
|
});
|
|
@@ -93,7 +93,7 @@ export declare function useUpdatePassword(props?: IAuthActionParams): {
|
|
|
93
93
|
* @returns Error method
|
|
94
94
|
*/
|
|
95
95
|
export declare function useError(onCallback?: (data?: IAuthErrorResponse) => void): {
|
|
96
|
-
mutate: (error
|
|
96
|
+
mutate: (error?: IDataProviderError) => Promise<void>;
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
99
99
|
* Get auth
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { InfiniteData } from '@tanstack/vue-query';
|
|
2
1
|
import type { IDataProviderPagination, IDataProviderResponse } from '../types';
|
|
3
2
|
import type { IInfiniteListParams } from './data';
|
|
4
3
|
export interface IUseExportProps extends IInfiniteListParams {
|
|
5
|
-
onSuccess?: (data
|
|
6
|
-
onProgress?: (data
|
|
4
|
+
onSuccess?: (data?: IDataProviderResponse) => void;
|
|
5
|
+
onProgress?: (data?: IDataProviderPagination) => void;
|
|
7
6
|
interval?: number;
|
|
8
7
|
maxPage?: number | (() => number);
|
|
9
8
|
}
|
|
@@ -3,7 +3,7 @@ import type { IDataProviderError, IDataProviderResponse } from '../types';
|
|
|
3
3
|
type Key = string | number | undefined;
|
|
4
4
|
export interface IUseFormProps {
|
|
5
5
|
path?: string;
|
|
6
|
-
id?: Key
|
|
6
|
+
id?: MaybeRef<Key>;
|
|
7
7
|
form?: MaybeRef<Record<string, any>>;
|
|
8
8
|
onSuccess?: (data: IDataProviderResponse) => void;
|
|
9
9
|
onError?: (error: IDataProviderError) => void;
|
|
@@ -14,7 +14,7 @@ export declare function useForm(props: IUseFormProps): {
|
|
|
14
14
|
form: import("vue").Ref<MaybeRef<Record<string, any>>, MaybeRef<Record<string, any>>>;
|
|
15
15
|
initData: any;
|
|
16
16
|
isLoading: import("vue").ComputedRef<boolean>;
|
|
17
|
-
isEdit: import("vue").ComputedRef<
|
|
17
|
+
isEdit: import("vue").ComputedRef<boolean>;
|
|
18
18
|
onSubmit: (data?: Record<string, any>) => void;
|
|
19
19
|
onReset: () => void;
|
|
20
20
|
};
|
|
@@ -5,7 +5,7 @@ export interface UseExtendFormProps extends IUseFormProps {
|
|
|
5
5
|
}
|
|
6
6
|
export declare function useExtendForm(props: UseExtendFormProps): {
|
|
7
7
|
isLoading: import("vue").ComputedRef<boolean>;
|
|
8
|
-
isEdit: import("vue").ComputedRef<
|
|
8
|
+
isEdit: import("vue").ComputedRef<boolean>;
|
|
9
9
|
form: import("vue").Ref<import("vue").MaybeRef<Record<string, any>>, import("vue").MaybeRef<Record<string, any>>>;
|
|
10
10
|
onSubmit: (data?: Record<string, any>) => void;
|
|
11
11
|
onReset: () => void;
|
|
@@ -4,4 +4,5 @@ export declare function useI18n(): {
|
|
|
4
4
|
getLocale: () => string | undefined;
|
|
5
5
|
loadLocale: (lang: string, messages: Record<string, unknown>) => Promise<any> | undefined;
|
|
6
6
|
mergeLocale: (lang: string, messages: Record<string, unknown>) => void | undefined;
|
|
7
|
+
getLocales: () => string[] | undefined;
|
|
7
8
|
};
|