@duxweb/dvha-pro 1.0.23 → 1.0.25

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 (229) 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/card/store.cjs +1 -1
  4. package/dist/cjs/components/carousel/carousel.cjs +1 -1
  5. package/dist/cjs/components/chart/echart.cjs +1 -1
  6. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  7. package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
  8. package/dist/cjs/components/dashboard/hello.cjs +1 -1
  9. package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
  10. package/dist/cjs/components/dashboard/quick.cjs +1 -1
  11. package/dist/cjs/components/data/dynamicData.cjs +1 -1
  12. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  13. package/dist/cjs/components/data/selectModal.cjs +1 -1
  14. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  15. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  16. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  17. package/dist/cjs/components/editor/aiEditor.cjs +1 -1
  18. package/dist/cjs/components/form/drawerForm.cjs +1 -1
  19. package/dist/cjs/components/form/formItem.cjs +1 -1
  20. package/dist/cjs/components/form/formLayout.cjs +1 -1
  21. package/dist/cjs/components/form/modalForm.cjs +1 -1
  22. package/dist/cjs/components/form/pageForm.cjs +1 -1
  23. package/dist/cjs/components/form/settingForm.cjs +1 -1
  24. package/dist/cjs/components/icon/icon.cjs +1 -1
  25. package/dist/cjs/components/icon/iconPicker.cjs +1 -1
  26. package/dist/cjs/components/image/components/CanvasRuler.cjs +1 -0
  27. package/dist/cjs/components/image/elements/circle.cjs +1 -0
  28. package/dist/cjs/components/image/elements/image.cjs +1 -0
  29. package/dist/cjs/components/image/elements/index.cjs +1 -0
  30. package/dist/cjs/components/image/elements/rect.cjs +1 -0
  31. package/dist/cjs/components/image/elements/text.cjs +1 -0
  32. package/dist/cjs/components/image/hooks/usePosterEditor.cjs +1 -0
  33. package/dist/cjs/components/image/pages/LeftToolbar.cjs +1 -0
  34. package/dist/cjs/components/image/pages/Panel.cjs +1 -0
  35. package/dist/cjs/components/image/pages/PanelItem.cjs +1 -0
  36. package/dist/cjs/components/image/pages/RightPanel.cjs +1 -0
  37. package/dist/cjs/components/image/posterEditor.cjs +1 -0
  38. package/dist/cjs/components/layout/filter.cjs +1 -1
  39. package/dist/cjs/components/layout/filterLayout.cjs +1 -1
  40. package/dist/cjs/components/layout/list.cjs +1 -1
  41. package/dist/cjs/components/layout/table.cjs +1 -1
  42. package/dist/cjs/components/layout/tools.cjs +1 -1
  43. package/dist/cjs/components/level/level.cjs +1 -1
  44. package/dist/cjs/components/list/card.cjs +1 -1
  45. package/dist/cjs/components/list/list.cjs +1 -1
  46. package/dist/cjs/components/media/media.cjs +1 -1
  47. package/dist/cjs/components/modal/modal.cjs +1 -1
  48. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  49. package/dist/cjs/components/modal/modalTab.cjs +1 -1
  50. package/dist/cjs/components/panel/alert.cjs +1 -1
  51. package/dist/cjs/components/panel/collapse.cjs +1 -1
  52. package/dist/cjs/components/panel/setting.cjs +1 -1
  53. package/dist/cjs/components/select/cardSelect.cjs +1 -1
  54. package/dist/cjs/components/status/listEmpty.cjs +1 -1
  55. package/dist/cjs/components/table/table.cjs +1 -1
  56. package/dist/cjs/components/table/tablePage.cjs +1 -1
  57. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  58. package/dist/cjs/components/upload/config.cjs +1 -1
  59. package/dist/cjs/components/upload/file.cjs +1 -1
  60. package/dist/cjs/components/upload/image.cjs +1 -1
  61. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  62. package/dist/cjs/components/upload/manager.cjs +1 -1
  63. package/dist/cjs/components/widget/connect.cjs +1 -1
  64. package/dist/cjs/dvha-pro.css +1 -1
  65. package/dist/cjs/hooks/action.cjs +1 -1
  66. package/dist/cjs/hooks/dialog.cjs +1 -1
  67. package/dist/cjs/hooks/download.cjs +1 -1
  68. package/dist/cjs/hooks/drawer.cjs +1 -1
  69. package/dist/cjs/hooks/echart.cjs +1 -1
  70. package/dist/cjs/hooks/image.cjs +1 -1
  71. package/dist/cjs/hooks/level.cjs +1 -1
  72. package/dist/cjs/hooks/modal.cjs +1 -1
  73. package/dist/cjs/hooks/table/color.cjs +1 -0
  74. package/dist/cjs/hooks/table/column.cjs +1 -1
  75. package/dist/cjs/hooks/table/image.cjs +1 -1
  76. package/dist/cjs/hooks/table/input.cjs +1 -1
  77. package/dist/cjs/hooks/table/map.cjs +1 -1
  78. package/dist/cjs/hooks/table/media.cjs +1 -1
  79. package/dist/cjs/hooks/table/status.cjs +1 -1
  80. package/dist/cjs/hooks/table/switch.cjs +1 -1
  81. package/dist/cjs/hooks/table.cjs +1 -1
  82. package/dist/cjs/index.cjs +1 -1
  83. package/dist/cjs/pages/authLayout.cjs +1 -1
  84. package/dist/cjs/pages/layout/global.cjs +1 -1
  85. package/dist/cjs/pages/layout/page.cjs +1 -1
  86. package/dist/cjs/pages/layout/tab.cjs +1 -1
  87. package/dist/cjs/pages/layout.cjs +1 -1
  88. package/dist/cjs/pages/login.cjs +1 -1
  89. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  90. package/dist/cjs/pages/menu/button.cjs +1 -1
  91. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  92. package/dist/cjs/pages/menu/main.cjs +1 -1
  93. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  94. package/dist/cjs/pages/page.cjs +1 -1
  95. package/dist/cjs/pages/page404.cjs +1 -1
  96. package/dist/cjs/pages/pageStatus.cjs +1 -1
  97. package/dist/cjs/stores/ui.cjs +1 -1
  98. package/dist/cjs/theme/uno.css.cjs +26 -1
  99. package/dist/esm/component.js +49 -47
  100. package/dist/esm/components/card/card.js +24 -27
  101. package/dist/esm/components/card/store.js +33 -39
  102. package/dist/esm/components/carousel/carousel.js +16 -19
  103. package/dist/esm/components/chart/echart.js +15 -13
  104. package/dist/esm/components/crop/imageCrop.js +45 -46
  105. package/dist/esm/components/crop/imageCropModal.js +36 -37
  106. package/dist/esm/components/dashboard/hello.js +27 -30
  107. package/dist/esm/components/dashboard/helloBig.js +328 -331
  108. package/dist/esm/components/dashboard/quick.js +30 -33
  109. package/dist/esm/components/data/dynamicData.js +86 -98
  110. package/dist/esm/components/data/dynamicSelect.js +42 -42
  111. package/dist/esm/components/data/selectModal.js +58 -60
  112. package/dist/esm/components/dialog/dialog.js +54 -55
  113. package/dist/esm/components/drawer/drawer.js +23 -23
  114. package/dist/esm/components/drawer/drawerPage.js +39 -49
  115. package/dist/esm/components/editor/aiEditor.js +64 -70
  116. package/dist/esm/components/form/drawerForm.js +61 -59
  117. package/dist/esm/components/form/formItem.js +45 -51
  118. package/dist/esm/components/form/formLayout.js +7 -10
  119. package/dist/esm/components/form/modalForm.js +63 -61
  120. package/dist/esm/components/form/pageForm.js +56 -57
  121. package/dist/esm/components/form/settingForm.js +43 -44
  122. package/dist/esm/components/icon/icon.js +15 -13
  123. package/dist/esm/components/icon/iconPicker.js +54 -58
  124. package/dist/esm/components/image/components/CanvasRuler.js +113 -0
  125. package/dist/esm/components/image/elements/circle.js +127 -0
  126. package/dist/esm/components/image/elements/image.js +131 -0
  127. package/dist/esm/components/image/elements/index.js +46 -0
  128. package/dist/esm/components/image/elements/rect.js +171 -0
  129. package/dist/esm/components/image/elements/text.js +206 -0
  130. package/dist/esm/components/image/hooks/usePosterEditor.js +434 -0
  131. package/dist/esm/components/image/pages/LeftToolbar.js +40 -0
  132. package/dist/esm/components/image/pages/Panel.js +31 -0
  133. package/dist/esm/components/image/pages/PanelItem.js +22 -0
  134. package/dist/esm/components/image/pages/RightPanel.js +421 -0
  135. package/dist/esm/components/image/posterEditor.js +227 -0
  136. package/dist/esm/components/layout/filter.js +13 -16
  137. package/dist/esm/components/layout/filterLayout.js +7 -10
  138. package/dist/esm/components/layout/list.js +312 -337
  139. package/dist/esm/components/layout/table.js +281 -294
  140. package/dist/esm/components/layout/tools.js +38 -41
  141. package/dist/esm/components/level/level.js +15 -13
  142. package/dist/esm/components/list/card.js +35 -38
  143. package/dist/esm/components/list/list.js +15 -18
  144. package/dist/esm/components/media/media.js +35 -36
  145. package/dist/esm/components/modal/modal.js +10 -10
  146. package/dist/esm/components/modal/modalPage.js +32 -36
  147. package/dist/esm/components/modal/modalTab.js +39 -45
  148. package/dist/esm/components/panel/alert.js +19 -22
  149. package/dist/esm/components/panel/collapse.js +33 -36
  150. package/dist/esm/components/panel/setting.js +25 -31
  151. package/dist/esm/components/select/cardSelect.js +27 -28
  152. package/dist/esm/components/status/listEmpty.js +13 -13
  153. package/dist/esm/components/table/table.js +15 -13
  154. package/dist/esm/components/table/tablePage.js +25 -25
  155. package/dist/esm/components/tree/treeFilter.js +137 -147
  156. package/dist/esm/components/upload/config.js +15 -27
  157. package/dist/esm/components/upload/file.js +115 -109
  158. package/dist/esm/components/upload/image.js +135 -130
  159. package/dist/esm/components/upload/manage/item.js +59 -60
  160. package/dist/esm/components/upload/manager.js +203 -218
  161. package/dist/esm/components/widget/connect.js +103 -106
  162. package/dist/esm/dvha-pro.css +1 -1
  163. package/dist/esm/hooks/action.js +115 -131
  164. package/dist/esm/hooks/dialog.js +15 -13
  165. package/dist/esm/hooks/download.js +55 -56
  166. package/dist/esm/hooks/drawer.js +15 -13
  167. package/dist/esm/hooks/echart.js +156 -179
  168. package/dist/esm/hooks/image.js +14 -15
  169. package/dist/esm/hooks/level.js +7 -7
  170. package/dist/esm/hooks/modal.js +15 -13
  171. package/dist/esm/hooks/table/color.js +19 -0
  172. package/dist/esm/hooks/table/column.js +25 -23
  173. package/dist/esm/hooks/table/image.js +17 -15
  174. package/dist/esm/hooks/table/input.js +28 -28
  175. package/dist/esm/hooks/table/map.js +7 -7
  176. package/dist/esm/hooks/table/media.js +15 -13
  177. package/dist/esm/hooks/table/status.js +8 -9
  178. package/dist/esm/hooks/table/switch.js +19 -19
  179. package/dist/esm/hooks/table.js +27 -31
  180. package/dist/esm/index.js +213 -200
  181. package/dist/esm/pages/authLayout.js +15 -13
  182. package/dist/esm/pages/layout/global.js +12 -15
  183. package/dist/esm/pages/layout/page.js +15 -13
  184. package/dist/esm/pages/layout/tab.js +58 -71
  185. package/dist/esm/pages/layout.js +7 -6
  186. package/dist/esm/pages/login.js +95 -98
  187. package/dist/esm/pages/menu/avatar.js +151 -162
  188. package/dist/esm/pages/menu/button.js +29 -31
  189. package/dist/esm/pages/menu/cmd.js +83 -87
  190. package/dist/esm/pages/menu/main.js +25 -23
  191. package/dist/esm/pages/menu/mobile.js +15 -13
  192. package/dist/esm/pages/page.js +21 -25
  193. package/dist/esm/pages/page404.js +13 -11
  194. package/dist/esm/pages/pageStatus.js +33 -34
  195. package/dist/esm/stores/ui.js +15 -15
  196. package/dist/esm/theme/uno.css.js +26 -1
  197. package/dist/types/components/form/drawerForm.d.ts +6 -0
  198. package/dist/types/components/form/modalForm.d.ts +6 -0
  199. package/dist/types/components/form/pageForm.d.ts +6 -0
  200. package/dist/types/components/form/settingForm.d.ts +6 -0
  201. package/dist/types/components/image/components/CanvasRuler.d.ts +43 -0
  202. package/dist/types/components/image/components/index.d.ts +1 -0
  203. package/dist/types/components/image/elements/circle.d.ts +3 -0
  204. package/dist/types/components/image/elements/image.d.ts +3 -0
  205. package/dist/types/components/image/elements/index.d.ts +15 -0
  206. package/dist/types/components/image/elements/rect.d.ts +3 -0
  207. package/dist/types/components/image/elements/text.d.ts +3 -0
  208. package/dist/types/components/image/elements/types.d.ts +51 -0
  209. package/dist/types/components/image/hooks/index.d.ts +1 -0
  210. package/dist/types/components/image/hooks/usePosterEditor.d.ts +48 -0
  211. package/dist/types/components/image/index.d.ts +4 -0
  212. package/dist/types/components/image/pages/LeftToolbar.d.ts +33 -0
  213. package/dist/types/components/image/pages/Panel.d.ts +11 -0
  214. package/dist/types/components/image/pages/PanelItem.d.ts +11 -0
  215. package/dist/types/components/image/pages/RightPanel.d.ts +208 -0
  216. package/dist/types/components/image/pages/index.d.ts +4 -0
  217. package/dist/types/components/image/posterEditor.d.ts +61 -0
  218. package/dist/types/components/image/types/editor.d.ts +47 -0
  219. package/dist/types/components/index.d.ts +2 -2
  220. package/dist/types/components/layout/table.d.ts +9 -0
  221. package/dist/types/components/stats/number.d.ts +1 -1
  222. package/dist/types/components/table/tablePage.d.ts +9 -0
  223. package/dist/types/components/upload/file.d.ts +5 -3
  224. package/dist/types/hooks/table/color.d.ts +13 -0
  225. package/dist/types/hooks/table/column.d.ts +1 -0
  226. package/dist/types/hooks/table/index.d.ts +1 -0
  227. package/dist/types/index.d.ts +1 -0
  228. package/dist/types/pages/layout/global.d.ts +0 -1
  229. package/package.json +6 -3
