@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.
Files changed (116) hide show
  1. package/dist/cjs/components/auth/can.cjs +1 -1
  2. package/dist/cjs/components/loader/iframe.cjs +1 -1
  3. package/dist/cjs/components/loader/loader.cjs +1 -0
  4. package/dist/cjs/components/loader/remote/loader.cjs +1 -0
  5. package/dist/cjs/components/loader/remote/render.cjs +1 -0
  6. package/dist/cjs/components/overlay/overlay.cjs +1 -1
  7. package/dist/cjs/components/status/error.cjs +1 -1
  8. package/dist/cjs/components/status/exception.cjs +1 -0
  9. package/dist/cjs/components/status/notAuthorized.cjs +1 -1
  10. package/dist/cjs/components/status/notFound.cjs +1 -1
  11. package/dist/cjs/directive/permission.cjs +1 -1
  12. package/dist/cjs/hooks/auth.cjs +1 -1
  13. package/dist/cjs/hooks/data.cjs +1 -1
  14. package/dist/cjs/hooks/export.cjs +1 -1
  15. package/dist/cjs/hooks/form.cjs +1 -1
  16. package/dist/cjs/hooks/formExtend.cjs +1 -0
  17. package/dist/cjs/hooks/formValidate.cjs +1 -0
  18. package/dist/cjs/hooks/i18n.cjs +1 -1
  19. package/dist/cjs/hooks/importCsv.cjs +1 -1
  20. package/dist/cjs/hooks/json/utils/expressionParser.cjs +1 -1
  21. package/dist/cjs/hooks/json.cjs +1 -1
  22. package/dist/cjs/hooks/list.cjs +1 -0
  23. package/dist/cjs/hooks/manage.cjs +1 -1
  24. package/dist/cjs/hooks/menu.cjs +1 -1
  25. package/dist/cjs/hooks/overlay.cjs +1 -1
  26. package/dist/cjs/hooks/select.cjs +1 -1
  27. package/dist/cjs/hooks/theme.cjs +2 -2
  28. package/dist/cjs/hooks/upload.cjs +1 -1
  29. package/dist/cjs/index.cjs +1 -1
  30. package/dist/cjs/main.cjs +1 -1
  31. package/dist/cjs/preset/dataProvider.cjs +1 -1
  32. package/dist/cjs/preset/i18nProvider.cjs +1 -1
  33. package/dist/cjs/provider/app.cjs +1 -1
  34. package/dist/cjs/provider/tab.cjs +1 -1
  35. package/dist/cjs/stores/manage.cjs +1 -1
  36. package/dist/cjs/stores/tab.cjs +1 -1
  37. package/dist/cjs/stores/theme.cjs +1 -1
  38. package/dist/cjs/utils/theme.cjs +9 -1
  39. package/dist/esm/components/auth/can.js +9 -7
  40. package/dist/esm/components/loader/loader.js +48 -0
  41. package/dist/esm/components/loader/remote/loader.js +150 -0
  42. package/dist/esm/components/loader/remote/render.js +19 -0
  43. package/dist/esm/components/overlay/overlay.js +22 -31
  44. package/dist/esm/components/status/error.js +3 -3
  45. package/dist/esm/components/status/exception.js +23 -0
  46. package/dist/esm/components/status/notAuthorized.js +2 -2
  47. package/dist/esm/components/status/notFound.js +4 -4
  48. package/dist/esm/directive/permission.js +5 -3
  49. package/dist/esm/hooks/auth.js +67 -67
  50. package/dist/esm/hooks/data.js +164 -160
  51. package/dist/esm/hooks/export.js +26 -23
  52. package/dist/esm/hooks/form.js +38 -35
  53. package/dist/esm/hooks/formExtend.js +38 -0
  54. package/dist/esm/hooks/formValidate.js +28 -0
  55. package/dist/esm/hooks/i18n.js +16 -8
  56. package/dist/esm/hooks/json/utils/expressionParser.js +1 -1
  57. package/dist/esm/hooks/json.js +57 -57
  58. package/dist/esm/hooks/list.js +179 -0
  59. package/dist/esm/hooks/manage.js +18 -13
  60. package/dist/esm/hooks/overlay.js +6 -4
  61. package/dist/esm/hooks/theme.js +11 -11
  62. package/dist/esm/index.js +129 -113
  63. package/dist/esm/main.js +22 -12
  64. package/dist/esm/preset/i18nProvider.js +17 -18
  65. package/dist/esm/provider/app.js +61 -53
  66. package/dist/esm/provider/tab.js +1 -1
  67. package/dist/esm/stores/manage.js +34 -24
  68. package/dist/esm/stores/tab.js +58 -49
  69. package/dist/esm/stores/theme.js +36 -34
  70. package/dist/esm/utils/theme.js +89 -76
  71. package/dist/types/components/index.d.ts +2 -1
  72. package/dist/types/components/loader/loader.d.ts +2 -0
  73. package/dist/types/components/loader/remote/index.d.ts +2 -0
  74. package/dist/types/components/loader/remote/loader.d.ts +1 -0
  75. package/dist/types/components/loader/remote/render.d.ts +1 -0
  76. package/dist/types/components/status/error.d.ts +1 -2
  77. package/dist/types/components/status/exception.d.ts +3 -0
  78. package/dist/types/components/status/index.d.ts +4 -0
  79. package/dist/types/components/status/notAuthorized.d.ts +1 -2
  80. package/dist/types/components/status/notFound.d.ts +1 -2
  81. package/dist/types/config/index.d.ts +1 -0
  82. package/dist/types/hooks/auth.d.ts +6 -6
  83. package/dist/types/hooks/data.d.ts +216 -216
  84. package/dist/types/hooks/form.d.ts +6 -3
  85. package/dist/types/hooks/formExtend.d.ts +12 -0
  86. package/dist/types/hooks/formValidate.d.ts +14 -0
  87. package/dist/types/hooks/i18n.d.ts +2 -0
  88. package/dist/types/hooks/import.d.ts +1 -2
  89. package/dist/types/hooks/index.d.ts +4 -1
  90. package/dist/types/hooks/json.d.ts +1 -1
  91. package/dist/types/hooks/list.d.ts +66 -0
  92. package/dist/types/hooks/manage.d.ts +1 -0
  93. package/dist/types/hooks/menu.d.ts +1 -1
  94. package/dist/types/hooks/overlay.d.ts +1 -1
  95. package/dist/types/hooks/theme.d.ts +8 -8
  96. package/dist/types/index.d.ts +6 -5
  97. package/dist/types/preset/i18nProvider.d.ts +1 -1
  98. package/dist/types/stores/auth.d.ts +9 -24
  99. package/dist/types/stores/i18n.d.ts +7 -16
  100. package/dist/types/stores/index.d.ts +2 -2
  101. package/dist/types/stores/manage.d.ts +7 -16
  102. package/dist/types/stores/route.d.ts +12 -2538
  103. package/dist/types/stores/tab.d.ts +6 -1030
  104. package/dist/types/stores/theme.d.ts +14 -96
  105. package/dist/types/types/config.d.ts +9 -0
  106. package/dist/types/types/i18n.d.ts +1 -0
  107. package/dist/types/types/manage.d.ts +6 -0
  108. package/dist/types/types/theme.d.ts +2 -0
  109. package/dist/types/utils/index.d.ts +1 -1
  110. package/dist/types/utils/theme.d.ts +4 -49
  111. package/package.json +22 -15
  112. package/dist/cjs/node_modules/jsep/dist/jsep.cjs +0 -2
  113. package/dist/esm/node_modules/jsep/dist/jsep.js +0 -737
  114. /package/dist/cjs/{hooks/themeColor.cjs → config/color.cjs} +0 -0
  115. /package/dist/esm/{hooks/themeColor.js → config/color.js} +0 -0
  116. /package/dist/types/{hooks/themeColor.d.ts → config/color.d.ts} +0 -0
