@duxweb/dvha-pro 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/cjs/component.cjs +1 -1
  2. package/dist/cjs/components/card/card.cjs +1 -1
  3. package/dist/cjs/components/chart/echart.cjs +1 -1
  4. package/dist/cjs/components/code/code.cjs +1 -0
  5. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  6. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  7. package/dist/cjs/components/data/selectModal.cjs +1 -1
  8. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  9. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  10. package/dist/cjs/components/form/formItem.cjs +1 -1
  11. package/dist/cjs/components/form/formLayout.cjs +1 -1
  12. package/dist/cjs/components/form/modalForm.cjs +1 -1
  13. package/dist/cjs/components/form/pageForm.cjs +1 -1
  14. package/dist/cjs/components/form/settingForm.cjs +1 -1
  15. package/dist/cjs/components/icon/icon.cjs +1 -1
  16. package/dist/cjs/components/layout/filter.cjs +1 -1
  17. package/dist/cjs/components/layout/filterLayout.cjs +1 -0
  18. package/dist/cjs/components/layout/list.cjs +1 -1
  19. package/dist/cjs/components/layout/table.cjs +1 -1
  20. package/dist/cjs/components/level/level.cjs +1 -1
  21. package/dist/cjs/components/modal/modal.cjs +1 -1
  22. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  23. package/dist/cjs/components/panel/collapse.cjs +1 -0
  24. package/dist/cjs/components/panel/setting.cjs +1 -1
  25. package/dist/cjs/components/status/listEmpty.cjs +1 -0
  26. package/dist/cjs/components/table/table.cjs +1 -0
  27. package/dist/cjs/components/table/tablePage.cjs +1 -1
  28. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  29. package/dist/cjs/components/upload/config.cjs +1 -0
  30. package/dist/cjs/components/upload/file.cjs +1 -1
  31. package/dist/cjs/components/upload/image.cjs +1 -1
  32. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  33. package/dist/cjs/components/upload/manager.cjs +1 -1
  34. package/dist/cjs/dvha-pro.css +1 -1
  35. package/dist/cjs/hooks/action.cjs +1 -1
  36. package/dist/cjs/hooks/dialog.cjs +1 -1
  37. package/dist/cjs/hooks/drawer.cjs +1 -1
  38. package/dist/cjs/hooks/modal.cjs +1 -1
  39. package/dist/cjs/hooks/table/image.cjs +1 -1
  40. package/dist/cjs/hooks/table/media.cjs +1 -1
  41. package/dist/cjs/hooks/table.cjs +1 -1
  42. package/dist/cjs/index.cjs +1 -1
  43. package/dist/cjs/langs/en-US.json.cjs +1 -1
  44. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  45. package/dist/cjs/pages/authLayout.cjs +1 -1
  46. package/dist/cjs/pages/layout/page.cjs +1 -1
  47. package/dist/cjs/pages/login.cjs +1 -1
  48. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  49. package/dist/cjs/pages/menu/button.cjs +1 -1
  50. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  51. package/dist/cjs/pages/menu/main.cjs +1 -1
  52. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  53. package/dist/cjs/pages/page.cjs +1 -1
  54. package/dist/cjs/pages/page404.cjs +1 -1
  55. package/dist/cjs/pages/pageStatus.cjs +1 -1
  56. package/dist/cjs/theme/naiveTheme.cjs +1 -1
  57. package/dist/cjs/theme/uno.css.cjs +23 -7
  58. package/dist/esm/component.js +36 -34
  59. package/dist/esm/components/card/card.js +6 -6
  60. package/dist/esm/components/chart/echart.js +17 -6
  61. package/dist/esm/components/code/code.js +53 -0
  62. package/dist/esm/components/crop/imageCrop.js +37 -26
  63. package/dist/esm/components/data/dynamicSelect.js +29 -18
  64. package/dist/esm/components/data/selectModal.js +49 -38
  65. package/dist/esm/components/drawer/drawer.js +17 -28
  66. package/dist/esm/components/drawer/drawerPage.js +54 -17
  67. package/dist/esm/components/form/formItem.js +17 -17
  68. package/dist/esm/components/form/formLayout.js +8 -8
  69. package/dist/esm/components/form/modalForm.js +44 -35
  70. package/dist/esm/components/form/pageForm.js +81 -43
  71. package/dist/esm/components/form/settingForm.js +28 -17
  72. package/dist/esm/components/icon/icon.js +23 -12
  73. package/dist/esm/components/layout/filter.js +15 -11
  74. package/dist/esm/components/layout/filterLayout.js +34 -0
  75. package/dist/esm/components/layout/list.js +206 -160
  76. package/dist/esm/components/layout/table.js +212 -185
  77. package/dist/esm/components/level/level.js +28 -17
  78. package/dist/esm/components/modal/modal.js +9 -9
  79. package/dist/esm/components/modal/modalPage.js +2 -2
  80. package/dist/esm/components/panel/collapse.js +49 -0
  81. package/dist/esm/components/panel/setting.js +3 -3
  82. package/dist/esm/components/status/listEmpty.js +26 -0
  83. package/dist/esm/components/table/table.js +110 -0
  84. package/dist/esm/components/table/tablePage.js +24 -18
  85. package/dist/esm/components/tree/treeFilter.js +44 -39
  86. package/dist/esm/components/upload/config.js +32 -0
  87. package/dist/esm/components/upload/file.js +142 -116
  88. package/dist/esm/components/upload/image.js +95 -66
  89. package/dist/esm/components/upload/manage/item.js +17 -6
  90. package/dist/esm/components/upload/manager.js +202 -164
  91. package/dist/esm/dvha-pro.css +1 -1
  92. package/dist/esm/hooks/action.js +77 -75
  93. package/dist/esm/hooks/dialog.js +13 -2
  94. package/dist/esm/hooks/drawer.js +13 -2
  95. package/dist/esm/hooks/modal.js +13 -2
  96. package/dist/esm/hooks/table/image.js +21 -10
  97. package/dist/esm/hooks/table/media.js +20 -9
  98. package/dist/esm/hooks/table.js +16 -13
  99. package/dist/esm/index.js +174 -164
  100. package/dist/esm/langs/en-US.json.js +1 -1
  101. package/dist/esm/langs/zh-CN.json.js +1 -1
  102. package/dist/esm/pages/authLayout.js +19 -8
  103. package/dist/esm/pages/layout/page.js +17 -6
  104. package/dist/esm/pages/login.js +40 -29
  105. package/dist/esm/pages/menu/avatar.js +45 -34
  106. package/dist/esm/pages/menu/button.js +23 -12
  107. package/dist/esm/pages/menu/cmd.js +45 -34
  108. package/dist/esm/pages/menu/main.js +40 -27
  109. package/dist/esm/pages/menu/mobile.js +13 -2
  110. package/dist/esm/pages/page.js +1 -1
  111. package/dist/esm/pages/page404.js +20 -9
  112. package/dist/esm/pages/pageStatus.js +31 -15
  113. package/dist/esm/theme/naiveTheme.js +6 -6
  114. package/dist/esm/theme/uno.css.js +23 -7
  115. package/dist/types/components/code/code.d.ts +44 -0
  116. package/dist/types/components/code/index.d.ts +1 -0
  117. package/dist/types/components/drawer/drawer.d.ts +2 -0
  118. package/dist/types/components/drawer/drawerPage.d.ts +20 -1
  119. package/dist/types/components/form/formItem.d.ts +2 -2
  120. package/dist/types/components/form/formLayout.d.ts +3 -3
  121. package/dist/types/components/form/modalForm.d.ts +3 -3
  122. package/dist/types/components/form/pageForm.d.ts +12 -0
  123. package/dist/types/components/index.d.ts +1 -0
  124. package/dist/types/components/layout/filterLayout.d.ts +32 -0
  125. package/dist/types/components/layout/index.d.ts +1 -0
  126. package/dist/types/components/layout/table.d.ts +3 -0
  127. package/dist/types/components/panel/collapse.d.ts +14 -0
  128. package/dist/types/components/panel/index.d.ts +1 -0
  129. package/dist/types/components/select/cardSelect.d.ts +1 -1
  130. package/dist/types/components/status/index.d.ts +1 -0
  131. package/dist/types/components/status/listEmpty.d.ts +11 -0
  132. package/dist/types/components/table/index.d.ts +1 -0
  133. package/dist/types/components/table/table.d.ts +6552 -0
  134. package/dist/types/components/table/tablePage.d.ts +3 -0
  135. package/dist/types/components/tree/treeFilter.d.ts +13 -12
  136. package/dist/types/components/upload/config.d.ts +13 -0
  137. package/dist/types/components/upload/file.d.ts +4 -0
  138. package/dist/types/components/upload/image.d.ts +30 -2
  139. package/dist/types/components/upload/manager.d.ts +4 -0
  140. package/dist/types/hooks/drawer.d.ts +1 -0
  141. package/dist/types/hooks/table/types.d.ts +1 -0
  142. package/dist/types/main.d.ts +6 -0
  143. package/dist/types/pages/pageStatus.d.ts +11 -1
  144. package/package.json +6 -4
