@duxweb/dvha-core 0.1.21 → 0.1.23
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/components/loader/remote/render.cjs +1 -1
- package/dist/cjs/components/overlay/overlay.cjs +1 -1
- package/dist/cjs/hooks/data.cjs +1 -1
- package/dist/cjs/hooks/i18n.cjs +1 -1
- package/dist/cjs/hooks/json/utils/expressionParser.cjs +1 -1
- package/dist/cjs/hooks/manage.cjs +1 -1
- package/dist/cjs/hooks/select.cjs +1 -1
- package/dist/cjs/hooks/theme.cjs +1 -1
- package/dist/cjs/hooks/tree.cjs +1 -0
- package/dist/cjs/hooks/upload.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/preset/dataProvider.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/theme.cjs +1 -1
- package/dist/esm/components/loader/loader.js +9 -8
- package/dist/esm/components/loader/remote/loader.js +2 -2
- package/dist/esm/components/loader/remote/render.js +1 -1
- package/dist/esm/components/overlay/overlay.js +3 -4
- package/dist/esm/hooks/data.js +273 -263
- package/dist/esm/hooks/i18n.js +1 -1
- package/dist/esm/hooks/json/utils/expressionParser.js +1 -1
- package/dist/esm/hooks/manage.js +17 -17
- package/dist/esm/hooks/select.js +48 -46
- package/dist/esm/hooks/theme.js +1 -1
- package/dist/esm/hooks/tree.js +41 -0
- package/dist/esm/hooks/upload.js +1 -0
- package/dist/esm/index.js +62 -60
- package/dist/esm/preset/dataProvider.js +67 -63
- package/dist/esm/provider/app.js +4 -4
- package/dist/esm/provider/tab.js +1 -1
- package/dist/esm/stores/manage.js +27 -25
- package/dist/esm/stores/theme.js +36 -34
- package/dist/types/hooks/data.d.ts +258 -186
- package/dist/types/hooks/form.d.ts +1 -1
- package/dist/types/hooks/index.d.ts +2 -2
- package/dist/types/hooks/menu.d.ts +1 -1
- package/dist/types/hooks/overlay.d.ts +1 -1
- package/dist/types/hooks/select.d.ts +30 -1
- package/dist/types/hooks/theme.d.ts +8 -8
- package/dist/types/hooks/tree.d.ts +2 -3
- package/dist/types/hooks/upload.d.ts +1 -1
- package/dist/types/preset/dataProvider.d.ts +1 -0
- 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 -2069
- package/dist/types/stores/theme.d.ts +14 -96
- package/dist/types/types/data.d.ts +3 -0
- package/dist/types/types/theme.d.ts +2 -0
- package/package.json +15 -13
- package/dist/cjs/_virtual/_commonjsHelpers.cjs +0 -1
- package/dist/cjs/_virtual/dayjs.min.cjs +0 -1
- package/dist/cjs/_virtual/dayjs.min2.cjs +0 -1
- package/dist/cjs/node_modules/dayjs/dayjs.min.cjs +0 -1
- package/dist/cjs/node_modules/jsep/dist/jsep.cjs +0 -2
- package/dist/cjs/node_modules/mitt/dist/mitt.cjs +0 -1
- package/dist/esm/_virtual/_commonjsHelpers.js +0 -6
- package/dist/esm/_virtual/dayjs.min.js +0 -7
- package/dist/esm/_virtual/dayjs.min2.js +0 -4
- package/dist/esm/node_modules/dayjs/dayjs.min.js +0 -282
- package/dist/esm/node_modules/jsep/dist/jsep.js +0 -737
- package/dist/esm/node_modules/mitt/dist/mitt.js +0 -19
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import k from "axios";
|
|
2
|
-
import { trimStart as
|
|
3
|
-
function w(
|
|
4
|
-
const
|
|
2
|
+
import { trimStart as h } from "lodash-es";
|
|
3
|
+
function w(l) {
|
|
4
|
+
const d = (a) => a ? `${l.apiUrl}/${h(a || "", "/")}` : l.apiUrl;
|
|
5
5
|
return {
|
|
6
|
-
apiUrl:
|
|
7
|
-
getList: (a,
|
|
6
|
+
apiUrl: d,
|
|
7
|
+
getList: (a, r, c) => {
|
|
8
8
|
const e = {};
|
|
9
|
-
return a.pagination && typeof a.pagination == "object" && (e.page = a.pagination.page, e.pageSize = a.pagination.pageSize), k.get(
|
|
9
|
+
return a.pagination && typeof a.pagination == "object" && (e.page = a.pagination.page, e.pageSize = a.pagination.pageSize), k.get(d(a.path) || "", {
|
|
10
10
|
params: {
|
|
11
11
|
...e,
|
|
12
12
|
...a.filters,
|
|
13
13
|
...a.sorters
|
|
14
14
|
},
|
|
15
15
|
headers: {
|
|
16
|
-
Authorization:
|
|
16
|
+
Authorization: c == null ? void 0 : c.token
|
|
17
17
|
},
|
|
18
18
|
...a.meta
|
|
19
|
-
}).then((t) =>
|
|
20
|
-
throw
|
|
19
|
+
}).then((t) => l.successCallback ? l.successCallback(t) : n(t)).catch((t) => {
|
|
20
|
+
throw l.errorCallback ? l.errorCallback(t) : m(t);
|
|
21
21
|
});
|
|
22
22
|
},
|
|
23
|
-
create: (a,
|
|
23
|
+
create: (a, r, c) => k.post(d(a.path) || "", a.data, {
|
|
24
24
|
headers: {
|
|
25
|
-
Authorization:
|
|
25
|
+
Authorization: c == null ? void 0 : c.token
|
|
26
26
|
},
|
|
27
27
|
...a.meta
|
|
28
|
-
}).then((e) =>
|
|
29
|
-
throw
|
|
28
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
29
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
30
30
|
}),
|
|
31
|
-
update: (a,
|
|
31
|
+
update: (a, r, c) => k.put(d(a.id ? `${a.path}/${a.id}` : a.path) || "", a.data, {
|
|
32
32
|
headers: {
|
|
33
|
-
Authorization:
|
|
33
|
+
Authorization: c == null ? void 0 : c.token
|
|
34
34
|
},
|
|
35
35
|
...a.meta
|
|
36
|
-
}).then((e) =>
|
|
37
|
-
throw
|
|
36
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
37
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
38
38
|
}),
|
|
39
|
-
deleteOne: (a,
|
|
39
|
+
deleteOne: (a, r, c) => k.delete(d(a.id ? `${a.path}/${a.id}` : a.path) || "", {
|
|
40
40
|
headers: {
|
|
41
|
-
Authorization:
|
|
41
|
+
Authorization: c == null ? void 0 : c.token
|
|
42
42
|
},
|
|
43
43
|
...a.meta
|
|
44
|
-
}).then((e) =>
|
|
45
|
-
throw
|
|
44
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
45
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
46
46
|
}),
|
|
47
|
-
getOne: (a,
|
|
47
|
+
getOne: (a, r, c) => k.get(d(a.id ? `${a.path}/${a.id}` : a.path) || "", {
|
|
48
48
|
headers: {
|
|
49
|
-
Authorization:
|
|
49
|
+
Authorization: c == null ? void 0 : c.token
|
|
50
50
|
},
|
|
51
51
|
...a.meta
|
|
52
|
-
}).then((e) =>
|
|
53
|
-
throw
|
|
52
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
53
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
54
54
|
}),
|
|
55
|
-
getMany: (a,
|
|
55
|
+
getMany: (a, r, c) => k.get(d(a.path) || "", {
|
|
56
56
|
params: {
|
|
57
57
|
ids: a.ids
|
|
58
58
|
},
|
|
59
59
|
headers: {
|
|
60
|
-
Authorization:
|
|
60
|
+
Authorization: c == null ? void 0 : c.token
|
|
61
61
|
},
|
|
62
62
|
...a.meta
|
|
63
|
-
}).then((e) =>
|
|
64
|
-
throw
|
|
63
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
64
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
65
65
|
}),
|
|
66
|
-
createMany: (a,
|
|
66
|
+
createMany: (a, r, c) => k.post(d(a.path) || "", a.data, {
|
|
67
67
|
headers: {
|
|
68
|
-
Authorization:
|
|
68
|
+
Authorization: c == null ? void 0 : c.token
|
|
69
69
|
},
|
|
70
70
|
...a.meta
|
|
71
|
-
}).then((e) =>
|
|
72
|
-
throw
|
|
71
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
72
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
73
73
|
}),
|
|
74
|
-
updateMany: (a,
|
|
74
|
+
updateMany: (a, r, c) => k.put(d(a.path) || "", {
|
|
75
75
|
ids: a.ids,
|
|
76
76
|
data: a.data
|
|
77
77
|
}, {
|
|
78
78
|
headers: {
|
|
79
|
-
Authorization:
|
|
79
|
+
Authorization: c == null ? void 0 : c.token
|
|
80
80
|
},
|
|
81
81
|
...a.meta
|
|
82
|
-
}).then((e) =>
|
|
83
|
-
throw
|
|
82
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
83
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
84
84
|
}),
|
|
85
|
-
deleteMany: (a,
|
|
85
|
+
deleteMany: (a, r, c) => k.delete(d(a.path) || "", {
|
|
86
86
|
params: {
|
|
87
87
|
ids: a.ids
|
|
88
88
|
},
|
|
89
89
|
headers: {
|
|
90
|
-
Authorization:
|
|
90
|
+
Authorization: c == null ? void 0 : c.token
|
|
91
91
|
},
|
|
92
92
|
...a.meta
|
|
93
|
-
}).then((e) =>
|
|
94
|
-
throw
|
|
93
|
+
}).then((e) => l.successCallback ? l.successCallback(e) : n(e)).catch((e) => {
|
|
94
|
+
throw l.errorCallback ? l.errorCallback(e) : m(e);
|
|
95
95
|
}),
|
|
96
|
-
custom: (a,
|
|
96
|
+
custom: (a, r, c) => {
|
|
97
97
|
let e = {
|
|
98
98
|
...a.query
|
|
99
99
|
};
|
|
@@ -104,57 +104,61 @@ function w(c) {
|
|
|
104
104
|
...e,
|
|
105
105
|
...a.filters
|
|
106
106
|
}), k.request({
|
|
107
|
-
url:
|
|
107
|
+
url: d(a.path || ""),
|
|
108
108
|
method: a.method || "GET",
|
|
109
109
|
data: a.payload,
|
|
110
110
|
params: e,
|
|
111
111
|
signal: a.signal,
|
|
112
112
|
headers: {
|
|
113
|
-
Authorization:
|
|
113
|
+
Authorization: c == null ? void 0 : c.token,
|
|
114
114
|
...a.headers
|
|
115
115
|
},
|
|
116
116
|
onUploadProgress: (t) => {
|
|
117
|
-
var
|
|
117
|
+
var b;
|
|
118
118
|
const C = Math.round(t.loaded * 100 / (t.total || 1));
|
|
119
|
-
(
|
|
119
|
+
(b = a.onUploadProgress) == null || b.call(a, {
|
|
120
120
|
loaded: t.loaded,
|
|
121
121
|
total: t.total,
|
|
122
122
|
percent: C
|
|
123
123
|
});
|
|
124
124
|
},
|
|
125
125
|
onDownloadProgress: (t) => {
|
|
126
|
-
var
|
|
126
|
+
var b;
|
|
127
127
|
const C = Math.round(t.loaded * 100 / (t.total || 1));
|
|
128
|
-
(
|
|
128
|
+
(b = a.onDownloadProgress) == null || b.call(a, {
|
|
129
129
|
loaded: t.loaded,
|
|
130
130
|
total: t.total,
|
|
131
131
|
percent: C
|
|
132
132
|
});
|
|
133
133
|
},
|
|
134
134
|
...a.meta
|
|
135
|
-
}).then((t) =>
|
|
136
|
-
throw
|
|
135
|
+
}).then((t) => l.successCallback ? l.successCallback(t) : n(t)).catch((t) => {
|
|
136
|
+
throw l.errorCallback ? l.errorCallback(t) : m(t);
|
|
137
137
|
});
|
|
138
|
+
},
|
|
139
|
+
getTotal: (a) => {
|
|
140
|
+
var r;
|
|
141
|
+
return l.getTotal ? l.getTotal(a) : ((r = a.meta) == null ? void 0 : r.total) || 0;
|
|
138
142
|
}
|
|
139
143
|
};
|
|
140
144
|
}
|
|
141
|
-
function n(
|
|
142
|
-
var
|
|
145
|
+
function n(l) {
|
|
146
|
+
var d, a, r;
|
|
143
147
|
return {
|
|
144
|
-
message: (
|
|
145
|
-
data: (a =
|
|
146
|
-
meta: (
|
|
147
|
-
raw:
|
|
148
|
+
message: (d = l.data) == null ? void 0 : d.message,
|
|
149
|
+
data: (a = l.data) == null ? void 0 : a.data,
|
|
150
|
+
meta: (r = l.data) == null ? void 0 : r.meta,
|
|
151
|
+
raw: l.data
|
|
148
152
|
};
|
|
149
153
|
}
|
|
150
|
-
function
|
|
151
|
-
var
|
|
154
|
+
function m(l) {
|
|
155
|
+
var d, a, r, c, e, t, C, b, g, u;
|
|
152
156
|
return {
|
|
153
|
-
message: ((a = (
|
|
154
|
-
data: (
|
|
155
|
-
meta: (t = (e =
|
|
156
|
-
status: ((
|
|
157
|
-
raw: (
|
|
157
|
+
message: ((a = (d = l.response) == null ? void 0 : d.data) == null ? void 0 : a.message) || (l == null ? void 0 : l.message),
|
|
158
|
+
data: (c = (r = l.response) == null ? void 0 : r.data) == null ? void 0 : c.data,
|
|
159
|
+
meta: (t = (e = l.response) == null ? void 0 : e.data) == null ? void 0 : t.meta,
|
|
160
|
+
status: ((b = (C = l.response) == null ? void 0 : C.data) == null ? void 0 : b.code) || ((g = l.response) == null ? void 0 : g.status) || 500,
|
|
161
|
+
raw: (u = l.response) == null ? void 0 : u.data
|
|
158
162
|
};
|
|
159
163
|
}
|
|
160
164
|
export {
|
package/dist/esm/provider/app.js
CHANGED
|
@@ -10,10 +10,10 @@ import "lodash-es";
|
|
|
10
10
|
import "@vee-validate/rules";
|
|
11
11
|
import "vee-validate";
|
|
12
12
|
import { useAuthStore as T } from "../stores/auth.js";
|
|
13
|
-
import {
|
|
14
|
-
import "pinia";
|
|
13
|
+
import { useI18nStore as W } from "../stores/i18n.js";
|
|
15
14
|
import { useManageStore as X } from "../stores/manage.js";
|
|
16
|
-
import {
|
|
15
|
+
import { useRouteStore as Y } from "../stores/route.js";
|
|
16
|
+
import "pinia";
|
|
17
17
|
import "@vueuse/core";
|
|
18
18
|
import "../hooks/json/index.js";
|
|
19
19
|
import "colorizr";
|
|
@@ -42,7 +42,7 @@ const De = /* @__PURE__ */ V({
|
|
|
42
42
|
f && (f.value = t);
|
|
43
43
|
const h = X(t);
|
|
44
44
|
h.isInit() || h.setConfig((R = u.manages) == null ? void 0 : R.find((e) => e.name === t), u);
|
|
45
|
-
const i =
|
|
45
|
+
const i = Y(t), r = Q(t), d = T(t), l = W(t);
|
|
46
46
|
if ((A = r.config) != null && A.i18nProvider && !l.isInit()) {
|
|
47
47
|
const e = l.getLocale();
|
|
48
48
|
e && ((S = r.config) == null || S.i18nProvider.changeLocale(e));
|
package/dist/esm/provider/tab.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as c, watch as d, createVNode as m, Transition as l, KeepAlive as f } from "vue";
|
|
2
2
|
import { useRoute as b, RouterView as h } from "vue-router";
|
|
3
3
|
import "pinia";
|
|
4
|
+
import "lodash-es";
|
|
4
5
|
import { useRouteStore as R } from "../stores/route.js";
|
|
5
6
|
import { useTabStore as w } from "../stores/tab.js";
|
|
6
|
-
import "lodash-es";
|
|
7
7
|
const k = /* @__PURE__ */ c({
|
|
8
8
|
name: "DuxTabRouterView",
|
|
9
9
|
props: {},
|
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
import { cloneDeep as P } from "lodash-es";
|
|
2
2
|
import { defineStore as h } from "pinia";
|
|
3
|
-
import { inject as m, ref as
|
|
4
|
-
function
|
|
3
|
+
import { inject as m, ref as p, markRaw as y } from "vue";
|
|
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
|
|
13
|
+
function j(e) {
|
|
14
14
|
return h(`manages-${e}`, () => {
|
|
15
|
-
const
|
|
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 && (
|
|
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
|
|
34
|
+
const c = {
|
|
35
35
|
...r.components,
|
|
36
36
|
...t.components
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
c && Object.keys(c).forEach((i) => {
|
|
39
|
+
c[i] && (c[i] = y(c[i]));
|
|
40
|
+
}), t.components = c, t.remote = {
|
|
39
41
|
...r.remote,
|
|
40
42
|
...t.remote
|
|
41
|
-
},
|
|
43
|
+
}, d.value = t;
|
|
42
44
|
},
|
|
43
|
-
getConfig: () =>
|
|
45
|
+
getConfig: () => d.value
|
|
44
46
|
};
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
export {
|
|
48
|
-
|
|
50
|
+
O as useManageStore
|
|
49
51
|
};
|
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
|
};
|