@duxweb/dvha-pro 1.0.17 → 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 (150) 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 -0
  16. package/dist/cjs/components/icon/iconPicker.cjs +1 -0
  17. package/dist/cjs/components/layout/filter.cjs +1 -1
  18. package/dist/cjs/components/layout/filterLayout.cjs +1 -0
  19. package/dist/cjs/components/layout/list.cjs +1 -1
  20. package/dist/cjs/components/layout/table.cjs +1 -1
  21. package/dist/cjs/components/level/level.cjs +1 -1
  22. package/dist/cjs/components/modal/modal.cjs +1 -1
  23. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  24. package/dist/cjs/components/panel/collapse.cjs +1 -0
  25. package/dist/cjs/components/panel/setting.cjs +1 -1
  26. package/dist/cjs/components/status/listEmpty.cjs +1 -0
  27. package/dist/cjs/components/table/table.cjs +1 -0
  28. package/dist/cjs/components/table/tablePage.cjs +1 -1
  29. package/dist/cjs/components/tree/treeFilter.cjs +1 -0
  30. package/dist/cjs/components/upload/config.cjs +1 -0
  31. package/dist/cjs/components/upload/file.cjs +1 -1
  32. package/dist/cjs/components/upload/image.cjs +1 -1
  33. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  34. package/dist/cjs/components/upload/manager.cjs +1 -1
  35. package/dist/cjs/dvha-pro.css +1 -1
  36. package/dist/cjs/hooks/action.cjs +1 -1
  37. package/dist/cjs/hooks/dialog.cjs +1 -1
  38. package/dist/cjs/hooks/drawer.cjs +1 -1
  39. package/dist/cjs/hooks/modal.cjs +1 -1
  40. package/dist/cjs/hooks/table/image.cjs +1 -1
  41. package/dist/cjs/hooks/table/media.cjs +1 -1
  42. package/dist/cjs/hooks/table.cjs +1 -1
  43. package/dist/cjs/index.cjs +1 -1
  44. package/dist/cjs/langs/en-US.json.cjs +1 -1
  45. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  46. package/dist/cjs/pages/authLayout.cjs +1 -1
  47. package/dist/cjs/pages/layout/page.cjs +1 -1
  48. package/dist/cjs/pages/login.cjs +1 -1
  49. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  50. package/dist/cjs/pages/menu/button.cjs +1 -1
  51. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  52. package/dist/cjs/pages/menu/main.cjs +1 -1
  53. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  54. package/dist/cjs/pages/page.cjs +1 -1
  55. package/dist/cjs/pages/page404.cjs +1 -1
  56. package/dist/cjs/pages/pageStatus.cjs +1 -1
  57. package/dist/cjs/theme/naiveTheme.cjs +1 -1
  58. package/dist/cjs/theme/uno.css.cjs +27 -7
  59. package/dist/esm/component.js +52 -47
  60. package/dist/esm/components/card/card.js +6 -6
  61. package/dist/esm/components/chart/echart.js +18 -6
  62. package/dist/esm/components/code/code.js +53 -0
  63. package/dist/esm/components/crop/imageCrop.js +38 -26
  64. package/dist/esm/components/data/dynamicSelect.js +31 -19
  65. package/dist/esm/components/data/selectModal.js +50 -38
  66. package/dist/esm/components/drawer/drawer.js +17 -28
  67. package/dist/esm/components/drawer/drawerPage.js +54 -17
  68. package/dist/esm/components/form/formItem.js +13 -13
  69. package/dist/esm/components/form/formLayout.js +8 -8
  70. package/dist/esm/components/form/modalForm.js +46 -36
  71. package/dist/esm/components/form/pageForm.js +82 -43
  72. package/dist/esm/components/form/settingForm.js +39 -27
  73. package/dist/esm/components/icon/icon.js +89 -0
  74. package/dist/esm/components/icon/iconPicker.js +83 -0
  75. package/dist/esm/components/layout/filter.js +15 -11
  76. package/dist/esm/components/layout/filterLayout.js +34 -0
  77. package/dist/esm/components/layout/list.js +207 -160
  78. package/dist/esm/components/layout/table.js +213 -185
  79. package/dist/esm/components/level/level.js +29 -17
  80. package/dist/esm/components/modal/modal.js +9 -9
  81. package/dist/esm/components/modal/modalPage.js +2 -2
  82. package/dist/esm/components/panel/collapse.js +49 -0
  83. package/dist/esm/components/panel/setting.js +3 -3
  84. package/dist/esm/components/status/listEmpty.js +26 -0
  85. package/dist/esm/components/table/table.js +110 -0
  86. package/dist/esm/components/table/tablePage.js +24 -18
  87. package/dist/esm/components/tree/treeFilter.js +212 -0
  88. package/dist/esm/components/upload/config.js +32 -0
  89. package/dist/esm/components/upload/file.js +143 -116
  90. package/dist/esm/components/upload/image.js +96 -66
  91. package/dist/esm/components/upload/manage/item.js +18 -6
  92. package/dist/esm/components/upload/manager.js +203 -164
  93. package/dist/esm/dvha-pro.css +1 -1
  94. package/dist/esm/hooks/action.js +77 -75
  95. package/dist/esm/hooks/dialog.js +14 -2
  96. package/dist/esm/hooks/drawer.js +14 -2
  97. package/dist/esm/hooks/modal.js +14 -2
  98. package/dist/esm/hooks/table/image.js +22 -10
  99. package/dist/esm/hooks/table/media.js +22 -10
  100. package/dist/esm/hooks/table.js +16 -13
  101. package/dist/esm/index.js +200 -184
  102. package/dist/esm/langs/en-US.json.js +1 -1
  103. package/dist/esm/langs/zh-CN.json.js +1 -1
  104. package/dist/esm/pages/authLayout.js +23 -11
  105. package/dist/esm/pages/layout/page.js +29 -17
  106. package/dist/esm/pages/login.js +41 -29
  107. package/dist/esm/pages/menu/avatar.js +46 -34
  108. package/dist/esm/pages/menu/button.js +26 -14
  109. package/dist/esm/pages/menu/cmd.js +46 -34
  110. package/dist/esm/pages/menu/main.js +41 -27
  111. package/dist/esm/pages/menu/mobile.js +14 -2
  112. package/dist/esm/pages/page.js +1 -1
  113. package/dist/esm/pages/page404.js +21 -9
  114. package/dist/esm/pages/pageStatus.js +33 -16
  115. package/dist/esm/theme/naiveTheme.js +6 -6
  116. package/dist/esm/theme/uno.css.js +27 -7
  117. package/dist/types/components/code/code.d.ts +44 -0
  118. package/dist/types/components/code/index.d.ts +1 -0
  119. package/dist/types/components/drawer/drawer.d.ts +2 -0
  120. package/dist/types/components/drawer/drawerPage.d.ts +20 -1
  121. package/dist/types/components/form/formItem.d.ts +2 -2
  122. package/dist/types/components/form/formLayout.d.ts +3 -3
  123. package/dist/types/components/form/modalForm.d.ts +3 -3
  124. package/dist/types/components/form/pageForm.d.ts +12 -0
  125. package/dist/types/components/icon/icon.d.ts +7 -0
  126. package/dist/types/components/icon/iconPicker.d.ts +9 -0
  127. package/dist/types/components/icon/index.d.ts +2 -0
  128. package/dist/types/components/index.d.ts +3 -0
  129. package/dist/types/components/layout/filterLayout.d.ts +32 -0
  130. package/dist/types/components/layout/index.d.ts +1 -0
  131. package/dist/types/components/layout/table.d.ts +3 -0
  132. package/dist/types/components/panel/collapse.d.ts +14 -0
  133. package/dist/types/components/panel/index.d.ts +1 -0
  134. package/dist/types/components/select/cardSelect.d.ts +1 -1
  135. package/dist/types/components/status/index.d.ts +1 -0
  136. package/dist/types/components/status/listEmpty.d.ts +11 -0
  137. package/dist/types/components/table/index.d.ts +1 -0
  138. package/dist/types/components/table/table.d.ts +6552 -0
  139. package/dist/types/components/table/tablePage.d.ts +3 -0
  140. package/dist/types/components/tree/index.d.ts +1 -0
  141. package/dist/types/components/tree/treeFilter.d.ts +24 -0
  142. package/dist/types/components/upload/config.d.ts +13 -0
  143. package/dist/types/components/upload/file.d.ts +4 -0
  144. package/dist/types/components/upload/image.d.ts +30 -2
  145. package/dist/types/components/upload/manager.d.ts +4 -0
  146. package/dist/types/hooks/drawer.d.ts +1 -0
  147. package/dist/types/hooks/table/types.d.ts +1 -0
  148. package/dist/types/main.d.ts +6 -0
  149. package/dist/types/pages/pageStatus.d.ts +11 -1
  150. package/package.json +6 -4
