@duxweb/dvha-pro 1.0.18 → 1.0.19

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 (144) hide show
  1. package/dist/cjs/component.cjs +1 -1
  2. package/dist/cjs/components/card/card.cjs +1 -1
  3. package/dist/cjs/components/chart/echart.cjs +1 -1
  4. package/dist/cjs/components/code/code.cjs +1 -0
  5. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  6. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  7. package/dist/cjs/components/data/selectModal.cjs +1 -1
  8. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  9. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  10. package/dist/cjs/components/form/formItem.cjs +1 -1
  11. package/dist/cjs/components/form/formLayout.cjs +1 -1
  12. package/dist/cjs/components/form/modalForm.cjs +1 -1
  13. package/dist/cjs/components/form/pageForm.cjs +1 -1
  14. package/dist/cjs/components/form/settingForm.cjs +1 -1
  15. package/dist/cjs/components/icon/icon.cjs +1 -1
  16. package/dist/cjs/components/layout/filter.cjs +1 -1
  17. package/dist/cjs/components/layout/filterLayout.cjs +1 -0
  18. package/dist/cjs/components/layout/list.cjs +1 -1
  19. package/dist/cjs/components/layout/table.cjs +1 -1
  20. package/dist/cjs/components/level/level.cjs +1 -1
  21. package/dist/cjs/components/modal/modal.cjs +1 -1
  22. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  23. package/dist/cjs/components/panel/collapse.cjs +1 -0
  24. package/dist/cjs/components/panel/setting.cjs +1 -1
  25. package/dist/cjs/components/status/listEmpty.cjs +1 -0
  26. package/dist/cjs/components/table/table.cjs +1 -0
  27. package/dist/cjs/components/table/tablePage.cjs +1 -1
  28. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  29. package/dist/cjs/components/upload/config.cjs +1 -0
  30. package/dist/cjs/components/upload/file.cjs +1 -1
  31. package/dist/cjs/components/upload/image.cjs +1 -1
  32. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  33. package/dist/cjs/components/upload/manager.cjs +1 -1
  34. package/dist/cjs/dvha-pro.css +1 -1
  35. package/dist/cjs/hooks/action.cjs +1 -1
  36. package/dist/cjs/hooks/dialog.cjs +1 -1
  37. package/dist/cjs/hooks/drawer.cjs +1 -1
  38. package/dist/cjs/hooks/modal.cjs +1 -1
  39. package/dist/cjs/hooks/table/image.cjs +1 -1
  40. package/dist/cjs/hooks/table/media.cjs +1 -1
  41. package/dist/cjs/hooks/table.cjs +1 -1
  42. package/dist/cjs/index.cjs +1 -1
  43. package/dist/cjs/langs/en-US.json.cjs +1 -1
  44. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  45. package/dist/cjs/pages/authLayout.cjs +1 -1
  46. package/dist/cjs/pages/layout/page.cjs +1 -1
  47. package/dist/cjs/pages/login.cjs +1 -1
  48. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  49. package/dist/cjs/pages/menu/button.cjs +1 -1
  50. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  51. package/dist/cjs/pages/menu/main.cjs +1 -1
  52. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  53. package/dist/cjs/pages/page.cjs +1 -1
  54. package/dist/cjs/pages/page404.cjs +1 -1
  55. package/dist/cjs/pages/pageStatus.cjs +1 -1
  56. package/dist/cjs/theme/naiveTheme.cjs +1 -1
  57. package/dist/cjs/theme/uno.css.cjs +23 -7
  58. package/dist/esm/component.js +36 -34
  59. package/dist/esm/components/card/card.js +6 -6
  60. package/dist/esm/components/chart/echart.js +17 -6
  61. package/dist/esm/components/code/code.js +53 -0
  62. package/dist/esm/components/crop/imageCrop.js +37 -26
  63. package/dist/esm/components/data/dynamicSelect.js +29 -18
  64. package/dist/esm/components/data/selectModal.js +49 -38
  65. package/dist/esm/components/drawer/drawer.js +17 -28
  66. package/dist/esm/components/drawer/drawerPage.js +54 -17
  67. package/dist/esm/components/form/formItem.js +17 -17
  68. package/dist/esm/components/form/formLayout.js +8 -8
  69. package/dist/esm/components/form/modalForm.js +44 -35
  70. package/dist/esm/components/form/pageForm.js +81 -43
  71. package/dist/esm/components/form/settingForm.js +28 -17
  72. package/dist/esm/components/icon/icon.js +23 -12
  73. package/dist/esm/components/layout/filter.js +15 -11
  74. package/dist/esm/components/layout/filterLayout.js +34 -0
  75. package/dist/esm/components/layout/list.js +206 -160
  76. package/dist/esm/components/layout/table.js +212 -185
  77. package/dist/esm/components/level/level.js +28 -17
  78. package/dist/esm/components/modal/modal.js +9 -9
  79. package/dist/esm/components/modal/modalPage.js +2 -2
  80. package/dist/esm/components/panel/collapse.js +49 -0
  81. package/dist/esm/components/panel/setting.js +3 -3
  82. package/dist/esm/components/status/listEmpty.js +26 -0
  83. package/dist/esm/components/table/table.js +110 -0
  84. package/dist/esm/components/table/tablePage.js +24 -18
  85. package/dist/esm/components/tree/treeFilter.js +44 -39
  86. package/dist/esm/components/upload/config.js +32 -0
  87. package/dist/esm/components/upload/file.js +142 -116
  88. package/dist/esm/components/upload/image.js +95 -66
  89. package/dist/esm/components/upload/manage/item.js +17 -6
  90. package/dist/esm/components/upload/manager.js +202 -164
  91. package/dist/esm/dvha-pro.css +1 -1
  92. package/dist/esm/hooks/action.js +77 -75
  93. package/dist/esm/hooks/dialog.js +13 -2
  94. package/dist/esm/hooks/drawer.js +13 -2
  95. package/dist/esm/hooks/modal.js +13 -2
  96. package/dist/esm/hooks/table/image.js +21 -10
  97. package/dist/esm/hooks/table/media.js +20 -9
  98. package/dist/esm/hooks/table.js +16 -13
  99. package/dist/esm/index.js +174 -164
  100. package/dist/esm/langs/en-US.json.js +1 -1
  101. package/dist/esm/langs/zh-CN.json.js +1 -1
  102. package/dist/esm/pages/authLayout.js +19 -8
  103. package/dist/esm/pages/layout/page.js +17 -6
  104. package/dist/esm/pages/login.js +40 -29
  105. package/dist/esm/pages/menu/avatar.js +45 -34
  106. package/dist/esm/pages/menu/button.js +23 -12
  107. package/dist/esm/pages/menu/cmd.js +45 -34
  108. package/dist/esm/pages/menu/main.js +40 -27
  109. package/dist/esm/pages/menu/mobile.js +13 -2
  110. package/dist/esm/pages/page.js +1 -1
  111. package/dist/esm/pages/page404.js +20 -9
  112. package/dist/esm/pages/pageStatus.js +31 -15
  113. package/dist/esm/theme/naiveTheme.js +6 -6
  114. package/dist/esm/theme/uno.css.js +23 -7
  115. package/dist/types/components/code/code.d.ts +44 -0
  116. package/dist/types/components/code/index.d.ts +1 -0
  117. package/dist/types/components/drawer/drawer.d.ts +2 -0
  118. package/dist/types/components/drawer/drawerPage.d.ts +20 -1
  119. package/dist/types/components/form/formItem.d.ts +2 -2
  120. package/dist/types/components/form/formLayout.d.ts +3 -3
  121. package/dist/types/components/form/modalForm.d.ts +3 -3
  122. package/dist/types/components/form/pageForm.d.ts +12 -0
  123. package/dist/types/components/index.d.ts +1 -0
  124. package/dist/types/components/layout/filterLayout.d.ts +32 -0
  125. package/dist/types/components/layout/index.d.ts +1 -0
  126. package/dist/types/components/layout/table.d.ts +3 -0
  127. package/dist/types/components/panel/collapse.d.ts +14 -0
  128. package/dist/types/components/panel/index.d.ts +1 -0
  129. package/dist/types/components/select/cardSelect.d.ts +1 -1
  130. package/dist/types/components/status/index.d.ts +1 -0
  131. package/dist/types/components/status/listEmpty.d.ts +11 -0
  132. package/dist/types/components/table/index.d.ts +1 -0
  133. package/dist/types/components/table/table.d.ts +6552 -0
  134. package/dist/types/components/table/tablePage.d.ts +3 -0
  135. package/dist/types/components/tree/treeFilter.d.ts +13 -12
  136. package/dist/types/components/upload/config.d.ts +13 -0
  137. package/dist/types/components/upload/file.d.ts +4 -0
  138. package/dist/types/components/upload/image.d.ts +30 -2
  139. package/dist/types/components/upload/manager.d.ts +4 -0
  140. package/dist/types/hooks/drawer.d.ts +1 -0
  141. package/dist/types/hooks/table/types.d.ts +1 -0
  142. package/dist/types/main.d.ts +6 -0
  143. package/dist/types/pages/pageStatus.d.ts +11 -1
  144. package/package.json +6 -4