@@ -1,7 +1,7 @@
1
- import { defineComponent as u, createVNode as r } from "vue";
1
+ import { defineComponent as l, createVNode as t } from "vue";
2
2
  import o from "clsx";
3
- import { ceil as s } from "lodash-es";
4
- const f = /* @__PURE__ */ u({
3
+ import { ceil as a } from "lodash-es";
4
+ const u = /* @__PURE__ */ l({
5
5
  name: "DuxDashboardQuickItem",
6
6
  props: {
7
7
  icon: String,
@@ -9,21 +9,21 @@ const f = /* @__PURE__ */ u({
9
9
  color: String,
10
10
  onClick: Function
11
11
  },
12
- setup(c) {
13
- return () => r("div", {
12
+ setup(e) {
13
+ return () => t("div", {
14
14
  class: "flex flex-col justify-center items-center "
15
- }, [r("div", {
15
+ }, [t("div", {
16
16
  class: "flex flex-col gap-1 justify-center items-center p-2 pb-1 hover:bg-elevated cursor-pointer",
17
- onClick: c == null ? void 0 : c.onClick
18
- }, [r("div", {
19
- class: o(["p-1 rounded flex justify-center items-center text-white", `bg-${c.color || "primary"}`])
20
- }, [r("div", {
21
- class: o(["size-7", c.icon])
22
- }, null)]), r("div", {
17
+ onClick: e?.onClick
18
+ }, [t("div", {
19
+ class: o(["p-1 rounded flex justify-center items-center text-white", `bg-${e.color || "primary"}`])
20
+ }, [t("div", {
21
+ class: o(["size-7", e.icon])
22
+ }, null)]), t("div", {
23
23
  class: "text-muted"
24
- }, [c.title])])]);
24
+ }, [e.title])])]);
25
25
  }
26
- }), b = /* @__PURE__ */ u({
26
+ }), x = /* @__PURE__ */ l({
27
27
  name: "DuxDashboardQuick",
28
28
  props: {
29
29
  data: Array,
@@ -32,28 +32,25 @@ const f = /* @__PURE__ */ u({
32
32
  default: 6
33
33
  }
34
34
  },
35
- setup(c, {
35
+ setup(e, {
36
36
  slots: n
37
37
  }) {
38
- const l = ["primary", "info", "success", "warning", "error"];
39
- return () => {
40
- var t, i;
41
- return r("div", {
42
- class: o(["grid gap-2", `grid-cols-${s(c.col / 2)}`, `xl:grid-cols-${c.col}`])
43
- }, [(t = c.data) == null ? void 0 : t.map((e, a) => {
44
- const d = l[a % l.length];
45
- return r(f, {
46
- icon: e == null ? void 0 : e.icon,
47
- title: e == null ? void 0 : e.title,
48
- color: d,
49
- onClick: e == null ? void 0 : e.onClick,
50
- key: a
51
- }, null);
52
- }), (i = n.default) == null ? void 0 : i.call(n)]);
53
- };
38
+ const r = ["primary", "info", "success", "warning", "error"];
39
+ return () => t("div", {
40
+ class: o(["grid gap-2", `grid-cols-${a(e.col / 2)}`, `xl:grid-cols-${e.col}`])
41
+ }, [e.data?.map((c, i) => {
42
+ const s = r[i % r.length];
43
+ return t(u, {
44
+ icon: c?.icon,
45
+ title: c?.title,
46
+ color: s,
47
+ onClick: c?.onClick,
48
+ key: i
49
+ }, null);
50
+ }), n.default?.()]);
54
51
  }
55
52
  });
56
53
  export {
57
- b as DuxDashboardQuick,
58
- f as DuxDashboardQuickItem
54
+ x as DuxDashboardQuick,
55
+ u as DuxDashboardQuickItem
59
56
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as h, computed as A, createVNode as e, mergeProps as b, h as k } from "vue";
2
- import { useJsonSchema as g } from "@duxweb/dvha-core";
3
- import { useVModel as w } from "@vueuse/core";
4
- import { NTable as C, NButton as d } from "naive-ui";
5
- import { VueDraggable as D } from "vue-draggable-plus";
6
- import { DuxBlockEmpty as V } from "../status/blockEmpty.js";
7
- const E = /* @__PURE__ */ h({
1
+ import { defineComponent as m, computed as y, createVNode as e, mergeProps as v, h as f } from "vue";
2
+ import { useJsonSchema as h } from "@duxweb/dvha-core";
3
+ import { useVModel as A } from "@vueuse/core";
4
+ import { NTable as b, NButton as c } from "naive-ui";
5
+ import { VueDraggable as k } from "vue-draggable-plus";
6
+ import { DuxBlockEmpty as g } from "../status/blockEmpty.js";
7
+ const B = /* @__PURE__ */ m({
8
8
  name: "DuxDynamicData",
9
9
  props: {
10
10
  createAction: {
@@ -28,31 +28,29 @@ const E = /* @__PURE__ */ h({
28
28
  }
29
29
  },
30
30
  setup(t, {
31
- emit: s
31
+ emit: o
32
32
  }) {
33
- const l = w(t, "value", s, {
33
+ const a = A(t, "value", o, {
34
34
  passive: !0,
35
35
  defaultValue: t.defaultValue || [],
36
36
  deep: !0
37
37
  }), {
38
- renderAsync: m
39
- } = g(), y = (n) => {
40
- var u;
41
- const r = (u = l.value) == null ? void 0 : u[0][n], a = [...l.value || []].map((i) => ({
42
- ...i,
43
- [n]: r
38
+ renderAsync: i
39
+ } = h(), d = (l) => {
40
+ const u = a.value?.[0][l], n = [...a.value || []].map((r) => ({
41
+ ...r,
42
+ [l]: u
44
43
  }));
45
- l.value = [...a];
46
- }, v = A(() => {
47
- var r;
48
- let n = ((r = t.columns) == null ? void 0 : r.length) || 0;
49
- return (t.createAction || t.deleteAction) && (n += 1), n;
44
+ a.value = [...n];
45
+ }, s = y(() => {
46
+ let l = t.columns?.length || 0;
47
+ return (t.createAction || t.deleteAction) && (l += 1), l;
50
48
  });
51
- return () => e(D, b({
52
- modelValue: l.value
49
+ return () => e(k, v({
50
+ modelValue: a.value
53
51
  }, {
54
- "onUpdate:modelValue": (n) => {
55
- l.value = n;
52
+ "onUpdate:modelValue": (l) => {
53
+ a.value = l;
56
54
  }
57
55
  }, {
58
56
  handle: ".sort-handle",
@@ -61,85 +59,75 @@ const E = /* @__PURE__ */ h({
61
59
  }), {
62
60
  default: () => [e("div", {
63
61
  class: "overflow-auto w-full"
64
- }, [e(C, {
62
+ }, [e(b, {
65
63
  class: "table-fixed w-full"
66
64
  }, {
67
- default: () => {
68
- var n, r;
69
- return [e("thead", null, [e("tr", null, [e("th", {
70
- style: {
71
- width: "40px"
72
- }
73
- }, null), (n = t.columns) == null ? void 0 : n.map((a, u) => e("th", {
74
- key: u,
75
- style: {
76
- width: `${a.width}px`
77
- }
78
- }, [e("div", {
79
- class: "flex items-center justify-between"
80
- }, [e("div", null, [a.title]), a.copy && e("div", null, [e(d, {
81
- onClick: () => {
82
- y(a.key);
83
- },
84
- renderIcon: () => e("div", {
85
- class: "i-tabler:pencil-down t-icon"
86
- }, null),
87
- text: !0,
88
- type: "primary"
89
- }, null)])])])), (t.createAction || t.deleteAction) && e("th", {
90
- class: "w-15"
91
- }, [t.createAction && e(d, {
92
- tertiary: !0,
93
- type: "primary",
94
- circle: !0,
95
- renderIcon: () => e("div", {
96
- class: "i-tabler:plus h-4 w-4"
97
- }, null),
98
- onClick: () => {
99
- var a, u;
100
- t != null && t.onCreate ? t.onCreate() : (l.value || (l.value = []), (u = l.value) == null || u.push(((a = t == null ? void 0 : t.createCallback) == null ? void 0 : a.call(t, l.value)) || {}));
101
- }
102
- }, null)])])]), e("tbody", {
103
- class: "sort-target"
104
- }, [l.value && ((r = l.value) == null ? void 0 : r.length) > 0 ? l.value.map((a, u) => {
105
- var i;
106
- return e("tr", {
107
- key: u
108
- }, [e("td", null, [e("div", {
109
- class: "sort-handle i-tabler:grid-dots size-4 cursor-move"
110
- }, null)]), (i = t.columns) == null ? void 0 : i.map((c, f) => {
111
- var o;
112
- return e("td", {
113
- key: f
114
- }, [c.schema ? k(m({
115
- data: Array.isArray(c.schema) ? c.schema : [c.schema],
116
- context: {
117
- rowIndex: u,
118
- model: l.value,
119
- row: a
120
- }
121
- })) : ((o = c.render) == null ? void 0 : o.call(c, a, u)) || a[c.key]]);
122
- }), (t.createAction || t.deleteAction) && e("td", {
123
- class: "w-15"
124
- }, [t.deleteAction && e(d, {
125
- tertiary: !0,
126
- type: "error",
127
- circle: !0,
128
- renderIcon: () => e("div", {
129
- class: "i-tabler:trash h-4 w-4"
130
- }, null),
131
- onClick: () => {
132
- l.value.splice(u, 1);
133
- }
134
- }, null)])]);
135
- }) : e("tr", null, [e("td", {
136
- colspan: v.value
137
- }, [e(V, null, null)])])])];
138
- }
65
+ default: () => [e("thead", null, [e("tr", null, [e("th", {
66
+ style: {
67
+ width: "40px"
68
+ }
69
+ }, null), t.columns?.map((l, u) => e("th", {
70
+ key: u,
71
+ style: {
72
+ width: `${l.width}px`
73
+ }
74
+ }, [e("div", {
75
+ class: "flex items-center justify-between"
76
+ }, [e("div", null, [l.title]), l.copy && e("div", null, [e(c, {
77
+ onClick: () => {
78
+ d(l.key);
79
+ },
80
+ renderIcon: () => e("div", {
81
+ class: "i-tabler:pencil-down t-icon"
82
+ }, null),
83
+ text: !0,
84
+ type: "primary"
85
+ }, null)])])])), (t.createAction || t.deleteAction) && e("th", {
86
+ class: "w-15"
87
+ }, [t.createAction && e(c, {
88
+ tertiary: !0,
89
+ type: "primary",
90
+ circle: !0,
91
+ renderIcon: () => e("div", {
92
+ class: "i-tabler:plus h-4 w-4"
93
+ }, null),
94
+ onClick: () => {
95
+ t?.onCreate ? t.onCreate() : (a.value || (a.value = []), a.value?.push(t?.createCallback?.(a.value) || {}));
96
+ }
97
+ }, null)])])]), e("tbody", {
98
+ class: "sort-target"
99
+ }, [a.value && a.value?.length > 0 ? a.value.map((l, u) => e("tr", {
100
+ key: u
101
+ }, [e("td", null, [e("div", {
102
+ class: "sort-handle i-tabler:grid-dots size-4 cursor-move"
103
+ }, null)]), t.columns?.map((n, r) => e("td", {
104
+ key: r
105
+ }, [n.schema ? f(i({
106
+ data: Array.isArray(n.schema) ? n.schema : [n.schema],
107
+ context: {
108
+ rowIndex: u,
109
+ model: a.value,
110
+ row: l
111
+ }
112
+ })) : n.render?.(l, u) || l[n.key]])), (t.createAction || t.deleteAction) && e("td", {
113
+ class: "w-15"
114
+ }, [t.deleteAction && e(c, {
115
+ tertiary: !0,
116
+ type: "error",
117
+ circle: !0,
118
+ renderIcon: () => e("div", {
119
+ class: "i-tabler:trash h-4 w-4"
120
+ }, null),
121
+ onClick: () => {
122
+ a.value.splice(u, 1);
123
+ }
124
+ }, null)])])) : e("tr", null, [e("td", {
125
+ colspan: s.value
126
+ }, [e(g, null, null)])])])]
139
127
  })])]
140
128
  });
141
129
  }
142
130
  });
143
131
  export {
144
- E as DuxDynamicData
132
+ B as DuxDynamicData
145
133
  };
@@ -1,15 +1,26 @@
1
- import { defineComponent as y, ref as h, watch as d, createVNode as s } from "vue";
2
- import { useClient as D, useI18n as S } from "@duxweb/dvha-core";
3
- import { useVModel as K } from "@vueuse/core";
1
+ import { defineComponent as f, ref as s, watch as v, createVNode as y } from "vue";
2
+ import { useClient as d, useI18n as h } from "@duxweb/dvha-core";
3
+ import { useVModel as D } from "@vueuse/core";
4
4
  import "naive-ui";
5
5
  import "vue-router";
6
6
  import "@overlastic/vue";
7
7
  import "clsx";
8
8
  import "vue-echarts";
9
+ import "vue3-ace-editor";
10
+ import "ace-builds/src-noconflict/mode-vue";
11
+ import "ace-builds/src-noconflict/mode-javascript";
12
+ import "ace-builds/src-noconflict/mode-html";
13
+ import "ace-builds/src-noconflict/mode-json";
14
+ import "ace-builds/src-noconflict/mode-json5";
15
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
16
+ import "ace-builds/src-noconflict/theme-tomorrow";
17
+ import "ace-builds/src-noconflict/ext-searchbox";
18
+ import "ace-builds/src-noconflict/ext-language_tools";
19
+ import "ace-builds/src-noconflict/mode-snippets";
9
20
  import "vue-cropper";
10
21
  import "jinrishici";
11
22
  import "lodash-es";
12
- import { DuxDynamicData as A } from "./dynamicData.js";
23
+ import { DuxDynamicData as S } from "./dynamicData.js";
13
24
  import "aieditor";
14
25
  import "vee-validate";
15
26
  import "@vee-validate/i18n";
@@ -25,24 +36,15 @@ import "vue-command-palette";
25
36
  import "@duxweb/dvha-naiveui";
26
37
  import "../../pages/page404.js";
27
38
  import "@iconify-json/tabler/icons.json";
39
+ import "../image/elements/index.js";
40
+ import "fabric";
28
41
  import "mime";
29
42
  import "vue-draggable-plus";
30
- import "vue3-ace-editor";
31
- import "ace-builds/src-noconflict/mode-vue";
32
- import "ace-builds/src-noconflict/mode-javascript";
33
- import "ace-builds/src-noconflict/mode-html";
34
- import "ace-builds/src-noconflict/mode-json";
35
- import "ace-builds/src-noconflict/mode-json5";
36
- import "ace-builds/src-noconflict/theme-tomorrow_night";
37
- import "ace-builds/src-noconflict/theme-tomorrow";
38
- import "ace-builds/src-noconflict/ext-searchbox";
39
- import "ace-builds/src-noconflict/ext-language_tools";
40
- import "ace-builds/src-noconflict/mode-snippets";
41
- import { useModal as C } from "../../hooks/modal.js";
43
+ import { useModal as w } from "../../hooks/modal.js";
42
44
  import "dayjs";
43
45
  import "@tanstack/vue-query";
44
46
  import "pinia";
45
- const vt = /* @__PURE__ */ y({
47
+ const st = /* @__PURE__ */ f({
46
48
  name: "DuxDynamicSelect",
47
49
  props: {
48
50
  rowKey: {
@@ -65,40 +67,38 @@ const vt = /* @__PURE__ */ y({
65
67
  }
66
68
  },
67
69
  setup(t, {
68
- emit: p
70
+ emit: l
69
71
  }) {
70
- const e = K(t, "value", p, {
72
+ const e = D(t, "value", l, {
71
73
  passive: !0,
72
74
  defaultValue: t.defaultValue,
73
75
  deep: !0
74
- }), n = C(), c = D(), {
75
- t: f
76
- } = S(), i = h(!0);
77
- return d([e, i], () => {
78
- var r;
76
+ }), u = w(), p = d(), {
77
+ t: n
78
+ } = h(), i = s(!0);
79
+ return v([e, i], () => {
79
80
  if (!i.value || !e.value || e.value.length === 0)
80
81
  return;
81
- const o = ((r = e.value) == null ? void 0 : r.map((m) => m[t.rowKey])) || [];
82
- c.request({
82
+ const r = e.value?.map((o) => o[t.rowKey]) || [];
83
+ p.request({
83
84
  path: t.path,
84
85
  query: {
85
- ids: (o == null ? void 0 : o.join(",")) || ""
86
+ ids: r?.join(",") || ""
86
87
  }
87
- }).then((m) => {
88
- var l;
89
- i.value = !1, (l = m == null ? void 0 : m.data) == null || l.forEach((a, u) => {
90
- e.value.some((v) => v[t.rowKey] === a[t.rowKey]) ? e.value[u] = {
91
- ...e.value[u],
92
- ...a
93
- } : e.value.push(a);
88
+ }).then((o) => {
89
+ i.value = !1, o?.data?.forEach((m, a) => {
90
+ e.value.some((c) => c[t.rowKey] === m[t.rowKey]) ? e.value[a] = {
91
+ ...e.value[a],
92
+ ...m
93
+ } : e.value.push(m);
94
94
  });
95
95
  });
96
- }), () => s(A, {
96
+ }), () => y(S, {
97
97
  value: e.value,
98
- "onUpdate:value": (o) => e.value = o,
98
+ "onUpdate:value": (r) => e.value = r,
99
99
  columns: t.columns,
100
100
  onCreate: () => {
101
- n.show({
101
+ u.show({
102
102
  component: () => import("./selectModal.js"),
103
103
  componentProps: {
104
104
  path: t.path,
@@ -106,10 +106,10 @@ const vt = /* @__PURE__ */ y({
106
106
  filterSchema: t.filterSchema
107
107
  },
108
108
  width: 1e3,
109
- title: f("buttons.select")
110
- }).then((o) => {
111
- i.value = !1, o == null || o.forEach((r) => {
112
- e.value.some((m) => m[t.rowKey] === r[t.rowKey]) || e.value.push(r);
109
+ title: n("buttons.select")
110
+ }).then((r) => {
111
+ i.value = !1, r?.forEach((o) => {
112
+ e.value.some((m) => m[t.rowKey] === o[t.rowKey]) || e.value.push(o);
113
113
  });
114
114
  });
115
115
  }
@@ -117,5 +117,5 @@ const vt = /* @__PURE__ */ y({
117
117
  }
118
118
  });
119
119
  export {
120
- vt as DuxDynamicSelect
120
+ st as DuxDynamicSelect
121
121
  };
@@ -1,13 +1,24 @@
1
- import { defineComponent as h, computed as C, ref as m, watch as b, createVNode as i, Fragment as x, h as w, mergeProps as z, isVNode as P } from "vue";
2
- import { useI18n as j, useJsonSchema as k } from "@duxweb/dvha-core";
3
- import { NButton as p, NDataTable as K } from "naive-ui";
1
+ import { defineComponent as y, computed as h, ref as m, watch as C, createVNode as o, Fragment as b, h as x, mergeProps as w, isVNode as z } from "vue";
2
+ import { useI18n as P, useJsonSchema as j } from "@duxweb/dvha-core";
3
+ import { NButton as l, NDataTable as k } from "naive-ui";
4
4
  import "vue-router";
5
5
  import "@overlastic/vue";
6
6
  import "clsx";
7
7
  import "vue-echarts";
8
8
  import "@vueuse/core";
9
+ import "vue3-ace-editor";
10
+ import "ace-builds/src-noconflict/mode-vue";
11
+ import "ace-builds/src-noconflict/mode-javascript";
12
+ import "ace-builds/src-noconflict/mode-html";
13
+ import "ace-builds/src-noconflict/mode-json";
14
+ import "ace-builds/src-noconflict/mode-json5";
15
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
16
+ import "ace-builds/src-noconflict/theme-tomorrow";
17
+ import "ace-builds/src-noconflict/ext-searchbox";
18
+ import "ace-builds/src-noconflict/ext-language_tools";
19
+ import "ace-builds/src-noconflict/mode-snippets";
9
20
  import "vue-cropper";
10
- import N from "../modal/modalPage.js";
21
+ import K from "../modal/modalPage.js";
11
22
  import "jinrishici";
12
23
  import "lodash-es";
13
24
  import "vue-draggable-plus";
@@ -26,26 +37,17 @@ import "vue-command-palette";
26
37
  import "@duxweb/dvha-naiveui";
27
38
  import "../../pages/page404.js";
28
39
  import "@iconify-json/tabler/icons.json";
40
+ import "../image/elements/index.js";
41
+ import "fabric";
29
42
  import "mime";
30
- import "vue3-ace-editor";
31
- import "ace-builds/src-noconflict/mode-vue";
32
- import "ace-builds/src-noconflict/mode-javascript";
33
- import "ace-builds/src-noconflict/mode-html";
34
- import "ace-builds/src-noconflict/mode-json";
35
- import "ace-builds/src-noconflict/mode-json5";
36
- import "ace-builds/src-noconflict/theme-tomorrow_night";
37
- import "ace-builds/src-noconflict/theme-tomorrow";
38
- import "ace-builds/src-noconflict/ext-searchbox";
39
- import "ace-builds/src-noconflict/ext-language_tools";
40
- import "ace-builds/src-noconflict/mode-snippets";
41
43
  import "dayjs";
42
44
  import "@tanstack/vue-query";
43
- import { useTable as D } from "../../hooks/table.js";
45
+ import { useTable as N } from "../../hooks/table.js";
44
46
  import "pinia";
45
- function u(t) {
46
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !P(t);
47
+ function c(t) {
48
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !z(t);
47
49
  }
48
- const bt = /* @__PURE__ */ h({
50
+ const xt = /* @__PURE__ */ y({
49
51
  name: "Select",
50
52
  props: {
51
53
  path: String,
@@ -62,80 +64,76 @@ const bt = /* @__PURE__ */ h({
62
64
  },
63
65
  setup(t) {
64
66
  const {
65
- t: n
66
- } = j(), f = C(() => [{
67
+ t: a
68
+ } = P(), u = h(() => [{
67
69
  type: "selection",
68
70
  fixed: "left"
69
- }, ...t.columns || []]), l = m({}), a = m({
71
+ }, ...t.columns || []]), n = m({}), i = m({
70
72
  page: 1,
71
73
  pageSize: 10
72
74
  }), {
73
- table: d,
74
- list: g,
75
- pageCount: s,
76
- pageSizes: S,
77
- checkeds: v
78
- } = D({
75
+ table: s,
76
+ list: f,
77
+ pageCount: d,
78
+ pageSizes: g,
79
+ checkeds: S
80
+ } = N({
79
81
  path: t.path || "",
80
- columns: f.value || [],
81
- filters: l,
82
- pagination: a.value
83
- }), c = m([]);
84
- b(v, (e) => {
85
- var r;
86
- c.value = (r = g.value) == null ? void 0 : r.filter((o) => e.includes(o[t.rowKey]));
82
+ columns: u.value || [],
83
+ filters: n,
84
+ pagination: i.value
85
+ }), p = m([]);
86
+ C(S, (e) => {
87
+ p.value = f.value?.filter((r) => e.includes(r[t.rowKey]));
87
88
  });
88
- const y = k({
89
+ const v = j({
89
90
  data: t.filterSchema || [],
90
91
  context: {
91
- filter: l
92
+ filter: n
92
93
  }
93
94
  });
94
- return () => i(N, {
95
- title: n("components.data.selectTitle"),
95
+ return () => o(K, {
96
+ title: a("components.data.selectTitle"),
96
97
  onClose: () => {
97
- var e;
98
- (e = t.onClose) == null || e.call(t);
98
+ t.onClose?.();
99
99
  }
100
100
  }, {
101
- default: () => i("div", {
101
+ default: () => o("div", {
102
102
  class: "flex flex-col gap-4"
103
- }, [t.filterSchema && i("div", {
103
+ }, [t.filterSchema && o("div", {
104
104
  class: "grid grid-cols-1 md:grid-cols-4 gap-2"
105
- }, [w(y.render)]), i(K, z({
105
+ }, [x(v.render)]), o(k, w({
106
106
  bordered: !1,
107
107
  maxHeight: 400,
108
108
  rowKey: (e) => e[t.rowKey]
109
- }, d.value, {
109
+ }, s.value, {
110
110
  pagination: {
111
- page: a.value.page,
112
- pageSize: a.value.pageSize,
113
- pageCount: s.value,
114
- pageSizes: S,
111
+ page: i.value.page,
112
+ pageSize: i.value.pageSize,
113
+ pageCount: d.value,
114
+ pageSizes: g,
115
115
  onUpdatePage: (e) => {
116
- a.value.page = e;
116
+ i.value.page = e;
117
117
  },
118
118
  onUpdatePageSize: (e) => {
119
- a.value.pageSize = e;
119
+ i.value.pageSize = e;
120
120
  }
121
121
  }
122
122
  }), null)]),
123
123
  footer: () => {
124
124
  let e, r;
125
- return i(x, null, [i(p, {
125
+ return o(b, null, [o(l, {
126
126
  onClick: () => {
127
- var o;
128
- (o = t.onClose) == null || o.call(t);
127
+ t.onClose?.();
129
128
  }
130
- }, u(e = n("components.button.cancel")) ? e : {
129
+ }, c(e = a("components.button.cancel")) ? e : {
131
130
  default: () => [e]
132
- }), i(p, {
131
+ }), o(l, {
133
132
  type: "primary",
134
133
  onClick: () => {
135
- var o;
136
- (o = t.onConfirm) == null || o.call(t, c.value);
134
+ t.onConfirm?.(p.value);
137
135
  }
138
- }, u(r = n("components.button.select")) ? r : {
136
+ }, c(r = a("components.button.select")) ? r : {
139
137
  default: () => [r]
140
138
  })]);
141
139
  }
@@ -143,5 +141,5 @@ const bt = /* @__PURE__ */ h({
143
141
  }
144
142
  });
145
143
  export {
146
- bt as default
144
+ xt as default
147
145
  };