@duxweb/dvha-pro 1.0.23 → 1.0.24

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 (152) hide show
  1. package/dist/cjs/components/card/card.cjs +1 -1
  2. package/dist/cjs/components/card/store.cjs +1 -1
  3. package/dist/cjs/components/carousel/carousel.cjs +1 -1
  4. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  5. package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
  6. package/dist/cjs/components/dashboard/hello.cjs +1 -1
  7. package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
  8. package/dist/cjs/components/dashboard/quick.cjs +1 -1
  9. package/dist/cjs/components/data/dynamicData.cjs +1 -1
  10. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  11. package/dist/cjs/components/data/selectModal.cjs +1 -1
  12. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  13. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  14. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  15. package/dist/cjs/components/editor/aiEditor.cjs +1 -1
  16. package/dist/cjs/components/form/drawerForm.cjs +1 -1
  17. package/dist/cjs/components/form/formItem.cjs +1 -1
  18. package/dist/cjs/components/form/formLayout.cjs +1 -1
  19. package/dist/cjs/components/form/modalForm.cjs +1 -1
  20. package/dist/cjs/components/form/pageForm.cjs +1 -1
  21. package/dist/cjs/components/form/settingForm.cjs +1 -1
  22. package/dist/cjs/components/icon/iconPicker.cjs +1 -1
  23. package/dist/cjs/components/layout/filter.cjs +1 -1
  24. package/dist/cjs/components/layout/filterLayout.cjs +1 -1
  25. package/dist/cjs/components/layout/list.cjs +1 -1
  26. package/dist/cjs/components/layout/table.cjs +1 -1
  27. package/dist/cjs/components/layout/tools.cjs +1 -1
  28. package/dist/cjs/components/list/card.cjs +1 -1
  29. package/dist/cjs/components/list/list.cjs +1 -1
  30. package/dist/cjs/components/media/media.cjs +1 -1
  31. package/dist/cjs/components/modal/modal.cjs +1 -1
  32. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  33. package/dist/cjs/components/modal/modalTab.cjs +1 -1
  34. package/dist/cjs/components/panel/alert.cjs +1 -1
  35. package/dist/cjs/components/panel/collapse.cjs +1 -1
  36. package/dist/cjs/components/panel/setting.cjs +1 -1
  37. package/dist/cjs/components/select/cardSelect.cjs +1 -1
  38. package/dist/cjs/components/status/listEmpty.cjs +1 -1
  39. package/dist/cjs/components/table/tablePage.cjs +1 -1
  40. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  41. package/dist/cjs/components/upload/config.cjs +1 -1
  42. package/dist/cjs/components/upload/file.cjs +1 -1
  43. package/dist/cjs/components/upload/image.cjs +1 -1
  44. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  45. package/dist/cjs/components/upload/manager.cjs +1 -1
  46. package/dist/cjs/components/widget/connect.cjs +1 -1
  47. package/dist/cjs/dvha-pro.css +1 -1
  48. package/dist/cjs/hooks/action.cjs +1 -1
  49. package/dist/cjs/hooks/download.cjs +1 -1
  50. package/dist/cjs/hooks/echart.cjs +1 -1
  51. package/dist/cjs/hooks/image.cjs +1 -1
  52. package/dist/cjs/hooks/level.cjs +1 -1
  53. package/dist/cjs/hooks/table/color.cjs +1 -0
  54. package/dist/cjs/hooks/table/column.cjs +1 -1
  55. package/dist/cjs/hooks/table/image.cjs +1 -1
  56. package/dist/cjs/hooks/table/input.cjs +1 -1
  57. package/dist/cjs/hooks/table/map.cjs +1 -1
  58. package/dist/cjs/hooks/table/status.cjs +1 -1
  59. package/dist/cjs/hooks/table/switch.cjs +1 -1
  60. package/dist/cjs/hooks/table.cjs +1 -1
  61. package/dist/cjs/index.cjs +1 -1
  62. package/dist/cjs/pages/layout/global.cjs +1 -1
  63. package/dist/cjs/pages/layout/tab.cjs +1 -1
  64. package/dist/cjs/pages/login.cjs +1 -1
  65. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  66. package/dist/cjs/pages/menu/button.cjs +1 -1
  67. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  68. package/dist/cjs/pages/page.cjs +1 -1
  69. package/dist/cjs/pages/pageStatus.cjs +1 -1
  70. package/dist/cjs/stores/ui.cjs +1 -1
  71. package/dist/cjs/theme/uno.css.cjs +2 -1
  72. package/dist/esm/components/card/card.js +24 -27
  73. package/dist/esm/components/card/store.js +33 -39
  74. package/dist/esm/components/carousel/carousel.js +16 -19
  75. package/dist/esm/components/crop/imageCrop.js +32 -35
  76. package/dist/esm/components/crop/imageCropModal.js +36 -37
  77. package/dist/esm/components/dashboard/hello.js +27 -30
  78. package/dist/esm/components/dashboard/helloBig.js +328 -331
  79. package/dist/esm/components/dashboard/quick.js +30 -33
  80. package/dist/esm/components/data/dynamicData.js +86 -98
  81. package/dist/esm/components/data/dynamicSelect.js +29 -31
  82. package/dist/esm/components/data/selectModal.js +45 -49
  83. package/dist/esm/components/dialog/dialog.js +54 -55
  84. package/dist/esm/components/drawer/drawer.js +23 -23
  85. package/dist/esm/components/drawer/drawerPage.js +39 -49
  86. package/dist/esm/components/editor/aiEditor.js +64 -70
  87. package/dist/esm/components/form/drawerForm.js +48 -48
  88. package/dist/esm/components/form/formItem.js +45 -51
  89. package/dist/esm/components/form/formLayout.js +7 -10
  90. package/dist/esm/components/form/modalForm.js +50 -50
  91. package/dist/esm/components/form/pageForm.js +47 -50
  92. package/dist/esm/components/form/settingForm.js +34 -37
  93. package/dist/esm/components/icon/iconPicker.js +54 -58
  94. package/dist/esm/components/layout/filter.js +13 -16
  95. package/dist/esm/components/layout/filterLayout.js +7 -10
  96. package/dist/esm/components/layout/list.js +299 -326
  97. package/dist/esm/components/layout/table.js +268 -283
  98. package/dist/esm/components/layout/tools.js +38 -41
  99. package/dist/esm/components/list/card.js +35 -38
  100. package/dist/esm/components/list/list.js +15 -18
  101. package/dist/esm/components/media/media.js +35 -36
  102. package/dist/esm/components/modal/modal.js +10 -10
  103. package/dist/esm/components/modal/modalPage.js +32 -36
  104. package/dist/esm/components/modal/modalTab.js +39 -45
  105. package/dist/esm/components/panel/alert.js +19 -22
  106. package/dist/esm/components/panel/collapse.js +33 -36
  107. package/dist/esm/components/panel/setting.js +25 -31
  108. package/dist/esm/components/select/cardSelect.js +27 -28
  109. package/dist/esm/components/status/listEmpty.js +13 -13
  110. package/dist/esm/components/table/tablePage.js +25 -25
  111. package/dist/esm/components/tree/treeFilter.js +137 -147
  112. package/dist/esm/components/upload/config.js +15 -27
  113. package/dist/esm/components/upload/file.js +90 -94
  114. package/dist/esm/components/upload/image.js +116 -123
  115. package/dist/esm/components/upload/manage/item.js +44 -47
  116. package/dist/esm/components/upload/manager.js +190 -207
  117. package/dist/esm/components/widget/connect.js +103 -106
  118. package/dist/esm/dvha-pro.css +1 -1
  119. package/dist/esm/hooks/action.js +115 -131
  120. package/dist/esm/hooks/download.js +55 -56
  121. package/dist/esm/hooks/echart.js +156 -179
  122. package/dist/esm/hooks/image.js +14 -15
  123. package/dist/esm/hooks/level.js +7 -7
  124. package/dist/esm/hooks/table/color.js +19 -0
  125. package/dist/esm/hooks/table/column.js +25 -23
  126. package/dist/esm/hooks/table/image.js +2 -2
  127. package/dist/esm/hooks/table/input.js +28 -28
  128. package/dist/esm/hooks/table/map.js +7 -7
  129. package/dist/esm/hooks/table/status.js +8 -9
  130. package/dist/esm/hooks/table/switch.js +19 -19
  131. package/dist/esm/hooks/table.js +27 -31
  132. package/dist/esm/index.js +167 -165
  133. package/dist/esm/pages/layout/global.js +12 -15
  134. package/dist/esm/pages/layout/tab.js +58 -71
  135. package/dist/esm/pages/login.js +81 -85
  136. package/dist/esm/pages/menu/avatar.js +136 -149
  137. package/dist/esm/pages/menu/button.js +16 -20
  138. package/dist/esm/pages/menu/cmd.js +68 -74
  139. package/dist/esm/pages/page.js +21 -25
  140. package/dist/esm/pages/pageStatus.js +21 -24
  141. package/dist/esm/stores/ui.js +15 -15
  142. package/dist/esm/theme/uno.css.js +2 -1
  143. package/dist/types/components/form/drawerForm.d.ts +6 -0
  144. package/dist/types/components/form/modalForm.d.ts +6 -0
  145. package/dist/types/components/form/pageForm.d.ts +6 -0
  146. package/dist/types/components/form/settingForm.d.ts +6 -0
  147. package/dist/types/components/layout/table.d.ts +9 -0
  148. package/dist/types/components/table/tablePage.d.ts +9 -0
  149. package/dist/types/hooks/table/color.d.ts +13 -0
  150. package/dist/types/hooks/table/column.d.ts +1 -0
  151. package/dist/types/hooks/table/index.d.ts +1 -0
  152. package/package.json +3 -3
