@duxweb/dvha-pro 1.1.9 → 1.1.11

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.
@@ -1,7 +1,7 @@
1
- import { defineComponent as s, defineAsyncComponent as c, createVNode as t, mergeProps as n, Suspense as m } from "vue";
2
- import { useExtendOverlay as f } from "@overlastic/vue";
1
+ import { defineComponent as c, defineAsyncComponent as s, createVNode as t, mergeProps as n, Suspense as m } from "vue";
2
+ import { useDisclosure as f } from "@overlastic/vue";
3
3
  import { NModal as g, NSpin as b } from "naive-ui";
4
- const w = /* @__PURE__ */ s({
4
+ const y = /* @__PURE__ */ c({
5
5
  name: "DuxModal",
6
6
  props: {
7
7
  title: {
@@ -26,19 +26,19 @@ const w = /* @__PURE__ */ s({
26
26
  setup(e) {
27
27
  const {
28
28
  visible: l,
29
- resolve: d,
30
- reject: a,
31
- vanish: r
29
+ confirm: d,
30
+ cancel: a,
31
+ vanish: i
32
32
  } = f({
33
33
  duration: 1e3
34
34
  }), o = e?.componentProps || {};
35
35
  o.title = e.title, o.onConfirm = d, o.onClose = a;
36
- const i = typeof e.component == "function" ? c(e.component) : e.component;
36
+ const r = typeof e.component == "function" ? s(e.component) : e.component;
37
37
  return () => t(g, n({
38
38
  displayDirective: "show",
39
39
  show: l.value,
40
40
  onAfterLeave: () => {
41
- r();
41
+ i();
42
42
  },
43
43
  onClose: () => {
44
44
  a();
@@ -61,7 +61,7 @@ const w = /* @__PURE__ */ s({
61
61
  width: typeof e.width == "number" ? `${e.width}px` : e.width
62
62
  }
63
63
  }, [t(m, null, {
64
- default: () => t(i, n(o, {
64
+ default: () => t(r, n(o, {
65
65
  title: e.title,
66
66
  handle: u
67
67
  }), null),
@@ -77,6 +77,6 @@ const w = /* @__PURE__ */ s({
77
77
  }
78
78
  });
79
79
  export {
80
- w as DuxModal,
81
- w as default
80
+ y as DuxModal,
81
+ y as default
82
82
  };
@@ -1,4 +1,4 @@
1
- import { useOverlayInject as p } from "@overlastic/vue";
1
+ import { useOverlay as p } from "@overlastic/vue";
2
2
  import "vue";
3
3
  import "clsx";
4
4
  import "naive-ui";
@@ -61,7 +61,7 @@ import "@vue-flow/background";
61
61
  import "@iconify-json/tabler/icons.json";
62
62
  import "../components/posterEditor/elements/index.js";
63
63
  import "fabric";
64
- function hr() {
64
+ function wr() {
65
65
  const t = p(m), o = (r) => t(r);
66
66
  return {
67
67
  confirm: (r) => o({
@@ -87,5 +87,5 @@ function hr() {
87
87
  };
88
88
  }
89
89
  export {
90
- hr as useDialog
90
+ wr as useDialog
91
91
  };
@@ -1,4 +1,4 @@
1
- import { useOverlayInject as t } from "@overlastic/vue";
1
+ import { useOverlay as t } from "@overlastic/vue";
2
2
  import "vue";
3
3
  import "clsx";
4
4
  import "naive-ui";
@@ -61,12 +61,12 @@ import "@vue-flow/background";
61
61
  import "@iconify-json/tabler/icons.json";
62
62
  import "../components/posterEditor/elements/index.js";
63
63
  import "fabric";
64
- function Dr() {
64
+ function hr() {
65
65
  const r = t(m);
66
66
  return {
67
67
  show: (o) => r(o)
68
68
  };
69
69
  }
70
70
  export {
71
- Dr as useDrawer
71
+ hr as useDrawer
72
72
  };
@@ -1,4 +1,4 @@
1
- import { useOverlayInject as t } from "@overlastic/vue";
1
+ import { useOverlay as t } from "@overlastic/vue";
2
2
  import "vue";
3
3
  import "clsx";
4
4
  import "naive-ui";
@@ -1,9 +1,9 @@
1
- import { defineComponent as C, onMounted as D, computed as p, createVNode as e, Transition as z, createTextVNode as u, h as m } from "vue";
2
- import { useManage as A, useI18n as N, useMenu as T, DuxLogoIcon as I } from "@duxweb/dvha-core";
1
+ import { defineComponent as C, onMounted as z, computed as u, createVNode as e, Transition as N, createTextVNode as m, h as c } from "vue";
2
+ import { useManage as A, useI18n as D, useMenu as T, DuxLogoIcon as I } from "@duxweb/dvha-core";
3
3
  import { cloneDeep as d } from "lodash-es";
4
- import { NScrollbar as c, NTag as f, NMenu as L } from "naive-ui";
5
- import { useRouter as V, RouterLink as j } from "vue-router";
6
- import F from "./avatar.js";
4
+ import { NScrollbar as f, NTooltip as L, NButton as V, NTag as v, NMenu as j } from "naive-ui";
5
+ import { useRouter as B, RouterLink as F } from "vue-router";
6
+ import O from "./avatar.js";
7
7
  import "@overlastic/vue";
8
8
  import "clsx";
9
9
  import "vue-echarts";
@@ -59,11 +59,11 @@ import "../../components/posterEditor/elements/index.js";
59
59
  import "fabric";
60
60
  import "dayjs";
61
61
  import "@tanstack/vue-query";
62
- import { useUI as O } from "../../hooks/ui.js";
62
+ import { useUI as R } from "../../hooks/ui.js";
63
63
  import "vue-command-palette";
64
- import R from "./dark.js";
65
- import S from "./notice.js";
66
- const We = /* @__PURE__ */ C({
64
+ import S from "./dark.js";
65
+ import U from "./notice.js";
66
+ const Xe = /* @__PURE__ */ C({
67
67
  name: "DuxMenuApp",
68
68
  props: {
69
69
  collapsed: {
@@ -73,33 +73,33 @@ const We = /* @__PURE__ */ C({
73
73
  },
74
74
  setup() {
75
75
  const {
76
- setCmdVisible: v,
76
+ setCmdVisible: h,
77
77
  setMenuCollapsed: x
78
- } = O(), {
78
+ } = R(), {
79
79
  config: l
80
80
  } = A(), {
81
- t: h
82
- } = N(), g = V(), {
81
+ t: g
82
+ } = D(), i = B(), {
83
83
  mainMenu: b,
84
84
  subMenu: y,
85
- appActive: a,
85
+ appActive: n,
86
86
  subActive: s,
87
- isSubMenu: M
87
+ isSubMenu: k
88
88
  } = T({
89
89
  doubleMenu: !0
90
90
  });
91
- D(() => {
91
+ z(() => {
92
92
  x(!1);
93
93
  });
94
- const i = (t) => t.map((r) => {
94
+ const a = (t) => t.map((r) => {
95
95
  const o = {
96
96
  ...r,
97
97
  key: r.name,
98
- icon: r?.icon ? () => m("div", {
98
+ icon: r?.icon ? () => c("div", {
99
99
  class: `${r.icon} size-5`
100
100
  }) : void 0,
101
101
  labelName: r.label,
102
- label: () => r.path ? m(j, {
102
+ label: () => r.path ? c(F, {
103
103
  to: {
104
104
  path: r.path
105
105
  }
@@ -107,8 +107,8 @@ const We = /* @__PURE__ */ C({
107
107
  default: () => r.label
108
108
  }) : r.label
109
109
  };
110
- return o.children && o.children.length > 0 && (o.children = i(o.children)), o;
111
- }), k = p(() => i(d(b.value))), w = p(() => i(d(y.value)));
110
+ return o.children && o.children.length > 0 && (o.children = a(o.children)), o;
111
+ }), w = u(() => a(d(b.value))), M = u(() => a(d(y.value)));
112
112
  return () => e("div", {
113
113
  class: "flex h-screen gap-2 pr-2"
114
114
  }, [e("div", {
@@ -127,25 +127,50 @@ const We = /* @__PURE__ */ C({
127
127
  class: "size-4"
128
128
  }, null)])]), e("div", {
129
129
  class: "flex-1 min-h-0"
130
- }, [e(c, null, {
130
+ }, [e(f, null, {
131
131
  default: () => [e("div", {
132
132
  class: "flex flex-col px-2 gap-2"
133
- }, [k.value.map((t, n) => e("div", {
134
- key: n,
135
- class: ["flex flex-col gap-1 justify-center items-center py-1.5 cursor-pointer rounded transition-all", t.key === a.value ? "bg-primary/50 text-primary-200" : "text-white/60 hover:text-white"],
133
+ }, [w.value.map((t, p) => e("div", {
134
+ key: p,
135
+ class: ["flex flex-col gap-1 justify-center items-center py-1.5 cursor-pointer rounded transition-all", t.key === n.value ? "bg-primary/50 text-primary-200" : "text-white/60 hover:text-white"],
136
136
  onClick: () => {
137
- a.value = t.key, t?.path && g.push(t.path);
137
+ n.value = t.key, t?.path && i.push(t.path);
138
138
  }
139
139
  }, [e("div", null, [t.icon?.()]), e("div", {
140
140
  class: "text-xs"
141
141
  }, [typeof t.label == "function" ? t.label?.() : t.label])]))])]
142
142
  })]), e("div", {
143
143
  class: "flex-none hidden lg:flex flex-col items-center gap-2 p-2"
144
- }, [l.notice?.status && e(S, {
144
+ }, [l.tools?.map((t) => e(L, {
145
+ trigger: "hover",
146
+ placement: "right"
147
+ }, {
148
+ default: () => t.label,
149
+ trigger: () => e(V, {
150
+ quaternary: !0,
151
+ onClick: () => {
152
+ if (t.callback) {
153
+ t.callback();
154
+ return;
155
+ }
156
+ if (t.path) {
157
+ i.push(t.path);
158
+ return;
159
+ }
160
+ t.url && window.open(t.url, "_blank");
161
+ }
162
+ }, {
163
+ icon: () => e("div", {
164
+ class: "transition-all text-muted p-2 hover:text-white"
165
+ }, [e("div", {
166
+ class: `${t.icon} size-5`
167
+ }, null)])
168
+ })
169
+ })), l.notice?.status && e(U, {
145
170
  collapsed: !0
146
- }, null), e(R, null, null), e(F, {
171
+ }, null), e(S, null, null), e(O, {
147
172
  collapsed: !0
148
- }, null)])])]), e(z, {
173
+ }, null)])])]), e(N, {
149
174
  name: "submenu-slide",
150
175
  enterActiveClass: "transition-all duration-150 ease-out",
151
176
  enterFromClass: "opacity-0 translate-x-[-50%]",
@@ -154,39 +179,39 @@ const We = /* @__PURE__ */ C({
154
179
  leaveFromClass: "opacity-100 translate-x-0",
155
180
  leaveToClass: "opacity-0 translate-x-[-50%]"
156
181
  }, {
157
- default: () => [M.value && e("div", null, [e("div", {
182
+ default: () => [k.value && e("div", null, [e("div", {
158
183
  class: "w-160px overflow-hidden flex flex-col h-full"
159
184
  }, [e("div", {
160
185
  class: "py-2 flex-none"
161
186
  }, [e("div", {
162
187
  class: "rounded-md relative py-2 px-3 bg-white dark:bg-elevated shadow-xs hover:shadow flex items-center gap-2 cursor-pointer transition-all",
163
- onClick: () => v(!0)
188
+ onClick: () => h(!0)
164
189
  }, [e("div", {
165
190
  class: "i-tabler:search size-4 icon-gradient"
166
191
  }, null), e("div", {
167
192
  class: "text-muted text-sm flex-1"
168
- }, [h("common.search")]), e("div", {
193
+ }, [g("common.search")]), e("div", {
169
194
  class: "flex items-center gap-1 absolute right-2.5"
170
- }, [e(f, {
195
+ }, [e(v, {
171
196
  size: "small",
172
197
  bordered: !1,
173
198
  type: "primary"
174
199
  }, {
175
- default: () => [u("⌘")]
176
- }), e(f, {
200
+ default: () => [m("⌘")]
201
+ }), e(v, {
177
202
  size: "small",
178
203
  bordered: !1,
179
204
  type: "primary"
180
205
  }, {
181
- default: () => [u("K")]
206
+ default: () => [m("K")]
182
207
  })])])]), e("div", {
183
208
  class: "flex-1 min-h-0"
184
- }, [e(c, null, {
185
- default: () => [e(L, {
209
+ }, [e(f, null, {
210
+ default: () => [e(j, {
186
211
  rootIndent: 20,
187
212
  indent: 15,
188
213
  class: "app-menu",
189
- options: w.value,
214
+ options: M.value,
190
215
  value: s.value,
191
216
  collapsed: !1,
192
217
  onUpdateValue: (t) => s.value = t
@@ -196,5 +221,5 @@ const We = /* @__PURE__ */ C({
196
221
  }
197
222
  });
198
223
  export {
199
- We as DuxMenuApp
224
+ Xe as DuxMenuApp
200
225
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as k, computed as d, ref as C, createVNode as t, Fragment as F, isVNode as S } from "vue";
2
- import { useI18n as z, useManage as B, useList as M, useCustomMutation as R } from "@duxweb/dvha-core";
3
- import { NPopover as D, NButton as u, NSpin as _, NTooltip as j, NBadge as A } from "naive-ui";
2
+ import { useI18n as z, useManage as B, useList as R, useCustomMutation as M } from "@duxweb/dvha-core";
3
+ import { NPopover as _, NButton as u, NSpin as j, NTooltip as A, NBadge as D } from "naive-ui";
4
4
  import { useRouter as L } from "vue-router";
5
5
  import { DuxCard as O } from "../../components/card/card.js";
6
6
  import "clsx";
@@ -83,7 +83,7 @@ const Kt = /* @__PURE__ */ k({
83
83
  data: f,
84
84
  isLoading: v,
85
85
  refetch: h
86
- } = M({
86
+ } = R({
87
87
  path: o.notice?.path || "notice",
88
88
  pagination: {
89
89
  page: 1,
@@ -91,7 +91,7 @@ const Kt = /* @__PURE__ */ k({
91
91
  }
92
92
  }), {
93
93
  mutate: p
94
- } = R({
94
+ } = M({
95
95
  path: `${o.notice?.path || "notice"}`,
96
96
  method: "POST",
97
97
  onSuccess: () => {
@@ -111,7 +111,7 @@ const Kt = /* @__PURE__ */ k({
111
111
  }
112
112
  }), r.value = !1;
113
113
  };
114
- return () => t(D, {
114
+ return () => t(_, {
115
115
  trigger: "click",
116
116
  arrowClass: "ml-2.5",
117
117
  placement: "bottom-start",
@@ -120,7 +120,7 @@ const Kt = /* @__PURE__ */ k({
120
120
  show: r.value,
121
121
  onClickoutside: () => r.value = !1
122
122
  }, {
123
- trigger: () => t(j, {
123
+ trigger: () => t(A, {
124
124
  trigger: "hover",
125
125
  placement: "right"
126
126
  }, {
@@ -129,7 +129,7 @@ const Kt = /* @__PURE__ */ k({
129
129
  onClick: () => r.value = !0,
130
130
  quaternary: !0
131
131
  }, {
132
- icon: () => t(A, {
132
+ icon: () => t(D, {
133
133
  dot: s.value,
134
134
  offset: [-8, 8]
135
135
  }, {
@@ -148,7 +148,7 @@ const Kt = /* @__PURE__ */ k({
148
148
  contentSize: "none",
149
149
  title: i("components.menu.notice", "Notice")
150
150
  }, {
151
- default: () => t(F, null, [t(_, {
151
+ default: () => t(F, null, [t(j, {
152
152
  show: v.value
153
153
  }, {
154
154
  default: () => [l.value.length > 0 ? t("div", {
@@ -1,5 +1,5 @@
1
1
  const r = `/* layer: properties */
2
- @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-ease:initial;--un-to-opacity:100%;--un-outline-style:solid;--un-fill-opacity:100%;--un-space-y-reverse:initial;}}
2
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-ease:initial;--un-to-opacity:100%;--un-fill-opacity:100%;--un-outline-style:solid;--un-space-y-reverse:initial;}}
3
3
  @property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
4
4
  @property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
5
5
  @property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
@@ -1092,15 +1092,19 @@ input:where([type='button'], [type='reset'], [type='submit']),
1092
1092
  .mx-auto{margin-inline:auto;}
1093
1093
  .my-2{margin-block:calc(var(--spacing) * 2);}
1094
1094
  .my-6{margin-block:calc(var(--spacing) * 6);}
1095
+ .mb{margin-bottom:calc(var(--spacing) * 4);}
1095
1096
  .mb-2{margin-bottom:calc(var(--spacing) * 2);}
1097
+ .ml{margin-left:calc(var(--spacing) * 4);}
1096
1098
  .ml-2{margin-left:calc(var(--spacing) * 2);}
1097
1099
  .ml-2\\.5{margin-left:calc(var(--spacing) * 2.5);}
1100
+ .mr{margin-right:calc(var(--spacing) * 4);}
1098
1101
  .mr-1\\!{margin-right:calc(var(--spacing) * 1) !important;}
1099
1102
  .mr-2{margin-right:calc(var(--spacing) * 2);}
1103
+ .mt,
1104
+ .mt-4{margin-top:calc(var(--spacing) * 4);}
1100
1105
  .mt-1{margin-top:calc(var(--spacing) * 1);}
1101
1106
  .mt-2{margin-top:calc(var(--spacing) * 2);}
1102
1107
  .mt-3{margin-top:calc(var(--spacing) * 3);}
1103
- .mt-4{margin-top:calc(var(--spacing) * 4);}
1104
1108
  .mt-auto{margin-top:auto;}
1105
1109
  .p-1{padding:calc(var(--spacing) * 1);}
1106
1110
  .p-2{padding:calc(var(--spacing) * 2);}
@@ -1111,11 +1115,12 @@ input:where([type='button'], [type='reset'], [type='submit']),
1111
1115
  .p-8{padding:calc(var(--spacing) * 8);}
1112
1116
  .\\!px-1{padding-inline:calc(var(--spacing) * 1) !important;}
1113
1117
  .\\!px-4{padding-inline:calc(var(--spacing) * 4) !important;}
1118
+ .px,
1119
+ .px-4{padding-inline:calc(var(--spacing) * 4);}
1114
1120
  .px-1{padding-inline:calc(var(--spacing) * 1);}
1115
1121
  .px-2{padding-inline:calc(var(--spacing) * 2);}
1116
1122
  .px-2\\.5{padding-inline:calc(var(--spacing) * 2.5);}
1117
1123
  .px-3{padding-inline:calc(var(--spacing) * 3);}
1118
- .px-4{padding-inline:calc(var(--spacing) * 4);}
1119
1124
  .px-6{padding-inline:calc(var(--spacing) * 6);}
1120
1125
  .py-1{padding-block:calc(var(--spacing) * 1);}
1121
1126
  .py-1\\.5{padding-block:calc(var(--spacing) * 1.5);}
@@ -1144,6 +1149,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
1144
1149
  .pt-2{padding-top:calc(var(--spacing) * 2);}
1145
1150
  .pt-4{padding-top:calc(var(--spacing) * 4);}
1146
1151
  .pt-6{padding-top:calc(var(--spacing) * 6);}
1152
+ .pie{padding-inline-end:calc(var(--spacing) * 4);}
1147
1153
  .text-center{text-align:center;}
1148
1154
  .text-left{text-align:left;}
1149
1155
  .outline-0{outline-style:var(--un-outline-style);outline-width:0px;}