@duxweb/dvha-pro 0.0.6 → 0.0.7

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 (121) 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 -0
  4. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  5. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  6. package/dist/cjs/components/form/modalForm.cjs +1 -1
  7. package/dist/cjs/components/form/pageForm.cjs +1 -1
  8. package/dist/cjs/components/form/settingForm.cjs +1 -1
  9. package/dist/cjs/components/layout/list.cjs +1 -1
  10. package/dist/cjs/components/layout/table.cjs +1 -1
  11. package/dist/cjs/components/list/card.cjs +1 -1
  12. package/dist/cjs/components/list/list.cjs +1 -1
  13. package/dist/cjs/components/modal/modal.cjs +1 -1
  14. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  15. package/dist/cjs/components/modal/modalTab.cjs +1 -1
  16. package/dist/cjs/components/select/cardSelect.cjs +1 -0
  17. package/dist/cjs/components/table/tablePage.cjs +1 -1
  18. package/dist/cjs/config/echart.cjs +1 -0
  19. package/dist/cjs/dvha-pro.css +1 -1
  20. package/dist/cjs/hooks/action.cjs +1 -1
  21. package/dist/cjs/hooks/dialog.cjs +1 -1
  22. package/dist/cjs/hooks/drawer.cjs +1 -1
  23. package/dist/cjs/hooks/echart.cjs +1 -0
  24. package/dist/cjs/hooks/modal.cjs +1 -1
  25. package/dist/cjs/hooks/table/media.cjs +1 -1
  26. package/dist/cjs/index.cjs +1 -1
  27. package/dist/cjs/main.cjs +1 -1
  28. package/dist/cjs/pages/authLayout.cjs +1 -1
  29. package/dist/cjs/pages/layout/global.cjs +1 -1
  30. package/dist/cjs/pages/layout/page.cjs +1 -1
  31. package/dist/cjs/pages/login.cjs +1 -1
  32. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  33. package/dist/cjs/pages/menu/button.cjs +1 -1
  34. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  35. package/dist/cjs/pages/menu/main.cjs +1 -1
  36. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  37. package/dist/cjs/pages/page.cjs +1 -1
  38. package/dist/cjs/pages/page404.cjs +1 -1
  39. package/dist/cjs/pages/pageStatus.cjs +1 -1
  40. package/dist/cjs/theme/naiveTheme.cjs +1 -1
  41. package/dist/cjs/theme/uno.css.cjs +28 -7
  42. package/dist/esm/component.js +43 -41
  43. package/dist/esm/components/card/card.js +1 -1
  44. package/dist/esm/components/chart/echart.js +75 -0
  45. package/dist/esm/components/dialog/dialog.js +87 -93
  46. package/dist/esm/components/drawer/drawer.js +34 -32
  47. package/dist/esm/components/form/modalForm.js +1 -1
  48. package/dist/esm/components/form/pageForm.js +23 -19
  49. package/dist/esm/components/form/settingForm.js +22 -18
  50. package/dist/esm/components/layout/list.js +203 -142
  51. package/dist/esm/components/layout/table.js +210 -145
  52. package/dist/esm/components/list/card.js +42 -32
  53. package/dist/esm/components/list/list.js +27 -16
  54. package/dist/esm/components/modal/modal.js +46 -86
  55. package/dist/esm/components/modal/modalPage.js +23 -18
  56. package/dist/esm/components/modal/modalTab.js +11 -11
  57. package/dist/esm/components/select/cardSelect.js +103 -0
  58. package/dist/esm/components/table/tablePage.js +21 -18
  59. package/dist/esm/config/echart.js +456 -0
  60. package/dist/esm/dvha-pro.css +1 -1
  61. package/dist/esm/hooks/action.js +46 -45
  62. package/dist/esm/hooks/dialog.js +24 -7
  63. package/dist/esm/hooks/drawer.js +12 -8
  64. package/dist/esm/hooks/echart.js +469 -0
  65. package/dist/esm/hooks/modal.js +25 -9
  66. package/dist/esm/hooks/table/media.js +18 -14
  67. package/dist/esm/index.js +158 -135
  68. package/dist/esm/main.js +11 -8
  69. package/dist/esm/pages/authLayout.js +3 -2
  70. package/dist/esm/pages/layout/global.js +46 -33
  71. package/dist/esm/pages/layout/page.js +13 -9
  72. package/dist/esm/pages/login.js +25 -21
  73. package/dist/esm/pages/menu/avatar.js +14 -14
  74. package/dist/esm/pages/menu/button.js +14 -10
  75. package/dist/esm/pages/menu/cmd.js +26 -22
  76. package/dist/esm/pages/menu/main.js +26 -22
  77. package/dist/esm/pages/menu/mobile.js +11 -7
  78. package/dist/esm/pages/page.js +16 -16
  79. package/dist/esm/pages/page404.js +24 -20
  80. package/dist/esm/pages/pageStatus.js +12 -8
  81. package/dist/esm/theme/naiveTheme.js +57 -51
  82. package/dist/esm/theme/uno.css.js +28 -7
  83. package/dist/types/components/chart/echart.d.ts +284 -0
  84. package/dist/types/components/chart/index.d.ts +1 -0
  85. package/dist/types/components/dialog/dialog.d.ts +1 -20
  86. package/dist/types/components/drawer/drawer.d.ts +14 -4
  87. package/dist/types/components/form/formLayout.d.ts +1 -1
  88. package/dist/types/components/form/modalForm.d.ts +1 -1
  89. package/dist/types/components/index.d.ts +3 -0
  90. package/dist/types/components/layout/list.d.ts +18 -0
  91. package/dist/types/components/layout/table.d.ts +22 -1
  92. package/dist/types/components/list/card.d.ts +38 -0
  93. package/dist/types/components/list/list.d.ts +43 -2
  94. package/dist/types/components/modal/modal.d.ts +13 -31
  95. package/dist/types/components/modal/modalPage.d.ts +3 -6
  96. package/dist/types/components/panel/alert.d.ts +1 -1
  97. package/dist/types/components/select/cardSelect.d.ts +88 -0
  98. package/dist/types/components/select/index.d.ts +1 -0
  99. package/dist/types/components/table/tablePage.d.ts +28 -2
  100. package/dist/types/config/echart.d.ts +4 -0
  101. package/dist/types/config/index.d.ts +1 -0
  102. package/dist/types/hooks/drawer.d.ts +3 -2
  103. package/dist/types/hooks/echart.d.ts +166 -0
  104. package/dist/types/hooks/index.d.ts +2 -0
  105. package/dist/types/hooks/modal.d.ts +10 -5
  106. package/dist/types/hooks/table/types.d.ts +1 -0
  107. package/dist/types/main.d.ts +1 -0
  108. package/dist/types/pages/layout/global.d.ts +1 -0
  109. package/dist/types/pages/menu/avatar.d.ts +3 -3
  110. package/dist/types/pages/menu/button.d.ts +3 -3
  111. package/dist/types/pages/menu/main.d.ts +3 -3
  112. package/dist/types/pages/page.d.ts +1 -1
  113. package/package.json +8 -3
  114. package/dist/cjs/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.cjs +0 -1
  115. package/dist/cjs/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.cjs +0 -1
  116. package/dist/cjs/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.cjs +0 -5
  117. package/dist/cjs/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.cjs +0 -4
  118. package/dist/esm/node_modules/.pnpm/@vueuse_integrations@13.3.0_async-validator@4.2.5_axios@1.10.0_focus-trap@7.6.5_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/integrations/useFocusTrap.js +0 -43
  119. package/dist/esm/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.js +0 -6
  120. package/dist/esm/node_modules/.pnpm/focus-trap@7.6.5/node_modules/focus-trap/dist/focus-trap.esm.js +0 -473
  121. package/dist/esm/node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js +0 -202
