@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 c, computed as s, createVNode as e, Transition as p, Fragment as m } from "vue";
2
- import { useI18n as y } from "@duxweb/dvha-core";
3
- import { NButton as u, NDropdown as g } from "naive-ui";
4
- const x = /* @__PURE__ */ c({
1
+ import { defineComponent as d, computed as o, createVNode as e, Transition as c, Fragment as p } from "vue";
2
+ import { useI18n as m } from "@duxweb/dvha-core";
3
+ import { NButton as r, NDropdown as y } from "naive-ui";
4
+ const v = /* @__PURE__ */ d({
5
5
  name: "DuxTableTools",
6
6
  props: {
7
7
  number: {
@@ -19,11 +19,11 @@ const x = /* @__PURE__ */ c({
19
19
  },
20
20
  setup(t) {
21
21
  const {
22
- t: i
23
- } = y(), l = s(() => t.group ? t.group : [t.options]), d = s(() => t.number && t.number > 0);
22
+ t: s
23
+ } = m(), n = o(() => t.group ? t.group : [t.options]), u = o(() => t.number && t.number > 0);
24
24
  return () => e("div", {
25
25
  class: "absolute bottom-0 left-0 right-0 pointer-events-none"
26
- }, [e(p, {
26
+ }, [e(c, {
27
27
  name: "slide-up",
28
28
  appear: !0,
29
29
  enterActiveClass: "transition-all duration-200 ease-out",
@@ -33,46 +33,43 @@ const x = /* @__PURE__ */ c({
33
33
  leaveFromClass: "transform translate-y-0 opacity-100",
34
34
  leaveToClass: "transform translate-y-full opacity-0"
35
35
  }, {
36
- default: () => {
37
- var r;
38
- return [d.value ? e("div", {
39
- class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto backdrop-blur"
40
- }, [(r = l.value) == null ? void 0 : r.map((n, o) => e("div", {
41
- class: "h-10 mt-1 bg-gray-800 rounded px-4 py-1 shadow-lg flex items-center gap-4"
42
- }, [o === l.value.length - 1 && e(m, null, [e("span", {
43
- class: "text-gray-300"
44
- }, [i("components.list.selectedItems", {
45
- num: t.number || 0
46
- })]), e("div", {
47
- class: "w-px h-4 bg-gray-600"
48
- }, null)]), n == null ? void 0 : n.map((a) => e(u, {
36
+ default: () => [u.value ? e("div", {
37
+ class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto backdrop-blur"
38
+ }, [n.value?.map((i, l) => e("div", {
39
+ class: "h-10 mt-1 bg-gray-800 rounded px-4 py-1 shadow-lg flex items-center gap-4"
40
+ }, [l === n.value.length - 1 && e(p, null, [e("span", {
41
+ class: "text-gray-300"
42
+ }, [s("components.list.selectedItems", {
43
+ num: t.number || 0
44
+ })]), e("div", {
45
+ class: "w-px h-4 bg-gray-600"
46
+ }, null)]), i?.map((a) => e(r, {
47
+ text: !0,
48
+ onClick: a.onClick,
49
+ class: "text-gray-300",
50
+ loading: a.loading,
51
+ disabled: a.disabled,
52
+ type: a.type
53
+ }, {
54
+ default: () => a.label,
55
+ icon: () => e("div", {
56
+ class: a.icon
57
+ }, null)
58
+ })), l === n.value.length - 1 && t.dropdown && t.dropdown.length > 0 && e(y, {
59
+ options: t.dropdown
60
+ }, {
61
+ default: () => [e(r, {
49
62
  text: !0,
50
- onClick: a.onClick,
51
- class: "text-gray-300",
52
- loading: a.loading,
53
- disabled: a.disabled,
54
- type: a.type
63
+ class: "text-gray-300"
55
64
  }, {
56
- default: () => a.label,
57
65
  icon: () => e("div", {
58
- class: a.icon
66
+ class: "i-tabler:dots-vertical size-4"
59
67
  }, null)
60
- })), o === l.value.length - 1 && t.dropdown && t.dropdown.length > 0 && e(g, {
61
- options: t.dropdown
62
- }, {
63
- default: () => [e(u, {
64
- text: !0,
65
- class: "text-gray-300"
66
- }, {
67
- icon: () => e("div", {
68
- class: "i-tabler:dots-vertical size-4"
69
- }, null)
70
- })]
71
- })]))]) : null];
72
- }
68
+ })]
69
+ })]))]) : null]
73
70
  })]);
74
71
  }
75
72
  });
76
73
  export {
77
- x as DuxTableTools
74
+ v as DuxTableTools
78
75
  };
@@ -6,6 +6,17 @@ 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";
@@ -25,22 +36,13 @@ 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
- 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
42
  import "dayjs";
41
43
  import { useLevel as c } from "../../hooks/level.js";
42
44
  import "pinia";
43
- const me = /* @__PURE__ */ v({
45
+ const le = /* @__PURE__ */ v({
44
46
  name: "DuxLevel",
45
47
  props: {
46
48
  value: {
@@ -111,5 +113,5 @@ const me = /* @__PURE__ */ v({
111
113
  }
112
114
  });
113
115
  export {
114
- me as DuxLevel
116
+ le as DuxLevel
115
117
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as v, ref as W, computed as l, toRef as S, createVNode as g } from "vue";
1
+ import { defineComponent as v, ref as W, computed as r, toRef as S, createVNode as m } from "vue";
2
2
  import { useElementSize as y, useWindowSize as z, watchDebounced as M } from "@vueuse/core";
3
- import { DuxListLayout as s } from "../layout/list.js";
3
+ import { DuxListLayout as g } from "../layout/list.js";
4
4
  const j = /* @__PURE__ */ v({
5
5
  name: "DuxCardPage",
6
6
  props: {
@@ -25,61 +25,58 @@ const j = /* @__PURE__ */ v({
25
25
  default: ""
26
26
  }
27
27
  },
28
- extends: s,
28
+ extends: g,
29
29
  slots: Object,
30
- setup(e, {
31
- slots: t
30
+ setup(t, {
31
+ slots: a
32
32
  }) {
33
33
  const f = W(), {
34
- width: u
34
+ width: s
35
35
  } = y(f), {
36
36
  width: h
37
- } = z(), p = l(() => e.colWidth || 320), r = (a = 0) => {
38
- const o = a || h.value || 1024, i = e.colWidth || 320, d = e.rows || 4, b = e.maxRows || 10, c = 0.25 * 16 * 3, m = Math.max(1, Math.floor((o + c) / (i + c))), x = Math.floor((1920 + c) / (i + c)) * d, C = Math.ceil(x / m), R = Math.min(Math.max(C, d), b);
39
- return m * R;
40
- }, n = S(e.pagination && typeof e.pagination == "object" ? e.pagination : {
37
+ } = z(), p = r(() => t.colWidth || 320), u = (e = 0) => {
38
+ const i = e || h.value || 1024, c = t.colWidth || 320, n = t.rows || 4, b = t.maxRows || 10, d = 0.25 * 16 * 3, l = Math.max(1, Math.floor((i + d) / (c + d))), x = Math.floor((1920 + d) / (c + d)) * n, C = Math.ceil(x / l), R = Math.min(Math.max(C, n), b);
39
+ return l * R;
40
+ }, o = S(t.pagination && typeof t.pagination == "object" ? t.pagination : {
41
41
  page: 1,
42
- pageSize: r()
42
+ pageSize: u()
43
43
  });
44
- M([u], () => {
45
- if (e.pagination && typeof e.pagination == "object")
44
+ M([s], () => {
45
+ if (t.pagination && typeof t.pagination == "object")
46
46
  return;
47
- const a = r(u.value);
48
- a !== n.value.pageSize && (n.value.pageSize = a, n.value.page = 1);
47
+ const e = u(s.value);
48
+ e !== o.value.pageSize && (o.value.pageSize = e, o.value.page = 1);
49
49
  }, {
50
50
  debounce: 300
51
51
  });
52
- const w = l(() => {
52
+ const w = r(() => {
53
53
  const {
54
- maxRows: a,
55
- rows: o,
56
- colWidth: i,
57
- ...d
58
- } = e;
54
+ maxRows: e,
55
+ rows: i,
56
+ colWidth: c,
57
+ ...n
58
+ } = t;
59
59
  return {
60
- ...d,
61
- pagination: n.value
60
+ ...n,
61
+ pagination: o.value
62
62
  };
63
63
  });
64
- return () => g(s, w.value, {
65
- default: (a) => g("div", {
64
+ return () => m(g, w.value, {
65
+ default: (e) => m("div", {
66
66
  class: "grid gap-3",
67
67
  style: {
68
68
  "grid-template-columns": `repeat(auto-fit, minmax(${p.value}px, 1fr))`
69
69
  }
70
- }, [a.list.value.map((o) => {
71
- var i;
72
- return (i = t == null ? void 0 : t.default) == null ? void 0 : i.call(t, {
73
- item: o,
74
- isChecked: a.isChecked,
75
- toggleChecked: a.toggleChecked
76
- });
77
- })]),
78
- actions: t.actions,
79
- tools: t.tools,
80
- bottom: t.bottom,
81
- sideLeft: t.sideLeft,
82
- sideRight: t.sideRight
70
+ }, [e.list.value.map((i) => a?.default?.({
71
+ item: i,
72
+ isChecked: e.isChecked,
73
+ toggleChecked: e.toggleChecked
74
+ }))]),
75
+ actions: a.actions,
76
+ tools: a.tools,
77
+ bottom: a.bottom,
78
+ sideLeft: a.sideLeft,
79
+ sideRight: a.sideRight
83
80
  });
84
81
  }
85
82
  });
@@ -1,6 +1,6 @@
1
- import { defineComponent as p, computed as r, createVNode as d } from "vue";
2
- import { DuxListLayout as a } from "../layout/list.js";
3
- const u = /* @__PURE__ */ p({
1
+ import { defineComponent as c, computed as n, createVNode as i } from "vue";
2
+ import { DuxListLayout as o } from "../layout/list.js";
3
+ const f = /* @__PURE__ */ c({
4
4
  name: "DuxListPage",
5
5
  props: {
6
6
  sideLeftTitle: {
@@ -12,30 +12,27 @@ const u = /* @__PURE__ */ p({
12
12
  default: ""
13
13
  }
14
14
  },
15
- extends: a,
15
+ extends: o,
16
16
  slots: Object,
17
- setup(o, {
17
+ setup(d, {
18
18
  slots: e
19
19
  }) {
20
- const c = r(() => {
20
+ const s = n(() => {
21
21
  const {
22
22
  ...t
23
- } = o;
23
+ } = d;
24
24
  return {
25
25
  ...t
26
26
  };
27
27
  });
28
- return () => d(a, c.value, {
29
- default: (t) => d("div", {
28
+ return () => i(o, s.value, {
29
+ default: (t) => i("div", {
30
30
  class: "flex flex-col gap-3"
31
- }, [t.list.value.map((n) => {
32
- var i;
33
- return (i = e == null ? void 0 : e.default) == null ? void 0 : i.call(e, {
34
- item: n,
35
- isChecked: t.isChecked,
36
- toggleChecked: t.toggleChecked
37
- });
38
- })]),
31
+ }, [t.list.value.map((a) => e?.default?.({
32
+ item: a,
33
+ isChecked: t.isChecked,
34
+ toggleChecked: t.toggleChecked
35
+ }))]),
39
36
  actions: e.actions,
40
37
  tools: e.tools,
41
38
  bottom: e.bottom,
@@ -45,5 +42,5 @@ const u = /* @__PURE__ */ p({
45
42
  }
46
43
  });
47
44
  export {
48
- u as DuxListPage
45
+ f as DuxListPage
49
46
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as h, computed as y, createVNode as i, Fragment as k, isVNode as A } from "vue";
2
- import b from "clsx";
3
- import { NImageGroup as S } from "naive-ui";
4
- import { DuxAvatar as C } from "../widget/avatar.js";
5
- import { DuxImage as N } from "../widget/image.js";
6
- function j(e) {
7
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !A(e);
1
+ import { defineComponent as u, computed as m, createVNode as t, Fragment as g, isVNode as x } from "vue";
2
+ import f from "clsx";
3
+ import { NImageGroup as o } from "naive-ui";
4
+ import { DuxAvatar as d } from "../widget/avatar.js";
5
+ import { DuxImage as v } from "../widget/image.js";
6
+ function s(e) {
7
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !x(e);
8
8
  }
9
- const I = /* @__PURE__ */ h({
9
+ const S = /* @__PURE__ */ u({
10
10
  name: "DuxMedia",
11
11
  props: {
12
12
  title: String,
@@ -17,63 +17,62 @@ const I = /* @__PURE__ */ h({
17
17
  onClick: Function,
18
18
  imageWidth: {
19
19
  type: Number,
20
- default: 48
20
+ default: 42
21
21
  },
22
22
  imageHeight: {
23
23
  type: Number,
24
- default: 48
24
+ default: 42
25
25
  }
26
26
  },
27
27
  setup(e, {
28
28
  slots: a
29
29
  }) {
30
- const c = y(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), t = y(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
30
+ const l = m(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), c = m(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
31
31
  return () => {
32
- var u, d, g, x, f, v, l;
33
32
  let r;
34
- return i("div", {
33
+ return t("div", {
35
34
  class: "flex gap-2 items-center"
36
- }, [(a == null ? void 0 : a.image) && i("div", {
35
+ }, [a?.image && t("div", {
37
36
  class: "flex-none flex items-center gap-2"
38
- }, [(u = a == null ? void 0 : a.image) == null ? void 0 : u.call(a)]), (c == null ? void 0 : c.value.length) > 0 && i("div", {
37
+ }, [a?.image?.()]), (e.avatar || l?.value.length > 0) && t("div", {
39
38
  class: "flex-none flex items-center gap-2"
40
- }, [e.avatar ? i(k, null, [c.value.map((n, m) => i(C, {
41
- key: m,
42
- src: n,
39
+ }, [e.avatar ? t(g, null, [l.value.length > 0 ? l.value.map((i, n) => t(d, {
40
+ key: n,
41
+ src: i,
43
42
  round: !0,
44
43
  size: e.imageWidth
45
- }, null))]) : i(S, null, j(r = c.value.map((n, m) => i(N, {
46
- key: m,
47
- src: n,
44
+ }, null)) : t(d, {
45
+ round: !0,
46
+ size: e.imageWidth
47
+ }, null)]) : t(o, null, s(r = l.value.map((i, n) => t(v, {
48
+ key: n,
49
+ src: i,
48
50
  class: "rounded",
49
51
  objectFit: "cover",
50
52
  width: e.imageWidth,
51
53
  height: e.imageHeight
52
54
  }, null))) ? r : {
53
55
  default: () => [r]
54
- })]), i("div", {
56
+ })]), t("div", {
55
57
  class: "flex-1 flex-col gap-2 min-w-0 truncate items-center"
56
- }, [i("div", {
58
+ }, [t("div", {
57
59
  class: "flex gap-2 items-center"
58
- }, [(d = a.prefix) == null ? void 0 : d.call(a), (e.title || a.default) && i("div", {
59
- onClick: () => {
60
- var n;
61
- return (n = e.onClick) == null ? void 0 : n.call(e);
62
- },
63
- class: b(["transition-all truncate", (e == null ? void 0 : e.onClick) && "hover:text-primary cursor-pointer"])
64
- }, [e.title || ((g = a.default) == null ? void 0 : g.call(a))])]), ((t == null ? void 0 : t.value.length) > 0 || a.desc) && i("div", {
60
+ }, [a.prefix?.(), (e.title || a.default) && t("div", {
61
+ onClick: () => e.onClick?.(),
62
+ class: f(["transition-all truncate", e?.onClick && "hover:text-primary cursor-pointer"])
63
+ }, [e.title || a.default?.()])]), (c?.value.length > 0 || a.desc) && t("div", {
65
64
  class: "text-sm text-muted flex flex-col gap-0"
66
- }, [(f = t == null ? void 0 : (x = t.value).map) == null ? void 0 : f.call(x, (n, m) => i("div", {
67
- key: m,
65
+ }, [c?.value.map?.((i, n) => t("div", {
66
+ key: n,
68
67
  class: "truncate"
69
- }, [n])), (v = a.desc) == null ? void 0 : v.call(a)])]), (e == null ? void 0 : e.extend) && i("div", {
68
+ }, [i])), a.desc?.()])]), e?.extend && t("div", {
70
69
  class: "flex-none flex items-center gap-2 text-gray-7"
71
- }, [e == null ? void 0 : e.extend]), (a == null ? void 0 : a.extend) && i("div", {
70
+ }, [e?.extend]), a?.extend && t("div", {
72
71
  class: "flex-none flex items-center gap-2 text-gray-7"
73
- }, [(l = a == null ? void 0 : a.extend) == null ? void 0 : l.call(a)])]);
72
+ }, [a?.extend?.()])]);
74
73
  };
75
74
  }
76
75
  });
77
76
  export {
78
- I as DuxMedia
77
+ S as DuxMedia
79
78
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as c, defineAsyncComponent as m, createVNode as t, mergeProps as n, Suspense as s } from "vue";
1
+ import { defineComponent as s, defineAsyncComponent as c, createVNode as t, mergeProps as n, Suspense as m } from "vue";
2
2
  import { useExtendOverlay as f } from "@overlastic/vue";
3
3
  import { NModal as g, NSpin as b } from "naive-ui";
4
- const v = /* @__PURE__ */ c({
4
+ const w = /* @__PURE__ */ s({
5
5
  name: "DuxModal",
6
6
  props: {
7
7
  title: {
@@ -28,17 +28,17 @@ const v = /* @__PURE__ */ c({
28
28
  visible: l,
29
29
  resolve: d,
30
30
  reject: a,
31
- vanish: i
31
+ vanish: r
32
32
  } = f({
33
33
  duration: 1e3
34
- }), o = (e == null ? void 0 : e.componentProps) || {};
34
+ }), o = e?.componentProps || {};
35
35
  o.title = e.title, o.onConfirm = d, o.onClose = a;
36
- const r = typeof e.component == "function" ? m(e.component) : e.component;
36
+ const i = typeof e.component == "function" ? c(e.component) : e.component;
37
37
  return () => t(g, n({
38
38
  displayDirective: "show",
39
39
  show: l.value,
40
40
  onAfterLeave: () => {
41
- i();
41
+ r();
42
42
  },
43
43
  onClose: () => {
44
44
  a();
@@ -60,8 +60,8 @@ const v = /* @__PURE__ */ c({
60
60
  style: {
61
61
  width: typeof e.width == "number" ? `${e.width}px` : e.width
62
62
  }
63
- }, [t(s, null, {
64
- default: () => t(r, n(o, {
63
+ }, [t(m, null, {
64
+ default: () => t(i, n(o, {
65
65
  title: e.title,
66
66
  handle: u
67
67
  }), null),
@@ -77,6 +77,6 @@ const v = /* @__PURE__ */ c({
77
77
  }
78
78
  });
79
79
  export {
80
- v as DuxModal,
81
- v as default
80
+ w as DuxModal,
81
+ w as default
82
82
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as f, ref as l, watch as o, nextTick as u, createVNode as a } from "vue";
2
- import { NButton as c } from "naive-ui";
3
- const x = /* @__PURE__ */ f({
1
+ import { defineComponent as o, ref as r, watch as n, nextTick as i, createVNode as e } from "vue";
2
+ import { NButton as f } from "naive-ui";
3
+ const c = /* @__PURE__ */ o({
4
4
  name: "DuxModalPage",
5
5
  props: {
6
6
  title: {
@@ -20,42 +20,38 @@ const x = /* @__PURE__ */ f({
20
20
  }
21
21
  }
22
22
  },
23
- setup(n, {
24
- slots: e
23
+ setup(t, {
24
+ slots: a
25
25
  }) {
26
- const i = l();
27
- return o(i, (t) => {
28
- t && u(() => {
29
- var d, r;
30
- (r = (d = t.$el) == null ? void 0 : d.focus) == null || r.call(d);
26
+ const l = r();
27
+ return n(l, (d) => {
28
+ d && i(() => {
29
+ d.$el?.focus?.();
31
30
  });
32
- }), () => {
33
- var t, d, r;
34
- return a("div", {
35
- class: "flex flex-col"
36
- }, [a("div", {
37
- class: ["px-4 py-3 border-b border-muted rounded-t flex justify-between items-center bg-white dark:bg-gray-800/50", n.draggable && "cursor-move", n.handle]
38
- }, [a("div", {
39
- class: "text-base font-bold"
40
- }, [n.title]), a("div", {
41
- class: "flex justify-end gap-2"
42
- }, [a(c, {
43
- text: !0,
44
- onClick: n.onClose,
45
- "aria-label": "close",
46
- ref: i
47
- }, {
48
- icon: () => a("div", {
49
- class: "i-tabler:x"
50
- }, null)
51
- })])]), a("div", {
52
- class: "p-4"
53
- }, [(t = e.default) == null ? void 0 : t.call(e)]), ((d = e.footer) == null ? void 0 : d.call(e)) && a("div", {
54
- class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
55
- }, [(r = e.footer) == null ? void 0 : r.call(e)])]);
56
- };
31
+ }), () => e("div", {
32
+ class: "flex flex-col"
33
+ }, [e("div", {
34
+ class: ["px-4 py-3 border-b border-muted rounded-t flex justify-between items-center bg-white dark:bg-gray-800/50", t.draggable && "cursor-move", t.handle]
35
+ }, [e("div", {
36
+ class: "text-base font-bold"
37
+ }, [t.title]), e("div", {
38
+ class: "flex justify-end gap-2"
39
+ }, [e(f, {
40
+ text: !0,
41
+ onClick: t.onClose,
42
+ "aria-label": "close",
43
+ ref: l
44
+ }, {
45
+ icon: () => e("div", {
46
+ class: "i-tabler:x"
47
+ }, null)
48
+ })])]), e("div", {
49
+ class: "p-4"
50
+ }, [a.default?.()]), a.footer?.() && e("div", {
51
+ class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
52
+ }, [a.footer?.()])]);
57
53
  }
58
54
  });
59
55
  export {
60
- x as default
56
+ c as default
61
57
  };