@@ -1,17 +1,20 @@
1
- import { defineComponent as $, toRef as j, ref as D, computed as m, reactive as ee, watch as te, onMounted as ie, createVNode as e, h as U, mergeProps as ae } from "vue";
2
- import { useI18n as ne, useExtendList as le, useJsonSchema as E } from "@duxweb/dvha-core";
3
- import { useWindowSize as re } from "@vueuse/core";
4
- import { NTooltip as f, NCheckbox as q, NTabs as ce, NTab as ue, NButton as d, NPopover as oe, NSpin as de, NProgress as pe, NPagination as me } from "naive-ui";
5
- import { useAction as fe } from "../../hooks/action.js";
1
+ import { defineComponent as ie, toRef as U, ref as T, computed as m, reactive as S, watch as le, onMounted as ne, createVNode as e, h as O, mergeProps as re, isVNode as oe } from "vue";
2
+ import { useI18n as ue, useExtendList as ce, useJsonSchema as E } from "@duxweb/dvha-core";
3
+ import { useWindowSize as de } from "@vueuse/core";
4
+ import { NTooltip as s, NCheckbox as q, NTabs as pe, NTab as me, NButton as d, NSpin as fe, NProgress as ge, NPagination as he, NModal as ve, NDrawer as I } from "naive-ui";
5
+ import { useAction as se } 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 be from "../modal/modalPage.js";
10
11
  import "jinrishici";
