@duxweb/dvha-core 0.1.20 → 0.1.22
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/loader/iframe.cjs +1 -1
- package/dist/cjs/components/loader/loader.cjs +1 -0
- package/dist/cjs/components/loader/remote/loader.cjs +1 -0
- package/dist/cjs/components/loader/remote/render.cjs +1 -0
- 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 -0
- package/dist/cjs/components/status/notAuthorized.cjs +1 -1
- package/dist/cjs/components/status/notFound.cjs +1 -1
- package/dist/cjs/directive/permission.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/form.cjs +1 -1
- package/dist/cjs/hooks/formExtend.cjs +1 -0
- package/dist/cjs/hooks/formValidate.cjs +1 -0
- package/dist/cjs/hooks/i18n.cjs +1 -1
- package/dist/cjs/hooks/importCsv.cjs +1 -1
- package/dist/cjs/hooks/json/utils/expressionParser.cjs +1 -1
- package/dist/cjs/hooks/json.cjs +1 -1
- package/dist/cjs/hooks/list.cjs +1 -0
- package/dist/cjs/hooks/manage.cjs +1 -1
- package/dist/cjs/hooks/menu.cjs +1 -1
- package/dist/cjs/hooks/overlay.cjs +1 -1
- package/dist/cjs/hooks/select.cjs +1 -1
- package/dist/cjs/hooks/theme.cjs +2 -2
- package/dist/cjs/hooks/upload.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/preset/dataProvider.cjs +1 -1
- package/dist/cjs/preset/i18nProvider.cjs +1 -1
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/provider/tab.cjs +1 -1
- package/dist/cjs/stores/manage.cjs +1 -1
- package/dist/cjs/stores/tab.cjs +1 -1
- package/dist/cjs/stores/theme.cjs +1 -1
- package/dist/cjs/utils/theme.cjs +9 -1
- package/dist/esm/components/auth/can.js +9 -7
- package/dist/esm/components/loader/loader.js +48 -0
- package/dist/esm/components/loader/remote/loader.js +150 -0
- package/dist/esm/components/loader/remote/render.js +19 -0
- package/dist/esm/components/overlay/overlay.js +22 -31
- package/dist/esm/components/status/error.js +3 -3
- package/dist/esm/components/status/exception.js +23 -0
- package/dist/esm/components/status/notAuthorized.js +2 -2
- package/dist/esm/components/status/notFound.js +4 -4
- package/dist/esm/directive/permission.js +5 -3
- package/dist/esm/hooks/auth.js +67 -67
- package/dist/esm/hooks/data.js +164 -160
- package/dist/esm/hooks/export.js +26 -23
- package/dist/esm/hooks/form.js +38 -35
- package/dist/esm/hooks/formExtend.js +38 -0
- package/dist/esm/hooks/formValidate.js +28 -0
- package/dist/esm/hooks/i18n.js +16 -8
- package/dist/esm/hooks/json/utils/expressionParser.js +1 -1
- package/dist/esm/hooks/json.js +57 -57
- package/dist/esm/hooks/list.js +179 -0
- package/dist/esm/hooks/manage.js +18 -13
- package/dist/esm/hooks/overlay.js +6 -4
- package/dist/esm/hooks/theme.js +11 -11
- package/dist/esm/index.js +129 -113
- package/dist/esm/main.js +22 -12
- package/dist/esm/preset/i18nProvider.js +17 -18
- package/dist/esm/provider/app.js +61 -53
- package/dist/esm/provider/tab.js +1 -1
- package/dist/esm/stores/manage.js +34 -24
- package/dist/esm/stores/tab.js +58 -49
- package/dist/esm/stores/theme.js +36 -34
- package/dist/esm/utils/theme.js +89 -76
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/loader/loader.d.ts +2 -0
- package/dist/types/components/loader/remote/index.d.ts +2 -0
- package/dist/types/components/loader/remote/loader.d.ts +1 -0
- package/dist/types/components/loader/remote/render.d.ts +1 -0
- package/dist/types/components/status/error.d.ts +1 -2
- package/dist/types/components/status/exception.d.ts +3 -0
- package/dist/types/components/status/index.d.ts +4 -0
- package/dist/types/components/status/notAuthorized.d.ts +1 -2
- package/dist/types/components/status/notFound.d.ts +1 -2
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/hooks/auth.d.ts +6 -6
- package/dist/types/hooks/data.d.ts +216 -216
- package/dist/types/hooks/form.d.ts +6 -3
- package/dist/types/hooks/formExtend.d.ts +12 -0
- package/dist/types/hooks/formValidate.d.ts +14 -0
- package/dist/types/hooks/i18n.d.ts +2 -0
- package/dist/types/hooks/import.d.ts +1 -2
- package/dist/types/hooks/index.d.ts +4 -1
- package/dist/types/hooks/json.d.ts +1 -1
- package/dist/types/hooks/list.d.ts +66 -0
- package/dist/types/hooks/manage.d.ts +1 -0
- package/dist/types/hooks/menu.d.ts +1 -1
- package/dist/types/hooks/overlay.d.ts +1 -1
- package/dist/types/hooks/theme.d.ts +8 -8
- package/dist/types/index.d.ts +6 -5
- package/dist/types/preset/i18nProvider.d.ts +1 -1
- package/dist/types/stores/auth.d.ts +9 -24
- package/dist/types/stores/i18n.d.ts +7 -16
- package/dist/types/stores/index.d.ts +2 -2
- package/dist/types/stores/manage.d.ts +7 -16
- package/dist/types/stores/route.d.ts +12 -2538
- package/dist/types/stores/tab.d.ts +6 -1030
- package/dist/types/stores/theme.d.ts +14 -96
- package/dist/types/types/config.d.ts +9 -0
- package/dist/types/types/i18n.d.ts +1 -0
- package/dist/types/types/manage.d.ts +6 -0
- package/dist/types/types/theme.d.ts +2 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/theme.d.ts +4 -49
- package/package.json +22 -15
- package/dist/cjs/node_modules/jsep/dist/jsep.cjs +0 -2
- package/dist/esm/node_modules/jsep/dist/jsep.js +0 -737
- /package/dist/cjs/{hooks/themeColor.cjs → config/color.cjs} +0 -0
- /package/dist/esm/{hooks/themeColor.js → config/color.js} +0 -0
- /package/dist/types/{hooks/themeColor.d.ts → config/color.d.ts} +0 -0
|
@@ -1,41 +1,51 @@
|
|
|
1
1
|
import { cloneDeep as P } from "lodash-es";
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { inject as
|
|
2
|
+
import { defineStore as h } from "pinia";
|
|
3
|
+
import { inject as m, ref as p, markRaw as y } from "vue";
|
|
4
4
|
function v(e) {
|
|
5
5
|
return e != null && typeof e == "object" && !Array.isArray(e) && typeof e.getList != "function";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
if (e || (e = (
|
|
7
|
+
function O(e) {
|
|
8
|
+
const d = m("dux.manage");
|
|
9
|
+
if (e || (e = (d == null ? void 0 : d.value) || ""), !e)
|
|
10
10
|
throw new Error("manage not found");
|
|
11
|
-
return
|
|
11
|
+
return j(e)();
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
const
|
|
13
|
+
function j(e) {
|
|
14
|
+
return h(`manages-${e}`, () => {
|
|
15
|
+
const d = p(), o = p(!1);
|
|
16
16
|
return {
|
|
17
|
-
config:
|
|
17
|
+
config: d,
|
|
18
18
|
isInit: () => {
|
|
19
|
-
const
|
|
20
|
-
return
|
|
19
|
+
const n = o.value;
|
|
20
|
+
return o.value = !0, n;
|
|
21
21
|
},
|
|
22
|
-
setConfig: (
|
|
23
|
-
const t = P(
|
|
24
|
-
t.title &&
|
|
25
|
-
const
|
|
26
|
-
r != null && r.dataProvider && (v(r.dataProvider) ? Object.keys(r.dataProvider).forEach((
|
|
27
|
-
|
|
28
|
-
}) :
|
|
29
|
-
|
|
30
|
-
}) :
|
|
22
|
+
setConfig: (n, r) => {
|
|
23
|
+
const t = P(n), u = [];
|
|
24
|
+
t.title && u.push(t.title), r.title && u.push(r.title), t.title = u.join(" - "), t.copyright = t.copyright || r.copyright, t.description = t.description || r.description, t.theme = { ...r == null ? void 0 : r.theme, ...t == null ? void 0 : t.theme };
|
|
25
|
+
const s = {};
|
|
26
|
+
r != null && r.dataProvider && (v(r.dataProvider) ? Object.keys(r.dataProvider).forEach((i) => {
|
|
27
|
+
s[i] = r.dataProvider[i];
|
|
28
|
+
}) : s.default = r.dataProvider), t != null && t.dataProvider && (v(t.dataProvider) ? Object.keys(t.dataProvider).forEach((i) => {
|
|
29
|
+
s[i] = t.dataProvider[i];
|
|
30
|
+
}) : s.default = t.dataProvider), t.authProvider = (r == null ? void 0 : r.authProvider) || (t == null ? void 0 : t.authProvider), t.dataProvider = s, t.i18nProvider = (r == null ? void 0 : r.i18nProvider) || (t == null ? void 0 : t.i18nProvider), t.layoutComponent = {
|
|
31
31
|
...r.layoutComponent,
|
|
32
32
|
...t.layoutComponent
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
|
+
const c = {
|
|
35
|
+
...r.components,
|
|
36
|
+
...t.components
|
|
37
|
+
};
|
|
38
|
+
c && Object.keys(c).forEach((i) => {
|
|
39
|
+
c[i] && (c[i] = y(c[i]));
|
|
40
|
+
}), t.components = c, t.remote = {
|
|
41
|
+
...r.remote,
|
|
42
|
+
...t.remote
|
|
43
|
+
}, d.value = t;
|
|
34
44
|
},
|
|
35
|
-
getConfig: () =>
|
|
45
|
+
getConfig: () => d.value
|
|
36
46
|
};
|
|
37
47
|
});
|
|
38
48
|
}
|
|
39
49
|
export {
|
|
40
|
-
|
|
50
|
+
O as useManageStore
|
|
41
51
|
};
|
package/dist/esm/stores/tab.js
CHANGED
|
@@ -1,69 +1,78 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { inject as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
1
|
+
import { defineStore as p } from "pinia";
|
|
2
|
+
import { inject as c, ref as s, nextTick as h } from "vue";
|
|
3
|
+
function E(i) {
|
|
4
|
+
const u = c("dux.manage");
|
|
5
|
+
if (i || (i = (u == null ? void 0 : u.value) || ""), !i)
|
|
6
6
|
throw new Error("manage not found");
|
|
7
|
-
return
|
|
7
|
+
return T(i)();
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
const o = s(),
|
|
9
|
+
function T(i) {
|
|
10
|
+
return p(`tab-${i}`, () => {
|
|
11
|
+
const u = s(), o = s(), e = s([]);
|
|
12
12
|
return {
|
|
13
|
-
current:
|
|
14
|
-
tabs:
|
|
15
|
-
isTab: (
|
|
16
|
-
addTab: (
|
|
17
|
-
|
|
13
|
+
current: u,
|
|
14
|
+
tabs: e,
|
|
15
|
+
isTab: (t) => e.value.some((a) => a.path === t),
|
|
16
|
+
addTab: (t, a) => {
|
|
17
|
+
t.path && (e.value.some((l) => l.path === t.path) ? (u.value && u.value !== t.path && (o.value = e.value.find((l) => l.path === u.value)), u.value = t.path) : (u.value && (o.value = e.value.find((l) => l.path === u.value)), e.value.push(t), a == null || a(t), u.value = t.path));
|
|
18
18
|
},
|
|
19
|
-
delTab: (
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
19
|
+
delTab: (t, a) => {
|
|
20
|
+
var d;
|
|
21
|
+
const l = e.value.findIndex((r) => r.path === t);
|
|
22
|
+
if (l === -1 || e.value.length <= 1)
|
|
23
23
|
return;
|
|
24
|
-
const n =
|
|
25
|
-
if ((
|
|
24
|
+
const n = e.value[l];
|
|
25
|
+
if ((d = n == null ? void 0 : n.meta) != null && d.lock)
|
|
26
26
|
return;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
let v;
|
|
28
|
+
if (t === u.value && o.value && (v = e.value.find((r) => {
|
|
29
|
+
var f;
|
|
30
|
+
return r.path === ((f = o.value) == null ? void 0 : f.path) && r.path !== t;
|
|
31
|
+
})), !v) {
|
|
32
|
+
const r = e.value[l - 1], f = e.value[l + 1];
|
|
33
|
+
v = r || f;
|
|
34
|
+
}
|
|
35
|
+
e.value.splice(l, 1), a == null || a(v);
|
|
31
36
|
},
|
|
32
|
-
changeTab: (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
a && (e == null || e(a));
|
|
37
|
+
changeTab: (t, a) => {
|
|
38
|
+
const l = e.value.find((n) => n.path === t);
|
|
39
|
+
l && (u.value && u.value !== t && (o.value = e.value.find((n) => n.path === u.value)), u.value = t, a == null || a(l));
|
|
36
40
|
},
|
|
37
|
-
delOther: (
|
|
38
|
-
|
|
41
|
+
delOther: (t, a) => {
|
|
42
|
+
e.value = e.value.filter((l) => {
|
|
39
43
|
var n;
|
|
40
|
-
return
|
|
41
|
-
}),
|
|
44
|
+
return l.path === t || ((n = l.meta) == null ? void 0 : n.lock);
|
|
45
|
+
}), a == null || a();
|
|
42
46
|
},
|
|
43
|
-
delLeft: (
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
delLeft: (t, a) => {
|
|
48
|
+
const l = e.value.findIndex((n) => n.path === t);
|
|
49
|
+
l <= 0 || h(() => {
|
|
50
|
+
e.value = [...e.value.slice(0, l).filter((n) => {
|
|
51
|
+
var v;
|
|
52
|
+
return (v = n.meta) == null ? void 0 : v.lock;
|
|
53
|
+
}), ...e.value.slice(l)], a == null || a();
|
|
54
|
+
});
|
|
49
55
|
},
|
|
50
|
-
delRight: (
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
delRight: (t, a) => {
|
|
57
|
+
const l = e.value.findIndex((n) => n.path === t);
|
|
58
|
+
l === -1 || l === e.value.length - 1 || h(() => {
|
|
59
|
+
e.value = [...e.value.slice(0, l + 1), ...e.value.slice(l + 1).filter((n) => {
|
|
60
|
+
var v;
|
|
61
|
+
return (v = n.meta) == null ? void 0 : v.lock;
|
|
62
|
+
})], a == null || a();
|
|
63
|
+
});
|
|
56
64
|
},
|
|
57
|
-
lockTab: (
|
|
58
|
-
const
|
|
59
|
-
|
|
65
|
+
lockTab: (t) => {
|
|
66
|
+
const a = e.value.findIndex((l) => l.path === t);
|
|
67
|
+
a !== -1 && e.value[a] && (e.value[a].meta || (e.value[a].meta = {}), e.value[a].meta.lock = !e.value[a].meta.lock);
|
|
60
68
|
},
|
|
61
69
|
clearTab: () => {
|
|
62
|
-
o.value = void 0,
|
|
70
|
+
u.value = void 0, o.value = void 0, e.value = [];
|
|
63
71
|
}
|
|
64
72
|
};
|
|
65
73
|
});
|
|
66
74
|
}
|
|
67
75
|
export {
|
|
68
|
-
|
|
76
|
+
T as createTabStore,
|
|
77
|
+
E as useTabStore
|
|
69
78
|
};
|
package/dist/esm/stores/theme.js
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { inject as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineStore as v } from "pinia";
|
|
2
|
+
import { inject as S, ref as n } from "vue";
|
|
3
|
+
import { useManageStore as g } from "./manage.js";
|
|
4
|
+
const f = {
|
|
5
|
+
primary: "emerald",
|
|
5
6
|
info: "cyan",
|
|
6
7
|
success: "green",
|
|
7
8
|
warning: "amber",
|
|
8
9
|
error: "red",
|
|
9
|
-
gray: "
|
|
10
|
+
gray: "zinc"
|
|
10
11
|
};
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
12
|
+
function j(e) {
|
|
13
|
+
const o = S("dux.manage");
|
|
14
|
+
if (e || (e = (o == null ? void 0 : o.value) || ""), !e)
|
|
14
15
|
throw new Error("manage not found");
|
|
15
|
-
return
|
|
16
|
+
return w(e)();
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
function w(e) {
|
|
19
|
+
return v(`theme-${e}`, () => {
|
|
20
|
+
var c, i;
|
|
21
|
+
const o = g(e), t = n(((i = (c = o.config) == null ? void 0 : c.theme) == null ? void 0 : i.defaultTheme) || f), u = n("auto"), s = n(!1);
|
|
22
|
+
function m() {
|
|
23
|
+
s.value = !0;
|
|
22
24
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
+
function h(r) {
|
|
26
|
+
u.value = r;
|
|
25
27
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
+
function a(r, p) {
|
|
29
|
+
t.value[r] = p;
|
|
28
30
|
}
|
|
29
|
-
function
|
|
30
|
-
Object.assign(
|
|
31
|
+
function l(r) {
|
|
32
|
+
Object.assign(t.value, r);
|
|
31
33
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
+
function d() {
|
|
35
|
+
t.value = { ...f };
|
|
34
36
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
37
|
+
function T() {
|
|
38
|
+
return t.value;
|
|
37
39
|
}
|
|
38
40
|
return {
|
|
39
|
-
mode:
|
|
40
|
-
setMode:
|
|
41
|
-
theme:
|
|
42
|
-
cssInit:
|
|
43
|
-
setCssInit:
|
|
44
|
-
setThemeColor:
|
|
45
|
-
setThemeColors:
|
|
46
|
-
resetTheme:
|
|
47
|
-
getTheme:
|
|
41
|
+
mode: u,
|
|
42
|
+
setMode: h,
|
|
43
|
+
theme: t,
|
|
44
|
+
cssInit: s,
|
|
45
|
+
setCssInit: m,
|
|
46
|
+
setThemeColor: a,
|
|
47
|
+
setThemeColors: l,
|
|
48
|
+
resetTheme: d,
|
|
49
|
+
getTheme: T
|
|
48
50
|
};
|
|
49
51
|
}, {
|
|
50
52
|
persist: {
|
|
@@ -53,5 +55,5 @@ function T(t) {
|
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
j as useThemeStore
|
|
57
59
|
};
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -1,85 +1,98 @@
|
|
|
1
|
-
function
|
|
2
|
-
return `
|
|
1
|
+
function p(s) {
|
|
2
|
+
return `rgb(var(${s}))`;
|
|
3
3
|
}
|
|
4
|
-
function s
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
function f(s, u) {
|
|
5
|
+
return `color-mix(in oklab, rgb(var(${s})) var(${u}, 100%), transparent)`;
|
|
6
|
+
}
|
|
7
|
+
function C(s) {
|
|
8
|
+
const u = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"], m = ["primary", "info", "success", "warning", "error", "gray"], x = ["hover", "pressed", "focus", "disabled"], n = {
|
|
9
|
+
white: { DEFAULT: p("--ui-color-white") },
|
|
10
|
+
black: { DEFAULT: p("--ui-color-black") }
|
|
11
|
+
};
|
|
12
|
+
Object.keys(s).forEach((r) => {
|
|
13
|
+
n[r] = {}, u.forEach((e) => {
|
|
14
|
+
n[r][e] = p(`--base-color-${r}-${e}`);
|
|
9
15
|
});
|
|
10
|
-
}),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
16
|
+
}), m.forEach((r) => {
|
|
17
|
+
n[r] = {
|
|
18
|
+
DEFAULT: f(`--ui-color-${r}`, "--un-text-opacity")
|
|
19
|
+
}, u.forEach((e) => {
|
|
20
|
+
n[r][e] = f(`--ui-color-${r}-${e}`, "--un-text-opacity");
|
|
21
|
+
}), x.forEach((e) => {
|
|
22
|
+
n[r][e] = f(`--ui-color-${r}-${e}`, "--un-text-opacity");
|
|
15
23
|
});
|
|
16
24
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return Object.entries(d).forEach(([e, o]) => {
|
|
72
|
-
b.push([
|
|
73
|
-
e,
|
|
74
|
-
o
|
|
25
|
+
const l = {
|
|
26
|
+
text: ["default", "dimmed", "muted", "toned", "highlighted", "inverted"],
|
|
27
|
+
bg: ["default", "muted", "elevated", "accented", "inverted"],
|
|
28
|
+
border: ["default", "muted", "accented", "inverted"]
|
|
29
|
+
};
|
|
30
|
+
function a(r, e, i, t, d) {
|
|
31
|
+
const c = [];
|
|
32
|
+
return i.forEach((o) => {
|
|
33
|
+
const E = `--ui-${d || r}${o === "default" ? "" : `-${o}`}`;
|
|
34
|
+
c.push([
|
|
35
|
+
`${r}-${o}`,
|
|
36
|
+
{
|
|
37
|
+
[e]: `color-mix(in oklab, rgb(var(${E})) var(${t}, 100%), transparent)`,
|
|
38
|
+
[t]: "100%"
|
|
39
|
+
}
|
|
40
|
+
]), c.push([
|
|
41
|
+
new RegExp(`^${r}-${o}\\/(\\d*\\.?\\d+)(%?)$`),
|
|
42
|
+
([, b, A]) => {
|
|
43
|
+
const g = Number(b);
|
|
44
|
+
let h;
|
|
45
|
+
return A || g > 1 ? h = `${g}%` : h = `${g * 100}%`, {
|
|
46
|
+
[e]: `color-mix(in oklab, rgb(var(${E})) var(${t}, 100%), transparent)`,
|
|
47
|
+
[t]: h
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
]), c.push([
|
|
51
|
+
new RegExp(`^${r}-${o}\\[(.+)\\]$`),
|
|
52
|
+
([, b]) => ({
|
|
53
|
+
[e]: b.replace(/_/g, " ")
|
|
54
|
+
})
|
|
55
|
+
]);
|
|
56
|
+
}), c;
|
|
57
|
+
}
|
|
58
|
+
const v = a("text", "color", l.text, "--un-text-opacity"), R = a("bg", "background-color", l.bg, "--un-bg-opacity"), k = a("border", "border-color", l.border, "--un-border-opacity"), w = a("ring", "--un-ring-color", l.border, "--un-ring-opacity", "border"), $ = [];
|
|
59
|
+
l.border.forEach((r) => {
|
|
60
|
+
const e = `--ui-border${r === "default" ? "" : `-${r}`}`;
|
|
61
|
+
$.push([
|
|
62
|
+
new RegExp(`^divide-${r}$`),
|
|
63
|
+
(i, { rawSelector: t }) => `
|
|
64
|
+
.${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")} > :not(:last-child) {
|
|
65
|
+
border-color: color-mix(in oklab, rgb(var(${e})) var(--un-border-opacity, 100%), transparent);
|
|
66
|
+
--un-border-opacity: 100%;
|
|
67
|
+
}`
|
|
68
|
+
]), $.push([
|
|
69
|
+
new RegExp(`^divide-${r}\\/(\\d*\\.?\\d+)(%?)$`),
|
|
70
|
+
([, i, t], { rawSelector: d }) => {
|
|
71
|
+
const c = Number(i);
|
|
72
|
+
let o;
|
|
73
|
+
return t || c > 1 ? o = `${c}%` : o = `${c * 100}%`, `
|
|
74
|
+
.${d.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")} > :not(:last-child) {
|
|
75
|
+
border-color: color-mix(in oklab, rgb(var(${e})) var(--un-border-opacity, 100%), transparent);
|
|
76
|
+
--un-border-opacity: ${o};
|
|
77
|
+
}`;
|
|
78
|
+
}
|
|
75
79
|
]);
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
});
|
|
81
|
+
const y = [
|
|
82
|
+
...v,
|
|
83
|
+
...R,
|
|
84
|
+
...k,
|
|
85
|
+
...w,
|
|
86
|
+
...$
|
|
87
|
+
];
|
|
88
|
+
return {
|
|
89
|
+
name: "preset-theme",
|
|
90
|
+
theme: {
|
|
91
|
+
colors: n
|
|
92
|
+
},
|
|
93
|
+
rules: y
|
|
81
94
|
};
|
|
82
95
|
}
|
|
83
96
|
export {
|
|
84
|
-
|
|
97
|
+
C as themePreset
|
|
85
98
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sfcLoader(path: string): () => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DuxRemoteRender: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const DuxError: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const DuxException: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const DuxNotAuthorized: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const DuxNotFound: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './color';
|
|
@@ -34,7 +34,7 @@ export interface IAuthActionParams {
|
|
|
34
34
|
* @param onError Login error callback
|
|
35
35
|
* @returns Login method
|
|
36
36
|
*/
|
|
37
|
-
export declare function useLogin(
|
|
37
|
+
export declare function useLogin(props?: IAuthLoginParams): {
|
|
38
38
|
mutate: (data: Record<string, any>) => Promise<void>;
|
|
39
39
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
40
40
|
};
|
|
@@ -45,7 +45,7 @@ export declare function useLogin({ onSuccess, onError }: IAuthLoginParams): {
|
|
|
45
45
|
* @param onError Logout error callback
|
|
46
46
|
* @returns Logout method
|
|
47
47
|
*/
|
|
48
|
-
export declare function useLogout(
|
|
48
|
+
export declare function useLogout(props?: IAuthLogoutParams): {
|
|
49
49
|
mutate: (params?: any) => Promise<void>;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -55,7 +55,7 @@ export declare function useLogout({ onSuccess, onError }: IAuthLogoutParams): {
|
|
|
55
55
|
* @param onError Check error callback
|
|
56
56
|
* @returns Check method
|
|
57
57
|
*/
|
|
58
|
-
export declare function useCheck(
|
|
58
|
+
export declare function useCheck(props?: IAuthCheckParams): {
|
|
59
59
|
mutate: (params?: any) => Promise<void>;
|
|
60
60
|
};
|
|
61
61
|
/**
|
|
@@ -65,7 +65,7 @@ export declare function useCheck({ onSuccess, onError }: IAuthCheckParams): {
|
|
|
65
65
|
* @param onError Register error callback
|
|
66
66
|
* @returns Register method
|
|
67
67
|
*/
|
|
68
|
-
export declare function useRegister(
|
|
68
|
+
export declare function useRegister(props?: IAuthLoginParams): {
|
|
69
69
|
mutate: (data: Record<string, any>) => Promise<void>;
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
@@ -74,7 +74,7 @@ export declare function useRegister({ onSuccess, onError }: IAuthLoginParams): {
|
|
|
74
74
|
* @param onError Forgot password error callback
|
|
75
75
|
* @returns Forgot password method
|
|
76
76
|
*/
|
|
77
|
-
export declare function useForgotPassword(
|
|
77
|
+
export declare function useForgotPassword(props?: IAuthActionParams): {
|
|
78
78
|
mutate: (params?: any) => Promise<void>;
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
@@ -83,7 +83,7 @@ export declare function useForgotPassword({ onSuccess, onError }: IAuthActionPar
|
|
|
83
83
|
* @param onError Update password error callback
|
|
84
84
|
* @returns Update password method
|
|
85
85
|
*/
|
|
86
|
-
export declare function useUpdatePassword(
|
|
86
|
+
export declare function useUpdatePassword(props?: IAuthActionParams): {
|
|
87
87
|
mutate: (params?: any) => Promise<void>;
|
|
88
88
|
};
|
|
89
89
|
/**
|