@duxweb/dvha-core 0.1.17 → 0.1.18
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 -0
- package/dist/cjs/directive/permission.cjs +1 -1
- package/dist/cjs/hooks/data.cjs +1 -1
- package/dist/cjs/hooks/export.cjs +1 -1
- package/dist/cjs/hooks/overlay.cjs +1 -1
- package/dist/cjs/hooks/theme.cjs +4 -4
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/utils/theme.cjs +1 -1
- package/dist/esm/components/auth/can.js +3 -3
- package/dist/esm/components/common/icon.js +25 -0
- package/dist/esm/directive/permission.js +3 -3
- package/dist/esm/hooks/data.js +262 -234
- package/dist/esm/hooks/export.js +20 -18
- package/dist/esm/hooks/overlay.js +1 -1
- package/dist/esm/hooks/theme.js +163 -119
- package/dist/esm/index.js +65 -63
- package/dist/esm/provider/app.js +15 -15
- package/dist/esm/utils/theme.js +17 -17
- package/dist/types/components/common/icon.d.ts +13 -0
- package/dist/types/components/common/index.d.ts +1 -0
- package/dist/types/hooks/data.d.ts +390 -30
- package/dist/types/hooks/export.d.ts +16 -3
- package/dist/types/hooks/exportCsv.d.ts +13 -1
- package/dist/types/hooks/index.d.ts +9 -9
- package/dist/types/hooks/theme.d.ts +6 -3
- package/dist/types/utils/theme.d.ts +3 -3
- package/package.json +3 -3
package/dist/esm/provider/app.js
CHANGED
|
@@ -5,29 +5,29 @@ import { useCan as G } from "../hooks/auth.js";
|
|
|
5
5
|
import { useConfig as H } from "../hooks/config.js";
|
|
6
6
|
import "@tanstack/vue-query";
|
|
7
7
|
import { useManage as J } from "../hooks/manage.js";
|
|
8
|
+
import "json-2-csv";
|
|
8
9
|
import "lodash-es";
|
|
9
|
-
import "pinia";
|
|
10
10
|
import { useAuthStore as K } from "../stores/auth.js";
|
|
11
11
|
import { useRouteStore as Q } from "../stores/route.js";
|
|
12
|
+
import "pinia";
|
|
12
13
|
import { useManageStore as T } from "../stores/manage.js";
|
|
13
14
|
import { useI18nStore as W } from "../stores/i18n.js";
|
|
14
15
|
import "@vueuse/core";
|
|
15
|
-
import "colorizr";
|
|
16
16
|
import "clsx";
|
|
17
|
-
import "
|
|
17
|
+
import "colorizr";
|
|
18
18
|
import "axios";
|
|
19
19
|
const ge = /* @__PURE__ */ O({
|
|
20
20
|
name: "DuxAppProvider",
|
|
21
21
|
props: {},
|
|
22
22
|
setup(X, {
|
|
23
|
-
slots:
|
|
23
|
+
slots: m
|
|
24
24
|
}) {
|
|
25
|
-
const f = U("dux.manage"),
|
|
25
|
+
const f = U("dux.manage"), c = H(), s = B();
|
|
26
26
|
return s.beforeEach(async (r, Y, n) => {
|
|
27
27
|
var P, R, b, A, S, $, M, k, w, z, I, C, y, D;
|
|
28
28
|
const t = r.meta.manageName, _ = r.meta.authorization === !1;
|
|
29
29
|
if (!t) {
|
|
30
|
-
const e =
|
|
30
|
+
const e = c.defaultManage || ((R = (P = c.manages) == null ? void 0 : P[0]) == null ? void 0 : R.name) || "";
|
|
31
31
|
return n({
|
|
32
32
|
path: `/${e}`,
|
|
33
33
|
replace: !0
|
|
@@ -35,7 +35,7 @@ const ge = /* @__PURE__ */ O({
|
|
|
35
35
|
}
|
|
36
36
|
f && (f.value = t);
|
|
37
37
|
const h = T(t);
|
|
38
|
-
h.isInit() || h.setConfig((b =
|
|
38
|
+
h.isInit() || h.setConfig((b = c.manages) == null ? void 0 : b.find((e) => e.name === t), c);
|
|
39
39
|
const i = Q(t), a = J(t), d = K(t), l = W(t);
|
|
40
40
|
if ((A = a.config) != null && A.i18nProvider && !l.isInit()) {
|
|
41
41
|
const e = l.getLocale();
|
|
@@ -48,7 +48,7 @@ const ge = /* @__PURE__ */ O({
|
|
|
48
48
|
});
|
|
49
49
|
const g = (e) => e == null ? void 0 : e.map((p) => ({
|
|
50
50
|
...p,
|
|
51
|
-
path: a.getRoutePath(p.path
|
|
51
|
+
path: p.path ? a.getRoutePath(p.path) : void 0
|
|
52
52
|
}));
|
|
53
53
|
if (!i.getRouteInit()) {
|
|
54
54
|
const e = (($ = a.config) == null ? void 0 : $.components) || {}, p = [];
|
|
@@ -96,29 +96,29 @@ const ge = /* @__PURE__ */ O({
|
|
|
96
96
|
var E, F;
|
|
97
97
|
if (!o.path)
|
|
98
98
|
return;
|
|
99
|
-
const
|
|
99
|
+
const u = {
|
|
100
100
|
name: o.name,
|
|
101
101
|
path: o.path,
|
|
102
102
|
meta: o.meta
|
|
103
103
|
};
|
|
104
104
|
switch (o.loader) {
|
|
105
105
|
case "iframe":
|
|
106
|
-
|
|
106
|
+
u.component = ((F = (E = a.config) == null ? void 0 : E.components) == null ? void 0 : F.iframe) || (() => import("../components/loader/iframe.js"));
|
|
107
107
|
break;
|
|
108
108
|
case "link":
|
|
109
|
-
|
|
109
|
+
u.beforeEnter = () => {
|
|
110
110
|
var N;
|
|
111
111
|
const L = ((N = o.meta) == null ? void 0 : N.url) || o.path;
|
|
112
112
|
return L && window.open(L, "_blank"), !1;
|
|
113
|
-
},
|
|
113
|
+
}, u.component = () => Promise.resolve({
|
|
114
114
|
template: "<div></div>"
|
|
115
115
|
});
|
|
116
116
|
break;
|
|
117
117
|
default:
|
|
118
|
-
o.component && (
|
|
118
|
+
o.component && (u.component = o.component);
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
|
-
s.addRoute(`${t}.auth`,
|
|
121
|
+
s.addRoute(`${t}.auth`, u);
|
|
122
122
|
}), n({
|
|
123
123
|
path: ((C = r.redirectedFrom) == null ? void 0 : C.path) || r.path,
|
|
124
124
|
replace: !0
|
|
@@ -139,7 +139,7 @@ const ge = /* @__PURE__ */ O({
|
|
|
139
139
|
}), () => V(q, null, {
|
|
140
140
|
default: () => {
|
|
141
141
|
var r;
|
|
142
|
-
return [(r =
|
|
142
|
+
return [(r = m.default) == null ? void 0 : r.call(m)];
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
}
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -2,21 +2,21 @@ function r(c) {
|
|
|
2
2
|
return `rgb(var(${c}))`;
|
|
3
3
|
}
|
|
4
4
|
function s(c) {
|
|
5
|
-
const t = {}, i = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"],
|
|
6
|
-
t.white = { DEFAULT: r("--color-white") }, t.black = { DEFAULT: r("--color-black") }, Object.keys(c).forEach((
|
|
7
|
-
t[
|
|
8
|
-
t[
|
|
5
|
+
const t = {}, i = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"], l = ["primary", "info", "success", "warning", "error", "gray"], n = ["hover", "pressed", "focus", "disabled"];
|
|
6
|
+
t.white = { DEFAULT: r("--ui-color-white") }, t.black = { DEFAULT: r("--ui-color-black") }, Object.keys(c).forEach((e) => {
|
|
7
|
+
t[e] = {}, i.forEach((o) => {
|
|
8
|
+
t[e][o] = r(`--base-color-${e}-${o}`);
|
|
9
9
|
});
|
|
10
|
-
}),
|
|
11
|
-
t[
|
|
12
|
-
t[
|
|
13
|
-
}),
|
|
14
|
-
t[
|
|
10
|
+
}), l.forEach((e) => {
|
|
11
|
+
t[e] = {}, t[e].DEFAULT = r(`--ui-color-${e}`), i.forEach((o) => {
|
|
12
|
+
t[e][o] = r(`--ui-color-${e}-${o}`);
|
|
13
|
+
}), n.forEach((o) => {
|
|
14
|
+
t[e][o] = r(`--ui-color-${e}-${o}`);
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
const d = {
|
|
18
18
|
// 文字颜色
|
|
19
|
-
text: {
|
|
19
|
+
"text-default": {
|
|
20
20
|
color: r("--ui-text")
|
|
21
21
|
},
|
|
22
22
|
"text-dimmed": {
|
|
@@ -35,7 +35,7 @@ function s(c) {
|
|
|
35
35
|
color: r("--ui-text-inverted")
|
|
36
36
|
},
|
|
37
37
|
// 背景颜色
|
|
38
|
-
bg: {
|
|
38
|
+
"bg-default": {
|
|
39
39
|
"background-color": r("--ui-bg")
|
|
40
40
|
},
|
|
41
41
|
"bg-muted": {
|
|
@@ -51,7 +51,7 @@ function s(c) {
|
|
|
51
51
|
"background-color": r("--ui-bg-inverted")
|
|
52
52
|
},
|
|
53
53
|
// 边框颜色
|
|
54
|
-
border: {
|
|
54
|
+
"border-default": {
|
|
55
55
|
"border-color": r("--ui-border")
|
|
56
56
|
},
|
|
57
57
|
"border-muted": {
|
|
@@ -64,14 +64,14 @@ function s(c) {
|
|
|
64
64
|
"border-color": r("--ui-border-inverted")
|
|
65
65
|
}
|
|
66
66
|
}, u = {};
|
|
67
|
-
Object.entries(d).forEach(([
|
|
68
|
-
u[`.${
|
|
67
|
+
Object.entries(d).forEach(([e, o]) => {
|
|
68
|
+
u[`.${e}`] = o;
|
|
69
69
|
});
|
|
70
70
|
const b = [];
|
|
71
|
-
return Object.entries(d).forEach(([
|
|
71
|
+
return Object.entries(d).forEach(([e, o]) => {
|
|
72
72
|
b.push([
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
e,
|
|
74
|
+
o
|
|
75
75
|
]);
|
|
76
76
|
}), {
|
|
77
77
|
colors: t,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DuxLogoIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
highlight: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
highlight: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {
|
|
12
|
+
highlight: string;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|