11
12
  import "lodash-es";
12
13
  import "vue-draggable-plus";
14
+ import { DuxDrawerPage as M } from "../drawer/drawerPage.js";
13
15
  import "aieditor";
14
16
  import "vee-validate";
17
+ import "vue-router";
15
18
  import "@vee-validate/i18n";
16
19
  import "colorizr";
17
20
  import "echarts";
@@ -21,21 +24,34 @@ import "@unocss/preset-typography";
21
24
  import "unocss/preset-wind4";
22
25
  import "@vee-validate/i18n/dist/locale/en.json";
23
26
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
24
- import "vue-router";
25
27
  import "vue-command-palette";
26
28
  import "@duxweb/dvha-naiveui";
27
- import { DuxPage as ge } from "../../pages/page.js";
29
+ import { DuxPage as xe } from "../../pages/page.js";
28
30
  import "../../pages/page404.js";
29
- import { DuxPageEmpty as ve } from "../../pages/pageEmpty.js";
31
+ import { DuxPageEmpty as we } from "../../pages/pageEmpty.js";
30
32
  import "@iconify-json/tabler/icons.json";
31
- import { DuxTableFilter as he } from "./filter.js";
32
- import { DuxTableTools as be } from "./tools.js";
33
+ import { DuxTableFilter as ye } from "./filter.js";
34
+ import { DuxFilterLayout as Se } from "./filterLayout.js";
35
+ import { DuxTableTools as ke } from "./tools.js";
33
36
  import "mime";
37
+ import "vue3-ace-editor";
38
+ import "ace-builds/src-noconflict/mode-vue";
39
+ import "ace-builds/src-noconflict/mode-javascript";
40
+ import "ace-builds/src-noconflict/mode-html";
41
+ import "ace-builds/src-noconflict/mode-json";
42
+ import "ace-builds/src-noconflict/mode-json5";
43
+ import "ace-builds/src-noconflict/theme-tomorrow_night";
44
+ import "ace-builds/src-noconflict/theme-tomorrow";
45
+ import "ace-builds/src-noconflict/ext-searchbox";
46
+ import "ace-builds/src-noconflict/ext-language_tools";
47
+ import "ace-builds/src-noconflict/mode-snippets";
34
48
  import "dayjs";