@@ -1,6 +1,6 @@
1
- import { defineComponent as p, computed as C, toRef as x, createVNode as m, Fragment as F, resolveComponent as a, mergeProps as E, isVNode as v } from "vue";
1
+ import { defineComponent as s, computed as C, toRef as F, createVNode as n, Fragment as x, isVNode as E } from "vue";
2
2
  import { useI18n as h, useExtendForm as j } from "@duxweb/dvha-core";
3
- import { useMessage as D } from "naive-ui";
3
+ import { useMessage as v, NButton as a } from "naive-ui";
4
4
  import "clsx";
5
5
  import "vue-echarts";
6
6
  import "vue-router";
@@ -13,12 +13,12 @@ import "@duxweb/dvha-naiveui";
13
13
  import "@vueuse/core";
14
14
  import "pinia";
15
15
  import "vue-cropper";
16
- import M from "../modal/modalPage.js";
16
+ import D from "../modal/modalPage.js";
17
17
  import "jinrishici";
18
18
  import "vue-draggable-plus";
19
19
  import "aieditor";
20
20
  import "vee-validate";
21
- import { DuxFormLayout as l } from "./formLayout.js";
21
+ import { DuxFormLayout as d } from "./formLayout.js";
22
22
  import "@vee-validate/i18n";
