@duxweb/dvha-core 1.2.5 → 1.2.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/cjs/components/auth/can.cjs +1 -1
- package/dist/cjs/components/common/icon.cjs +1 -1
- package/dist/cjs/components/common/logo.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/loader/index.cjs +1 -1
- package/dist/cjs/components/loader/remote/render.cjs +1 -1
- package/dist/cjs/components/overlay/overlay.cjs +1 -1
- package/dist/cjs/components/status/error.cjs +1 -1
- package/dist/cjs/components/status/exception.cjs +1 -1
- package/dist/cjs/components/status/notAuthorized.cjs +1 -1
- package/dist/cjs/components/status/notFound.cjs +1 -1
- package/dist/cjs/config/color.cjs +1 -1
- package/dist/cjs/directive/permission.cjs +1 -1
- package/dist/cjs/hooks/json/index.cjs +1 -1
- package/dist/cjs/hooks/json/vFor.cjs +1 -1
- package/dist/cjs/hooks/json/vIf.cjs +1 -1
- package/dist/cjs/hooks/json/vModel.cjs +1 -1
- package/dist/cjs/hooks/json/vOn.cjs +1 -1
- package/dist/cjs/hooks/json/vShow.cjs +1 -1
- package/dist/cjs/hooks/json/vText.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/provider/tab.cjs +1 -1
- package/dist/cjs/utils/bus.cjs +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.js +2 -0
- package/dist/esm/components/auth/can.js +3 -1
- package/dist/esm/components/common/icon.js +3 -1
- package/dist/esm/components/common/logo.js +3 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/loader/iframe.js +2 -0
- package/dist/esm/components/loader/index.js +1 -0
- package/dist/esm/components/loader/loader.js +2 -0
- package/dist/esm/components/loader/remote/loader.js +2 -0
- package/dist/esm/components/loader/remote/render.js +3 -1
- package/dist/esm/components/overlay/overlay.js +3 -1
- package/dist/esm/components/status/error.js +3 -1
- package/dist/esm/components/status/exception.js +3 -1
- package/dist/esm/components/status/notAuthorized.js +3 -1
- package/dist/esm/components/status/notFound.js +3 -1
- package/dist/esm/config/color.js +3 -1
- package/dist/esm/directive/permission.js +3 -1
- package/dist/esm/hooks/auth.js +2 -62
- package/dist/esm/hooks/config.js +2 -5
- package/dist/esm/hooks/data.js +2 -47
- package/dist/esm/hooks/export.js +2 -0
- package/dist/esm/hooks/exportCsv.js +2 -0
- package/dist/esm/hooks/form.js +2 -0
- package/dist/esm/hooks/formExtend.js +2 -0
- package/dist/esm/hooks/formValidate.js +2 -0
- package/dist/esm/hooks/i18n.js +2 -0
- package/dist/esm/hooks/import.js +2 -0
- package/dist/esm/hooks/importCsv.js +2 -0
- package/dist/esm/hooks/json/index.js +3 -1
- package/dist/esm/hooks/json/utils/contextManager.js +2 -15
- package/dist/esm/hooks/json/utils/expressionParser.js +1 -0
- package/dist/esm/hooks/json/vFor.js +3 -1
- package/dist/esm/hooks/json/vIf.js +3 -1
- package/dist/esm/hooks/json/vModel.js +3 -1
- package/dist/esm/hooks/json/vOn.js +3 -1
- package/dist/esm/hooks/json/vShow.js +3 -1
- package/dist/esm/hooks/json/vText.js +3 -7
- package/dist/esm/hooks/json.js +2 -22
- package/dist/esm/hooks/list.js +2 -0
- package/dist/esm/hooks/manage.js +2 -6
- package/dist/esm/hooks/menu.js +2 -0
- package/dist/esm/hooks/overlay.js +2 -0
- package/dist/esm/hooks/select.js +2 -0
- package/dist/esm/hooks/theme.js +2 -0
- package/dist/esm/hooks/tree.js +2 -0
- package/dist/esm/hooks/upload/local.js +2 -0
- package/dist/esm/hooks/upload/s3.js +2 -0
- package/dist/esm/hooks/upload.js +2 -0
- package/dist/esm/index.js +30 -26
- package/dist/esm/main.js +2 -0
- package/dist/esm/preset/authProvider.js +2 -0
- package/dist/esm/preset/dataProvider.js +2 -0
- package/dist/esm/preset/i18nProvider.js +2 -0
- package/dist/esm/provider/app.js +45 -43
- package/dist/esm/provider/tab.js +3 -1
- package/dist/esm/router/route.js +2 -0
- package/dist/esm/stores/auth.js +2 -10
- package/dist/esm/stores/i18n.js +2 -10
- package/dist/esm/stores/jsonSchema.js +2 -13
- package/dist/esm/stores/manage.js +2 -15
- package/dist/esm/stores/route.js +2 -10
- package/dist/esm/stores/tab.js +2 -0
- package/dist/esm/stores/theme.js +2 -0
- package/dist/esm/utils/bus.js +3 -1
- package/dist/esm/utils/theme.js +2 -0
- package/dist/esm/utils/tree.js +2 -0
- package/dist/types/components/loader/index.d.ts +1 -0
- package/package.json +16 -16
package/dist/esm/index.js
CHANGED
|
@@ -46,48 +46,51 @@ import { DuxCan as me } from "./components/auth/can.js";
|
|
|
46
46
|
import { DuxLogo as he } from "./components/common/logo.js";
|
|
47
47
|
import { DuxLogoIcon as ge } from "./components/common/icon.js";
|
|
48
48
|
import _e from "./components/loader/iframe.js";
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
49
|
+
import { sfcLoader as ve } from "./components/loader/remote/loader.js";
|
|
50
|
+
import { DuxOverlay as ye } from "./components/overlay/overlay.js";
|
|
51
|
+
import { DuxError as be } from "./components/status/error.js";
|
|
52
|
+
import { DuxException as xe } from "./components/status/exception.js";
|
|
53
|
+
import { DuxNotAuthorized as Se } from "./components/status/notAuthorized.js";
|
|
54
|
+
import { DuxNotFound as Ce } from "./components/status/notFound.js";
|
|
54
55
|
import "./components/index.js";
|
|
55
|
-
import { initRouter as
|
|
56
|
-
import { createDux as
|
|
57
|
-
import { simpleAuthProvider as
|
|
58
|
-
import { simpleDataProvider as
|
|
59
|
-
import { i18nProvider as
|
|
56
|
+
import { initRouter as we } from "./router/route.js";
|
|
57
|
+
import { createDux as Te } from "./main.js";
|
|
58
|
+
import { simpleAuthProvider as Ee } from "./preset/authProvider.js";
|
|
59
|
+
import { simpleDataProvider as De } from "./preset/dataProvider.js";
|
|
60
|
+
import { i18nProvider as Oe } from "./preset/i18nProvider.js";
|
|
60
61
|
import "./preset/index.js";
|
|
61
|
-
import { DuxAppProvider as
|
|
62
|
-
import { DuxTabRouterView as
|
|
62
|
+
import { DuxAppProvider as ke } from "./provider/app.js";
|
|
63
|
+
import { DuxTabRouterView as Ae } from "./provider/tab.js";
|
|
63
64
|
import "./provider/index.js";
|
|
64
65
|
import "./router/index.js";
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
//#region src/index.ts
|
|
67
|
+
var je = /* @__PURE__ */ ee({
|
|
68
|
+
DuxAppProvider: () => ke,
|
|
67
69
|
DuxCan: () => me,
|
|
68
|
-
DuxError: () =>
|
|
69
|
-
DuxException: () =>
|
|
70
|
+
DuxError: () => be,
|
|
71
|
+
DuxException: () => xe,
|
|
70
72
|
DuxLoaderIframe: () => _e,
|
|
71
73
|
DuxLogo: () => he,
|
|
72
74
|
DuxLogoIcon: () => ge,
|
|
73
|
-
DuxNotAuthorized: () =>
|
|
74
|
-
DuxNotFound: () =>
|
|
75
|
-
DuxOverlay: () =>
|
|
76
|
-
DuxTabRouterView: () =>
|
|
75
|
+
DuxNotAuthorized: () => Se,
|
|
76
|
+
DuxNotFound: () => Ce,
|
|
77
|
+
DuxOverlay: () => ye,
|
|
78
|
+
DuxTabRouterView: () => Ae,
|
|
77
79
|
arrayToTree: () => re,
|
|
78
|
-
createDux: () =>
|
|
80
|
+
createDux: () => Te,
|
|
79
81
|
createLocalUploadDriver: () => de,
|
|
80
82
|
createS3UploadDriver: () => pe,
|
|
81
83
|
createTabStore: () => o,
|
|
82
84
|
defaultAdaptors: () => Y,
|
|
83
85
|
emitter: () => $,
|
|
84
|
-
i18nProvider: () =>
|
|
86
|
+
i18nProvider: () => Oe,
|
|
85
87
|
initFormValidate: () => R,
|
|
86
88
|
initJsonSchemaComponents: () => X,
|
|
87
|
-
initRouter: () =>
|
|
89
|
+
initRouter: () => we,
|
|
88
90
|
searchTree: () => ie,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
sfcLoader: () => ve,
|
|
92
|
+
simpleAuthProvider: () => Ee,
|
|
93
|
+
simpleDataProvider: () => De,
|
|
91
94
|
themeColor: () => e,
|
|
92
95
|
themePreset: () => ne,
|
|
93
96
|
treeToArr: () => ae,
|
|
@@ -147,4 +150,5 @@ var Ae = /* @__PURE__ */ ee({
|
|
|
147
150
|
vShowAdaptor: () => q,
|
|
148
151
|
vTextAdaptor: () => J
|
|
149
152
|
});
|
|
150
|
-
|
|
153
|
+
//#endregion
|
|
154
|
+
export { ke as DuxAppProvider, me as DuxCan, be as DuxError, xe as DuxException, _e as DuxLoaderIframe, he as DuxLogo, ge as DuxLogoIcon, Se as DuxNotAuthorized, Ce as DuxNotFound, ye as DuxOverlay, Ae as DuxTabRouterView, re as arrayToTree, Te as createDux, de as createLocalUploadDriver, pe as createS3UploadDriver, o as createTabStore, Y as defaultAdaptors, $ as emitter, Oe as i18nProvider, R as initFormValidate, X as initJsonSchemaComponents, we as initRouter, ie as searchTree, ve as sfcLoader, Ee as simpleAuthProvider, De as simpleDataProvider, je as src_exports, e as themeColor, ne as themePreset, ae as treeToArr, t as useAuthStore, u as useCan, d as useCheck, x as useClient, b as useConfig, S as useCreate, C as useCreateMany, w as useCustom, T as useCustomMutation, E as useDelete, D as useDeleteMany, f as useError, F as useExport, I as useExportCsv, B as useExtendForm, Q as useExtendList, p as useForgotPassword, L as useForm, m as useGetAuth, V as useI18n, n as useI18nStore, H as useImport, U as useImportCsv, O as useInfiniteList, k as useInvalidate, h as useIsLogin, Z as useJsonSchema, r as useJsonSchemaStore, A as useList, g as useLogin, _ as useLogout, l as useManage, i as useManageStore, j as useMany, oe as useMenu, M as useOne, se as useOverlay, v as useRegister, a as useRouteStore, ce as useSelect, s as useTabStore, le as useTheme, c as useThemeStore, ue as useTree, N as useUpdate, P as useUpdateMany, y as useUpdatePassword, fe as useUpload, z as useValidateForm, te as vForAdaptor, W as vIfAdaptor, G as vModelAdaptor, K as vOnAdaptor, q as vShowAdaptor, J as vTextAdaptor };
|
package/dist/esm/main.js
CHANGED
|
@@ -7,6 +7,7 @@ import { ref as r } from "vue";
|
|
|
7
7
|
import { createPinia as i } from "pinia";
|
|
8
8
|
import { QueryClient as a, VueQueryPlugin as o } from "@tanstack/vue-query";
|
|
9
9
|
import s from "pinia-plugin-persistedstate";
|
|
10
|
+
//#region src/main.ts
|
|
10
11
|
function c(c) {
|
|
11
12
|
let l = i();
|
|
12
13
|
l.use(s);
|
|
@@ -22,4 +23,5 @@ function c(c) {
|
|
|
22
23
|
i.provide("dux.config", c), i.provide("dux.manage", a), i.directive("can", t), i.use(l), i.use(o, { queryClient: u }), i.use(n(c));
|
|
23
24
|
} };
|
|
24
25
|
}
|
|
26
|
+
//#endregion
|
|
25
27
|
export { c as createDux };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import e from "axios";
|
|
2
|
+
//#region src/preset/authProvider.ts
|
|
2
3
|
function t(t) {
|
|
3
4
|
return {
|
|
4
5
|
login: async (n, r) => await e.post(r.getApiUrl(t?.apiPath?.login || "/login", t?.dataProviderName), n).then((e) => ({
|
|
@@ -60,4 +61,5 @@ function t(t) {
|
|
|
60
61
|
can: (e, t, n, r) => !r?.permission || Array.isArray(r?.permission) && r?.permission?.length === 0 || typeof r?.permission == "object" && Object.keys(r?.permission).length === 0 ? !0 : !(Array.isArray(r?.permission) && !r?.permission?.includes(e) || typeof r?.permission == "object" && r?.permission[e] === !1)
|
|
61
62
|
};
|
|
62
63
|
}
|
|
64
|
+
//#endregion
|
|
63
65
|
export { t as simpleAuthProvider };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { trim as e } from "lodash-es";
|
|
2
2
|
import t from "axios";
|
|
3
|
+
//#region src/preset/dataProvider.ts
|
|
3
4
|
function n(e) {
|
|
4
5
|
return Object.values(e).some((e) => e instanceof File ? !0 : Array.isArray(e) ? e.some((e) => e instanceof File) : e && typeof e == "object" ? n(e) : !1);
|
|
5
6
|
}
|
|
@@ -156,4 +157,5 @@ function o(e) {
|
|
|
156
157
|
raw: e.response?.data
|
|
157
158
|
};
|
|
158
159
|
}
|
|
160
|
+
//#endregion
|
|
159
161
|
export { i as simpleDataProvider };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createI18n as e } from "vue-i18n";
|
|
2
|
+
//#region src/preset/i18nProvider.ts
|
|
2
3
|
function t(t) {
|
|
3
4
|
let n = e({
|
|
4
5
|
legacy: !1,
|
|
@@ -26,4 +27,5 @@ function t(t) {
|
|
|
26
27
|
getLocales: () => n.global.availableLocales.map((e) => e)
|
|
27
28
|
};
|
|
28
29
|
}
|
|
30
|
+
//#endregion
|
|
29
31
|
export { t as i18nProvider };
|
package/dist/esm/provider/app.js
CHANGED
|
@@ -15,66 +15,67 @@ import "../components/index.js";
|
|
|
15
15
|
import { createVNode as d, defineComponent as f, inject as p } from "vue";
|
|
16
16
|
import { useRouter as m } from "vue-router";
|
|
17
17
|
import { OverlaysProvider as h } from "@overlastic/vue";
|
|
18
|
-
|
|
18
|
+
//#region src/provider/app.tsx
|
|
19
|
+
var g = /* @__PURE__ */ f({
|
|
19
20
|
name: "DuxAppProvider",
|
|
20
21
|
props: {},
|
|
21
22
|
setup(f, { slots: g }) {
|
|
22
23
|
let _ = p("dux.manage"), v = o(), y = m();
|
|
23
|
-
return y.beforeEach(async (o, d
|
|
24
|
-
let
|
|
25
|
-
if (!
|
|
24
|
+
return y.beforeEach(async (o, d) => {
|
|
25
|
+
let f = o.meta.manageName, p = o.meta.authorization === !1;
|
|
26
|
+
if (!f) return {
|
|
26
27
|
path: `/${v.defaultManage || v.manages?.[0]?.name || ""}`,
|
|
27
28
|
replace: !0
|
|
28
|
-
}
|
|
29
|
-
_ && (_.value =
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
if (
|
|
34
|
-
let e =
|
|
35
|
-
e &&
|
|
29
|
+
};
|
|
30
|
+
_ && (_.value = f);
|
|
31
|
+
let m = n(f);
|
|
32
|
+
m.isInit() || m.setConfig(v.manages?.find((e) => e.name === f), v);
|
|
33
|
+
let h = r(f), g = i(f), b = e(f), x = t(f);
|
|
34
|
+
if (g.config?.i18nProvider && !x.isInit()) {
|
|
35
|
+
let e = x.getLocale();
|
|
36
|
+
e && g.config?.i18nProvider.changeLocale(e);
|
|
36
37
|
}
|
|
37
|
-
if (s(v,
|
|
38
|
-
path:
|
|
38
|
+
if (s(v, f), !b.isLogin()) return p ? !0 : {
|
|
39
|
+
path: g.getRoutePath("login"),
|
|
39
40
|
replace: !0
|
|
40
|
-
}
|
|
41
|
-
let
|
|
41
|
+
};
|
|
42
|
+
let S = (e) => e?.map((e) => ({
|
|
42
43
|
...e,
|
|
43
|
-
path: e.path ?
|
|
44
|
+
path: e.path ? g.getRoutePath(e.path) : void 0
|
|
44
45
|
}));
|
|
45
|
-
if (!
|
|
46
|
-
let e =
|
|
46
|
+
if (!h.getRouteInit()) {
|
|
47
|
+
let e = g.config?.components || {}, t = [];
|
|
47
48
|
return t.push({
|
|
48
|
-
name: `${
|
|
49
|
+
name: `${f}.notFound`,
|
|
49
50
|
label: "404",
|
|
50
51
|
path: ":pathMatch(.*)*",
|
|
51
52
|
component: e.notFound || u,
|
|
52
53
|
hidden: !0,
|
|
53
54
|
meta: { can: !1 }
|
|
54
55
|
}), t.push({
|
|
55
|
-
name: `${
|
|
56
|
+
name: `${f}.notAuthorized`,
|
|
56
57
|
label: "403",
|
|
57
58
|
path: "notAuthorized",
|
|
58
59
|
component: e.notAuthorized || l,
|
|
59
60
|
hidden: !0,
|
|
60
61
|
meta: { can: !1 }
|
|
61
62
|
}), t.push({
|
|
62
|
-
name: `${
|
|
63
|
+
name: `${f}.error`,
|
|
63
64
|
label: "500",
|
|
64
65
|
path: "error",
|
|
65
66
|
component: e.error || c,
|
|
66
67
|
hidden: !0,
|
|
67
68
|
meta: { can: !1 }
|
|
68
|
-
}),
|
|
69
|
-
path:
|
|
69
|
+
}), h.setRoutes(S(g.config?.menus || [])), g.config?.apiRoutePath && await g.config?.dataProvider?.default?.custom({
|
|
70
|
+
path: g.config.apiRoutePath,
|
|
70
71
|
meta: { timeout: 5e3 }
|
|
71
|
-
},
|
|
72
|
-
|
|
72
|
+
}, g, b.getUser()).then((e) => {
|
|
73
|
+
h.appendRoutes(S(e.data || []));
|
|
73
74
|
}).catch((e) => {
|
|
74
|
-
throw
|
|
75
|
-
e?.logout && (
|
|
75
|
+
throw g.config?.authProvider?.onError?.(e).then((e) => {
|
|
76
|
+
e?.logout && (b.logout(), y.push(g.getRoutePath(e.redirectTo || "/login")));
|
|
76
77
|
}), e;
|
|
77
|
-
}),
|
|
78
|
+
}), h.appendRoutes(t), h.getRoutes().forEach((e) => {
|
|
78
79
|
if (!e.path) return;
|
|
79
80
|
let t = {
|
|
80
81
|
name: e.name,
|
|
@@ -83,10 +84,10 @@ const g = /* @__PURE__ */ f({
|
|
|
83
84
|
};
|
|
84
85
|
switch (e.loader) {
|
|
85
86
|
case "iframe":
|
|
86
|
-
t.component =
|
|
87
|
+
t.component = g.config?.components?.iframe || (() => import("../components/loader/iframe.js"));
|
|
87
88
|
break;
|
|
88
89
|
case "remote":
|
|
89
|
-
t.component =
|
|
90
|
+
t.component = g.config?.components?.remote || (() => import("../components/loader/loader.js"));
|
|
90
91
|
break;
|
|
91
92
|
case "link":
|
|
92
93
|
t.beforeEnter = () => {
|
|
@@ -98,30 +99,31 @@ const g = /* @__PURE__ */ f({
|
|
|
98
99
|
e.component && (t.component = e.component);
|
|
99
100
|
break;
|
|
100
101
|
}
|
|
101
|
-
y.addRoute(`${
|
|
102
|
-
}),
|
|
102
|
+
y.addRoute(`${f}.auth`, t);
|
|
103
|
+
}), {
|
|
103
104
|
path: o.redirectedFrom?.path || o.path,
|
|
104
105
|
query: o.redirectedFrom?.query || o.query,
|
|
105
106
|
hash: o.redirectedFrom?.hash || o.hash,
|
|
106
107
|
replace: !0
|
|
107
|
-
}
|
|
108
|
+
};
|
|
108
109
|
}
|
|
109
|
-
let
|
|
110
|
+
let C = [
|
|
110
111
|
"",
|
|
111
112
|
"/",
|
|
112
|
-
`/${
|
|
113
|
-
`/${
|
|
113
|
+
`/${f}`,
|
|
114
|
+
`/${f}/`
|
|
114
115
|
];
|
|
115
|
-
if (
|
|
116
|
-
let e =
|
|
117
|
-
return !e?.path ||
|
|
116
|
+
if (C.includes(o.path)) {
|
|
117
|
+
let e = h.getIndexRoute();
|
|
118
|
+
return !e?.path || C.includes(e?.path) ? (console.warn("[Dux] index route not found, skip redirect"), !0) : {
|
|
118
119
|
path: e?.path || "/",
|
|
119
120
|
replace: !0
|
|
120
|
-
}
|
|
121
|
+
};
|
|
121
122
|
}
|
|
122
|
-
let
|
|
123
|
-
return (o.meta?.can === void 0 || o.meta?.can === !0) && !
|
|
123
|
+
let w = a(f);
|
|
124
|
+
return (o.meta?.can === void 0 || o.meta?.can === !0) && !w(o.name) ? { name: `${f}.notAuthorized` } : !0;
|
|
124
125
|
}), () => d(h, null, { default: () => [g.default?.()] });
|
|
125
126
|
}
|
|
126
127
|
});
|
|
128
|
+
//#endregion
|
|
127
129
|
export { g as DuxAppProvider };
|
package/dist/esm/provider/tab.js
CHANGED
|
@@ -3,7 +3,8 @@ import { useTabStore as t } from "../stores/tab.js";
|
|
|
3
3
|
import "../stores/index.js";
|
|
4
4
|
import { KeepAlive as n, Transition as r, createVNode as i, defineComponent as a, watch as o } from "vue";
|
|
5
5
|
import { RouterView as s, useRoute as c } from "vue-router";
|
|
6
|
-
|
|
6
|
+
//#region src/provider/tab.tsx
|
|
7
|
+
var l = /* @__PURE__ */ a({
|
|
7
8
|
name: "DuxTabRouterView",
|
|
8
9
|
props: {},
|
|
9
10
|
setup() {
|
|
@@ -51,4 +52,5 @@ const l = /* @__PURE__ */ a({
|
|
|
51
52
|
} });
|
|
52
53
|
}
|
|
53
54
|
});
|
|
55
|
+
//#endregion
|
|
54
56
|
export { l as DuxTabRouterView };
|
package/dist/esm/router/route.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createRouter as e, createWebHashHistory as t } from "vue-router";
|
|
2
|
+
//#region src/router/route.ts
|
|
2
3
|
function n(n) {
|
|
3
4
|
let r = [...n.routes || [], {
|
|
4
5
|
name: "default",
|
|
@@ -37,4 +38,5 @@ function n(n) {
|
|
|
37
38
|
routes: r
|
|
38
39
|
});
|
|
39
40
|
}
|
|
41
|
+
//#endregion
|
|
40
42
|
export { n as initRouter };
|
package/dist/esm/stores/auth.js
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { inject as e, ref as t } from "vue";
|
|
2
2
|
import { defineStore as n } from "pinia";
|
|
3
|
-
|
|
4
|
-
* use auth store
|
|
5
|
-
* @param manageName manage name
|
|
6
|
-
* @returns auth store
|
|
7
|
-
*/
|
|
3
|
+
//#region src/stores/auth.ts
|
|
8
4
|
function r(t) {
|
|
9
5
|
let n = e("dux.manage");
|
|
10
6
|
if (t ||= n?.value || "", !t) throw Error("manage not found");
|
|
11
7
|
return i(t)();
|
|
12
8
|
}
|
|
13
|
-
/**
|
|
14
|
-
* create auth store
|
|
15
|
-
* @param manageName manage name
|
|
16
|
-
* @returns auth store
|
|
17
|
-
*/
|
|
18
9
|
function i(e) {
|
|
19
10
|
return n(`auths-${e}`, () => {
|
|
20
11
|
let e = t();
|
|
@@ -50,4 +41,5 @@ function i(e) {
|
|
|
50
41
|
};
|
|
51
42
|
}, { persist: !0 });
|
|
52
43
|
}
|
|
44
|
+
//#endregion
|
|
53
45
|
export { r as useAuthStore };
|
package/dist/esm/stores/i18n.js
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { inject as e, ref as t } from "vue";
|
|
2
2
|
import { defineStore as n } from "pinia";
|
|
3
|
-
|
|
4
|
-
* use i18n store
|
|
5
|
-
* @param manageName manage name
|
|
6
|
-
* @returns i18n store
|
|
7
|
-
*/
|
|
3
|
+
//#region src/stores/i18n.ts
|
|
8
4
|
function r(t) {
|
|
9
5
|
let n = e("dux.manage");
|
|
10
6
|
if (t ||= n?.value || "", !t) throw Error("manage not found");
|
|
11
7
|
return i(t)();
|
|
12
8
|
}
|
|
13
|
-
/**
|
|
14
|
-
* create manage store
|
|
15
|
-
* @param manageName manage name
|
|
16
|
-
* @returns manage store
|
|
17
|
-
*/
|
|
18
9
|
function i(e) {
|
|
19
10
|
return n(`i18n-${e}`, () => {
|
|
20
11
|
let e = t(""), n = t(!1);
|
|
@@ -31,4 +22,5 @@ function i(e) {
|
|
|
31
22
|
};
|
|
32
23
|
}, { persist: { pick: ["lang"] } });
|
|
33
24
|
}
|
|
25
|
+
//#endregion
|
|
34
26
|
export { r as useI18nStore };
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { inject as e, ref as t } from "vue";
|
|
2
2
|
import { defineStore as n } from "pinia";
|
|
3
|
-
|
|
4
|
-
* 生成组件缓存键
|
|
5
|
-
*/
|
|
3
|
+
//#region src/stores/jsonSchema.ts
|
|
6
4
|
function r(e) {
|
|
7
5
|
return e;
|
|
8
6
|
}
|
|
9
|
-
/**
|
|
10
|
-
* use json schema store
|
|
11
|
-
* @param manageName manage name
|
|
12
|
-
* @returns json schema store
|
|
13
|
-
*/
|
|
14
7
|
function i(t) {
|
|
15
8
|
let n = e("dux.manage");
|
|
16
9
|
if (t ||= n?.value || "", !t) throw Error("manage not found");
|
|
17
10
|
return a(t)();
|
|
18
11
|
}
|
|
19
|
-
/**
|
|
20
|
-
* create json schema store
|
|
21
|
-
* @param manageName manage name
|
|
22
|
-
* @returns json schema store
|
|
23
|
-
*/
|
|
24
12
|
function a(e) {
|
|
25
13
|
return n(`jsonSchema-${e}`, () => {
|
|
26
14
|
let e = t(/* @__PURE__ */ new Map()), n = t(/* @__PURE__ */ new Map());
|
|
@@ -46,4 +34,5 @@ function a(e) {
|
|
|
46
34
|
};
|
|
47
35
|
});
|
|
48
36
|
}
|
|
37
|
+
//#endregion
|
|
49
38
|
export { i as useJsonSchemaStore };
|
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
import { inject as e, markRaw as t, ref as n } from "vue";
|
|
2
2
|
import { defineStore as r } from "pinia";
|
|
3
3
|
import { cloneDeep as i } from "lodash-es";
|
|
4
|
-
|
|
5
|
-
* 判断是否为 Record<string, IDataProvider> 类型
|
|
6
|
-
* @param value 要判断的值
|
|
7
|
-
* @returns 是否为记录类型
|
|
8
|
-
*/
|
|
4
|
+
//#region src/stores/manage.ts
|
|
9
5
|
function a(e) {
|
|
10
6
|
return typeof e == "object" && !!e && !Array.isArray(e) && typeof e.getList != "function";
|
|
11
7
|
}
|
|
12
|
-
/**
|
|
13
|
-
* use manage store
|
|
14
|
-
* @param manageName manage name
|
|
15
|
-
* @returns manage store
|
|
16
|
-
*/
|
|
17
8
|
function o(t) {
|
|
18
9
|
let n = e("dux.manage");
|
|
19
10
|
if (t ||= n?.value || "", !t) throw Error("manage not found");
|
|
20
11
|
return s(t)();
|
|
21
12
|
}
|
|
22
|
-
/**
|
|
23
|
-
* create manage store
|
|
24
|
-
* @param manageName manage name
|
|
25
|
-
* @returns manage store
|
|
26
|
-
*/
|
|
27
13
|
function s(e) {
|
|
28
14
|
return r(`manages-${e}`, () => {
|
|
29
15
|
let e = n(), r = n(!1);
|
|
@@ -63,4 +49,5 @@ function s(e) {
|
|
|
63
49
|
};
|
|
64
50
|
});
|
|
65
51
|
}
|
|
52
|
+
//#endregion
|
|
66
53
|
export { o as useManageStore };
|
package/dist/esm/stores/route.js
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { inject as e, ref as t } from "vue";
|
|
2
2
|
import { defineStore as n } from "pinia";
|
|
3
|
-
|
|
4
|
-
* use route store
|
|
5
|
-
* @param manageName manage name
|
|
6
|
-
* @returns route store
|
|
7
|
-
*/
|
|
3
|
+
//#region src/stores/route.ts
|
|
8
4
|
function r(t) {
|
|
9
5
|
let n = e("dux.manage");
|
|
10
6
|
if (t ||= n?.value || "", !t) throw Error("manage not found");
|
|
11
7
|
return i(t)();
|
|
12
8
|
}
|
|
13
|
-
/**
|
|
14
|
-
* create route store
|
|
15
|
-
* @param manageName manage name
|
|
16
|
-
* @returns route store
|
|
17
|
-
*/
|
|
18
9
|
function i(e) {
|
|
19
10
|
return n(`routes-${e}`, () => {
|
|
20
11
|
let e = t([]), n = (t) => e.value?.find((e) => e.path === t), r = (t) => e.value?.find((e) => e.name === t), i = (t) => {
|
|
@@ -59,4 +50,5 @@ function i(e) {
|
|
|
59
50
|
};
|
|
60
51
|
});
|
|
61
52
|
}
|
|
53
|
+
//#endregion
|
|
62
54
|
export { r as useRouteStore };
|
package/dist/esm/stores/tab.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { inject as e, nextTick as t, ref as n } from "vue";
|
|
2
2
|
import { defineStore as r } from "pinia";
|
|
3
|
+
//#region src/stores/tab.ts
|
|
3
4
|
function i(t) {
|
|
4
5
|
let n = e("dux.manage");
|
|
5
6
|
if (t ||= n?.value || "", !t) throw Error("manage not found");
|
|
@@ -59,4 +60,5 @@ function a(e) {
|
|
|
59
60
|
};
|
|
60
61
|
});
|
|
61
62
|
}
|
|
63
|
+
//#endregion
|
|
62
64
|
export { a as createTabStore, i as useTabStore };
|
package/dist/esm/stores/theme.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useManageStore as e } from "./manage.js";
|
|
2
2
|
import { inject as t, ref as n } from "vue";
|
|
3
3
|
import { defineStore as r } from "pinia";
|
|
4
|
+
//#region src/stores/theme.ts
|
|
4
5
|
var i = {
|
|
5
6
|
primary: "emerald",
|
|
6
7
|
info: "cyan",
|
|
@@ -48,4 +49,5 @@ function o(t) {
|
|
|
48
49
|
};
|
|
49
50
|
}, { persist: { pick: ["theme", "mode"] } });
|
|
50
51
|
}
|
|
52
|
+
//#endregion
|
|
51
53
|
export { a as useThemeStore };
|
package/dist/esm/utils/bus.js
CHANGED
package/dist/esm/utils/theme.js
CHANGED
package/dist/esm/utils/tree.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duxweb/dvha-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.6",
|
|
5
5
|
"author": "DuxWeb",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
32
|
-
"@overlastic/vue": "^0.8.
|
|
33
|
-
"@tanstack/vue-query": "^5.
|
|
32
|
+
"@overlastic/vue": "^0.8.7",
|
|
33
|
+
"@tanstack/vue-query": "^5.95.2",
|
|
34
34
|
"@vee-validate/rules": "^4.15.1",
|
|
35
|
-
"@vueuse/core": "^14.
|
|
36
|
-
"@vueuse/integrations": "^14.
|
|
37
|
-
"axios": "^1.13.
|
|
35
|
+
"@vueuse/core": "^14.2.1",
|
|
36
|
+
"@vueuse/integrations": "^14.2.1",
|
|
37
|
+
"axios": "^1.13.6",
|
|
38
38
|
"clsx": "^2.1.1",
|
|
39
|
-
"colorizr": "^
|
|
39
|
+
"colorizr": "^4.0.1",
|
|
40
40
|
"crypto-js": "^4.2.0",
|
|
41
|
-
"dayjs": "^1.11.
|
|
41
|
+
"dayjs": "^1.11.20",
|
|
42
42
|
"jsep": "^1.4.0",
|
|
43
43
|
"json-2-csv": "^5.5.10",
|
|
44
|
-
"lodash-es": "^4.17.
|
|
45
|
-
"marked": "^17.0.
|
|
46
|
-
"mathjs": "^15.1.
|
|
44
|
+
"lodash-es": "^4.17.23",
|
|
45
|
+
"marked": "^17.0.5",
|
|
46
|
+
"mathjs": "^15.1.1",
|
|
47
47
|
"mime": "^4.1.0",
|
|
48
48
|
"mitt": "^3.0.1",
|
|
49
49
|
"pinia": "^3.0.4",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"print-js": "^1.6.0",
|
|
52
52
|
"tslib": "^2.8.1",
|
|
53
53
|
"vee-validate": "^4.15.1",
|
|
54
|
-
"vue": "^3.5.
|
|
55
|
-
"vue-i18n": "^11.
|
|
56
|
-
"vue-router": "^
|
|
54
|
+
"vue": "^3.5.31",
|
|
55
|
+
"vue-i18n": "^11.3.0",
|
|
56
|
+
"vue-router": "^5.0.4",
|
|
57
57
|
"vue3-sfc-loader": "^0.9.5"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"rimraf": "^6.1.
|
|
61
|
-
"vue-tsc": "^3.
|
|
60
|
+
"rimraf": "^6.1.3",
|
|
61
|
+
"vue-tsc": "^3.2.6"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"clean": "rimraf dist",
|