@@ -1,25 +1,30 @@
1
- import { defineComponent as _, toRef as $, computed as s, reactive as ee, ref as te, watch as le, createVNode as e, h as A, mergeProps as ae } from "vue";
2
- import { useI18n as ie, useJsonSchema as D } from "@duxweb/dvha-core";
3
- import { useWindowSize as ne, useElementSize as re } from "@vueuse/core";
4
- import { NInput as E, NTabs as oe, NTab as ue, NPopover as ce, NButton as c, NPopselect as se, NTooltip as p, NProgress as pe, NPagination as fe } from "naive-ui";
5
- import { useAction as de } from "../../hooks/action.js";
6
- import { useTable as me } from "../../hooks/table.js";
7
- import "lodash-es";
1
+ import { defineComponent as $, toRef as ee, computed as f, reactive as te, ref as ie, watch as ae, createVNode as t, h as D, mergeProps as ne } from "vue";
2
+ import { useI18n as re, useJsonSchema as E } from "@duxweb/dvha-core";
3
+ import { useWindowSize as le, useElementSize as ue } from "@vueuse/core";
4
+ import { NInput as I, NTabs as oe, NTab as ce, NButton as u, NPopover as de, NPopselect as fe, NTooltip as p, NProgress as pe, NPagination as me } from "naive-ui";
5
+ import { useAction as ge } from "../../hooks/action.js";
6
+ import "@overlastic/vue";
7
+ import "vue-echarts";
8
8
  import "clsx";