@@ -1,6 +1,6 @@
1
- import { defineComponent as C, computed as p, 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";
@@ -30,10 +30,22 @@ import "@vee-validate/i18n/dist/locale/en.json";
30
30
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
31
31
  import "vue-command-palette";
32
32
  import "../../pages/page404.js";
33
- function d(t) {
34
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !v(t);
33
+ import "@iconify-json/tabler/icons.json";
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);
35
47
  }
36
- const dt = /* @__PURE__ */ C({
48
+ const Et = /* @__PURE__ */ s({
37
49
  name: "DuxModalForm",
38
50
  props: {
39
51
  id: {
@@ -61,68 +73,66 @@ const dt = /* @__PURE__ */ C({
61
73
  type: Function
62
74
  }
63
75
  },
64
- extends: l,
76
+ extends: d,
65
77
  setup(t, {
66
- slots: i
78
+ slots: m
67
79
  }) {
68
80
  const {
69
- t: n
70
- } = h(), f = p(() => {
81
+ t: i
82
+ } = h(), f = C(() => {
71
83
  const {
72
84
  onClose: o,
73
85
  onSuccess: e,
74
86
  onError: r,
75
- action: N,
76
- title: O,
77
- id: P,
87
+ action: M,
88
+ title: N,
89
+ id: O,
78
90
  path: _,
79
91
  data: k,
80
- ...S
92
+ ...b
81
93
  } = t;
82
- return S;
83
- }), g = x(t, "data", {}), c = D(), {
94
+ return b;
95
+ }), p = F(t, "data", {}), c = v(), {
84
96
  isLoading: u,
85
- onSubmit: y,
86
- onReset: s,
87
- isEdit: b
97
+ onSubmit: g,
98
+ onReset: y,
99
+ isEdit: S
88
100
  } = j({
89
101
  id: t.id,
90
102
  path: t.path,
91
- form: g,
103
+ form: p,
92
104
  action: t.action,
93
105
  onError: (o) => {
94
106
  var e;
95
- 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);
96
108
  },
97
109
  onSuccess: (o) => {
98
110
  var e, r;
99
- 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);
100
112
  }
101
113
  });
102
- return () => m(M, {
103
- 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")),
104
116
  onClose: t == null ? void 0 : t.onClose
105
117
  }, {
106
- default: () => m(l, E(f.value, {
107
- class: "px-2 py-2"
108
- }), {
118
+ default: () => n(d, f.value, {
109
119
  default: () => {
110
120
  var o;
111
- 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)];
112
122
  }
113
123
  }),
114
124
  footer: () => {
115
125
  let o, e;
116
- return m(F, null, [m(a("n-button"), {
117
- onClick: s,
126
+ return n(x, null, [n(a, {
127
+ onClick: y,
118
128
  loading: u.value
119
- }, d(o = n("components.button.reset")) ? o : {
129
+ }, l(o = i("components.button.reset")) ? o : {
120
130
  default: () => [o]
121
- }), m(a("n-button"), {
131
+ }), n(a, {
122
132
  type: "primary",
123
133
  loading: u.value,
124
- onClick: y
125
- }, d(e = n("components.button.submit")) ? e : {
134
+ onClick: () => g()
135
+ }, l(e = i("components.button.submit")) ? e : {
126
136
  default: () => [e]
127
137
  })]);
128
138
  }
@@ -130,5 +140,5 @@ const dt = /* @__PURE__ */ C({
130
140
  }
131
141
  });
132
142
  export {
133
- dt as DuxModalForm
143
+ Et as DuxModalForm
134
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,7 +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";
17
+ import "@iconify-json/tabler/icons.json";
15
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";
16
30
  import "dayjs";
17
31
  import "@tanstack/vue-query";
18
32
  import "@duxweb/dvha-naiveui";
@@ -27,9 +41,9 @@ import "unocss/preset-wind4";
27
41
  import "@vee-validate/i18n/dist/locale/en.json";
28
42
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
29
43
  import "vue-command-palette";
30
- import { DuxPage as b } from "../../pages/page.js";
44
+ import { DuxPage as C } from "../../pages/page.js";
31
45
  import "../../pages/page404.js";
32
- const U = /* @__PURE__ */ p({
46
+ const xt = /* @__PURE__ */ b({
33
47
  name: "DuxPageForm",
34
48
  props: {
35
49
  id: {
@@ -38,6 +52,12 @@ const U = /* @__PURE__ */ p({
38
52
  action: {
39
53
  type: String
40
54
  },
55
+ title: {
56
+ type: String
57
+ },
58
+ description: {
59
+ type: String
60
+ },
41
61
  path: {
42
62
  type: String
43
63
  },
@@ -56,54 +76,73 @@ const U = /* @__PURE__ */ p({
56
76
  }
57
77
  },
58
78
  setup(t, {
59
- slots: e
79
+ slots: r
60
80
  }) {
61
81
  const {
62
82
  t: o
63
- } = f(), u = d(t, "data", {}), n = y(), a = g({
83
+ } = x(), d = g(t, "data", {}), u = s(), l = E(), n = y(), m = S({
64
84
  id: t.id,
65
85
  path: t.path,
66
- form: u,
86
+ form: d,
67
87
  action: t.action,
68
- onError: (r) => {
69
- var m;
70
- 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);
71
91
  },
72
- onSuccess: (r) => {
73
- var m;
74
- 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 || ""));
75
95
  }
76
- });
77
- return () => i(b, {
78
- card: !1
96
+ }), c = n.tabs.find((e) => e.path === n.current);
97
+ return () => i(C, {
98
+ card: !1,
99
+ scrollbar: !1
79
100
  }, {
80
- default: () => {
81
- var r;
82
- return (r = e == null ? void 0 : e.default) == null ? void 0 : r.call(e, a);
83
- },
84
- actions: () => {
85
- var r;
86
- return i("div", {
87
- class: "flex gap-6 items-center"
88
- }, [(r = e == null ? void 0 : e.actions) == null ? void 0 : r.call(e, a), i("div", {
89
- class: "flex gap-2"
90
- }, [i(c, null, {
91
- default: () => o("components.button.reset"),
92
- icon: () => i("i", {
93
- class: "i-tabler:refresh"
94
- }, null)
95
- }), i(c, {
96
- type: "primary"
97
- }, {
98
- default: () => o("components.button.submit"),
99
- icon: () => i("i", {
100
- class: "i-tabler:send"
101
- }, null)
102
- })])]);
103
- }
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
+ })]
104
143
  });
105
144
  }
106
145
  });
107
146
  export {
108
- U as DuxPageForm
147
+ xt as DuxPageForm
109
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";
@@ -12,7 +12,19 @@ import "lodash-es";
12
12
  import "vue-draggable-plus";
13
13
  import "aieditor";
14
14
  import "vee-validate";
15
+ import "@iconify-json/tabler/icons.json";
15
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";
16
28
  import "dayjs";
17
29
  import "@tanstack/vue-query";
18
30
  import "@duxweb/dvha-naiveui";
@@ -29,7 +41,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
29
41
  import "vue-command-palette";
30
42
  import { DuxPage as v } from "../../pages/page.js";
31
43
  import "../../pages/page404.js";
32
- const Z = /* @__PURE__ */ d({
44
+ const ct = /* @__PURE__ */ f({
33
45
  name: "DuxSettingForm",
34
46
  props: {
35
47
  id: {
@@ -63,26 +75,26 @@ const Z = /* @__PURE__ */ d({
63
75
  default: "medium"
64
76
  }
65
77
  },
66
- setup(e, {
67
- slots: t
78
+ setup(t, {
79
+ slots: e
68
80
  }) {
69
- const i = l(e.defaultTab), c = p(e, "data", {}), {
70
- t: n
71
- } = x(), o = S(), u = y({
72
- id: e.id,
73
- path: e.path,
81
+ const a = d(t.defaultTab), c = l(t, "data", {}), {
82
+ t: o
83
+ } = x(), n = S(), u = y({
84
+ id: t.id,
85
+ path: t.path,
74
86
  form: c,
75
- action: e.action,
76
- onError: (a) => {
87
+ action: t.action,
88
+ onError: (r) => {
77
89
  var m;
78
- o.error(a.message || n("components.form.error")), (m = e.onError) == null || m.call(e, a);
90
+ n.error(r.message || o("components.form.error")), (m = t.onError) == null || m.call(t, r);
79
91
  },
80
- onSuccess: (a) => {
92
+ onSuccess: (r) => {
81
93
  var m;
82
- o.success(n("components.form.success")), (m = e.onSuccess) == null || m.call(e, a);
94
+ n.success(o("components.form.success")), (m = t.onSuccess) == null || m.call(t, r);
83
95
  }
84
- }), f = g(() => {
85
- switch (e.size) {
96
+ }), p = g(() => {
97
+ switch (t.size) {
86
98
  case "small":
87
99
  return "lg:max-w-lg";
88
100
  case "large":
@@ -92,28 +104,28 @@ const Z = /* @__PURE__ */ d({
92
104
  return "lg:max-w-2xl";
93
105
  }
94
106
  });
95
- return () => r(v, null, {
107
+ return () => i(v, null, {
96
108
  default: () => {
97
- var a;
98
- return [r("div", {
99
- class: `flex flex-col gap-6 w-full ${f.value} mx-auto py-4`
100
- }, [e.tabs ? r(b, {
101
- defaultValue: e.defaultTab,
102
- value: i.value,
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, {
113
+ defaultValue: t.defaultTab,
114
+ value: a.value,
103
115
  onUpdateValue: (m) => {
104
- i.value = m;
116
+ a.value = m;
105
117
  },
106
118
  type: "segment"
107
119
  }, {
108
120
  default: () => {
109
121
  var m;
110
- return [(m = t == null ? void 0 : t.default) == null ? void 0 : m.call(t, u)];
122
+ return [(m = e == null ? void 0 : e.default) == null ? void 0 : m.call(e, u)];
111
123
  }
112
- }) : (a = t == null ? void 0 : t.default) == null ? void 0 : a.call(t, u)])];
124
+ }) : (r = e == null ? void 0 : e.default) == null ? void 0 : r.call(e, u)])];
113
125
  }
114
126
  });
115
127
  }
116
128
  });
117
129
  export {
118
- Z as DuxSettingForm
130
+ ct as DuxSettingForm
119
131
  };
@@ -0,0 +1,89 @@
1
+ import { defineComponent as n, createVNode as t } from "vue";
2
+ import { useI18n as l } from "@duxweb/dvha-core";
3
+ import { useVModel as a } from "@vueuse/core";
4
+ import { NButton as u } from "naive-ui";
5
+ import "vue-router";
6
+ import "@overlastic/vue";
7
+ import "clsx";
8
+ import "vue-echarts";
9
+ import "vue-cropper";
10
+ import "jinrishici";
11
+ import "lodash-es";
12
+ import "vue-draggable-plus";
13
+ import "aieditor";
14
+ import "vee-validate";
15
+ import "@vee-validate/i18n";
16
+ import "colorizr";
17
+ import "echarts";
18
+ import "@ant-design/colors";
19
+ import "@unocss/preset-icons/browser";
20
+ import "@unocss/preset-typography";
21
+ import "unocss/preset-wind4";
22
+ import "@vee-validate/i18n/dist/locale/en.json";
23
+ import "@vee-validate/i18n/dist/locale/zh_CN.json";
24
+ import "vue-command-palette";
25
+ import "@duxweb/dvha-naiveui";
26
+ import "../../pages/page404.js";
27
+ import "@iconify-json/tabler/icons.json";
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";
40
+ import { useModal as c } from "../../hooks/modal.js";
41
+ import "dayjs";
42
+ import "@tanstack/vue-query";
43
+ import "pinia";
44
+ const to = /* @__PURE__ */ n({
45
+ name: "DuxIconPicker",
46
+ props: {
47
+ defaultValue: String,
48
+ value: String
49
+ },
50
+ setup(r, {
51
+ emit: m
52
+ }) {
53
+ const o = a(r, "value", m, {
54
+ defaultValue: r.defaultValue,
55
+ passive: !0
56
+ }), p = c(), {
57
+ t: e
58
+ } = l();
59
+ return () => t(u, {
60
+ dashed: !o.value,
61
+ onClick: () => {
62
+ p.show({
63
+ title: e("components.iconPicker.title"),
64
+ component: () => import("./iconPicker.js")
65
+ }).then((i) => {
66
+ o.value = i;
67
+ });
68
+ },
69
+ iconPlacement: "right"
70
+ }, {
71
+ default: () => t("div", {
72
+ class: "flex gap-2 items-center"
73
+ }, [o.value ? t("div", {
74
+ class: `size-4 ${o.value || ""}`
75
+ }, null) : void 0, e("components.iconPicker.title")]),
76
+ icon: () => o.value ? t("div", {
77
+ class: "rounded-full p-1 hover:bg-gray-2 hover:text-gray-7",
78
+ onClick: (i) => {
79
+ i.stopPropagation(), o.value = void 0;
80
+ }
81
+ }, [t("div", {
82
+ class: "size-4 i-tabler:x"
83
+ }, null)]) : void 0
84
+ });
85
+ }
86
+ });
87
+ export {
88
+ to as DuxIconPicker
89
+ };
@@ -0,0 +1,83 @@
1
+ import { defineComponent as h, ref as r, onMounted as C, watch as y, createVNode as a } from "vue";
2
+ import { useI18n as b } from "@duxweb/dvha-core";
3
+ import { icons as f } from "@iconify-json/tabler/icons.json";
4
+ import { useOffsetPagination as k } from "@vueuse/core";
5
+ import { NInput as x, NPagination as z } from "naive-ui";
6
+ const N = /* @__PURE__ */ h({
7
+ name: "DuxIconPicker",
8
+ props: {
9
+ onConfirm: Function,
10
+ onClose: Function
11
+ },
12
+ setup(u) {
13
+ const c = Object.keys(f), i = r(c), l = r(""), s = r([]), v = r(c.length);
14
+ function t({
15
+ currentPage: n,
16
+ currentPageSize: e
17
+ }) {
18
+ s.value = i.value.slice((n - 1) * e, n * e);
19
+ }
20
+ const {
21
+ currentPage: o,
22
+ currentPageSize: d,
23
+ pageCount: m
24
+ } = k({
25
+ total: () => v.value,
26
+ page: 1,
27
+ pageSize: 42,
28
+ onPageChange: t,
29
+ onPageSizeChange: t,
30
+ onPageCountChange: t
31
+ });
32
+ C(() => {
33
+ t({
34
+ currentPage: o.value,
35
+ currentPageSize: 42
36
+ });
37
+ }), y(l, () => {
38
+ i.value = Object.keys(f).filter((n) => n.includes(l.value)), v.value = i.value.length, o.value = 1, t({
39
+ currentPage: o.value,
40
+ currentPageSize: d.value
41
+ });
42
+ }, {
43
+ immediate: !0
44
+ });
45
+ const {
46
+ t: p
47
+ } = b();
48
+ return () => {
49
+ var n;
50
+ return a("div", {
51
+ class: "p-4 flex flex-col gap-4"
52
+ }, [a(x, {
53
+ placeholder: p("common.keyword"),
54
+ value: l.value,
55
+ "onUpdate:value": (e) => l.value = e,
56
+ clearable: !0
57
+ }, null), a("div", {
58
+ class: "grid grid-cols-6"
59
+ }, [(n = s.value) == null ? void 0 : n.map((e, P) => a("div", {
60
+ key: P,
61
+ class: "flex justify-center items-center",
62
+ onClick: () => {
63
+ var g;
64
+ (g = u.onConfirm) == null || g.call(u, `i-tabler:${e}`);
65
+ }
66
+ }, [a("div", {
67
+ class: "py-2 px-3 hover:bg-primary/10 border border-transparent hover:border-primary-hover rounded cursor-pointer transition-all"
68
+ }, [a("div", {
69
+ class: `i-tabler:${e} size-6`
70
+ }, null)])]))]), a("div", {
71
+ class: "flex justify-center"
72
+ }, [a(z, {
73
+ page: o.value,
74
+ pageSize: d.value,
75
+ pageCount: m.value,
76
+ onUpdatePage: (e) => o.value = e
77
+ }, null)])]);
78
+ };
79
+ }
80
+ });
81
+ export {
82
+ N as default
83
+ };
@@ -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
  };