@@ -1,17 +1,17 @@
1
- import { defineComponent as te, toRef as D, computed as b, reactive as x, createVNode as t, h as A, mergeProps as ie, isVNode as ae } from "vue";
2
- import { useI18n as re, useJsonSchema as O } from "@duxweb/dvha-core";
3
- import { useWindowSize as ne } from "@vueuse/core";
4
- import { NTabs as oe, NTab as le, NButton as l, NPopselect as ue, NTooltip as h, NProgress as ce, NPagination as de, NModal as pe, NDrawer as U } from "naive-ui";
5
- import { useAction as fe } from "../../hooks/action.js";
1
+ import { defineComponent as J, toRef as x, computed as m, reactive as v, createVNode as e, h as k, mergeProps as K, isVNode as G } from "vue";
2
+ import { useI18n as H, useJsonSchema as C } from "@duxweb/dvha-core";
3
+ import { useWindowSize as Q } from "@vueuse/core";
4
+ import { NTabs as X, NTab as Y, NButton as r, NPopselect as Z, NTooltip as f, NProgress as $, NPagination as ee, NModal as te, NDrawer as N } from "naive-ui";
5
+ import { useAction as oe } from "../../hooks/action.js";
6
6
  import "@overlastic/vue";
7
7
  import "clsx";