35
- import { useDrawer as xe } from "../../hooks/drawer.js";
36
49
  import "@tanstack/vue-query";
37
50
  import "pinia";
38
- const it = /* @__PURE__ */ $({
51
+ function Ce(i) {
52
+ return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !oe(i);
53
+ }
54
+ const yt = /* @__PURE__ */ ie({
39
55
  name: "DuxListLayout",
40
56
  props: {
41
57
  rowKey: {
@@ -81,106 +97,107 @@ const it = /* @__PURE__ */ $({
81
97
  setup(i, {
82
98
  slots: t
83
99
  }) {
84
- var P;
85
- const I = j(i.filter || {}), {
100
+ var F;
101
+ const V = U(i.filter || {}), {
86
102
  t: r
87
- } = ne(), {
88
- renderAction: O
89
- } = fe(), W = j(i.pagination && typeof i.pagination == "object" ? i.pagination : {
103
+ } = ue(), {
104
+ renderAction: W
105
+ } = se(), B = U(i.pagination && typeof i.pagination == "object" ? i.pagination : {
90
106
  page: 1,
91
107
  pageSize: 20
92
- }), g = D({}), B = () => {
93
- Object.assign(g.value, I.value);
94
- }, a = le({
108
+ }), b = T({}), J = () => {
109
+ Object.assign(b.value, V.value);
110
+ }, l = ce({
95
111
  path: i.path,
96
- filters: g.value,
97
- pagination: W.value
112
+ filters: b.value,
113
+ pagination: B.value
98
114
  }), {
99
- meta: h,
100
- list: y,
101
- isLoading: s,
102
- autoRefetch: V,
103
- autoCountdown: w,
104
- onAutoRefetch: J,
105
- isExporting: b,
106
- isExportingRows: M,
107
- isImporting: S,
108
- onExport: K,
109
- onExportRows: Q,
110
- onImport: G
111
- } = a, H = m(() => ({
112
- page: a.page.value,
113
- pageSize: a.pageSize.value,
114
- pageCount: a.pageCount.value,
115
- pageSizes: a.pageSizes,
115
+ meta: w,
116
+ list: k,
117
+ isLoading: C,
118
+ autoRefetch: _,
119
+ autoCountdown: z,
120
+ onAutoRefetch: K,
121
+ isExporting: Q,
122
+ isExportingRows: G,
123
+ isImporting: L,
124
+ onExport: H,
125
+ onExportRows: X,
126
+ onImport: Y
127
+ } = l, Z = m(() => ({
128
+ page: l.page.value,
129
+ pageSize: l.pageSize.value,
130
+ pageCount: l.pageCount.value,
131
+ pageSizes: l.pageSizes,
116
132
  pageSlot: 5,
117
- onUpdatePage: a.onUpdatePage,
118
- onUpdatePageSize: a.onUpdatePageSize,
133
+ onUpdatePage: l.onUpdatePage,
134
+ onUpdatePageSize: l.onUpdatePageSize,
119
135
  showSizePicker: !0,
120
136
  showQuickJumper: !0
121
- })), k = ee({
122
- show: !1,
123
- collapse: !1
124
- }), v = D(((P = i.filterSchema) == null ? void 0 : P.length) || 0), {
137
+ })), g = S({
138
+ show: !1
139
+ }), h = S({
140
+ show: !1
141
+ }), v = S({
142
+ show: !1
143
+ }), x = T(((F = i.filterSchema) == null ? void 0 : F.length) || 0), {
125
144
  width: u
126
- } = re(), C = () => {
145
+ } = de(), R = () => {
127
146
  var p;
128
147
  if (!((p = i.filterSchema) != null && p.length)) return 0;
129
- const l = i.filterSchema.length;
130
- if (l <= 3)
131
- return l;
132
- const o = u.value || 1024;
133
- let c = 3;
134
- return o >= 1280 ? c = 4 : o >= 1024 ? c = 3 : o >= 768 ? c = 2 : c = 1, Math.min(l, c);
148
+ const n = i.filterSchema.length;
149
+ if (n <= 3)
150
+ return n;
151
+ const c = u.value || 1024;
152
+ let o = 3;
153
+ return c >= 1280 ? o = 4 : c >= 1024 ? o = 3 : c >= 768 ? o = 2 : o = 1, Math.min(n, o);
135
154
  };
136
- te(u, () => {
137
- v.value = C();
138
- }), ie(() => {
139
- v.value = C();
155
+ le(u, () => {
156
+ x.value = R();
157
+ }), ne(() => {
158
+ x.value = R();
140
159
  });
141
- const X = m(() => (i.filterSchema || []).slice(0, v.value)), z = m(() => (i.filterSchema || []).slice(v.value)), Y = m(() => z.value.length > 0), R = (l) => l.map((o) => {
160
+ const $ = m(() => (i.filterSchema || []).slice(0, x.value)), P = m(() => (i.filterSchema || []).slice(x.value)), ee = m(() => P.value.length > 0), A = (n) => n.map((c) => {
142
161
  const {
143
- title: c,
162
+ title: o,
144
163
  ...p
145
- } = o;
164
+ } = c;
146
165
  return {
147
- tag: he,
166
+ tag: ye,
148
167
  attrs: {
149
- label: c,
168
+ label: o,
150
169
  class: "flex-1 min-w-0"
151
170
  },
152
171
  children: p
153
172
  };
154
173
  }), {
155
- render: Z
174
+ render: te
156
175
  } = E({
157
- data: m(() => R(X.value))
176
+ data: m(() => A($.value))
158
177
  }), {
159
- render: _
178
+ render: ae
160
179
  } = E({
161
- data: m(() => R(z.value))
162
- }), x = m(() => ({
180
+ data: m(() => A(P.value))
181
+ }), y = m(() => ({
163
182
  import: !0,
164
183
  export: !0,
165
184
  refresh: !0,
166
185
  ...i.tools
167
- })), {
168
- show: A
169
- } = xe();
170
- return () => e(ge, {
186
+ }));
187
+ return () => e(xe, {
171
188
  padding: !1,
172
189
  scrollbar: !1
173
190
  }, {
174
191
  sideLeft: () => {
175
- var l;
176
- return t != null && t.sideLeft && u.value >= 1024 ? (l = t == null ? void 0 : t.sideLeft) == null ? void 0 : l.call(t) : void 0;
192
+ var n;
193
+ return t != null && t.sideLeft && u.value >= 1024 ? (n = t == null ? void 0 : t.sideLeft) == null ? void 0 : n.call(t) : void 0;
177
194
  },
178
195
  sideRight: () => {
179
- var l;
180
- return t != null && t.sideRight && u.value >= 1024 ? (l = t == null ? void 0 : t.sideRight) == null ? void 0 : l.call(t) : void 0;
196
+ var n;
197
+ return t != null && t.sideRight && u.value >= 1024 ? (n = t == null ? void 0 : t.sideRight) == null ? void 0 : n.call(t) : void 0;
181
198
  },
182
199
  default: () => {
183
- var l, o, c, p, L, F, N;
200
+ var n, c, o, p, N, j, D;
184
201
  return e("div", {
185
202
  class: "flex flex-col h-full relative"
186
203
  }, [e("div", {
@@ -189,32 +206,32 @@ const it = /* @__PURE__ */ $({
189
206
  class: "flex flex-col lg:flex-row lg:items-center gap-2"
190
207
  }, [i.checkable && e("div", {
191
208
  class: "hidden lg:flex items-center pl-2"
192
- }, [e(f, null, {
209
+ }, [e(s, null, {
193
210
  trigger: () => e("div", {
194
211
  class: "flex items-center"
195
212
  }, [e(q, {
196
- checked: a.isAllChecked.value,
197
- indeterminate: a.isIndeterminate.value,
198
- onUpdateChecked: a.toggleSelectAll
213
+ checked: l.isAllChecked.value,
214
+ indeterminate: l.isIndeterminate.value,
215
+ onUpdateChecked: l.toggleSelectAll
199
216
  }, null)]),
200
217
  default: () => r("components.list.selectAll")
201
- })]), i.tabs && e("div", null, [e(ce, {
218
+ })]), i.tabs && e("div", null, [e(pe, {
202
219
  type: "segment",
203
220
  size: "small",
204
221
  style: {
205
222
  "--n-tab-padding": "4px 10px"
206
223
  },
207
- "default-value": (o = (l = i.tabs) == null ? void 0 : l[0]) == null ? void 0 : o.value,
208
- value: (c = g.value) == null ? void 0 : c.tab,
209
- onUpdateValue: (n) => {
210
- g.value.tab = n;
224
+ "default-value": (c = (n = i.tabs) == null ? void 0 : n[0]) == null ? void 0 : c.value,
225
+ value: (o = b.value) == null ? void 0 : o.tab,
226
+ onUpdateValue: (a) => {
227
+ b.value.tab = a;
211
228
  }
212
229
  }, {
213
230
  default: () => {
214
- var n;
215
- return [(n = i.tabs) == null ? void 0 : n.map((T) => e(ue, {
216
- name: T.value,
217
- tab: T.label
231
+ var a;
232
+ return [(a = i.tabs) == null ? void 0 : a.map((f) => e(me, {
233
+ name: f.value,
234
+ tab: f.label
218
235
  }, null))];
219
236
  }
220
237
  })]), e("div", {
@@ -222,17 +239,8 @@ const it = /* @__PURE__ */ $({
222
239
  }, [(t == null ? void 0 : t.sideLeft) && u.value < 1024 && e(d, {
223
240
  class: "flex-none",
224
241
  secondary: !0,
225
- loading: b.value,
226
242
  onClick: () => {
227
- A({
228
- title: i.sideLeftTitle,
229
- component: () => {
230
- var n;
231
- return e("div", null, [(n = t == null ? void 0 : t.sideLeft) == null ? void 0 : n.call(t)]);
232
- },
233
- width: 300,
234
- placement: "left"
235
- });
243
+ h.show = !h.show;
236
244
  }
237
245
  }, {
238
246
  icon: () => e("div", {
@@ -240,10 +248,10 @@ const it = /* @__PURE__ */ $({
240
248
  }, null)
241
249
  }), e("div", {
242
250
  class: "flex flex-wrap gap-2 items-center flex-1 lg:flex-none"
243
- }, [U(Z)]), e(d, {
251
+ }, [O(te)]), e(d, {
244
252
  type: "primary",
245
253
  secondary: !0,
246
- onClick: B
254
+ onClick: J
247
255
  }, {
248
256
  icon: () => e("div", {
249
257
  class: "i-tabler:search size-4"
@@ -252,80 +260,63 @@ const it = /* @__PURE__ */ $({
252
260
  }), (t == null ? void 0 : t.sideRight) && u.value < 1024 && e(d, {
253
261
  class: "flex-none",
254
262
  secondary: !0,
255
- loading: b.value,
256
263
  onClick: () => {
257
- A({
258
- title: i.sideRightTitle,
259
- component: () => {
260
- var n;
261
- return e("div", null, [(n = t == null ? void 0 : t.sideRight) == null ? void 0 : n.call(t)]);
262
- },
263
- width: 300,
264
- placement: "right"
265
- });
264
+ v.show = !v.show;
266
265
  }
267
266
  }, {
268
267
  icon: () => e("div", {
269
268
  class: "i-tabler:layout-sidebar-right-inactive size-4"
270
269
  }, null)
271
- }), Y.value && e(oe, {
272
- trigger: "click",
273
- displayDirective: "show"
270
+ }), ee.value && e(d, {
271
+ iconPlacement: "right",
272
+ onClick: () => {
273
+ g.show = !g.show;
274
+ }
274
275
  }, {
275
- trigger: () => e(d, {
276
- iconPlacement: "right",
277
- onClick: () => {
278
- k.collapse = !k.collapse;
279
- }
280
- }, {
281
- default: () => r("components.button.advanced"),
282
- icon: () => e("div", {
283
- class: ["i-tabler:chevrons-down size-4 transition-all"]
284
- }, null)
285
- }),
286
- default: () => e("div", {
287
- class: "flex flex-col gap-2 py-1"
288
- }, [U(_)])
276
+ default: () => r("components.button.advanced"),
277
+ icon: () => e("div", {
278
+ class: ["i-tabler:chevrons-down size-4 transition-all"]
279
+ }, null)
289
280
  })])]), e("div", {
290
281
  class: "flex gap-2"
291
- }, [(p = t.actions) == null ? void 0 : p.call(t), ((L = i.actions) == null ? void 0 : L.length) > 0 && O({
282
+ }, [(p = t.actions) == null ? void 0 : p.call(t), ((N = i.actions) == null ? void 0 : N.length) > 0 && W({
292
283
  type: u.value < 1024 ? "dropdown" : "button",
293
284
  text: u.value < 1024,
294
285
  items: i.actions
295
- })])]), e(de, {
296
- show: s.value,
286
+ })])]), e(fe, {
287
+ show: C.value,
297
288
  class: "flex-1 min-h-0",
298
289
  contentClass: "h-full"
299
290
  }, {
300
291
  default: () => {
301
- var n;
292
+ var a;
302
293
  return [e("div", {
303
294
  class: ["h-full overflow-auto rounded-lg px-3"]
304
- }, [!s.value && y.value.length === 0 && e("div", {
295
+ }, [!C.value && k.value.length === 0 && e("div", {
305
296
  class: "flex justify-center items-center h-full"
306
- }, [e(ve, null, null)]), y.value.length > 0 && ((n = t == null ? void 0 : t.default) == null ? void 0 : n.call(t, a))])];
297
+ }, [e(we, null, null)]), k.value.length > 0 && ((a = t == null ? void 0 : t.default) == null ? void 0 : a.call(t, l))])];
307
298
  }
308
299
  }), e("div", {
309
300
  class: "flex justify-between px-3 py-2 gap-2"
310
301
  }, [e("div", null, [e("div", {
311
302
  class: "flex gap-1 items-center"
312
- }, [i.checkable && e(f, null, {
303
+ }, [i.checkable && e(s, null, {
313
304
  trigger: () => e(d, {
314
- loading: S.value,
305
+ loading: L.value,
315
306
  circle: !0,
316
307
  quaternary: !0
317
308
  }, {
318
309
  default: () => [e(q, {
319
- checked: a.isAllChecked.value,
320
- indeterminate: a.isIndeterminate.value,
321
- onUpdateChecked: a.toggleSelectAll
310
+ checked: l.isAllChecked.value,
311
+ indeterminate: l.isIndeterminate.value,
312
+ onUpdateChecked: l.toggleSelectAll
322
313
  }, null)]
323
314
  }),
324
315
  default: () => r("components.list.selectAll")
325
- }), (F = t == null ? void 0 : t.tools) == null ? void 0 : F.call(t), x.value.export && e(f, null, {
316
+ }), (j = t == null ? void 0 : t.tools) == null ? void 0 : j.call(t), y.value.export && e(s, null, {
326
317
  trigger: () => e(d, {
327
- loading: b.value,
328
- onClick: K,
318
+ loading: Q.value,
319
+ onClick: H,
329
320
  circle: !0,
330
321
  quaternary: !0
331
322
  }, {
@@ -334,10 +325,10 @@ const it = /* @__PURE__ */ $({
334
325
  }, null)
335
326
  }),
336
327
  default: () => r("components.button.export")
337
- }), x.value.import && e(f, null, {
328
+ }), y.value.import && e(s, null, {
338
329
  trigger: () => e(d, {
339
- loading: S.value,
340
- onClick: G,
330
+ loading: L.value,
331
+ onClick: Y,
341
332
  circle: !0,
342
333
  quaternary: !0
343
334
  }, {
@@ -346,22 +337,22 @@ const it = /* @__PURE__ */ $({
346
337
  }, null)
347
338
  }),
348
339
  default: () => r("components.button.import")
349
- }), x.value.refresh && e(f, null, {
340
+ }), y.value.refresh && e(s, null, {
350
341
  trigger: () => e(d, {
351
- onClick: J,
342
+ onClick: K,
352
343
  circle: !0,
353
344
  quaternary: !0
354
345
  }, {
355
- icon: () => V.value ? e(pe, {
346
+ icon: () => _.value ? e(ge, {
356
347
  class: "size-4",
357
348
  type: "circle",
358
- percentage: w.value * 10,
349
+ percentage: z.value * 10,
359
350
  strokeWidth: 20,
360
351
  color: "rgba(var(--ui-color-primary))"
361
352
  }, {
362
353
  default: () => [e("span", {
363
354
  class: "text-8px"
364
- }, [w.value])]
355
+ }, [z.value])]
365
356
  }) : e("div", {
366
357
  class: "i-tabler:refresh size-4"
367
358
  }, null)
@@ -369,38 +360,93 @@ const it = /* @__PURE__ */ $({
369
360
  default: () => r("components.button.autoRefresh")
370
361
  })])]), e("div", {
371
362
  class: "flex items-center gap-2"
372
- }, [(N = t == null ? void 0 : t.bottom) == null ? void 0 : N.call(t), i.pagination && e(me, ae(H.value, {
363
+ }, [(D = t == null ? void 0 : t.bottom) == null ? void 0 : D.call(t), i.pagination && e(he, re(Z.value, {
373
364
  simple: u.value < 768
374
365
  }), {
375
366
  prefix: () => {
376
- var n;
367
+ var a;
377
368
  return e("div", null, [r("components.list.total", {
378
- total: ((n = h == null ? void 0 : h.value) == null ? void 0 : n.total) || 0
369
+ total: ((a = w == null ? void 0 : w.value) == null ? void 0 : a.total) || 0
379
370
  })]);
380
371
  }
381
- })])]), e(be, {
382
- number: a.checkeds.value.length,
372
+ })])]), e(ke, {
373
+ number: l.checkeds.value.length,
383
374
  group: [[{
384
375
  icon: "i-tabler:x",
385
376
  onClick: () => {
386
- var n;
387
- a.checkeds.value = [], (n = a.onUpdateChecked) == null || n.call(a, []);
377
+ var a;
378
+ l.checkeds.value = [], (a = l.onUpdateChecked) == null || a.call(l, []);
388
379
  }
389
380
  }], [{
390
381
  label: r("components.button.export"),
391
382
  icon: "i-tabler:file-export",
392
- loading: M.value,
393
- onClick: Q
383
+ loading: G.value,
384
+ onClick: X
394
385
  }, {
395
386
  label: r("components.button.delete"),
396
387
  type: "error",
397
388
  icon: "i-tabler:trash"
398
389
  }]]
399
- }, null)]);
390
+ }, null), e(ve, {
391
+ draggable: !0,
392
+ class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
393
+ show: g.show,
394
+ onUpdateShow: (a) => g.show = a
395
+ }, {
396
+ default: ({
397
+ draggableClass: a
398
+ }) => {
399
+ let f;
400
+ return e(be, {
401
+ title: r("components.button.filter"),
402
+ handle: a,
403
+ onClose: () => g.show = !1
404
+ }, {
405
+ default: () => [e(Se, {
406
+ showLabel: !0,
407
+ labelPlacement: "top"
408
+ }, Ce(f = O(ae)) ? f : {
409
+ default: () => [f]
410
+ })]
411
+ });
412
+ }
413
+ }), e(I, {
414
+ show: h.show,
415
+ onUpdateShow: (a) => h.show = a,
416
+ autoFocus: !1,
417
+ placement: "left"
418
+ }, {
419
+ default: () => [e(M, {
420
+ title: i.sideLeftTitle || r("components.button.sideLeft"),
421
+ onClose: () => h.show = !1,
422
+ scrollbar: !1
423
+ }, {
424
+ default: () => {
425
+ var a;
426
+ return [(a = t == null ? void 0 : t.sideLeft) == null ? void 0 : a.call(t)];
427
+ }
428
+ })]
429
+ }), e(I, {
430
+ show: v.show,
431
+ onUpdateShow: (a) => v.show = a,
432
+ autoFocus: !1,
433
+ placement: "right"
434
+ }, {
435
+ default: () => [e(M, {
436
+ title: i.sideRightTitle || r("components.button.sideRight"),
437
+ onClose: () => v.show = !1,
438
+ scrollbar: !1
439
+ }, {
440
+ default: () => {
441
+ var a;
442
+ return [(a = t == null ? void 0 : t.sideRight) == null ? void 0 : a.call(t)];
443
+ }
444
+ })]
445
+ })]);
400
446
  }
401
447
  });
402
448
  }
403
449
  });
404
450
  export {
405
- it as DuxListLayout
451
+ yt as DuxListLayout
406
452
  };