@duxweb/dvha-core 0.1.20 → 0.1.21
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/_commonjsHelpers.cjs +1 -0
- package/dist/cjs/_virtual/dayjs.min.cjs +1 -0
- package/dist/cjs/_virtual/dayjs.min2.cjs +1 -0
- 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.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/node_modules/dayjs/dayjs.min.cjs +1 -0
- package/dist/cjs/node_modules/mitt/dist/mitt.cjs +1 -0
- 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/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/_virtual/_commonjsHelpers.js +6 -0
- package/dist/esm/_virtual/dayjs.min.js +7 -0
- package/dist/esm/_virtual/dayjs.min2.js +4 -0
- package/dist/esm/components/auth/can.js +9 -7
- package/dist/esm/components/loader/loader.js +47 -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.js +57 -57
- package/dist/esm/hooks/list.js +179 -0
- package/dist/esm/hooks/manage.js +19 -14
- 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/node_modules/dayjs/dayjs.min.js +282 -0
- package/dist/esm/node_modules/mitt/dist/mitt.js +19 -0
- package/dist/esm/preset/i18nProvider.js +17 -18
- package/dist/esm/provider/app.js +61 -53
- package/dist/esm/stores/manage.js +23 -15
- package/dist/esm/stores/tab.js +58 -49
- 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 +30 -30
- 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/index.d.ts +6 -5
- package/dist/types/preset/i18nProvider.d.ts +1 -1
- package/dist/types/stores/route.d.ts +180 -180
- package/dist/types/stores/tab.d.ts +1112 -73
- 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/utils/index.d.ts +1 -1
- package/dist/types/utils/theme.d.ts +4 -49
- package/package.json +11 -5
- /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
package/dist/cjs/utils/theme.cjs
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(s){return`rgb(var(${s}))`}function f(s,u){return`color-mix(in oklab, rgb(var(${s})) var(${u}, 100%), transparent)`}function O(s){const u=["50","100","200","300","400","500","600","700","800","900","950"],E=["primary","info","success","warning","error","gray"],x=["hover","pressed","focus","disabled"],n={white:{DEFAULT:p("--ui-color-white")},black:{DEFAULT:p("--ui-color-black")}};Object.keys(s).forEach(r=>{n[r]={},u.forEach(e=>{n[r][e]=p(`--base-color-${r}-${e}`)})}),E.forEach(r=>{n[r]={DEFAULT:f(`--ui-color-${r}`,"--un-text-opacity")},u.forEach(e=>{n[r][e]=f(`--ui-color-${r}-${e}`,"--un-text-opacity")}),x.forEach(e=>{n[r][e]=f(`--ui-color-${r}-${e}`,"--un-text-opacity")})});const l={text:["default","dimmed","muted","toned","highlighted","inverted"],bg:["default","muted","elevated","accented","inverted"],border:["default","muted","accented","inverted"]};function a(r,e,i,t,d){const c=[];return i.forEach(o=>{const m=`--ui-${d||r}${o==="default"?"":`-${o}`}`;c.push([`${r}-${o}`,{[e]:`color-mix(in oklab, rgb(var(${m})) var(${t}, 100%), transparent)`,[t]:"100%"}]),c.push([new RegExp(`^${r}-${o}\\/(\\d*\\.?\\d+)(%?)$`),([,b,P])=>{const g=Number(b);let h;return P||g>1?h=`${g}%`:h=`${g*100}%`,{[e]:`color-mix(in oklab, rgb(var(${m})) var(${t}, 100%), transparent)`,[t]:h}}]),c.push([new RegExp(`^${r}-${o}\\[(.+)\\]$`),([,b])=>({[e]:b.replace(/_/g," ")})])}),c}const v=a("text","color",l.text,"--un-text-opacity"),R=a("bg","background-color",l.bg,"--un-bg-opacity"),y=a("border","border-color",l.border,"--un-border-opacity"),S=a("ring","--un-ring-color",l.border,"--un-ring-opacity","border"),$=[];l.border.forEach(r=>{const e=`--ui-border${r==="default"?"":`-${r}`}`;$.push([new RegExp(`^divide-${r}$`),(i,{rawSelector:t})=>`
|
|
2
|
+
.${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")} > :not(:last-child) {
|
|
3
|
+
border-color: color-mix(in oklab, rgb(var(${e})) var(--un-border-opacity, 100%), transparent);
|
|
4
|
+
--un-border-opacity: 100%;
|
|
5
|
+
}`]),$.push([new RegExp(`^divide-${r}\\/(\\d*\\.?\\d+)(%?)$`),([,i,t],{rawSelector:d})=>{const c=Number(i);let o;return t||c>1?o=`${c}%`:o=`${c*100}%`,`
|
|
6
|
+
.${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")} > :not(:last-child) {
|
|
7
|
+
border-color: color-mix(in oklab, rgb(var(${e})) var(--un-border-opacity, 100%), transparent);
|
|
8
|
+
--un-border-opacity: ${o};
|
|
9
|
+
}`}])});const k=[...v,...R,...y,...S,...$];return{name:"preset-theme",theme:{colors:n},rules:k}}exports.themePreset=O;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
2
|
import { useCan as n } from "../../hooks/auth.js";
|
|
3
3
|
import "@tanstack/vue-query";
|
|
4
4
|
import "lodash-es";
|
|
5
|
+
import "vue-router";
|
|
5
6
|
import "pinia";
|
|
6
7
|
import "json-2-csv";
|
|
8
|
+
import "@vee-validate/rules";
|
|
9
|
+
import "vee-validate";
|
|
7
10
|
import "@vueuse/core";
|
|
8
11
|
import "../../hooks/json/index.js";
|
|
9
|
-
import "vue-router";
|
|
10
12
|
import "@overlastic/vue";
|
|
11
13
|
import "clsx";
|
|
12
14
|
import "colorizr";
|
|
13
15
|
import "axios";
|
|
14
|
-
const
|
|
16
|
+
const O = /* @__PURE__ */ e({
|
|
15
17
|
name: "DuxCan",
|
|
16
18
|
props: {
|
|
17
19
|
name: {
|
|
@@ -25,13 +27,13 @@ const k = /* @__PURE__ */ t({
|
|
|
25
27
|
setup(m, {
|
|
26
28
|
slots: r
|
|
27
29
|
}) {
|
|
28
|
-
const
|
|
30
|
+
const t = n();
|
|
29
31
|
return () => {
|
|
30
|
-
var p,
|
|
31
|
-
return
|
|
32
|
+
var p, i;
|
|
33
|
+
return t(m.name, m.params) ? (p = r.default) == null ? void 0 : p.call(r) : ((i = r.fallback) == null ? void 0 : i.call(r)) || null;
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
export {
|
|
36
|
-
|
|
38
|
+
O as DuxCan
|
|
37
39
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as p, createVNode as o, Suspense as i, h as n } from "vue";
|
|
2
|
+
import "vue-router";
|
|
3
|
+
import "pinia";
|
|
4
|
+
import { useManage as l } from "../../hooks/manage.js";
|
|
5
|
+
import "@tanstack/vue-query";
|
|
6
|
+
import "json-2-csv";
|
|
7
|
+
import "lodash-es";
|
|
8
|
+
import "@vee-validate/rules";
|
|
9
|
+
import "vee-validate";
|
|
10
|
+
import "@vueuse/core";
|
|
11
|
+
import "../../hooks/json/index.js";
|
|
12
|
+
import "@overlastic/vue";
|
|
13
|
+
import "clsx";
|
|
14
|
+
import { DuxException as a } from "../status/exception.js";
|
|
15
|
+
import "colorizr";
|
|
16
|
+
import "axios";
|
|
17
|
+
import "crypto-js";
|
|
18
|
+
import "../../_virtual/dayjs.min.js";
|
|
19
|
+
import "mathjs";
|
|
20
|
+
import "mime";
|
|
21
|
+
import "vue3-sfc-loader";
|
|
22
|
+
import "pinia-plugin-persistedstate";
|
|
23
|
+
import "vue-i18n";
|
|
24
|
+
import { DuxRemoteRender as u } from "./remote/render.js";
|
|
25
|
+
const A = /* @__PURE__ */ p({
|
|
26
|
+
name: "DuxLoaderRemote",
|
|
27
|
+
setup(d) {
|
|
28
|
+
const {
|
|
29
|
+
config: e
|
|
30
|
+
} = l(), m = () => {
|
|
31
|
+
var t;
|
|
32
|
+
const r = (t = e.components) == null ? void 0 : t.loading;
|
|
33
|
+
return r ? n(r) : null;
|
|
34
|
+
};
|
|
35
|
+
return () => o("div", {
|
|
36
|
+
class: "app-remote-loader"
|
|
37
|
+
}, [o(a, null, {
|
|
38
|
+
default: () => [o(i, null, {
|
|
39
|
+
default: () => o(u, null, null),
|
|
40
|
+
fallback: () => m()
|
|
41
|
+
})]
|
|
42
|
+
})]);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
A as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as b from "vue";
|
|
2
|
+
import { createVNode as E } from "vue";
|
|
3
|
+
import * as k from "@tanstack/vue-query";
|
|
4
|
+
import * as J from "@vueuse/core";
|
|
5
|
+
import T from "axios";
|
|
6
|
+
import $ from "crypto-js";
|
|
7
|
+
import L from "../../../_virtual/dayjs.min.js";
|
|
8
|
+
import * as N from "lodash-es";
|
|
9
|
+
import * as O from "mathjs";
|
|
10
|
+
import g from "mime";
|
|
11
|
+
import W from "../../../node_modules/mitt/dist/mitt.js";
|
|
12
|
+
import * as q from "pinia";
|
|
13
|
+
import { loadModule as F } from "vue3-sfc-loader";
|
|
14
|
+
import * as V from "vue-router";
|
|
15
|
+
import { useManage as _ } from "../../../hooks/manage.js";
|
|
16
|
+
import { useClient as A } from "../../../hooks/data.js";
|
|
17
|
+
import "json-2-csv";
|
|
18
|
+
import "@vee-validate/rules";
|
|
19
|
+
import "vee-validate";
|
|
20
|
+
import { useI18n as B } from "../../../hooks/i18n.js";
|
|
21
|
+
import { useJsonSchema as H } from "../../../hooks/json.js";
|
|
22
|
+
import "../../../hooks/json/index.js";
|
|
23
|
+
import "@overlastic/vue";
|
|
24
|
+
import "clsx";
|
|
25
|
+
import "colorizr";
|
|
26
|
+
import * as I from "../../../index.js";
|
|
27
|
+
const v = /* @__PURE__ */ new Map();
|
|
28
|
+
function Q(m) {
|
|
29
|
+
return $.MD5(m).toString().substring(0, 10);
|
|
30
|
+
}
|
|
31
|
+
function ct(m) {
|
|
32
|
+
var l;
|
|
33
|
+
const h = A(), {
|
|
34
|
+
mergeLocale: d
|
|
35
|
+
} = B(), {
|
|
36
|
+
config: r
|
|
37
|
+
} = _(), x = {
|
|
38
|
+
moduleCache: {
|
|
39
|
+
vue: b,
|
|
40
|
+
"@duxweb/dvha-core": I,
|
|
41
|
+
"@vueuse/core": J,
|
|
42
|
+
"@tanstack/vue-query": k,
|
|
43
|
+
axios: T,
|
|
44
|
+
crypto: $,
|
|
45
|
+
mime: g,
|
|
46
|
+
math: O,
|
|
47
|
+
mitt: W,
|
|
48
|
+
"lodash-es": N,
|
|
49
|
+
pinia: q,
|
|
50
|
+
dayjs: L,
|
|
51
|
+
"vue-router": V,
|
|
52
|
+
...(l = r == null ? void 0 : r.remote) == null ? void 0 : l.packages,
|
|
53
|
+
"static!": function(e, o, t) {
|
|
54
|
+
const a = g.getType(t);
|
|
55
|
+
if (a != null && a.startsWith("image"))
|
|
56
|
+
return `data:${a};charset=utf-8;base64,${btoa(e)}`;
|
|
57
|
+
if (t === ".json")
|
|
58
|
+
return JSON.parse(e);
|
|
59
|
+
throw new Error(`${t} unable to parse`);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
async handleModule(e, o) {
|
|
63
|
+
if (e !== ".vue") {
|
|
64
|
+
if (e === ".json") {
|
|
65
|
+
const t = await o(), {
|
|
66
|
+
render: a
|
|
67
|
+
} = H({
|
|
68
|
+
data: (t == null ? void 0 : t.nodes) || {},
|
|
69
|
+
context: (t == null ? void 0 : t.data) || {}
|
|
70
|
+
});
|
|
71
|
+
return () => E(a, null, null);
|
|
72
|
+
}
|
|
73
|
+
return o();
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
customBlockHandler(e) {
|
|
77
|
+
if (e.type === "i18n") {
|
|
78
|
+
const o = JSON.parse(e.content);
|
|
79
|
+
for (const t in o)
|
|
80
|
+
d(t, o[t]);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
getFile: async (e) => {
|
|
84
|
+
var t, a, u, c;
|
|
85
|
+
e = w(e, ".vue"), e = w(e, ".json");
|
|
86
|
+
const o = await h.request({
|
|
87
|
+
path: typeof ((t = r == null ? void 0 : r.remote) == null ? void 0 : t.apiRoutePath) == "function" ? (a = r == null ? void 0 : r.remote) == null ? void 0 : a.apiRoutePath(e) : ((u = r == null ? void 0 : r.remote) == null ? void 0 : u.apiRoutePath) || "static",
|
|
88
|
+
payload: {
|
|
89
|
+
path: e
|
|
90
|
+
},
|
|
91
|
+
method: ((c = r == null ? void 0 : r.remote) == null ? void 0 : c.apiMethod) || "POST"
|
|
92
|
+
}).then((s) => s == null ? void 0 : s.data).catch((s) => {
|
|
93
|
+
throw new Error(`${s == null ? void 0 : s.message} ${e}`);
|
|
94
|
+
});
|
|
95
|
+
return await setTimeout(() => {
|
|
96
|
+
console.log("res", o);
|
|
97
|
+
}, 1e4), {
|
|
98
|
+
getContentData: () => o == null ? void 0 : o.content,
|
|
99
|
+
type: `${(o == null ? void 0 : o.type) || "vue"}`
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
getResource({
|
|
103
|
+
refPath: e,
|
|
104
|
+
relPath: o
|
|
105
|
+
}, t) {
|
|
106
|
+
const {
|
|
107
|
+
moduleCache: a,
|
|
108
|
+
pathResolve: u,
|
|
109
|
+
getFile: c
|
|
110
|
+
} = t, [s, ...y] = o.match(/([^!]+!)|[^!]+$/g).reverse(), C = (n, p, f, S) => y.reduce((j, M) => a[M](j, p, f, S), n), i = u({
|
|
111
|
+
refPath: e,
|
|
112
|
+
relPath: s
|
|
113
|
+
}, t), R = y.join("") + i, P = (n) => n.startsWith("@") ? !0 : !n.includes("/") && !n.startsWith(".");
|
|
114
|
+
return {
|
|
115
|
+
id: R,
|
|
116
|
+
path: i,
|
|
117
|
+
async getContent() {
|
|
118
|
+
if (P(i))
|
|
119
|
+
throw new Error(`Package ${i} not imported`);
|
|
120
|
+
const {
|
|
121
|
+
getContentData: n,
|
|
122
|
+
type: p
|
|
123
|
+
} = await c(i);
|
|
124
|
+
return {
|
|
125
|
+
getContentData: async (f) => C(await n(f), i, p, t),
|
|
126
|
+
type: p
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
addStyle(e) {
|
|
132
|
+
const o = Q(e);
|
|
133
|
+
if (v.has(o))
|
|
134
|
+
return;
|
|
135
|
+
v.set(o, !0);
|
|
136
|
+
const t = document.createElement("style");
|
|
137
|
+
t.textContent = e, t.setAttribute("data-hash", o), document.head.appendChild(t);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
return () => F(`${m}`, {
|
|
141
|
+
...x
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function w(m, h) {
|
|
145
|
+
const d = new RegExp(`${h}$`);
|
|
146
|
+
return m.replace(d, "");
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
ct as sfcLoader
|
|
150
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as m, defineAsyncComponent as n, createVNode as p } from "vue";
|
|
2
|
+
import { useRoute as u } from "vue-router";
|
|
3
|
+
import "pinia";
|
|
4
|
+
import { useRouteStore as s } from "../../../stores/route.js";
|
|
5
|
+
import "lodash-es";
|
|
6
|
+
import { sfcLoader as c } from "./loader.js";
|
|
7
|
+
const S = /* @__PURE__ */ m({
|
|
8
|
+
name: "DuxRemoteRender",
|
|
9
|
+
setup(a) {
|
|
10
|
+
var o;
|
|
11
|
+
const t = u(), e = s().searchRouteName(t.name), r = n({
|
|
12
|
+
loader: c((o = e == null ? void 0 : e.meta) == null ? void 0 : o.path)
|
|
13
|
+
});
|
|
14
|
+
return () => p(r, null, null);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
S as DuxRemoteRender
|
|
19
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useExtendOverlay as
|
|
3
|
-
|
|
4
|
-
const T = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as r, defineAsyncComponent as u, createVNode as t, Transition as l } from "vue";
|
|
2
|
+
import { useExtendOverlay as d } from "@overlastic/vue";
|
|
3
|
+
const v = /* @__PURE__ */ r({
|
|
5
4
|
name: "DuxOverlay",
|
|
6
5
|
props: {
|
|
7
6
|
component: Function,
|
|
@@ -25,24 +24,18 @@ const T = /* @__PURE__ */ m({
|
|
|
25
24
|
},
|
|
26
25
|
setup(e) {
|
|
27
26
|
const {
|
|
28
|
-
visible:
|
|
29
|
-
resolve:
|
|
30
|
-
reject:
|
|
31
|
-
} =
|
|
27
|
+
visible: n,
|
|
28
|
+
resolve: s,
|
|
29
|
+
reject: o
|
|
30
|
+
} = d({
|
|
32
31
|
duration: e.duration
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
e.maskClosable &&
|
|
37
|
-
}
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur();
|
|
41
|
-
});
|
|
42
|
-
}), p(["Escape"], () => {
|
|
43
|
-
a();
|
|
44
|
-
}), () => t("div", {
|
|
45
|
-
class: `fixed inset-0 ${e.mask ? "" : "pointer-events-none"}`,
|
|
32
|
+
}), a = (e == null ? void 0 : e.componentProps) || {};
|
|
33
|
+
a.onConfirm = s, a.onClose = o;
|
|
34
|
+
const i = u(e.component), c = () => {
|
|
35
|
+
e.maskClosable && o();
|
|
36
|
+
};
|
|
37
|
+
return () => t("div", {
|
|
38
|
+
class: "fixed inset-0 flex items-center justify-center overflow-auto",
|
|
46
39
|
style: {
|
|
47
40
|
zIndex: e.zIndex
|
|
48
41
|
}
|
|
@@ -54,8 +47,8 @@ const T = /* @__PURE__ */ m({
|
|
|
54
47
|
leaveFromClass: "opacity-100",
|
|
55
48
|
leaveToClass: "opacity-0"
|
|
56
49
|
}, {
|
|
57
|
-
default: () => [
|
|
58
|
-
class: "fixed inset-0 bg-black bg-opacity-
|
|
50
|
+
default: () => [n.value && e.mask && t("div", {
|
|
51
|
+
class: "fixed inset-0 bg-black bg-opacity-30",
|
|
59
52
|
style: {
|
|
60
53
|
transitionDuration: `${e.duration}ms`
|
|
61
54
|
},
|
|
@@ -63,19 +56,17 @@ const T = /* @__PURE__ */ m({
|
|
|
63
56
|
"aria-hidden": "true"
|
|
64
57
|
}, null)]
|
|
65
58
|
}), t(l, {
|
|
66
|
-
enterActiveClass: "transition-all
|
|
67
|
-
enterFromClass: "opacity-0 scale-
|
|
59
|
+
enterActiveClass: "transition-all",
|
|
60
|
+
enterFromClass: "opacity-0 scale-95",
|
|
68
61
|
enterToClass: "opacity-100 scale-100",
|
|
69
|
-
leaveActiveClass: "transition-all
|
|
62
|
+
leaveActiveClass: "transition-all",
|
|
70
63
|
leaveFromClass: "opacity-100 scale-100",
|
|
71
|
-
leaveToClass: "opacity-0 scale-
|
|
64
|
+
leaveToClass: "opacity-0 scale-95"
|
|
72
65
|
}, {
|
|
73
|
-
default: () => [
|
|
74
|
-
ref: r
|
|
75
|
-
}, n), null)]
|
|
66
|
+
default: () => [n.value && t(i, a, null)]
|
|
76
67
|
})]);
|
|
77
68
|
}
|
|
78
69
|
});
|
|
79
70
|
export {
|
|
80
|
-
|
|
71
|
+
v as DuxOverlay
|
|
81
72
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as n, createVNode as
|
|
1
|
+
import { defineComponent as n, createVNode as r, createTextVNode as e } from "vue";
|
|
2
2
|
const t = /* @__PURE__ */ n({
|
|
3
3
|
name: "DuxError",
|
|
4
4
|
setup() {
|
|
5
|
-
return () =>
|
|
5
|
+
return () => r("div", null, [r("h1", null, [e("500")]), r("p", null, [e("Internal Server Error")])]);
|
|
6
6
|
}
|
|
7
7
|
});
|
|
8
8
|
export {
|
|
9
|
-
t as
|
|
9
|
+
t as DuxError
|
|
10
10
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as a, ref as c, onErrorCaptured as i, createVNode as o, createTextVNode as p } from "vue";
|
|
2
|
+
import { useRoute as d } from "vue-router";
|
|
3
|
+
const x = /* @__PURE__ */ a({
|
|
4
|
+
name: "DuxException",
|
|
5
|
+
setup(f, {
|
|
6
|
+
slots: t
|
|
7
|
+
}) {
|
|
8
|
+
const n = c(null), r = d();
|
|
9
|
+
return i((e) => (console.error(e), r.name ? n.value = {
|
|
10
|
+
title: "500",
|
|
11
|
+
desc: (e == null ? void 0 : e.message) || "Internal Server Error"
|
|
12
|
+
} : n.value = {
|
|
13
|
+
title: "404",
|
|
14
|
+
desc: "Page not found"
|
|
15
|
+
}, !1)), () => {
|
|
16
|
+
var e, u, l;
|
|
17
|
+
return n.value ? o("div", null, [o("h1", null, [((e = n.value) == null ? void 0 : e.title) || "Unknown"]), o("p", null, [((u = n.value) == null ? void 0 : u.desc) || "Unknown Description"]), o("p", null, [p("Use config.components.exception to configure the exception layout")])]) : (l = t.default) == null ? void 0 : l.call(t);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
x as DuxException
|
|
23
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as o, createVNode as e, createTextVNode as t } from "vue";
|
|
2
|
-
const
|
|
2
|
+
const u = /* @__PURE__ */ o({
|
|
3
3
|
name: "DuxNotAuthorized",
|
|
4
4
|
setup() {
|
|
5
5
|
return () => e("div", null, [e("h1", null, [t("403")]), e("p", null, [t("You are not authorized to access this page")])]);
|
|
6
6
|
}
|
|
7
7
|
});
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
u as DuxNotAuthorized
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const u = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as n, createVNode as e, createTextVNode as o } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ n({
|
|
3
3
|
name: "DuxNotFound",
|
|
4
4
|
setup() {
|
|
5
|
-
return () => e("div", null, [e("h1", null, [
|
|
5
|
+
return () => e("div", null, [e("h1", null, [o("404")]), e("p", null, [o("Page not found")])]);
|
|
6
6
|
}
|
|
7
7
|
});
|
|
8
8
|
export {
|
|
9
|
-
u as
|
|
9
|
+
u as DuxNotFound
|
|
10
10
|
};
|
|
@@ -2,16 +2,18 @@ import { useCan as m } from "../hooks/auth.js";
|
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@tanstack/vue-query";
|
|
4
4
|
import "lodash-es";
|
|
5
|
+
import "vue-router";
|
|
5
6
|
import "pinia";
|
|
6
7
|
import "json-2-csv";
|
|
8
|
+
import "@vee-validate/rules";
|
|
9
|
+
import "vee-validate";
|
|
7
10
|
import "@vueuse/core";
|
|
8
11
|
import "../hooks/json/index.js";
|
|
9
|
-
import "vue-router";
|
|
10
12
|
import "@overlastic/vue";
|
|
11
13
|
import "clsx";
|
|
12
14
|
import "colorizr";
|
|
13
15
|
import "axios";
|
|
14
|
-
const
|
|
16
|
+
const b = {
|
|
15
17
|
mounted(t, i) {
|
|
16
18
|
var r;
|
|
17
19
|
const { value: o } = i;
|
|
@@ -21,5 +23,5 @@ const D = {
|
|
|
21
23
|
}
|
|
22
24
|
};
|
|
23
25
|
export {
|
|
24
|
-
|
|
26
|
+
b as permissionDirective
|
|
25
27
|
};
|