8
8
  import "vue-echarts";
9
9
  import "vue-cropper";
10
- import me from "../modal/modalPage.js";
10
+ import le from "../modal/modalPage.js";
11
11
  import "jinrishici";
12
12
  import "lodash-es";
13
13
  import "vue-draggable-plus";
14
- import { DuxDrawerPage as E } from "../drawer/drawerPage.js";
14
+ import { DuxDrawerPage as R } from "../drawer/drawerPage.js";
15
15
  import "aieditor";
16
16
  import "vee-validate";
17
17
  import "vue-router";
@@ -26,12 +26,12 @@ import "@vee-validate/i18n/dist/locale/en.json";
26
26
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
27
27
  import "vue-command-palette";
28
28
  import "@duxweb/dvha-naiveui";
29
- import { DuxPage as be } from "../../pages/page.js";
29
+ import { DuxPage as ie } from "../../pages/page.js";
30
30
  import "../../pages/page404.js";
31
31
  import "@iconify-json/tabler/icons.json";
32
- import { DuxTableFilter as he } from "./filter.js";
33
- import { DuxFilterLayout as ge } from "./filterLayout.js";
34
- import { DuxTableTools as ve } from "./tools.js";
32
+ import { DuxTableFilter as ae } from "./filter.js";
33
+ import { DuxFilterLayout as re } from "./filterLayout.js";
34
+ import { DuxTableTools as ne } from "./tools.js";
35
35
  import "mime";
36
36
  import "vue3-ace-editor";
37
37
  import "ace-builds/src-noconflict/mode-vue";
@@ -46,12 +46,12 @@ import "ace-builds/src-noconflict/ext-language_tools";
46
46
  import "ace-builds/src-noconflict/mode-snippets";
