@duxweb/dvha-core 1.1.30 → 1.1.31
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/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/components/auth/can.cjs +1 -1
- package/dist/cjs/components/auth/index.cjs +1 -0
- package/dist/cjs/components/common/icon.cjs +1 -1
- package/dist/cjs/components/common/index.cjs +1 -0
- package/dist/cjs/components/common/logo.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -0
- package/dist/cjs/components/loader/iframe.cjs +1 -1
- package/dist/cjs/components/loader/index.cjs +1 -0
- package/dist/cjs/components/loader/loader.cjs +1 -1
- package/dist/cjs/components/loader/remote/index.cjs +1 -0
- 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/index.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 -1
- package/dist/cjs/components/status/index.cjs +1 -0
- 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/index.cjs +1 -0
- package/dist/cjs/directive/permission.cjs +1 -1
- package/dist/cjs/hooks/auth.cjs +1 -1
- package/dist/cjs/hooks/config.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/formValidate.cjs +1 -1
- package/dist/cjs/hooks/i18n.cjs +1 -1
- package/dist/cjs/hooks/import.cjs +1 -1
- package/dist/cjs/hooks/importCsv.cjs +2 -2
- package/dist/cjs/hooks/index.cjs +1 -0
- package/dist/cjs/hooks/json/index.cjs +1 -1
- package/dist/cjs/hooks/json/utils/contextManager.cjs +1 -1
- package/dist/cjs/hooks/json/utils/expressionParser.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/hooks/json.cjs +1 -1
- package/dist/cjs/hooks/list.cjs +1 -1
- 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 +4 -8
- package/dist/cjs/hooks/tree.cjs +1 -1
- package/dist/cjs/hooks/upload/index.cjs +1 -0
- package/dist/cjs/hooks/upload/local.cjs +1 -1
- package/dist/cjs/hooks/upload/s3.cjs +1 -1
- 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/authProvider.cjs +1 -1
- package/dist/cjs/preset/dataProvider.cjs +1 -1
- package/dist/cjs/preset/i18nProvider.cjs +1 -1
- package/dist/cjs/preset/index.cjs +1 -0
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/provider/index.cjs +1 -0
- package/dist/cjs/provider/tab.cjs +1 -1
- package/dist/cjs/router/index.cjs +1 -0
- package/dist/cjs/router/route.cjs +1 -1
- package/dist/cjs/stores/auth.cjs +1 -1
- package/dist/cjs/stores/i18n.cjs +1 -1
- package/dist/cjs/stores/index.cjs +1 -0
- package/dist/cjs/stores/jsonSchema.cjs +1 -1
- package/dist/cjs/stores/manage.cjs +1 -1
- package/dist/cjs/stores/route.cjs +1 -1
- package/dist/cjs/stores/tab.cjs +1 -1
- package/dist/cjs/stores/theme.cjs +1 -1
- package/dist/cjs/utils/bus.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -0
- package/dist/cjs/utils/theme.cjs +8 -8
- package/dist/cjs/utils/tree.cjs +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.js +9 -0
- package/dist/esm/components/auth/can.js +17 -36
- package/dist/esm/components/auth/index.js +1 -0
- package/dist/esm/components/common/icon.js +16 -24
- package/dist/esm/components/common/index.js +2 -0
- package/dist/esm/components/common/logo.js +50 -49
- package/dist/esm/components/index.js +14 -0
- package/dist/esm/components/loader/iframe.js +16 -18
- package/dist/esm/components/loader/index.js +1 -0
- package/dist/esm/components/loader/loader.js +11 -40
- package/dist/esm/components/loader/remote/index.js +2 -0
- package/dist/esm/components/loader/remote/loader.js +118 -156
- package/dist/esm/components/loader/remote/render.js +12 -17
- package/dist/esm/components/overlay/index.js +1 -0
- package/dist/esm/components/overlay/overlay.js +54 -70
- package/dist/esm/components/status/error.js +7 -9
- package/dist/esm/components/status/exception.js +21 -37
- package/dist/esm/components/status/index.js +4 -0
- package/dist/esm/components/status/notAuthorized.js +7 -9
- package/dist/esm/components/status/notFound.js +7 -9
- package/dist/esm/config/color.js +288 -290
- package/dist/esm/directive/index.js +1 -0
- package/dist/esm/directive/permission.js +7 -27
- package/dist/esm/hooks/auth.js +154 -120
- package/dist/esm/hooks/config.js +11 -9
- package/dist/esm/hooks/data.js +416 -415
- package/dist/esm/hooks/export.js +32 -36
- package/dist/esm/hooks/exportCsv.js +42 -46
- package/dist/esm/hooks/form.js +86 -95
- package/dist/esm/hooks/formExtend.js +36 -40
- package/dist/esm/hooks/formValidate.js +22 -25
- package/dist/esm/hooks/i18n.js +14 -18
- package/dist/esm/hooks/import.js +45 -54
- package/dist/esm/hooks/importCsv.js +90 -83
- package/dist/esm/hooks/index.js +31 -0
- package/dist/esm/hooks/json/index.js +14 -22
- package/dist/esm/hooks/json/utils/contextManager.js +35 -26
- package/dist/esm/hooks/json/utils/expressionParser.js +100 -123
- package/dist/esm/hooks/json/vFor.js +50 -55
- package/dist/esm/hooks/json/vIf.js +17 -16
- package/dist/esm/hooks/json/vModel.js +96 -106
- package/dist/esm/hooks/json/vOn.js +30 -32
- package/dist/esm/hooks/json/vShow.js +20 -22
- package/dist/esm/hooks/json/vText.js +44 -51
- package/dist/esm/hooks/json.js +131 -132
- package/dist/esm/hooks/list.js +150 -184
- package/dist/esm/hooks/manage.js +25 -22
- package/dist/esm/hooks/menu.js +57 -61
- package/dist/esm/hooks/overlay.js +6 -23
- package/dist/esm/hooks/select.js +84 -94
- package/dist/esm/hooks/theme.js +289 -219
- package/dist/esm/hooks/tree.js +43 -47
- package/dist/esm/hooks/upload/index.js +2 -0
- package/dist/esm/hooks/upload/local.js +24 -30
- package/dist/esm/hooks/upload/s3.js +70 -80
- package/dist/esm/hooks/upload.js +256 -272
- package/dist/esm/index.js +150 -141
- package/dist/esm/main.js +24 -45
- package/dist/esm/preset/authProvider.js +62 -68
- package/dist/esm/preset/dataProvider.js +154 -180
- package/dist/esm/preset/i18nProvider.js +28 -30
- package/dist/esm/preset/index.js +3 -0
- package/dist/esm/provider/app.js +124 -151
- package/dist/esm/provider/index.js +2 -0
- package/dist/esm/provider/tab.js +49 -66
- package/dist/esm/router/index.js +1 -0
- package/dist/esm/router/route.js +39 -46
- package/dist/esm/stores/auth.js +51 -46
- package/dist/esm/stores/i18n.js +32 -29
- package/dist/esm/stores/index.js +7 -0
- package/dist/esm/stores/jsonSchema.js +47 -34
- package/dist/esm/stores/manage.js +63 -48
- package/dist/esm/stores/route.js +60 -56
- package/dist/esm/stores/tab.js +55 -60
- package/dist/esm/stores/theme.js +48 -55
- package/dist/esm/utils/bus.js +3 -5
- package/dist/esm/utils/index.js +3 -0
- package/dist/esm/utils/theme.js +110 -93
- package/dist/esm/utils/tree.js +28 -37
- package/package.json +1 -1
|
@@ -1,160 +1,122 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { useManage as e } from "../../../hooks/manage.js";
|
|
2
|
+
import { useError as t } from "../../../hooks/auth.js";
|
|
3
|
+
import { useClient as n } from "../../../hooks/data.js";
|
|
4
|
+
import { useI18n as r } from "../../../hooks/i18n.js";
|
|
5
|
+
import { useJsonSchema as i } from "../../../hooks/json.js";
|
|
6
|
+
import "../../../hooks/index.js";
|
|
7
|
+
import { src_exports as a } from "../../../index.js";
|
|
8
|
+
import * as o from "vue";
|
|
9
|
+
import { createVNode as s } from "vue";
|
|
10
|
+
import * as c from "vue-router";
|
|
11
|
+
import * as l from "pinia";
|
|
12
|
+
import * as u from "lodash-es";
|
|
13
|
+
import * as d from "@tanstack/vue-query";
|
|
14
|
+
import * as f from "@vueuse/core";
|
|
15
|
+
import p from "mitt";
|
|
16
|
+
import m from "axios";
|
|
17
|
+
import * as h from "@microsoft/fetch-event-source";
|
|
7
18
|
import g from "crypto-js";
|
|
8
|
-
import
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import * as V from "vue-router";
|
|
18
|
-
import { useError as A } from "../../../hooks/auth.js";
|
|
19
|
-
import { useClient as H } from "../../../hooks/data.js";
|
|
20
|
-
import "json-2-csv";
|
|
21
|
-
import "@vee-validate/rules";
|
|
22
|
-
import "vee-validate";
|
|
23
|
-
import { useI18n as I } from "../../../hooks/i18n.js";
|
|
24
|
-
import { useJsonSchema as Q } from "../../../hooks/json.js";
|
|
25
|
-
import "../../../hooks/json/index.js";
|
|
26
|
-
import { useManage as U } from "../../../hooks/manage.js";
|
|
27
|
-
import "../../../utils/bus.js";
|
|
28
|
-
import "@overlastic/vue";
|
|
29
|
-
import "clsx";
|
|
30
|
-
import "colorizr";
|
|
31
|
-
import * as z from "../../../index.js";
|
|
32
|
-
const l = /* @__PURE__ */ new Map();
|
|
33
|
-
function G(a) {
|
|
34
|
-
return g.MD5(a).toString().substring(0, 10);
|
|
19
|
+
import _ from "dayjs";
|
|
20
|
+
import * as v from "marked";
|
|
21
|
+
import * as y from "mathjs";
|
|
22
|
+
import b from "mime";
|
|
23
|
+
import x from "print-js";
|
|
24
|
+
import { loadModule as S } from "vue3-sfc-loader";
|
|
25
|
+
var C = /* @__PURE__ */ new Map();
|
|
26
|
+
function w(e) {
|
|
27
|
+
return g.MD5(e).toString().substring(0, 10);
|
|
35
28
|
}
|
|
36
|
-
function
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return {
|
|
125
|
-
id: P,
|
|
126
|
-
path: s,
|
|
127
|
-
async getContent() {
|
|
128
|
-
if ($(s))
|
|
129
|
-
throw new Error(`Package ${s} not imported`);
|
|
130
|
-
const n = await w(s), {
|
|
131
|
-
content: p,
|
|
132
|
-
type: m
|
|
133
|
-
} = n || {};
|
|
134
|
-
return {
|
|
135
|
-
getContentData: async (d) => S(p, s, m, r),
|
|
136
|
-
type: m
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
addStyle(t) {
|
|
142
|
-
const e = G(t);
|
|
143
|
-
if (l.has(e))
|
|
144
|
-
return;
|
|
145
|
-
l.set(e, !0);
|
|
146
|
-
const r = document.createElement("style");
|
|
147
|
-
r.textContent = t, r.setAttribute("data-hash", e), document.head.appendChild(r);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
return () => F(`${a}`, {
|
|
151
|
-
...j
|
|
152
|
-
});
|
|
29
|
+
function T(T) {
|
|
30
|
+
let D = n(), { mutate: O } = t(), { mergeLocale: k } = r(), { config: A } = e(), j = {
|
|
31
|
+
moduleCache: {
|
|
32
|
+
vue: o,
|
|
33
|
+
"@duxweb/dvha-core": a,
|
|
34
|
+
"@vueuse/core": f,
|
|
35
|
+
"@tanstack/vue-query": d,
|
|
36
|
+
axios: m,
|
|
37
|
+
"crypto-js": g,
|
|
38
|
+
mime: b,
|
|
39
|
+
math: y,
|
|
40
|
+
mitt: p,
|
|
41
|
+
"lodash-es": u,
|
|
42
|
+
pinia: l,
|
|
43
|
+
dayjs: _,
|
|
44
|
+
"vue-router": c,
|
|
45
|
+
marked: v,
|
|
46
|
+
"@microsoft/fetch-event-source": h,
|
|
47
|
+
"print-js": x,
|
|
48
|
+
...A?.remote?.packages,
|
|
49
|
+
"static!": function(e, t, n) {
|
|
50
|
+
let r = b.getType(n);
|
|
51
|
+
if (r?.startsWith("image")) return `data:${r};charset=utf-8;base64,${btoa(e)}`;
|
|
52
|
+
if (n === ".json") return JSON.parse(e);
|
|
53
|
+
throw Error(`${n} unable to parse`);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
async handleModule(e, t) {
|
|
57
|
+
if (e !== ".vue") {
|
|
58
|
+
if (e === ".json") {
|
|
59
|
+
let e = await t(), { render: n } = i({
|
|
60
|
+
data: e?.nodes || {},
|
|
61
|
+
context: e?.data || {}
|
|
62
|
+
});
|
|
63
|
+
return () => s(n, null, null);
|
|
64
|
+
}
|
|
65
|
+
if (e !== ".mjs") return t();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
customBlockHandler(e) {
|
|
69
|
+
if (e.type === "i18n") {
|
|
70
|
+
let t = JSON.parse(e.content);
|
|
71
|
+
for (let e in t) k(e, t[e]);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
getFile: async (e) => {
|
|
75
|
+
e = E(e, ".vue"), e = E(e, ".json");
|
|
76
|
+
let t = await D.request({
|
|
77
|
+
path: typeof A?.remote?.apiRoutePath == "function" ? A?.remote?.apiRoutePath(e) : A?.remote?.apiRoutePath || "static",
|
|
78
|
+
payload: { path: e },
|
|
79
|
+
method: A?.remote?.apiMethod || "POST"
|
|
80
|
+
}).then((e) => e?.data).catch((e) => {
|
|
81
|
+
O(e);
|
|
82
|
+
});
|
|
83
|
+
if (!t) return;
|
|
84
|
+
let n = t?.type || ".vue";
|
|
85
|
+
return (t?.type?.endsWith("js") || t?.type?.endsWith("ts") || t?.type?.endsWith("jsx") || t?.type?.endsWith("tsx")) && (n = ".mjs"), {
|
|
86
|
+
content: t?.content,
|
|
87
|
+
type: n
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
getResource({ refPath: e, relPath: t }, n) {
|
|
91
|
+
let { moduleCache: r, pathResolve: i, getFile: a } = n, [o, ...s] = t.match(/([^!]+!)|[^!]+$/g).reverse(), c = (e, t, n, i) => s.reduce((e, a) => r[a](e, t, n, i), e), l = i({
|
|
92
|
+
refPath: e,
|
|
93
|
+
relPath: o
|
|
94
|
+
}, n), u = s.join("") + l, d = (e) => e.startsWith("@") ? !0 : !e.includes("/") && !e.startsWith(".");
|
|
95
|
+
return {
|
|
96
|
+
id: u,
|
|
97
|
+
path: l,
|
|
98
|
+
async getContent() {
|
|
99
|
+
if (d(l)) throw Error(`Package ${l} not imported`);
|
|
100
|
+
let { content: e, type: t } = await a(l) || {};
|
|
101
|
+
return {
|
|
102
|
+
getContentData: async (r) => c(e, l, t, n),
|
|
103
|
+
type: t
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
addStyle(e) {
|
|
109
|
+
let t = w(e);
|
|
110
|
+
if (C.has(t)) return;
|
|
111
|
+
C.set(t, !0);
|
|
112
|
+
let n = document.createElement("style");
|
|
113
|
+
n.textContent = e, n.setAttribute("data-hash", t), document.head.appendChild(n);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
return () => S(`${T}`, { ...j });
|
|
153
117
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
|
|
118
|
+
function E(e, t) {
|
|
119
|
+
let n = RegExp(`${t}$`);
|
|
120
|
+
return e.replace(n, "");
|
|
157
121
|
}
|
|
158
|
-
export {
|
|
159
|
-
gt as sfcLoader
|
|
160
|
-
};
|
|
122
|
+
export { T as sfcLoader };
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
return () => m(t, null, null);
|
|
14
|
-
}
|
|
1
|
+
import { useRouteStore as e } from "../../../stores/route.js";
|
|
2
|
+
import "../../../stores/index.js";
|
|
3
|
+
import { sfcLoader as t } from "./loader.js";
|
|
4
|
+
import { createVNode as n, defineAsyncComponent as r, defineComponent as i } from "vue";
|
|
5
|
+
import { useRoute as a } from "vue-router";
|
|
6
|
+
const o = /* @__PURE__ */ i({
|
|
7
|
+
name: "DuxRemoteRender",
|
|
8
|
+
setup(i) {
|
|
9
|
+
let o = a(), s = r({ loader: t(e().searchRouteName(o.name)?.meta?.path) });
|
|
10
|
+
return () => n(s, null, null);
|
|
11
|
+
}
|
|
15
12
|
});
|
|
16
|
-
export {
|
|
17
|
-
C as DuxRemoteRender
|
|
18
|
-
};
|
|
13
|
+
export { o as DuxRemoteRender };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./overlay.js";
|
|
@@ -1,71 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useDisclosure as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
onClick: c
|
|
56
|
-
}, null)]
|
|
57
|
-
}), t(s, {
|
|
58
|
-
enterActiveClass: "transition-all",
|
|
59
|
-
enterFromClass: "opacity-0 scale-95",
|
|
60
|
-
enterToClass: "opacity-100 scale-100",
|
|
61
|
-
leaveActiveClass: "transition-all",
|
|
62
|
-
leaveFromClass: "opacity-100 scale-100",
|
|
63
|
-
leaveToClass: "opacity-0 scale-95"
|
|
64
|
-
}, {
|
|
65
|
-
default: () => [o.value && t(i, a, null)]
|
|
66
|
-
})]);
|
|
67
|
-
}
|
|
1
|
+
import { Transition as e, createVNode as t, defineAsyncComponent as n, defineComponent as r } from "vue";
|
|
2
|
+
import { useDisclosure as i } from "@overlastic/vue";
|
|
3
|
+
const a = /* @__PURE__ */ r({
|
|
4
|
+
name: "DuxOverlay",
|
|
5
|
+
props: {
|
|
6
|
+
component: Function,
|
|
7
|
+
componentProps: Object,
|
|
8
|
+
mask: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !0
|
|
11
|
+
},
|
|
12
|
+
maskClosable: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !0
|
|
15
|
+
},
|
|
16
|
+
duration: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 300
|
|
19
|
+
},
|
|
20
|
+
zIndex: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 1e3
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(r) {
|
|
26
|
+
let { visible: a, confirm: o, cancel: s } = i({ duration: r.duration }), c = r?.componentProps || {};
|
|
27
|
+
c.onConfirm = o, c.onClose = s;
|
|
28
|
+
let l = n(r.component), u = () => {
|
|
29
|
+
r.maskClosable && s();
|
|
30
|
+
};
|
|
31
|
+
return () => t("div", {
|
|
32
|
+
class: "fixed inset-0 flex items-center justify-center overflow-auto",
|
|
33
|
+
style: { zIndex: r.zIndex }
|
|
34
|
+
}, [t(e, {
|
|
35
|
+
enterActiveClass: "transition-opacity",
|
|
36
|
+
enterFromClass: "opacity-0",
|
|
37
|
+
enterToClass: "opacity-100",
|
|
38
|
+
leaveActiveClass: "transition-opacity",
|
|
39
|
+
leaveFromClass: "opacity-100",
|
|
40
|
+
leaveToClass: "opacity-0"
|
|
41
|
+
}, { default: () => [a.value && r.mask && t("div", {
|
|
42
|
+
class: "fixed inset-0 bg-black bg-opacity-30",
|
|
43
|
+
style: { transitionDuration: `${r.duration}ms` },
|
|
44
|
+
onClick: u
|
|
45
|
+
}, null)] }), t(e, {
|
|
46
|
+
enterActiveClass: "transition-all",
|
|
47
|
+
enterFromClass: "opacity-0 scale-95",
|
|
48
|
+
enterToClass: "opacity-100 scale-100",
|
|
49
|
+
leaveActiveClass: "transition-all",
|
|
50
|
+
leaveFromClass: "opacity-100 scale-100",
|
|
51
|
+
leaveToClass: "opacity-0 scale-95"
|
|
52
|
+
}, { default: () => [a.value && t(l, c, null)] })]);
|
|
53
|
+
}
|
|
68
54
|
});
|
|
69
|
-
export {
|
|
70
|
-
C as DuxOverlay
|
|
71
|
-
};
|
|
55
|
+
export { a as DuxOverlay };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { createTextVNode as e, createVNode as t, defineComponent as n } from "vue";
|
|
2
|
+
const r = /* @__PURE__ */ n({
|
|
3
|
+
name: "DuxError",
|
|
4
|
+
setup() {
|
|
5
|
+
return () => t("div", null, [t("h1", null, [e("500")]), t("p", null, [e("Internal Server Error")])]);
|
|
6
|
+
}
|
|
7
7
|
});
|
|
8
|
-
export {
|
|
9
|
-
t as DuxError
|
|
10
|
-
};
|
|
8
|
+
export { r as DuxError };
|
|
@@ -1,38 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}) {
|
|
22
|
-
const e = m(null), p = c(), {
|
|
23
|
-
config: t
|
|
24
|
-
} = s();
|
|
25
|
-
return l((n) => (console.error(n), p.name ? e.value = {
|
|
26
|
-
title: "500",
|
|
27
|
-
desc: n?.message || "Internal Server Error"
|
|
28
|
-
} : e.value = {
|
|
29
|
-
title: "404",
|
|
30
|
-
desc: "Page not found"
|
|
31
|
-
}, !1)), () => e.value ? t.components?.exception ? u(t.components.exception, {
|
|
32
|
-
data: e.value
|
|
33
|
-
}) : o("div", null, [o("h1", null, [e.value?.title || "Unknown"]), o("p", null, [e.value?.desc || "Unknown Description"]), o("p", null, [a("Use config.components.exception to configure the exception layout")])]) : r.default?.();
|
|
34
|
-
}
|
|
1
|
+
import { useManage as e } from "../../hooks/manage.js";
|
|
2
|
+
import "../../hooks/index.js";
|
|
3
|
+
import { createTextVNode as t, createVNode as n, defineComponent as r, h as i, onErrorCaptured as a, ref as o } from "vue";
|
|
4
|
+
import { useRoute as s } from "vue-router";
|
|
5
|
+
const c = /* @__PURE__ */ r({
|
|
6
|
+
name: "DuxException",
|
|
7
|
+
setup(r, { slots: c }) {
|
|
8
|
+
let l = o(null), u = s(), { config: d } = e();
|
|
9
|
+
return a((e) => (console.error(e), u.name ? l.value = {
|
|
10
|
+
title: "500",
|
|
11
|
+
desc: e?.message || "Internal Server Error"
|
|
12
|
+
} : l.value = {
|
|
13
|
+
title: "404",
|
|
14
|
+
desc: "Page not found"
|
|
15
|
+
}, !1)), () => l.value ? d.components?.exception ? i(d.components.exception, { data: l.value }) : n("div", null, [
|
|
16
|
+
n("h1", null, [l.value?.title || "Unknown"]),
|
|
17
|
+
n("p", null, [l.value?.desc || "Unknown Description"]),
|
|
18
|
+
n("p", null, [t("Use config.components.exception to configure the exception layout")])
|
|
19
|
+
]) : c.default?.();
|
|
20
|
+
}
|
|
35
21
|
});
|
|
36
|
-
export {
|
|
37
|
-
P as DuxException
|
|
38
|
-
};
|
|
22
|
+
export { c as DuxException };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { createTextVNode as e, createVNode as t, defineComponent as n } from "vue";
|
|
2
|
+
const r = /* @__PURE__ */ n({
|
|
3
|
+
name: "DuxNotAuthorized",
|
|
4
|
+
setup() {
|
|
5
|
+
return () => t("div", null, [t("h1", null, [e("403")]), t("p", null, [e("You are not authorized to access this page")])]);
|
|
6
|
+
}
|
|
7
7
|
});
|
|
8
|
-
export {
|
|
9
|
-
u as DuxNotAuthorized
|
|
10
|
-
};
|
|
8
|
+
export { r as DuxNotAuthorized };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { createTextVNode as e, createVNode as t, defineComponent as n } from "vue";
|
|
2
|
+
const r = /* @__PURE__ */ n({
|
|
3
|
+
name: "DuxNotFound",
|
|
4
|
+
setup() {
|
|
5
|
+
return () => t("div", null, [t("h1", null, [e("404")]), t("p", null, [e("Page not found")])]);
|
|
6
|
+
}
|
|
7
7
|
});
|
|
8
|
-
export {
|
|
9
|
-
u as DuxNotFound
|
|
10
|
-
};
|
|
8
|
+
export { r as DuxNotFound };
|