23
23
  import "colorizr";
24
24
  import "echarts";
@@ -31,10 +31,21 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
31
31
  import "vue-command-palette";
32
32
  import "../../pages/page404.js";
33
33
  import "@iconify-json/tabler/icons.json";
34
- function d(t) {
35
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !v(t);
34
+ import "vue3-ace-editor";
35
+ import "ace-builds/src-noconflict/mode-vue";
36
+ import "ace-builds/src-noconflict/mode-javascript";
37
+ import "ace-builds/src-noconflict/mode-html";
38
+ import "ace-builds/src-noconflict/mode-json";
39
+ import "ace-builds/src-noconflict/mode-json5";
40
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
41
+ import "ace-builds/src-noconflict/theme-tomorrow";
42
+ import "ace-builds/src-noconflict/ext-searchbox";
43
+ import "ace-builds/src-noconflict/ext-language_tools";
44
+ import "ace-builds/src-noconflict/mode-snippets";
45
+ function l(t) {
46
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
36
47
  }
37
- const ft = /* @__PURE__ */ p({
48
+ const Et = /* @__PURE__ */ s({
38
49
  name: "DuxModalForm",
39
50
  props: {
40
51
  id: {
@@ -62,68 +73,66 @@ const ft = /* @__PURE__ */ p({
62
73
  type: Function
63
74
  }
64
75
  },
65
- extends: l,
76
+ extends: d,
66
77
  setup(t, {
67
- slots: i
78
+ slots: m
68
79
  }) {
69
80
  const {
70
- t: n
81
+ t: i
71
82
  } = h(), f = C(() => {
72
83
  const {
73
84
  onClose: o,
74
85
  onSuccess: e,
75
86
  onError: r,
76
- action: N,
77
- title: O,
78
- id: P,
87
+ action: M,
88
+ title: N,
89
+ id: O,
79
90
  path: _,
80
91
  data: k,
81
- ...S
92
+ ...b
82
93
  } = t;
83
- return S;
84
- }), g = x(t, "data", {}), c = D(), {
94
+ return b;
95
+ }), p = F(t, "data", {}), c = v(), {
85
96
  isLoading: u,
86
- onSubmit: y,
87
- onReset: s,
88
- isEdit: b
97
+ onSubmit: g,
98
+ onReset: y,
99
+ isEdit: S
89
100
  } = j({
90
101
  id: t.id,
91
102
  path: t.path,
92
- form: g,
103
+ form: p,
93
104
  action: t.action,
94
105
  onError: (o) => {
95
106
  var e;
96
- c.error(o.message || n("components.form.error")), (e = t.onError) == null || e.call(t, o);
107
+ c.error(o.message || i("components.form.error")), (e = t.onError) == null || e.call(t, o);
97
108
  },
98
109
  onSuccess: (o) => {
99
110
  var e, r;
100
- c.success(n("components.form.success")), (e = t.onSuccess) == null || e.call(t, o), (r = t.onClose) == null || r.call(t);
111
+ c.success(i("components.form.success")), (e = t.onSuccess) == null || e.call(t, o), (r = t.onClose) == null || r.call(t);
101
112
  }
102
113
  });
103
- return () => m(M, {
104
- title: (t == null ? void 0 : t.title) || (b.value ? n("components.form.edit") : n("components.form.create")),
114
+ return () => n(D, {
115
+ title: (t == null ? void 0 : t.title) || (S.value ? i("components.form.edit") : i("components.form.create")),
105
116
  onClose: t == null ? void 0 : t.onClose
106
117
  }, {
107
- default: () => m(l, E(f.value, {
108
- class: "px-2 py-2"
109
- }), {
118
+ default: () => n(d, f.value, {
110
119
  default: () => {
111
120
  var o;
112
- return [(o = i == null ? void 0 : i.default) == null ? void 0 : o.call(i)];
121
+ return [(o = m == null ? void 0 : m.default) == null ? void 0 : o.call(m)];
113
122
  }
114
123
  }),
115
124
  footer: () => {
116
125
  let o, e;
117
- return m(F, null, [m(a("n-button"), {
118
- onClick: s,
126
+ return n(x, null, [n(a, {
127
+ onClick: y,
119
128
  loading: u.value
120
- }, d(o = n("components.button.reset")) ? o : {
129
+ }, l(o = i("components.button.reset")) ? o : {
121
130
  default: () => [o]
122
- }), m(a("n-button"), {
131
+ }), n(a, {
123
132
  type: "primary",
124
133
  loading: u.value,
125
- onClick: y
126
- }, d(e = n("components.button.submit")) ? e : {
134
+ onClick: () => g()
135
+ }, l(e = i("components.button.submit")) ? e : {
127
136
  default: () => [e]
128
137
  })]);
129
138
  }
@@ -131,5 +140,5 @@ const ft = /* @__PURE__ */ p({
131
140
  }
132
141
  });
133
142
  export {
134
- ft as DuxModalForm
143
+ Et as DuxModalForm
135
144
  };
@@ -1,8 +1,9 @@
1
- import { defineComponent as p, toRef as d, createVNode as i } from "vue";
2
- import { useI18n as f, useExtendForm as g } from "@duxweb/dvha-core";
3
- import { useMessage as y, NButton as c } from "naive-ui";
1
+ import { defineComponent as b, toRef as g, createVNode as i } from "vue";
2
+ import { useI18n as x, useTabStore as y, useExtendForm as S } from "@duxweb/dvha-core";
3
+ import { useMessage as s, NButton as p, NScrollbar as h } from "naive-ui";
4
+ import { useRouter as E } from "vue-router";
4
5
  import "@overlastic/vue";
5
- import "vue-router";
6
+ import { DuxCard as F } from "../card/card.js";
6
7
  import "clsx";
7
8
  import "vue-echarts";
8
9
  import "@vueuse/core";
@@ -12,8 +13,20 @@ import "lodash-es";
12
13
  import "vue-draggable-plus";
13
14
  import "aieditor";
14
15
  import "vee-validate";
16
+ import { DuxFormLayout as v } from "./formLayout.js";
15
17
  import "@iconify-json/tabler/icons.json";
16
18
  import "mime";
19
+ import "vue3-ace-editor";
20
+ import "ace-builds/src-noconflict/mode-vue";
21
+ import "ace-builds/src-noconflict/mode-javascript";
22
+ import "ace-builds/src-noconflict/mode-html";
23
+ import "ace-builds/src-noconflict/mode-json";
24
+ import "ace-builds/src-noconflict/mode-json5";
25
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
26
+ import "ace-builds/src-noconflict/theme-tomorrow";
27
+ import "ace-builds/src-noconflict/ext-searchbox";
28
+ import "ace-builds/src-noconflict/ext-language_tools";
29
+ import "ace-builds/src-noconflict/mode-snippets";
17
30
  import "dayjs";
18
31
  import "@tanstack/vue-query";
19
32
  import "@duxweb/dvha-naiveui";
@@ -28,9 +41,9 @@ import "unocss/preset-wind4";
28
41
  import "@vee-validate/i18n/dist/locale/en.json";
29
42
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
30
43
  import "vue-command-palette";
31
- import { DuxPage as b } from "../../pages/page.js";
44
+ import { DuxPage as C } from "../../pages/page.js";
32
45
  import "../../pages/page404.js";
33
- const W = /* @__PURE__ */ p({
46
+ const xt = /* @__PURE__ */ b({
34
47
  name: "DuxPageForm",
35
48
  props: {
36
49
  id: {
@@ -39,6 +52,12 @@ const W = /* @__PURE__ */ p({
39
52
  action: {
40
53
  type: String
41
54
  },
55
+ title: {
56
+ type: String
57
+ },
58
+ description: {
59
+ type: String
60
+ },
42
61
  path: {
43
62
  type: String
44
63
  },
@@ -57,54 +76,73 @@ const W = /* @__PURE__ */ p({
57
76
  }
58
77
  },
59
78
  setup(t, {
60
- slots: e
79
+ slots: r
61
80
  }) {
62
81
  const {
63
82
  t: o
64
- } = f(), u = d(t, "data", {}), n = y(), a = g({
83
+ } = x(), d = g(t, "data", {}), u = s(), l = E(), n = y(), m = S({
65
84
  id: t.id,
66
85
  path: t.path,
67
- form: u,
86
+ form: d,
68
87
  action: t.action,
69
- onError: (r) => {
70
- var m;
71
- n.error(r.message || o("components.form.error")), (m = t.onError) == null || m.call(t, r);
88
+ onError: (e) => {
89
+ var a;
90
+ u.error(e.message || o("components.form.error")), (a = t.onError) == null || a.call(t, e);
72
91
  },
73
- onSuccess: (r) => {
74
- var m;
75
- n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t, r);
92
+ onSuccess: (e) => {
93
+ var a;
94
+ u.success(o("components.form.success")), (a = t.onSuccess) == null || a.call(t, e), !m.isEdit.value && n.current && n.delTab(n.current, (f) => l.push(f.path || ""));
76
95
  }
77
- });
78
- return () => i(b, {
79
- card: !1
96
+ }), c = n.tabs.find((e) => e.path === n.current);
97
+ return () => i(C, {
98
+ card: !1,
99
+ scrollbar: !1
80
100
  }, {
81
- default: () => {
82
- var r;
83
- return (r = e == null ? void 0 : e.default) == null ? void 0 : r.call(e, a);
84
- },
85
- actions: () => {
86
- var r;
87
- return i("div", {
88
- class: "flex gap-6 items-center"
89
- }, [(r = e == null ? void 0 : e.actions) == null ? void 0 : r.call(e, a), i("div", {
90
- class: "flex gap-2"
91
- }, [i(c, null, {
92
- default: () => o("components.button.reset"),
93
- icon: () => i("i", {
94
- class: "i-tabler:refresh"
95
- }, null)
96
- }), i(c, {
97
- type: "primary"
98
- }, {
99
- default: () => o("components.button.submit"),
100
- icon: () => i("i", {
101
- class: "i-tabler:send"
102
- }, null)
103
- })])]);
104
- }
101
+ default: () => [i(F, {
102
+ title: (t == null ? void 0 : t.title) || (c == null ? void 0 : c.label) || (m.isEdit.value ? o("components.form.edit") : o("components.form.create")),
103
+ description: t == null ? void 0 : t.description,
104
+ class: "h-full flex flex-col",
105
+ contentClass: "flex-1 min-h-0",
106
+ contentSize: "none",
107
+ "header-bordered": !0
108
+ }, {
109
+ default: () => i(h, null, {
110
+ default: () => [i(v, {
111
+ "label-placement": "page"
112
+ }, {
113
+ default: () => {
114
+ var e;
115
+ return [(e = r == null ? void 0 : r.default) == null ? void 0 : e.call(r, m)];
116
+ }
117
+ })]
118
+ }),
119
+ headerExtra: () => {
120
+ var e;
121
+ return i("div", {
122
+ class: "flex gap-6 items-center"
123
+ }, [(e = r == null ? void 0 : r.actions) == null ? void 0 : e.call(r, m), i("div", {
124
+ class: "flex gap-2"
125
+ }, [i(p, {
126
+ onClick: () => m.onReset()
127
+ }, {
128
+ default: () => o("components.button.reset"),
129
+ icon: () => i("i", {
130
+ class: "i-tabler:refresh"
131
+ }, null)
132
+ }), i(p, {
133
+ type: "primary",
134
+ onClick: () => m.onSubmit()
135
+ }, {
136
+ default: () => o("components.button.submit"),
137
+ icon: () => i("i", {
138
+ class: "i-tabler:device-floppy"
139
+ }, null)
140
+ })])]);
141
+ }
142
+ })]
105
143
  });
106
144
  }
107
145
  });
108
146
  export {
109
- W as DuxPageForm
147
+ xt as DuxPageForm
110
148
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, ref as l, toRef as p, computed as g, createVNode as r } from "vue";
1
+ import { defineComponent as f, ref as d, toRef as l, computed as g, createVNode as i } from "vue";
2
2
  import { useI18n as x, useExtendForm as y } from "@duxweb/dvha-core";
3
3
  import { useMessage as S, NTabs as b } from "naive-ui";
4
4
  import "@overlastic/vue";
@@ -14,6 +14,17 @@ import "aieditor";
14
14
  import "vee-validate";
15
15
  import "@iconify-json/tabler/icons.json";
16
16
  import "mime";
17
+ import "vue3-ace-editor";
18
+ import "ace-builds/src-noconflict/mode-vue";
19
+ import "ace-builds/src-noconflict/mode-javascript";
20
+ import "ace-builds/src-noconflict/mode-html";
21
+ import "ace-builds/src-noconflict/mode-json";
22
+ import "ace-builds/src-noconflict/mode-json5";
23
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
24
+ import "ace-builds/src-noconflict/theme-tomorrow";
25
+ import "ace-builds/src-noconflict/ext-searchbox";
26
+ import "ace-builds/src-noconflict/ext-language_tools";
27
+ import "ace-builds/src-noconflict/mode-snippets";
17
28
  import "dayjs";
18
29
  import "@tanstack/vue-query";
19
30
  import "@duxweb/dvha-naiveui";
@@ -30,7 +41,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
30
41
  import "vue-command-palette";
31
42
  import { DuxPage as v } from "../../pages/page.js";
32
43
  import "../../pages/page404.js";
33
- const _ = /* @__PURE__ */ d({
44
+ const ct = /* @__PURE__ */ f({
34
45
  name: "DuxSettingForm",
35
46
  props: {
36
47
  id: {
@@ -67,22 +78,22 @@ const _ = /* @__PURE__ */ d({
67
78
  setup(t, {
68
79
  slots: e
69
80
  }) {
70
- const i = l(t.defaultTab), c = p(t, "data", {}), {
81
+ const a = d(t.defaultTab), c = l(t, "data", {}), {
71
82
  t: o
72
83
  } = x(), n = S(), u = y({
73
84
  id: t.id,
74
85
  path: t.path,
75
86
  form: c,
76
87
  action: t.action,
77
- onError: (a) => {
88
+ onError: (r) => {
78
89
  var m;
79
- n.error(a.message || o("components.form.error")), (m = t.onError) == null || m.call(t, a);
90
+ n.error(r.message || o("components.form.error")), (m = t.onError) == null || m.call(t, r);
80
91
  },
81
- onSuccess: (a) => {
92
+ onSuccess: (r) => {
82
93
  var m;
83
- n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t, a);
94
+ n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t, r);
84
95
  }
85
- }), f = g(() => {
96
+ }), p = g(() => {
86
97
  switch (t.size) {
87
98
  case "small":
88
99
  return "lg:max-w-lg";
@@ -93,16 +104,16 @@ const _ = /* @__PURE__ */ d({
93
104
  return "lg:max-w-2xl";
94
105
  }
95
106
  });
96
- return () => r(v, null, {
107
+ return () => i(v, null, {
97
108
  default: () => {
98
- var a;
99
- return [r("div", {
100
- class: `flex flex-col gap-6 w-full ${f.value} mx-auto py-4`
101
- }, [t.tabs ? r(b, {
109
+ var r;
110
+ return [i("div", {
111
+ class: `flex flex-col gap-6 w-full ${p.value} mx-auto py-4`
112
+ }, [t.tabs ? i(b, {
102
113
  defaultValue: t.defaultTab,
103
- value: i.value,
114
+ value: a.value,
104
115
  onUpdateValue: (m) => {
105
- i.value = m;
116
+ a.value = m;
106
117
  },
107
118
  type: "segment"
108
119
  }, {
@@ -110,11 +121,11 @@ const _ = /* @__PURE__ */ d({
110
121
  var m;
111
122
  return [(m = e == null ? void 0 : e.default) == null ? void 0 : m.call(e, u)];
112
123
  }
113
- }) : (a = e == null ? void 0 : e.default) == null ? void 0 : a.call(e, u)])];
124
+ }) : (r = e == null ? void 0 : e.default) == null ? void 0 : r.call(e, u)])];
114
125
  }
115
126
  });
116
127
  }
117
128
  });
118
129
  export {
119
- _ as DuxSettingForm
130
+ ct as DuxSettingForm
120
131
  };
@@ -26,33 +26,44 @@ import "@duxweb/dvha-naiveui";
26
26
  import "../../pages/page404.js";
27
27
  import "@iconify-json/tabler/icons.json";
28
28
  import "mime";
29
+ import "vue3-ace-editor";
30
+ import "ace-builds/src-noconflict/mode-vue";
31
+ import "ace-builds/src-noconflict/mode-javascript";
32
+ import "ace-builds/src-noconflict/mode-html";
33
+ import "ace-builds/src-noconflict/mode-json";
34
+ import "ace-builds/src-noconflict/mode-json5";
35
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
36
+ import "ace-builds/src-noconflict/theme-tomorrow";
37
+ import "ace-builds/src-noconflict/ext-searchbox";
38
+ import "ace-builds/src-noconflict/ext-language_tools";
39
+ import "ace-builds/src-noconflict/mode-snippets";
29
40
  import { useModal as c } from "../../hooks/modal.js";
30
41
  import "dayjs";
31
42
  import "@tanstack/vue-query";
32
43
  import "pinia";
33
- const O = /* @__PURE__ */ n({
44
+ const to = /* @__PURE__ */ n({
34
45
  name: "DuxIconPicker",
35
46
  props: {
36
47
  defaultValue: String,
37
48
  value: String
38
49
  },
39
- setup(i, {
50
+ setup(r, {
40
51
  emit: m
41
52
  }) {
42
- const o = a(i, "value", m, {
43
- defaultValue: i.defaultValue,
53
+ const o = a(r, "value", m, {
54
+ defaultValue: r.defaultValue,
44
55
  passive: !0
45
56
  }), p = c(), {
46
- t: r
57
+ t: e
47
58
  } = l();
48
59
  return () => t(u, {
49
60
  dashed: !o.value,
50
61
  onClick: () => {
51
62
  p.show({
52
- title: r("components.iconPicker.title"),
63
+ title: e("components.iconPicker.title"),
53
64
  component: () => import("./iconPicker.js")
54
- }).then((e) => {
55
- o.value = e;
65
+ }).then((i) => {
66
+ o.value = i;
56
67
  });
57
68
  },
58
69
  iconPlacement: "right"
@@ -61,11 +72,11 @@ const O = /* @__PURE__ */ n({
61
72
  class: "flex gap-2 items-center"
62
73
  }, [o.value ? t("div", {
63
74
  class: `size-4 ${o.value || ""}`
64
- }, null) : void 0, r("components.iconPicker.title")]),
75
+ }, null) : void 0, e("components.iconPicker.title")]),
65
76
  icon: () => o.value ? t("div", {
66
77
  class: "rounded-full p-1 hover:bg-gray-2 hover:text-gray-7",
67
- onClick: (e) => {
68
- e.stopPropagation(), o.value = void 0;
78
+ onClick: (i) => {
79
+ i.stopPropagation(), o.value = void 0;
69
80
  }
70
81
  }, [t("div", {
71
82
  class: "size-4 i-tabler:x"
@@ -74,5 +85,5 @@ const O = /* @__PURE__ */ n({
74
85
  }
75
86
  });
76
87
  export {
77
- O as DuxIconPicker
88
+ to as DuxIconPicker
78
89
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as n, createVNode as a } from "vue";
2
- const i = /* @__PURE__ */ n({
1
+ import { defineComponent as n, inject as r, createVNode as l } from "vue";
2
+ const c = /* @__PURE__ */ n({
3
3
  name: "DuxTableFilter",
4
4
  props: {
5
5
  label: {
@@ -7,21 +7,25 @@ const i = /* @__PURE__ */ n({
7
7
  default: ""
8
8
  }
9
9
  },
10
- setup(l, {
10
+ setup(a, {
11
11
  slots: e
12
12
  }) {
13
+ const t = r("dux.filter", {
14
+ showLabel: !1,
15
+ labelPlacement: "left"
16
+ });
13
17
  return () => {
14
- var t;
15
- return a("div", {
16
- class: "flex gap-2 gap-2 flex-nowrap items-center"
17
- }, [l.label && a("div", {
18
+ var f;
19
+ return l("div", {
20
+ class: ["flex gap-2 gap-2 flex-nowrap", t.labelPlacement === "left" ? "flex-row items-center" : "flex-col"]
21
+ }, [t.showLabel && a.label && l("div", {
18
22
  class: "text-sm text-default whitespace-nowrap"
19
- }, [l.label]), a("div", {
20
- class: "flex-1 lg:flex-none min-w-20"
21
- }, [(t = e.default) == null ? void 0 : t.call(e)])]);
23
+ }, [a.label]), l("div", {
24
+ class: "flex-1 min-w-60"
25
+ }, [(f = e.default) == null ? void 0 : f.call(e)])]);
22
26
  };
23
27
  }
24
28
  });
25
29
  export {
26
- i as DuxTableFilter
30
+ c as DuxTableFilter
27
31
  };
@@ -0,0 +1,34 @@
1
+ import { defineComponent as t, provide as o, createVNode as f } from "vue";
2
+ const r = /* @__PURE__ */ t({
3
+ name: "DuxFilterLayout",
4
+ props: {
5
+ showLabel: {
6
+ type: Boolean,
7
+ default: !1
8
+ },
9
+ labelPlacement: {
10
+ type: String,
11
+ default: "left"
12
+ },
13
+ horizontal: {
14
+ type: Boolean,
15
+ default: !1
16
+ }
17
+ },
18
+ setup(e, {
19
+ slots: l
20
+ }) {
21
+ return o("dux.filter", {
22
+ showLabel: e.showLabel,
23
+ labelPlacement: e.labelPlacement
24
+ }), () => {
25
+ var a;
26
+ return f("div", {
27
+ class: ["flex flex-col gap-2", e.horizontal ? "flex-row" : "flex-col"]
28
+ }, [(a = l.default) == null ? void 0 : a.call(l)]);
29
+ };
30
+ }
31
+ });
32
+ export {
33
+ r as DuxFilterLayout
34
+ };