47
47
  import "dayjs";
48
48
  import "@tanstack/vue-query";
49
- import { useTable as we } from "../../hooks/table.js";
49
+ import { useTable as se } from "../../hooks/table.js";
50
50
  import "pinia";
51
- function ye(i) {
52
- return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !ae(i);
51
+ function ue(t) {
52
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !G(t);
53
53
  }
54
- const gt = /* @__PURE__ */ te({
54
+ const rt = /* @__PURE__ */ J({
55
55
  name: "DuxTableLayout",
56
56
  props: {
57
57
  path: {
@@ -64,6 +64,10 @@ const gt = /* @__PURE__ */ te({
64
64
  filterSchema: {
65
65
  type: Array
66
66
  },
67
+ filterNumber: {
68
+ type: Number,
69
+ default: 1
70
+ },
67
71
  columns: {
68
72
  type: Array
69
73
  },
@@ -93,308 +97,289 @@ const gt = /* @__PURE__ */ te({
93
97
  type: Object
94
98
  }
95
99
  },
96
- setup(i, {
97
- slots: e
100
+ setup(t, {
101
+ slots: l
98
102
  }) {
99
- var C, S;
100
- const g = D(i, "filter", {}), F = D(i, "columns", []), {
101
- t: n
102
- } = re(), {
103
- renderAction: V
104
- } = fe(), v = we({
105
- path: i.path,
106
- filters: g.value,
107
- columns: F,
108
- pagination: i.pagination,
109
- ...i.hookTableProps
103
+ const p = x(t, "filter", {}), S = x(t, "columns", []), {
104
+ t: i
105
+ } = H(), {
106
+ renderAction: T
107
+ } = oe(), b = se({
108
+ path: t.path,
109
+ filters: p.value,
110
+ columns: S,
111
+ pagination: t.pagination,
112
+ ...t.hookTableProps
110
113
  }), {
111
- columns: R,
112
- tablePagination: W,
113
- table: I,
114
- onUpdateColumnSelected: B,
115
- onUpdateChecked: w,
116
- columnSelected: M,
117
- autoRefetch: _,
118
- autoCountdown: k,
119
- onAutoRefetch: q,
120
- isExporting: J,
121
- isExportingRows: K,
122
- isImporting: G,
123
- onExport: H,
124
- onExportRows: Q,
125
- onImport: X
126
- } = v, Y = b(() => R.value.filter((r) => "title" in r && "key" in r).map((r) => ({
127
- label: r.title,
128
- value: r.key
114
+ columns: w,
115
+ tablePagination: j,
116
+ table: L,
117
+ onUpdateColumnSelected: P,
118
+ onUpdateChecked: z,
119
+ columnSelected: D,
120
+ autoRefetch: A,
121
+ autoCountdown: y,
122
+ onAutoRefetch: O,
123
+ isExporting: U,
124
+ isExportingRows: E,
125
+ isImporting: F,
126
+ onExport: V,
127
+ onExportRows: W,
128
+ onImport: I
129
+ } = b, B = m(() => w.value.filter((o) => "title" in o && "key" in o).map((o) => ({
130
+ label: o.title,
131
+ value: o.key
129
132
  }))), {
130
- width: u
131
- } = ne(), Z = b(() => R.value.reduce((c, o) => c + (Number(o == null ? void 0 : o.width) || Number(o == null ? void 0 : o.minWidth) || 110), 0)), p = x({
133
+ width: n
134
+ } = Q(), M = m(() => w.value.reduce((a, d) => a + (Number(d?.width) || Number(d?.minWidth) || 110), 0)), s = v({
132
135
  show: !1
133
- }), f = x({
136
+ }), u = v({
134
137
  show: !1
135
- }), m = x({
138
+ }), c = v({
136
139
  show: !1
137
- }), y = b(() => (i.filterSchema || []).map((r) => {
140
+ }), h = m(() => (t.filterSchema || []).map((o) => {
138
141
  const {
139
- label: c,
140
- ...o
141
- } = r;
142
+ label: a,
143
+ ...d
144
+ } = o;
142
145
  return {
143
- tag: he,
146
+ tag: ae,
144
147
  attrs: {
145
- label: c
148
+ label: a
146
149
  },
147
- children: o
150
+ children: d
148
151
  };
149
152
  })), {
150
- render: $
151
- } = O({
152
- data: (C = y.value) == null ? void 0 : C.slice(1)
153
+ render: _
154
+ } = C({
155
+ data: h.value?.slice(t.filterNumber)
153
156
  }), {
154
- render: ee
155
- } = O({
156
- data: (S = y.value) == null ? void 0 : S.slice(0, 1)
157
- }), s = b(() => ({
157
+ render: q
158
+ } = C({
159
+ data: h.value?.slice(0, t.filterNumber)
160
+ }), g = m(() => ({
158
161
  import: !1,
159
162
  export: !0,
160
163
  refresh: !0,
161
- ...i.tools
164
+ ...t.tools
162
165
  }));
163
- return () => t(be, {
164
- actions: i.actions,
166
+ return () => e(ie, {
167
+ actions: t.actions,
165
168
  scrollbar: !1
166
169
  }, {
167
- sideLeft: () => {
168
- var r;
169
- return e != null && e.sideLeft && u.value >= 1024 ? (r = e == null ? void 0 : e.sideLeft) == null ? void 0 : r.call(e) : void 0;
170
- },
171
- sideRight: () => {
172
- var r;
173
- return e != null && e.sideRight && u.value >= 1024 ? (r = e == null ? void 0 : e.sideRight) == null ? void 0 : r.call(e) : void 0;
174
- },
175
- default: () => {
176
- var r, c, o, T, j, L, N, P, z;
177
- return t("div", {
178
- class: "flex flex-col gap-2 h-full relative"
179
- }, [t("div", {
180
- class: "flex gap-2 justify-between flex-col lg:flex-row"
181
- }, [i.tabs && t("div", {
182
- class: "flex flex-none"
183
- }, [t(oe, {
184
- type: "segment",
185
- size: "small",
186
- style: {
187
- "--n-tab-padding": "4px 10px"
188
- },
189
- "default-value": (c = (r = i.tabs) == null ? void 0 : r[0]) == null ? void 0 : c.value,
190
- value: (o = g.value) == null ? void 0 : o.tab,
191
- onUpdateValue: (a) => {
192
- g.value.tab = a;
193
- }
170
+ sideLeft: () => l?.sideLeft && n.value >= 1024 ? l?.sideLeft?.() : void 0,
171
+ sideRight: () => l?.sideRight && n.value >= 1024 ? l?.sideRight?.() : void 0,
172
+ default: () => e("div", {
173
+ class: "flex flex-col gap-2 h-full relative"
174
+ }, [e("div", {
175
+ class: "flex gap-2 justify-between flex-col lg:flex-row"
176
+ }, [t.tabs && e("div", {
177
+ class: "flex flex-none"
178
+ }, [e(X, {
179
+ type: "segment",
180
+ size: "small",
181
+ style: {
182
+ "--n-tab-padding": "4px 10px"
183
+ },
184
+ "default-value": t.tabs?.[0]?.value,
185
+ value: p.value?.tab,
186
+ onUpdateValue: (o) => {
187
+ p.value.tab = o;
188
+ }
189
+ }, {
190
+ default: () => [t.tabs?.map((o) => e(Y, {
191
+ name: o.value,
192
+ tab: o.label
193
+ }, null))]
194
+ })]), e("div", {
195
+ class: ["overflow-hidden flex-1 flex gap-2"]
196
+ }, [l?.sideLeft && n.value < 1024 && e(r, {
197
+ class: "flex-none",
198
+ secondary: !0,
199
+ onClick: () => {
200
+ u.show = !u.show;
201
+ }
202
+ }, {
203
+ icon: () => e("div", {
204
+ class: "i-tabler:layout-sidebar-inactive size-4"
205
+ }, null)
206
+ }), e("div", {
207
+ class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap", t.tabs ? "justify-end" : "justify-start"]
208
+ }, [k(q)]), l?.sideRight && n.value < 1024 && e(r, {
209
+ class: "flex-none",
210
+ secondary: !0,
211
+ onClick: () => {
212
+ c.show = !c.show;
213
+ }
214
+ }, {
215
+ icon: () => e("div", {
216
+ class: "i-tabler:layout-sidebar-right-inactive size-4"
217
+ }, null)
218
+ })]), e("div", {
219
+ class: "flex gap-2 justify-between lg:justify-end"
220
+ }, [e("div", {
221
+ class: "flex gap-2 items-center"
222
+ }, [h.value.length > t.filterNumber && e(r, {
223
+ iconPlacement: "right",
224
+ onClick: () => {
225
+ s.show = !s.show;
226
+ }
227
+ }, {
228
+ default: () => i("components.button.filter"),
229
+ icon: () => e("div", {
230
+ class: ["i-tabler:chevrons-down size-4 transition-all"]
231
+ }, null)
232
+ }), l?.tools?.(), e(Z, {
233
+ options: B.value,
234
+ value: D.value,
235
+ onUpdateValue: (o) => {
236
+ P(o);
237
+ },
238
+ multiple: !0,
239
+ placement: "bottom-start",
240
+ trigger: "click"
241
+ }, {
242
+ default: () => [e(f, null, {
243
+ trigger: () => e(r, {
244
+ secondary: !0,
245
+ "icon-placement": "right"
246
+ }, {
247
+ icon: () => e("div", {
248
+ class: "i-tabler:columns size-4"
249
+ }, null)
250
+ }),
251
+ default: () => i("components.list.columnSetting")
252
+ })]
253
+ }), g.value.export && e(f, null, {
254
+ trigger: () => e(r, {
255
+ secondary: !0,
256
+ loading: U.value,
257
+ onClick: V
194
258
  }, {
195
- default: () => {
196
- var a;
197
- return [(a = i.tabs) == null ? void 0 : a.map((d) => t(le, {
198
- name: d.value,
199
- tab: d.label
200
- }, null))];
201
- }
202
- })]), t("div", {
203
- class: ["overflow-hidden flex-1 flex gap-2"]
204
- }, [(e == null ? void 0 : e.sideLeft) && u.value < 1024 && t(l, {
205
- class: "flex-none",
259
+ icon: () => e("div", {
260
+ class: "i-tabler:database-export size-4"
261
+ }, null)
262
+ }),
263
+ default: () => i("components.button.export")
264
+ }), g.value.import && e(f, null, {
265
+ trigger: () => e(r, {
206
266
  secondary: !0,
207
- onClick: () => {
208
- f.show = !f.show;
209
- }
267
+ loading: F.value,
268
+ onClick: I
210
269
  }, {
211
- icon: () => t("div", {
212
- class: "i-tabler:layout-sidebar-inactive size-4"
270
+ icon: () => e("div", {
271
+ class: "i-tabler:database-import size-4"
213
272
  }, null)
214
- }), t("div", {
215
- class: ["flex-1 lg:flex gap-2 flex-wrap", i.tabs ? "justify-end" : "justify-start"]
216
- }, [A(ee)]), (e == null ? void 0 : e.sideRight) && u.value < 1024 && t(l, {
217
- class: "flex-none",
273
+ }),
274
+ default: () => i("components.button.import")
275
+ }), g.value.refresh && e(f, null, {
276
+ trigger: () => e(r, {
218
277
  secondary: !0,
219
- onClick: () => {
220
- m.show = !m.show;
221
- }
278
+ onClick: O
222
279
  }, {
223
- icon: () => t("div", {
224
- class: "i-tabler:layout-sidebar-right-inactive size-4"
280
+ icon: () => A.value ? e($, {
281
+ class: "size-4",
282
+ type: "circle",
283
+ percentage: y.value * 10,
284
+ strokeWidth: 20,
285
+ color: "rgba(var(--ui-color-primary))"
286
+ }, {
287
+ default: () => [e("span", {
288
+ class: "text-8px"
289
+ }, [y.value])]
290
+ }) : e("div", {
291
+ class: "i-tabler:refresh size-4"
225
292
  }, null)
226
- })]), t("div", {
227
- class: "flex gap-2 justify-between lg:justify-end"
228
- }, [t("div", {
229
- class: "flex gap-2 items-center"
230
- }, [y.value.length > 1 && t(l, {
231
- iconPlacement: "right",
293
+ }),
294
+ default: () => i("components.button.autoRefresh")
295
+ })]), e("div", {
296
+ class: "flex gap-2 justify-end"
297
+ }, [l.actions?.(), t.actions?.length > 0 && T({
298
+ type: n.value < 1024 ? "dropdown" : "button",
299
+ items: t.actions
300
+ })])])]), e("div", {
301
+ class: "flex-1 min-h-0"
302
+ }, [l?.default?.({
303
+ ...b,
304
+ width: M.value
305
+ })]), e("div", {
306
+ class: "flex justify-between"
307
+ }, [e("div", null, [l?.bottom?.()]), e("div", null, [t.pagination && e(ee, K(j.value, {
308
+ simple: n.value < 768
309
+ }), {
310
+ prefix: () => e("div", null, [i("components.list.total", {
311
+ total: b.total.value || 0
312
+ })])
313
+ })])]), e(ne, {
314
+ number: L.value.checkedRowKeys?.length || 0 || 0,
315
+ group: [[{
316
+ icon: "i-tabler:x",
232
317
  onClick: () => {
233
- p.show = !p.show;
318
+ z?.([]);
234
319
  }
320
+ }], [{
321
+ label: i("components.button.export"),
322
+ icon: "i-tabler:file-export",
323
+ loading: E.value,
324
+ onClick: W
235
325
  }, {
236
- default: () => n("components.button.filter"),
237
- icon: () => t("div", {
238
- class: ["i-tabler:chevrons-down size-4 transition-all"]
239
- }, null)
240
- }), (T = e == null ? void 0 : e.tools) == null ? void 0 : T.call(e), t(ue, {
241
- options: Y.value,
242
- value: M.value,
243
- onUpdateValue: (a) => {
244
- B(a);
245
- },
246
- multiple: !0,
247
- placement: "bottom-start",
248
- trigger: "click"
249
- }, {
250
- default: () => [t(h, null, {
251
- trigger: () => t(l, {
252
- secondary: !0,
253
- "icon-placement": "right"
254
- }, {
255
- icon: () => t("div", {
256
- class: "i-tabler:columns size-4"
257
- }, null)
258
- }),
259
- default: () => n("components.list.columnSetting")
260
- })]
261
- }), s.value.export && t(h, null, {
262
- trigger: () => t(l, {
263
- secondary: !0,
264
- loading: J.value,
265
- onClick: H
326
+ label: i("components.button.delete"),
327
+ type: "error",
328
+ icon: "i-tabler:trash"
329
+ }]]
330
+ }, null), e(te, {
331
+ draggable: !0,
332
+ class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",
333
+ show: s.show,
334
+ onUpdateShow: (o) => s.show = o
335
+ }, {
336
+ default: ({
337
+ draggableClass: o
338
+ }) => {
339
+ let a;
340
+ return e(le, {
341
+ title: i("components.button.filter"),
342
+ handle: o,
343
+ onClose: () => s.show = !1
266
344
  }, {
267
- icon: () => t("div", {
268
- class: "i-tabler:database-export size-4"
269
- }, null)
270
- }),
271
- default: () => n("components.button.export")
272
- }), s.value.import && t(h, null, {
273
- trigger: () => t(l, {
274
- secondary: !0,
275
- loading: G.value,
276
- onClick: X
277
- }, {
278
- icon: () => t("div", {
279
- class: "i-tabler:database-import size-4"
280
- }, null)
281
- }),
282
- default: () => n("components.button.import")
283
- }), s.value.refresh && t(h, null, {
284
- trigger: () => t(l, {
285
- secondary: !0,
286
- onClick: q
287
- }, {
288
- icon: () => _.value ? t(ce, {
289
- class: "size-4",
290
- type: "circle",
291
- percentage: k.value * 10,
292
- strokeWidth: 20,
293
- color: "rgba(var(--ui-color-primary))"
294
- }, {
295
- default: () => [t("span", {
296
- class: "text-8px"
297
- }, [k.value])]
298
- }) : t("div", {
299
- class: "i-tabler:refresh size-4"
300
- }, null)
301
- }),
302
- default: () => n("components.button.autoRefresh")
303
- })]), t("div", {
304
- class: "flex gap-2 justify-end"
305
- }, [(j = e.actions) == null ? void 0 : j.call(e), ((L = i.actions) == null ? void 0 : L.length) > 0 && V({
306
- type: u.value < 1024 ? "dropdown" : "button",
307
- items: i.actions
308
- })])])]), t("div", {
309
- class: "flex-1 min-h-0"
310
- }, [(N = e == null ? void 0 : e.default) == null ? void 0 : N.call(e, {
311
- ...v,
312
- width: Z.value
313
- })]), t("div", {
314
- class: "flex justify-between"
315
- }, [t("div", null, [(P = e == null ? void 0 : e.bottom) == null ? void 0 : P.call(e)]), t("div", null, [i.pagination && t(de, ie(W.value, {
316
- simple: u.value < 768
317
- }), {
318
- prefix: () => t("div", null, [n("components.list.total", {
319
- total: v.total.value || 0
320
- })])
321
- })])]), t(ve, {
322
- number: ((z = I.value.checkedRowKeys) == null ? void 0 : z.length) || 0 || 0,
323
- group: [[{
324
- icon: "i-tabler:x",
325
- onClick: () => {
326
- w == null || w([]);
327
- }
328
- }], [{
329
- label: n("components.button.export"),
330
- icon: "i-tabler:file-export",
331
- loading: K.value,
332
- onClick: Q
333
- }, {
334
- label: n("components.button.delete"),
335
- type: "error",
336
- icon: "i-tabler:trash"
337
- }]]
338
- }, null), t(pe, {
339
- draggable: !0,
340
- class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
341
- show: p.show,
342
- onUpdateShow: (a) => p.show = a
345
+ default: () => [e(re, {
346
+ showLabel: !0,
347
+ labelPlacement: "top"
348
+ }, ue(a = k(_)) ? a : {
349
+ default: () => [a]
350
+ })]
351
+ });
352
+ }
353
+ }), e(N, {
354
+ show: u.show,
355
+ onUpdateShow: (o) => u.show = o,
356
+ autoFocus: !1,
357
+ placement: "left"
358
+ }, {
359
+ default: () => [e(R, {
360
+ title: t.sideLeftTitle || i("components.button.sideLeft"),
361
+ onClose: () => u.show = !1,
362
+ scrollbar: !1
343
363
  }, {
344
- default: ({
345
- draggableClass: a
346
- }) => {
347
- let d;
348
- return t(me, {
349
- title: n("components.button.filter"),
350
- handle: a,
351
- onClose: () => p.show = !1
352
- }, {
353
- default: () => [t(ge, {
354
- showLabel: !0,
355
- labelPlacement: "top"
356
- }, ye(d = A($)) ? d : {
357
- default: () => [d]
358
- })]
359
- });
360
- }
361
- }), t(U, {
362
- show: f.show,
363
- onUpdateShow: (a) => f.show = a,
364
- autoFocus: !1,
365
- placement: "left"
366
- }, {
367
- default: () => [t(E, {
368
- title: i.sideLeftTitle || n("components.button.sideLeft"),
369
- onClose: () => f.show = !1,
370
- scrollbar: !1
371
- }, {
372
- default: () => {
373
- var a;
374
- return [(a = e == null ? void 0 : e.sideLeft) == null ? void 0 : a.call(e)];
375
- }
376
- })]
377
- }), t(U, {
378
- show: m.show,
379
- onUpdateShow: (a) => m.show = a,
380
- autoFocus: !1,
381
- placement: "right"
364
+ default: () => [l?.sideLeft?.()]
365
+ })]
366
+ }), e(N, {
367
+ show: c.show,
368
+ onUpdateShow: (o) => c.show = o,
369
+ autoFocus: !1,
370
+ placement: "right"
371
+ }, {
372
+ default: () => [e(R, {
373
+ title: t.sideRightTitle || i("components.button.sideRight"),
374
+ onClose: () => c.show = !1,
375
+ scrollbar: !1
382
376
  }, {
383
- default: () => [t(E, {
384
- title: i.sideRightTitle || n("components.button.sideRight"),
385
- onClose: () => m.show = !1,
386
- scrollbar: !1
387
- }, {
388
- default: () => {
389
- var a;
390
- return [(a = e == null ? void 0 : e.sideRight) == null ? void 0 : a.call(e)];
391
- }
392
- })]
393
- })]);
394
- }
377
+ default: () => [l?.sideRight?.()]
378
+ })]
379
+ })])
395
380
  });
396
381
  }
397
382
  });
398
383
  export {
399
- gt as DuxTableLayout
384
+ rt as DuxTableLayout
400
385
  };