@@ -1 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(c){return`rgba(var(${c}))`}function s(c){const t={},i=["50","100","200","300","400","500","600","700","800","900","950"],b=["primary","info","success","warning","error","gray"],n=["hover","pressed","focus","disabled"];t.white={DEFAULT:e("--ui-color-white")},t.black={DEFAULT:e("--ui-color-black")},Object.keys(c).forEach(r=>{t[r]={},i.forEach(o=>{t[r][o]=e(`--base-color-${r}-${o}`)})}),b.forEach(r=>{t[r]={},t[r].DEFAULT=e(`--ui-color-${r}`),i.forEach(o=>{t[r][o]=e(`--ui-color-${r}-${o}`)}),n.forEach(o=>{t[r][o]=e(`--ui-color-${r}-${o}`)})});const d={"text-default":{color:e("--ui-text")},"text-dimmed":{color:e("--ui-text-dimmed")},"text-muted":{color:e("--ui-text-muted")},"text-toned":{color:e("--ui-text-toned")},"text-highlighted":{color:e("--ui-text-highlighted")},"text-inverted":{color:e("--ui-text-inverted")},"bg-default":{"background-color":e("--ui-bg")},"bg-muted":{"background-color":e("--ui-bg-muted")},"bg-elevated":{"background-color":e("--ui-bg-elevated")},"bg-accented":{"background-color":e("--ui-bg-accented")},"bg-inverted":{"background-color":e("--ui-bg-inverted")},"border-default":{"border-color":e("--ui-border")},"border-muted":{"border-color":e("--ui-border-muted")},"border-accented":{"border-color":e("--ui-border-accented")},"border-inverted":{"border-color":e("--ui-border-inverted")}},u={};Object.entries(d).forEach(([r,o])=>{u[`.${r}`]=o});const l=[];return Object.entries(d).forEach(([r,o])=>{l.push([r,o])}),{colors:t,classes:d,rules:l,utilities:u}}exports.themePreset=s;
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 t } from "vue";
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 k = /* @__PURE__ */ t({
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 i = n();
30
+ const t = n();
29
31
  return () => {
30
- var p, e;
31
- return i(m.name, m.params) ? (p = r.default) == null ? void 0 : p.call(r) : ((e = r.fallback) == null ? void 0 : e.call(r)) || null;
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
- k as DuxCan
38
+ O as DuxCan
37
39
  };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as e, 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 "dayjs";
19
+ import "mathjs";
20
+ import "mime";
21
+ import "mitt";
22
+ import "vue3-sfc-loader";
23
+ import "pinia-plugin-persistedstate";
24
+ import "vue-i18n";
25
+ import { DuxRemoteRender as u } from "./remote/render.js";
26
+ const B = /* @__PURE__ */ e({
27
+ name: "DuxLoaderRemote",
28
+ setup(d) {
29
+ const {
30
+ config: m
31
+ } = l(), p = () => {
32
+ var t;
33
+ const r = (t = m.components) == null ? void 0 : t.loading;
34
+ return r ? n(r) : null;
35
+ };
36
+ return () => o("div", {
37
+ class: "app-remote-loader"
38
+ }, [o(a, null, {
39
+ default: () => [o(i, null, {
40
+ default: () => o(u, null, null),
41
+ fallback: () => p()
42
+ })]
43
+ })]);
44
+ }
45
+ });
46
+ export {
47
+ B as default
48
+ };
@@ -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 "dayjs";
8
+ import * as N from "lodash-es";
9
+ import * as O from "mathjs";
10
+ import g from "mime";
11
+ import W from "mitt";
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 "lodash-es";
5
+ import { useRouteStore as s } from "../../../stores/route.js";
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 m, defineAsyncComponent as u, ref as d, onMounted as v, nextTick as y, createVNode as t, Transition as l, mergeProps as f } from "vue";
2
- import { useExtendOverlay as C } from "@overlastic/vue";
3
- import { onKeyStroke as p } from "@vueuse/core";
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: o,
29
- resolve: i,
30
- reject: a
31
- } = C({
27
+ visible: n,
28
+ resolve: s,
29
+ reject: o
30
+ } = d({
32
31
  duration: e.duration
33
- }), n = (e == null ? void 0 : e.componentProps) || {};
34
- n.onConfirm = i, n.onClose = a;
35
- const s = u(e.component), c = () => {
36
- e.maskClosable && a();
37
- }, r = d();
38
- return v(() => {
39
- y(() => {
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: () => [o.value && e.mask && t("div", {
58
- class: "fixed inset-0 bg-black bg-opacity-50 overflow-auto",
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 duration-150",
67
- enterFromClass: "opacity-0 scale-90",
59
+ enterActiveClass: "transition-all",
60
+ enterFromClass: "opacity-0 scale-95",
68
61
  enterToClass: "opacity-100 scale-100",
69
- leaveActiveClass: "transition-all duration-150",
62
+ leaveActiveClass: "transition-all",
70
63
  leaveFromClass: "opacity-100 scale-100",
71
- leaveToClass: "opacity-0 scale-90"
64
+ leaveToClass: "opacity-0 scale-95"
72
65
  }, {
73
- default: () => [o.value && t(s, f({
74
- ref: r
75
- }, n), null)]
66
+ default: () => [n.value && t(i, a, null)]
76
67
  })]);
77
68
  }
78
69
  });
79
70
  export {
80
- T as DuxOverlay
71
+ v as DuxOverlay
81
72
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as n, createVNode as e, createTextVNode as r } from "vue";
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 () => e("div", null, [e("h1", null, [r("500")]), e("p", null, [r("Internal Server Error")])]);
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 default
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 r = /* @__PURE__ */ o({
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
- r as default
9
+ u as DuxNotAuthorized
10
10
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as o, createVNode as e, createTextVNode as n } from "vue";
2
- const u = /* @__PURE__ */ o({
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, [n("404")]), e("p", null, [n("Page not found")])]);
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 default
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 D = {
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
- D as permissionDirective
26
+ b as permissionDirective
25
27
  };