9
9
  import "jinrishici";
10
- import "@overlastic/vue";
10
+ import "lodash-es";
11
11
  import "vee-validate";
12
12
  import "@vee-validate/i18n";
13
13
  import "colorizr";
14
+ import "echarts";
15
+ import "@ant-design/colors";
16
+ import "@unocss/preset-typography";
14
17
  import "vue-router";
15
18
  import "vue-command-palette";
16
19
  import "@duxweb/dvha-naiveui";
17
20
  import { DuxPage as ve } from "../../pages/page.js";
18
21
  import "../../pages/page404.js";
19
- import { DuxTableFilter as ge } from "./filter.js";
20
- import { DuxTableTools as be } from "./tools.js";
22
+ import { DuxTableFilter as be } from "./filter.js";
23
+ import { DuxTableTools as he } from "./tools.js";
24
+ import { useDrawer as xe } from "../../hooks/drawer.js";
25
+ import { useTable as ye } from "../../hooks/table.js";
21
26
  import "pinia";
22
- const Le = /* @__PURE__ */ _({
27
+ const Ge = /* @__PURE__ */ $({
23
28
  name: "DuxTableLayout",
24
29
  props: {
25
30
  path: {
@@ -47,239 +52,299 @@ const Le = /* @__PURE__ */ _({
47
52
  },
48
53
  tools: {
49
54
  type: Object
55
+ },
56
+ sideLeftTitle: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ sideRightTitle: {
61
+ type: String,
62
+ default: ""
50
63
  }
51
64
  },
52
- setup(l, {
53
- slots: t
65
+ setup(a, {
66
+ slots: e
54
67
  }) {
55
- var N, k;
56
- const f = $(l.filter || {}), {
57
- t: r
58
- } = ie(), {
59
- renderAction: I
60
- } = de(), b = me({
61
- path: l.path,
62
- filters: f.value,
63
- columns: l.columns || [],
64
- pagination: l.pagination
68
+ var C, N;
69
+ const m = ee(a.filter || {}), {
70
+ t: l
71
+ } = re(), {
72
+ renderAction: O
73
+ } = ge(), y = ye({
74
+ path: a.path,
75
+ filters: m.value,
76
+ columns: a.columns || [],
77
+ pagination: a.pagination
65
78
  }), {
66
- meta: d,
67
- columns: h,
68
- tablePagination: O,
69
- table: W,
70
- onUpdateColumnSelected: V,
71
- onUpdateChecked: m,
72
- columnSelected: B,
73
- autoRefetch: L,
74
- autoCountdown: x,
75
- onAutoRefetch: U,
76
- isExporting: q,
77
- isExportingRows: F,
78
- isImporting: H,
79
- onExport: J,
80
- onExportRows: K,
81
- onImport: G
82
- } = b, M = s(() => h.value.filter((a) => "title" in a && "key" in a).map((a) => ({
83
- label: a.title,
84
- value: a.key
79
+ meta: g,
80
+ columns: w,
81
+ tablePagination: W,
82
+ table: V,
83
+ onUpdateColumnSelected: B,
84
+ onUpdateChecked: v,
85
+ columnSelected: U,
86
+ autoRefetch: q,
87
+ autoCountdown: R,
88
+ onAutoRefetch: F,
89
+ isExporting: b,
90
+ isExportingRows: H,
91
+ isImporting: J,
92
+ onExport: K,
93
+ onExportRows: G,
94
+ onImport: M
95
+ } = y, Q = f(() => w.value.filter((i) => "title" in i && "key" in i).map((i) => ({
96
+ label: i.title,
97
+ value: i.key
85
98
  }))), {
86
- width: y
87
- } = ne(), Q = s(() => h.value.reduce((o, i) => o + (Number(i == null ? void 0 : i.width) || Number(i == null ? void 0 : i.minWidth) || 110), 0)), u = ee({
99
+ width: o
100
+ } = le(), X = f(() => w.value.reduce((c, r) => c + (Number(r == null ? void 0 : r.width) || Number(r == null ? void 0 : r.minWidth) || 110), 0)), d = te({
88
101
  show: !1,
89
102
  collapse: !1
90
- }), w = te(), {
91
- height: X
92
- } = re(w);
93
- le(X, (a) => {
94
- a > 35 ? u.show = !0 : u.show = !1;
103
+ }), k = ie(), {
104
+ height: Y
105
+ } = ue(k);
106
+ ae(Y, (i) => {
107
+ i > 35 ? d.show = !0 : d.show = !1;
95
108
  }, {
96
109
  immediate: !0,
97
110
  deep: !0
98
111
  });
99
- const v = s(() => (l.filterSchema || []).map((a) => {
112
+ const h = f(() => (a.filterSchema || []).map((i) => {
100
113
  const {
101
- title: o,
102
- ...i
103
- } = a;
114
+ title: c,
115
+ ...r
116
+ } = i;
104
117
  return {
105
- tag: ge,
118
+ tag: be,
106
119
  attrs: {
107
- label: o
120
+ label: c
108
121
  },
109
- children: i
122
+ children: r
110
123
  };
111
124
  })), {
112
- render: Y
113
- } = D({
114
- data: (N = v.value) == null ? void 0 : N.slice(1),
125
+ render: Z
126
+ } = E({
127
+ data: (C = h.value) == null ? void 0 : C.slice(1),
115
128
  components: {
116
- NInput: E
129
+ NInput: I
117
130
  }
118
131
  }), {
119
- render: Z
120
- } = D({
121
- data: (k = v.value) == null ? void 0 : k.slice(0, 1),
132
+ render: _
133
+ } = E({
134
+ data: (N = h.value) == null ? void 0 : N.slice(0, 1),
122
135
  components: {
123
- NInput: E
136
+ NInput: I
124
137
  }
125
- }), g = s(() => ({
138
+ }), x = f(() => ({
126
139
  import: !0,
127
140
  export: !0,
128
141
  refresh: !0,
129
- ...l.tools
130
- }));
131
- return () => e(ve, {
132
- actions: l.actions,
142
+ ...a.tools
143
+ })), {
144
+ show: T
145
+ } = xe();
146
+ return () => t(ve, {
147
+ actions: a.actions,
133
148
  scrollbar: !1
134
149
  }, {
150
+ sideLeft: () => {
151
+ var i;
152
+ return e != null && e.sideLeft && o.value >= 1024 ? (i = e == null ? void 0 : e.sideLeft) == null ? void 0 : i.call(e) : void 0;
153
+ },
154
+ sideRight: () => {
155
+ var i;
156
+ return e != null && e.sideRight && o.value >= 1024 ? (i = e == null ? void 0 : e.sideRight) == null ? void 0 : i.call(e) : void 0;
157
+ },
135
158
  default: () => {
136
- var a, o, i, j, C, S, z, R, T;
137
- return e("div", {
138
- class: "flex flex-col gap-3 h-full relative "
139
- }, [e("div", {
159
+ var i, c, r, S, s, z, j, L, P;
160
+ return t("div", {
161
+ class: "flex flex-col gap-3 h-full relative"
162
+ }, [t("div", {
140
163
  class: "flex gap-3 justify-between flex-col lg:flex-row"
141
- }, [l.tabs && e("div", {
164
+ }, [a.tabs && t("div", {
142
165
  class: "flex flex-none"
143
- }, [e(oe, {
166
+ }, [t(oe, {
144
167
  type: "segment",
145
168
  size: "small",
146
169
  style: {
147
170
  "--n-tab-padding": "4px 10px"
148
171
  },
149
- "default-value": (o = (a = l.tabs) == null ? void 0 : a[0]) == null ? void 0 : o.value,
150
- value: (i = f.value) == null ? void 0 : i.tab,
172
+ "default-value": (c = (i = a.tabs) == null ? void 0 : i[0]) == null ? void 0 : c.value,
173
+ value: (r = m.value) == null ? void 0 : r.tab,
151
174
  onUpdateValue: (n) => {
152
- f.value.tab = n;
175
+ m.value.tab = n;
153
176
  }
154
177
  }, {
155
178
  default: () => {
156
179
  var n;
157
- return [(n = l.tabs) == null ? void 0 : n.map((P) => e(ue, {
158
- name: P.value,
159
- tab: P.label
180
+ return [(n = a.tabs) == null ? void 0 : n.map((A) => t(ce, {
181
+ name: A.value,
182
+ tab: A.label
160
183
  }, null))];
161
184
  }
162
- })]), e("div", {
163
- class: ["overflow-hidden flex-1", u.collapse ? "h-auto" : "h-8.5"]
164
- }, [e("div", {
165
- ref: w,
166
- class: ["lg:flex gap-2 flex-wrap", l.tabs ? "justify-end" : "justify-start"]
167
- }, [A(Z)])]), e("div", {
185
+ })]), t("div", {
186
+ class: ["overflow-hidden flex-1 flex gap-2", d.collapse ? "h-auto" : "h-8.5"]
187
+ }, [(e == null ? void 0 : e.sideLeft) && o.value < 1024 && t(u, {
188
+ class: "flex-none",
189
+ secondary: !0,
190
+ loading: b.value,
191
+ onClick: () => {
192
+ T({
193
+ title: a.sideLeftTitle,
194
+ component: () => {
195
+ var n;
196
+ return t("div", null, [(n = e == null ? void 0 : e.sideLeft) == null ? void 0 : n.call(e)]);
197
+ },
198
+ width: 300,
199
+ placement: "left"
200
+ });
201
+ }
202
+ }, {
203
+ icon: () => t("div", {
204
+ class: "i-tabler:layout-sidebar-inactive size-4"
205
+ }, null)
206
+ }), t("div", {
207
+ ref: k,
208
+ class: ["flex-1 lg:flex gap-2 flex-wrap", a.tabs ? "justify-end" : "justify-start"]
209
+ }, [D(_)]), (e == null ? void 0 : e.sideRight) && o.value < 1024 && t(u, {
210
+ class: "flex-none",
211
+ secondary: !0,
212
+ loading: b.value,
213
+ onClick: () => {
214
+ T({
215
+ title: a.sideRightTitle,
216
+ component: () => {
217
+ var n;
218
+ return t("div", null, [(n = e == null ? void 0 : e.sideRight) == null ? void 0 : n.call(e)]);
219
+ },
220
+ width: 300,
221
+ placement: "right"
222
+ });
223
+ }
224
+ }, {
225
+ icon: () => t("div", {
226
+ class: "i-tabler:layout-sidebar-right-inactive size-4"
227
+ }, null)
228
+ })]), t("div", {
168
229
  class: "flex gap-2 justify-between lg:justify-end"
169
- }, [v.value.length > 1 && e(ce, {
230
+ }, [h.value.length > 1 && t(de, {
170
231
  trigger: "click",
171
232
  displayDirective: "show"
172
233
  }, {
173
- trigger: () => e(c, {
234
+ trigger: () => t(u, {
174
235
  iconPlacement: "right",
175
236
  onClick: () => {
176
- u.collapse = !u.collapse;
237
+ d.collapse = !d.collapse;
177
238
  }
178
239
  }, {
179
- default: () => r("components.button.filter"),
180
- icon: () => e("div", {
240
+ default: () => l("components.button.filter"),
241
+ icon: () => t("div", {
181
242
  class: ["i-tabler:chevrons-down size-4 transition-all"]
182
243
  }, null)
183
244
  }),
184
- default: () => e("div", {
245
+ default: () => t("div", {
185
246
  class: "flex flex-col gap-2 py-1"
186
- }, [A(Y)])
187
- }), e("div", {
247
+ }, [D(Z)])
248
+ }), t("div", {
188
249
  class: "flex gap-2 items-center"
189
- }, [(j = t == null ? void 0 : t.tools) == null ? void 0 : j.call(t), e(se, {
190
- options: M.value,
191
- value: B.value,
250
+ }, [(S = e == null ? void 0 : e.tools) == null ? void 0 : S.call(e), t(fe, {
251
+ options: Q.value,
252
+ value: U.value,
192
253
  onUpdateValue: (n) => {
193
- V(n);
254
+ B(n);
194
255
  },
195
256
  multiple: !0,
196
257
  placement: "bottom-start",
197
258
  trigger: "click"
198
259
  }, {
199
- default: () => [e(p, null, {
200
- trigger: () => e(c, {
260
+ default: () => [t(p, null, {
261
+ trigger: () => t(u, {
262
+ secondary: !0,
201
263
  "icon-placement": "right"
202
264
  }, {
203
- icon: () => e("div", {
265
+ icon: () => t("div", {
204
266
  class: "i-tabler:columns size-4"
205
267
  }, null)
206
268
  }),
207
- default: () => r("components.list.columnSetting")
269
+ default: () => l("components.list.columnSetting")
208
270
  })]
209
- }), g.value.export && e(p, null, {
210
- trigger: () => e(c, {
211
- loading: q.value,
212
- onClick: J
271
+ }), x.value.export && t(p, null, {
272
+ trigger: () => t(u, {
273
+ secondary: !0,
274
+ loading: b.value,
275
+ onClick: K
213
276
  }, {
214
- icon: () => e("div", {
277
+ icon: () => t("div", {
215
278
  class: "i-tabler:database-export size-4"
216
279
  }, null)
217
280
  }),
218
- default: () => r("components.button.export")
219
- }), g.value.import && e(p, null, {
220
- trigger: () => e(c, {
221
- loading: H.value,
222
- onClick: G
281
+ default: () => l("components.button.export")
282
+ }), x.value.import && t(p, null, {
283
+ trigger: () => t(u, {
284
+ secondary: !0,
285
+ loading: J.value,
286
+ onClick: M
223
287
  }, {
224
- icon: () => e("div", {
288
+ icon: () => t("div", {
225
289
  class: "i-tabler:database-import size-4"
226
290
  }, null)
227
291
  }),
228
- default: () => r("components.button.import")
229
- }), g.value.refresh && e(p, null, {
230
- trigger: () => e(c, {
231
- onClick: U
292
+ default: () => l("components.button.import")
293
+ }), x.value.refresh && t(p, null, {
294
+ trigger: () => t(u, {
295
+ secondary: !0,
296
+ onClick: F
232
297
  }, {
233
- icon: () => L.value ? e(pe, {
298
+ icon: () => q.value ? t(pe, {
234
299
  class: "size-4",
235
300
  type: "circle",
236
- percentage: x.value * 10,
301
+ percentage: R.value * 10,
237
302
  strokeWidth: 20,
238
303
  color: "rgba(var(--ui-color-primary))"
239
304
  }, {
240
- default: () => [e("span", {
305
+ default: () => [t("span", {
241
306
  class: "text-8px"
242
- }, [x.value])]
243
- }) : e("div", {
307
+ }, [R.value])]
308
+ }) : t("div", {
244
309
  class: "i-tabler:refresh size-4"
245
310
  }, null)
246
311
  }),
247
- default: () => r("components.button.autoRefresh")
248
- })]), e("div", {
312
+ default: () => l("components.button.autoRefresh")
313
+ })]), t("div", {
249
314
  class: "flex gap-2 justify-end"
250
- }, [(C = t.actions) == null ? void 0 : C.call(t), ((S = l.actions) == null ? void 0 : S.length) > 0 && I({
251
- type: y.value < 1024 ? "dropdown" : "button",
252
- items: l.actions
253
- })])])]), e("div", {
315
+ }, [(s = e.actions) == null ? void 0 : s.call(e), ((z = a.actions) == null ? void 0 : z.length) > 0 && O({
316
+ type: o.value < 1024 ? "dropdown" : "button",
317
+ items: a.actions
318
+ })])])]), t("div", {
254
319
  class: "flex-1 min-h-0"
255
- }, [(z = t == null ? void 0 : t.default) == null ? void 0 : z.call(t, {
256
- ...b,
257
- width: Q.value
258
- })]), e("div", {
320
+ }, [(j = e == null ? void 0 : e.default) == null ? void 0 : j.call(e, {
321
+ ...y,
322
+ width: X.value
323
+ })]), t("div", {
259
324
  class: "flex justify-between"
260
- }, [e("div", null, [(R = t == null ? void 0 : t.bottom) == null ? void 0 : R.call(t)]), e("div", null, [l.pagination && e(fe, ae(O.value, {
261
- simple: y.value < 768
325
+ }, [t("div", null, [(L = e == null ? void 0 : e.bottom) == null ? void 0 : L.call(e)]), t("div", null, [a.pagination && t(me, ne(W.value, {
326
+ simple: o.value < 768
262
327
  }), {
263
328
  prefix: () => {
264
329
  var n;
265
- return e("div", null, [r("components.list.total", {
266
- total: ((n = d == null ? void 0 : d.value) == null ? void 0 : n.total) || 0
330
+ return t("div", null, [l("components.list.total", {
331
+ total: ((n = g == null ? void 0 : g.value) == null ? void 0 : n.total) || 0
267
332
  })]);
268
333
  }
269
- })])]), e(be, {
270
- number: ((T = W.value.checkedRowKeys) == null ? void 0 : T.length) || 0 || 0,
334
+ })])]), t(he, {
335
+ number: ((P = V.value.checkedRowKeys) == null ? void 0 : P.length) || 0 || 0,
271
336
  group: [[{
272
337
  icon: "i-tabler:x",
273
338
  onClick: () => {
274
- m == null || m([]);
339
+ v == null || v([]);
275
340
  }
276
341
  }], [{
277
- label: r("components.button.export"),
342
+ label: l("components.button.export"),
278
343
  icon: "i-tabler:file-export",
279
- loading: F.value,
280
- onClick: K
344
+ loading: H.value,
345
+ onClick: G
281
346
  }, {
282
- label: r("components.button.delete"),
347
+ label: l("components.button.delete"),
283
348
  type: "error",
284
349
  icon: "i-tabler:trash"
285
350
  }]]
@@ -289,5 +354,5 @@ const Le = /* @__PURE__ */ _({
289
354
  }
290
355
  });
291
356
  export {
292
- Le as DuxTableLayout
357
+ Ge as DuxTableLayout
293
358
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as W, ref as R, computed as l, toRef as S, createVNode as s } from "vue";
1
+ import { defineComponent as v, ref as W, computed as l, toRef as S, createVNode as g } from "vue";
2
2
  import { useElementSize as y, useWindowSize as z, watchDebounced as M } from "@vueuse/core";
3
- import { DuxListLayout as g } from "../layout/list.js";
4
- const L = /* @__PURE__ */ W({
3
+ import { DuxListLayout as s } from "../layout/list.js";
4
+ const j = /* @__PURE__ */ v({
5
5
  name: "DuxCardPage",
6
6
  props: {
7
7
  colWidth: {
@@ -15,20 +15,28 @@ const L = /* @__PURE__ */ W({
15
15
  maxRows: {
16
16
  type: Number,
17
17
  default: 10
18
+ },
19
+ sideLeftTitle: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ sideRightTitle: {
24
+ type: String,
25
+ default: ""
18
26
  }
19
27
  },
20
- extends: g,
28
+ extends: s,
21
29
  slots: Object,
22
30
  setup(e, {
23
- slots: a
31
+ slots: t
24
32
  }) {
25
- const h = R(), {
33
+ const f = W(), {
26
34
  width: u
27
- } = y(h), {
28
- width: f
29
- } = z(), w = l(() => e.colWidth || 320), r = (t = 0) => {
30
- const i = t || f.value || 1024, o = e.colWidth || 320, c = e.rows || 4, b = e.maxRows || 10, d = 0.25 * 16 * 3, m = Math.max(1, Math.floor((i + d) / (o + d))), x = Math.floor((1920 + d) / (o + d)) * c, C = Math.ceil(x / m), v = Math.min(Math.max(C, c), b);
31
- return m * v;
35
+ } = y(f), {
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;
32
40
  }, n = S(e.pagination && typeof e.pagination == "object" ? e.pagination : {
33
41
  page: 1,
34
42
  pageSize: r()
@@ -36,43 +44,45 @@ const L = /* @__PURE__ */ W({
36
44
  M([u], () => {
37
45
  if (e.pagination && typeof e.pagination == "object")
38
46
  return;
39
- const t = r(u.value);
40
- t !== n.value.pageSize && (n.value.pageSize = t, n.value.page = 1);
47
+ const a = r(u.value);
48
+ a !== n.value.pageSize && (n.value.pageSize = a, n.value.page = 1);
41
49
  }, {
42
50
  debounce: 300
43
51
  });
44
- const p = l(() => {
52
+ const w = l(() => {
45
53
  const {
46
- maxRows: t,
47
- rows: i,
48
- colWidth: o,
49
- ...c
54
+ maxRows: a,
55
+ rows: o,
56
+ colWidth: i,
57
+ ...d
50
58
  } = e;
51
59
  return {
52
- ...c,
60
+ ...d,
53
61
  pagination: n.value
54
62
  };
55
63
  });
56
- return () => s(g, p.value, {
57
- default: (t) => s("div", {
64
+ return () => g(s, w.value, {
65
+ default: (a) => g("div", {
58
66
  class: "grid gap-3",
59
67
  style: {
60
- "grid-template-columns": `repeat(auto-fit, minmax(${w.value}px, 1fr))`
68
+ "grid-template-columns": `repeat(auto-fit, minmax(${p.value}px, 1fr))`
61
69
  }
62
- }, [t.list.value.map((i) => {
63
- var o;
64
- return (o = a == null ? void 0 : a.default) == null ? void 0 : o.call(a, {
65
- item: i,
66
- isChecked: t.isChecked,
67
- toggleChecked: t.toggleChecked
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
68
76
  });
69
77
  })]),
70
- actions: a.actions,
71
- tools: a.tools,
72
- bottom: a.bottom
78
+ actions: t.actions,
79
+ tools: t.tools,
80
+ bottom: t.bottom,
81
+ sideLeft: t.sideLeft,
82
+ sideRight: t.sideRight
73
83
  });
74
84
  }
75
85
  });
76
86
  export {
77
- L as DuxCardPage
87
+ j as DuxCardPage
78
88
  };
@@ -1,38 +1,49 @@
1
- import { defineComponent as p, computed as r, createVNode as a } from "vue";
2
- import { DuxListLayout as c } from "../layout/list.js";
3
- const f = /* @__PURE__ */ p({
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({
4
4
  name: "DuxListPage",
5
- props: {},
6
- extends: c,
5
+ props: {
6
+ sideLeftTitle: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ sideRightTitle: {
11
+ type: String,
12
+ default: ""
13
+ }
14
+ },
15
+ extends: a,
7
16
  slots: Object,
8
- setup(i, {
17
+ setup(o, {
9
18
  slots: e
10
19
  }) {
11
- const n = r(() => {
20
+ const c = r(() => {
12
21
  const {
13
22
  ...t
14
- } = i;
23
+ } = o;
15
24
  return {
16
25
  ...t
17
26
  };
18
27
  });
19
- return () => a(c, n.value, {
20
- default: (t) => a("div", {
28
+ return () => d(a, c.value, {
29
+ default: (t) => d("div", {
21
30
  class: "flex flex-col gap-3"
22
- }, [t.list.value.map((d) => {
23
- var o;
24
- return (o = e == null ? void 0 : e.default) == null ? void 0 : o.call(e, {
25
- item: d,
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,
26
35
  isChecked: t.isChecked,
27
36
  toggleChecked: t.toggleChecked
28
37
  });
29
38
  })]),
30
39
  actions: e.actions,
31
40
  tools: e.tools,
32
- bottom: e.bottom
41
+ bottom: e.bottom,
42
+ sideLeft: e.sideLeft,
43
+ sideRight: e.sideRight
33
44
  });
34
45
  }
35
46
  });
36
47
  export {
37
- f as DuxListPage
48
+ u as DuxListPage
38
49
  };