@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 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";
1
+ import { defineComponent as Y, toRef as z, ref as P, computed as c, reactive as b, watch as Z, onMounted as $, createVNode as e, h as R, mergeProps as ee, isVNode as te } from "vue";
2
+ import { useI18n as le, useExtendList as ae, useJsonSchema as A } from "@duxweb/dvha-core";
3
+ import { useWindowSize as ie } from "@vueuse/core";
4
+ import { NTooltip as f, NCheckbox as F, NTabs as oe, NTab as ne, NButton as s, NSpin as re, NProgress as se, NPagination as ue, NModal as ce, NDrawer as j } from "naive-ui";
5
+ import { useAction as de } 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
+ import pe from "../modal/modalPage.js";
11
11
  import "jinrishici";
12
12
  import "lodash-es";
13
13
  import "vue-draggable-plus";
14
- import { DuxDrawerPage as M } from "../drawer/drawerPage.js";
14
+ import { DuxDrawerPage as N } from "../drawer/drawerPage.js";
15
15
  import "aieditor";
16
16
  import "vee-validate";
17
17
  import "vue-router";
@@ -26,13 +26,13 @@ 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 xe } from "../../pages/page.js";
29
+ import { DuxPage as me } from "../../pages/page.js";
30
30
  import "../../pages/page404.js";
31
- import { DuxPageEmpty as we } from "../../pages/pageEmpty.js";
31
+ import { DuxPageEmpty as fe } from "../../pages/pageEmpty.js";
32
32
  import "@iconify-json/tabler/icons.json";
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
+ import { DuxTableFilter as ge } from "./filter.js";
34
+ import { DuxFilterLayout as he } from "./filterLayout.js";
35
+ import { DuxTableTools as ve } from "./tools.js";
36
36
  import "mime";
37
37
  import "vue3-ace-editor";
38
38
  import "ace-builds/src-noconflict/mode-vue";
@@ -48,10 +48,10 @@ import "ace-builds/src-noconflict/mode-snippets";
48
48
  import "dayjs";
49
49
  import "@tanstack/vue-query";
50
50
  import "pinia";
51
- function Ce(i) {
52
- return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !oe(i);
51
+ function be(t) {
52
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
53
53
  }
54
- const yt = /* @__PURE__ */ ie({
54
+ const gt = /* @__PURE__ */ Y({
55
55
  name: "DuxListLayout",
56
56
  props: {
57
57
  rowKey: {
@@ -97,360 +97,333 @@ const yt = /* @__PURE__ */ ie({
97
97
  type: Object
98
98
  }
99
99
  },
100
- setup(i, {
101
- slots: t
100
+ setup(t, {
101
+ slots: o
102
102
  }) {
103
- var F;
104
- const V = U(i.filter || {}), {
105
- t: r
106
- } = ue(), {
107
- renderAction: W
108
- } = se(), B = U(i.pagination && typeof i.pagination == "object" ? i.pagination : {
103
+ const D = z(t.filter || {}), {
104
+ t: i
105
+ } = le(), {
106
+ renderAction: U
107
+ } = de(), T = z(t.pagination && typeof t.pagination == "object" ? t.pagination : {
109
108
  page: 1,
110
109
  pageSize: 20
111
- }), b = T({}), J = () => {
112
- Object.assign(b.value, V.value);
113
- }, l = ce({
114
- path: i.path,
115
- filters: b.value,
116
- pagination: B.value,
117
- ...i.hookListProps
110
+ }), g = P({}), O = () => {
111
+ Object.assign(g.value, D.value);
112
+ }, a = ae({
113
+ path: t.path,
114
+ filters: g.value,
115
+ pagination: T.value,
116
+ ...t.hookListProps
118
117
  }), {
119
- meta: w,
120
- list: k,
121
- isLoading: C,
122
- autoRefetch: _,
123
- autoCountdown: L,
124
- onAutoRefetch: K,
125
- isExporting: Q,
126
- isExportingRows: G,
127
- isImporting: z,
128
- onExport: H,
129
- onExportRows: X,
130
- onImport: Y
131
- } = l, Z = m(() => ({
132
- page: l.page.value,
133
- pageSize: l.pageSize.value,
134
- pageCount: l.pageCount.value,
135
- pageSizes: l.pageSizes,
118
+ meta: E,
119
+ list: x,
120
+ isLoading: w,
121
+ autoRefetch: q,
122
+ autoCountdown: y,
123
+ onAutoRefetch: I,
124
+ isExporting: M,
125
+ isExportingRows: V,
126
+ isImporting: S,
127
+ onExport: W,
128
+ onExportRows: B,
129
+ onImport: J
130
+ } = a, _ = c(() => ({
131
+ page: a.page.value,
132
+ pageSize: a.pageSize.value,
133
+ pageCount: a.pageCount.value,
134
+ pageSizes: a.pageSizes,
136
135
  pageSlot: 5,
137
- onUpdatePage: l.onUpdatePage,
138
- onUpdatePageSize: l.onUpdatePageSize,
136
+ onUpdatePage: a.onUpdatePage,
137
+ onUpdatePageSize: a.onUpdatePageSize,
139
138
  showSizePicker: !0,
140
139
  showQuickJumper: !0
141
- })), g = S({
140
+ })), d = b({
142
141
  show: !1
143
- }), h = S({
142
+ }), p = b({
144
143
  show: !1
145
- }), v = S({
144
+ }), m = b({
146
145
  show: !1
147
- }), x = T(((F = i.filterSchema) == null ? void 0 : F.length) || 0), {
148
- width: u
149
- } = de(), P = () => {
150
- var p;
151
- if (!((p = i.filterSchema) != null && p.length)) return 0;
152
- const n = i.filterSchema.length;
153
- if (n <= 3)
154
- return n;
155
- const c = u.value || 1024;
156
- let o = 3;
157
- return c >= 1280 ? o = 4 : c >= 1024 ? o = 3 : c >= 768 ? o = 2 : o = 1, Math.min(n, o);
146
+ }), h = P(t.filterSchema?.length || 0), {
147
+ width: n
148
+ } = ie(), k = () => {
149
+ if (!t.filterSchema?.length) return 0;
150
+ const l = t.filterSchema.length;
151
+ if (l <= 3)
152
+ return l;
153
+ const r = n.value || 1024;
154
+ let u = 3;
155
+ return r >= 1280 ? u = 4 : r >= 1024 ? u = 3 : r >= 768 ? u = 2 : u = 1, Math.min(l, u);
158
156
  };
159
- le(u, () => {
160
- x.value = P();
161
- }), ne(() => {
162
- x.value = P();
157
+ Z(n, () => {
158
+ h.value = k();
159
+ }), $(() => {
160
+ h.value = k();
163
161
  });
164
- const $ = m(() => (i.filterSchema || []).slice(0, x.value)), R = m(() => (i.filterSchema || []).slice(x.value)), ee = m(() => R.value.length > 0), A = (n) => n.map((c) => {
162
+ const K = c(() => (t.filterSchema || []).slice(0, h.value)), C = c(() => (t.filterSchema || []).slice(h.value)), Q = c(() => C.value.length > 0), L = (l) => l.map((r) => {
165
163
  const {
166
- title: o,
167
- ...p
168
- } = c;
164
+ title: u,
165
+ ...X
166
+ } = r;
169
167
  return {
170
- tag: ye,
168
+ tag: ge,
171
169
  attrs: {
172
- label: o,
170
+ label: u,
173
171
  class: "flex-1 min-w-0"
174
172
  },
175
- children: p
173
+ children: X
176
174
  };
177
175
  }), {
178
- render: te
179
- } = E({
180
- data: m(() => A($.value))
176
+ render: G
177
+ } = A({
178
+ data: c(() => L(K.value))
181
179
  }), {
182
- render: ae
183
- } = E({
184
- data: m(() => A(R.value))
185
- }), y = m(() => ({
180
+ render: H
181
+ } = A({
182
+ data: c(() => L(C.value))
183
+ }), v = c(() => ({
186
184
  import: !1,
187
185
  export: !0,
188
186
  refresh: !0,
189
- ...i.tools
187
+ ...t.tools
190
188
  }));
191
- return () => e(xe, {
189
+ return () => e(me, {
192
190
  padding: !1,
193
191
  scrollbar: !1
194
192
  }, {
195
- sideLeft: () => {
196
- var n;
197
- return t != null && t.sideLeft && u.value >= 1024 ? (n = t == null ? void 0 : t.sideLeft) == null ? void 0 : n.call(t) : void 0;
198
- },
199
- sideRight: () => {
200
- var n;
201
- return t != null && t.sideRight && u.value >= 1024 ? (n = t == null ? void 0 : t.sideRight) == null ? void 0 : n.call(t) : void 0;
202
- },
203
- default: () => {
204
- var n, c, o, p, j, N, D;
205
- return e("div", {
206
- class: "flex flex-col h-full relative"
207
- }, [e("div", {
208
- class: "lg:justify-between gap-2 p-3"
209
- }, [e("div", {
210
- class: "flex flex-col lg:flex-row lg:items-center gap-2"
211
- }, [i.checkable && e("div", {
212
- class: "hidden lg:flex items-center pl-2"
213
- }, [e(s, null, {
214
- trigger: () => e("div", {
215
- class: "flex items-center"
216
- }, [e(q, {
217
- checked: l.isAllChecked.value,
218
- indeterminate: l.isIndeterminate.value,
219
- onUpdateChecked: l.toggleSelectAll
220
- }, null)]),
221
- default: () => r("components.list.selectAll")
222
- })]), i.tabs && e("div", null, [e(pe, {
223
- type: "segment",
224
- size: "small",
225
- style: {
226
- "--n-tab-padding": "4px 10px"
227
- },
228
- "default-value": (c = (n = i.tabs) == null ? void 0 : n[0]) == null ? void 0 : c.value,
229
- value: (o = b.value) == null ? void 0 : o.tab,
230
- onUpdateValue: (a) => {
231
- b.value.tab = a;
232
- }
193
+ sideLeft: () => o?.sideLeft && n.value >= 1024 ? o?.sideLeft?.() : void 0,
194
+ sideRight: () => o?.sideRight && n.value >= 1024 ? o?.sideRight?.() : void 0,
195
+ default: () => e("div", {
196
+ class: "flex flex-col h-full relative"
197
+ }, [e("div", {
198
+ class: "lg:justify-between gap-2 p-3"
199
+ }, [e("div", {
200
+ class: "flex flex-col lg:flex-row lg:items-center gap-2"
201
+ }, [t.checkable && e("div", {
202
+ class: "hidden lg:flex items-center pl-2"
203
+ }, [e(f, null, {
204
+ trigger: () => e("div", {
205
+ class: "flex items-center"
206
+ }, [e(F, {
207
+ checked: a.isAllChecked.value,
208
+ indeterminate: a.isIndeterminate.value,
209
+ onUpdateChecked: a.toggleSelectAll
210
+ }, null)]),
211
+ default: () => i("components.list.selectAll")
212
+ })]), t.tabs && e("div", null, [e(oe, {
213
+ type: "segment",
214
+ size: "small",
215
+ style: {
216
+ "--n-tab-padding": "4px 10px"
217
+ },
218
+ "default-value": t.tabs?.[0]?.value,
219
+ value: g.value?.tab,
220
+ onUpdateValue: (l) => {
221
+ g.value.tab = l;
222
+ }
223
+ }, {
224
+ default: () => [t.tabs?.map((l) => e(ne, {
225
+ name: l.value,
226
+ tab: l.label
227
+ }, null))]
228
+ })]), e("div", {
229
+ class: "flex gap-2"
230
+ }, [o?.sideLeft && n.value < 1024 && e(s, {
231
+ class: "flex-none",
232
+ secondary: !0,
233
+ onClick: () => {
234
+ p.show = !p.show;
235
+ }
236
+ }, {
237
+ icon: () => e("div", {
238
+ class: "i-tabler:layout-sidebar-inactive size-4"
239
+ }, null)
240
+ }), e("div", {
241
+ class: "flex flex-wrap gap-2 items-center flex-1 lg:flex-none"
242
+ }, [R(G)]), e(s, {
243
+ type: "primary",
244
+ secondary: !0,
245
+ onClick: O
246
+ }, {
247
+ icon: () => e("div", {
248
+ class: "i-tabler:search size-4"
249
+ }, null),
250
+ default: () => i("components.button.search")
251
+ }), o?.sideRight && n.value < 1024 && e(s, {
252
+ class: "flex-none",
253
+ secondary: !0,
254
+ onClick: () => {
255
+ m.show = !m.show;
256
+ }
257
+ }, {
258
+ icon: () => e("div", {
259
+ class: "i-tabler:layout-sidebar-right-inactive size-4"
260
+ }, null)
261
+ }), Q.value && e(s, {
262
+ iconPlacement: "right",
263
+ onClick: () => {
264
+ d.show = !d.show;
265
+ }
266
+ }, {
267
+ default: () => i("components.button.advanced"),
268
+ icon: () => e("div", {
269
+ class: ["i-tabler:chevrons-down size-4 transition-all"]
270
+ }, null)
271
+ })])]), e("div", {
272
+ class: "flex gap-2"
273
+ }, [o.actions?.(), t.actions?.length > 0 && U({
274
+ type: n.value < 1024 ? "dropdown" : "button",
275
+ text: n.value < 1024,
276
+ items: t.actions
277
+ })])]), e(re, {
278
+ show: w.value,
279
+ class: "flex-1 min-h-0",
280
+ contentClass: "h-full"
281
+ }, {
282
+ default: () => [e("div", {
283
+ class: ["h-full overflow-auto rounded-lg px-3"]
284
+ }, [!w.value && x.value.length === 0 && e("div", {
285
+ class: "flex justify-center items-center h-full"
286
+ }, [e(fe, null, null)]), x.value.length > 0 && o?.default?.(a)])]
287
+ }), e("div", {
288
+ class: "flex justify-between px-3 py-2 gap-2"
289
+ }, [e("div", null, [e("div", {
290
+ class: "flex gap-1 items-center"
291
+ }, [t.checkable && e(f, null, {
292
+ trigger: () => e(s, {
293
+ loading: S.value,
294
+ circle: !0,
295
+ quaternary: !0
233
296
  }, {
234
- default: () => {
235
- var a;
236
- return [(a = i.tabs) == null ? void 0 : a.map((f) => e(me, {
237
- name: f.value,
238
- tab: f.label
239
- }, null))];
240
- }
241
- })]), e("div", {
242
- class: "flex gap-2"
243
- }, [(t == null ? void 0 : t.sideLeft) && u.value < 1024 && e(d, {
244
- class: "flex-none",
245
- secondary: !0,
246
- onClick: () => {
247
- h.show = !h.show;
248
- }
297
+ default: () => [e(F, {
298
+ checked: a.isAllChecked.value,
299
+ indeterminate: a.isIndeterminate.value,
300
+ onUpdateChecked: a.toggleSelectAll
301
+ }, null)]
302
+ }),
303
+ default: () => i("components.list.selectAll")
304
+ }), o?.tools?.(), v.value.export && e(f, null, {
305
+ trigger: () => e(s, {
306
+ loading: M.value,
307
+ onClick: W,
308
+ circle: !0,
309
+ quaternary: !0
249
310
  }, {
250
311
  icon: () => e("div", {
251
- class: "i-tabler:layout-sidebar-inactive size-4"
312
+ class: "i-tabler:database-export size-4"
252
313
  }, null)
253
- }), e("div", {
254
- class: "flex flex-wrap gap-2 items-center flex-1 lg:flex-none"
255
- }, [O(te)]), e(d, {
256
- type: "primary",
257
- secondary: !0,
258
- onClick: J
314
+ }),
315
+ default: () => i("components.button.export")
316
+ }), v.value.import && e(f, null, {
317
+ trigger: () => e(s, {
318
+ loading: S.value,
319
+ onClick: J,
320
+ circle: !0,
321
+ quaternary: !0
259
322
  }, {
260
323
  icon: () => e("div", {
261
- class: "i-tabler:search size-4"
262
- }, null),
263
- default: () => r("components.button.search")
264
- }), (t == null ? void 0 : t.sideRight) && u.value < 1024 && e(d, {
265
- class: "flex-none",
266
- secondary: !0,
267
- onClick: () => {
268
- v.show = !v.show;
269
- }
324
+ class: "i-tabler:database-import size-4"
325
+ }, null)
326
+ }),
327
+ default: () => i("components.button.import")
328
+ }), v.value.refresh && e(f, null, {
329
+ trigger: () => e(s, {
330
+ onClick: I,
331
+ circle: !0,
332
+ quaternary: !0
270
333
  }, {
271
- icon: () => e("div", {
272
- class: "i-tabler:layout-sidebar-right-inactive size-4"
334
+ icon: () => q.value ? e(se, {
335
+ class: "size-4",
336
+ type: "circle",
337
+ percentage: y.value * 10,
338
+ strokeWidth: 20,
339
+ color: "rgba(var(--ui-color-primary))"
340
+ }, {
341
+ default: () => [e("span", {
342
+ class: "text-8px"
343
+ }, [y.value])]
344
+ }) : e("div", {
345
+ class: "i-tabler:refresh size-4"
273
346
  }, null)
274
- }), ee.value && e(d, {
275
- iconPlacement: "right",
347
+ }),
348
+ default: () => i("components.button.autoRefresh")
349
+ })])]), e("div", {
350
+ class: "flex items-center gap-2"
351
+ }, [o?.bottom?.(), t.pagination && e(ue, ee(_.value, {
352
+ simple: n.value < 768
353
+ }), {
354
+ prefix: () => e("div", null, [i("components.list.total", {
355
+ total: E?.value?.total || 0
356
+ })])
357
+ })])]), e(ve, {
358
+ number: a.checkeds.value.length,
359
+ group: [[{
360
+ icon: "i-tabler:x",
276
361
  onClick: () => {
277
- g.show = !g.show;
362
+ a.checkeds.value = [], a.onUpdateChecked?.([]);
278
363
  }
364
+ }], [{
365
+ label: i("components.button.export"),
366
+ icon: "i-tabler:file-export",
367
+ loading: V.value,
368
+ onClick: B
279
369
  }, {
280
- default: () => r("components.button.advanced"),
281
- icon: () => e("div", {
282
- class: ["i-tabler:chevrons-down size-4 transition-all"]
283
- }, null)
284
- })])]), e("div", {
285
- class: "flex gap-2"
286
- }, [(p = t.actions) == null ? void 0 : p.call(t), ((j = i.actions) == null ? void 0 : j.length) > 0 && W({
287
- type: u.value < 1024 ? "dropdown" : "button",
288
- text: u.value < 1024,
289
- items: i.actions
290
- })])]), e(fe, {
291
- show: C.value,
292
- class: "flex-1 min-h-0",
293
- contentClass: "h-full"
294
- }, {
295
- default: () => {
296
- var a;
297
- return [e("div", {
298
- class: ["h-full overflow-auto rounded-lg px-3"]
299
- }, [!C.value && k.value.length === 0 && e("div", {
300
- class: "flex justify-center items-center h-full"
301
- }, [e(we, null, null)]), k.value.length > 0 && ((a = t == null ? void 0 : t.default) == null ? void 0 : a.call(t, l))])];
302
- }
303
- }), e("div", {
304
- class: "flex justify-between px-3 py-2 gap-2"
305
- }, [e("div", null, [e("div", {
306
- class: "flex gap-1 items-center"
307
- }, [i.checkable && e(s, null, {
308
- trigger: () => e(d, {
309
- loading: z.value,
310
- circle: !0,
311
- quaternary: !0
312
- }, {
313
- default: () => [e(q, {
314
- checked: l.isAllChecked.value,
315
- indeterminate: l.isIndeterminate.value,
316
- onUpdateChecked: l.toggleSelectAll
317
- }, null)]
318
- }),
319
- default: () => r("components.list.selectAll")
320
- }), (N = t == null ? void 0 : t.tools) == null ? void 0 : N.call(t), y.value.export && e(s, null, {
321
- trigger: () => e(d, {
322
- loading: Q.value,
323
- onClick: H,
324
- circle: !0,
325
- quaternary: !0
370
+ label: i("components.button.delete"),
371
+ type: "error",
372
+ icon: "i-tabler:trash"
373
+ }]]
374
+ }, null), e(ce, {
375
+ draggable: !0,
376
+ class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
377
+ show: d.show,
378
+ onUpdateShow: (l) => d.show = l
379
+ }, {
380
+ default: ({
381
+ draggableClass: l
382
+ }) => {
383
+ let r;
384
+ return e(pe, {
385
+ title: i("components.button.filter"),
386
+ handle: l,
387
+ onClose: () => d.show = !1
326
388
  }, {
327
- icon: () => e("div", {
328
- class: "i-tabler:database-export size-4"
329
- }, null)
330
- }),
331
- default: () => r("components.button.export")
332
- }), y.value.import && e(s, null, {
333
- trigger: () => e(d, {
334
- loading: z.value,
335
- onClick: Y,
336
- circle: !0,
337
- quaternary: !0
338
- }, {
339
- icon: () => e("div", {
340
- class: "i-tabler:database-import size-4"
341
- }, null)
342
- }),
343
- default: () => r("components.button.import")
344
- }), y.value.refresh && e(s, null, {
345
- trigger: () => e(d, {
346
- onClick: K,
347
- circle: !0,
348
- quaternary: !0
349
- }, {
350
- icon: () => _.value ? e(ge, {
351
- class: "size-4",
352
- type: "circle",
353
- percentage: L.value * 10,
354
- strokeWidth: 20,
355
- color: "rgba(var(--ui-color-primary))"
356
- }, {
357
- default: () => [e("span", {
358
- class: "text-8px"
359
- }, [L.value])]
360
- }) : e("div", {
361
- class: "i-tabler:refresh size-4"
362
- }, null)
363
- }),
364
- default: () => r("components.button.autoRefresh")
365
- })])]), e("div", {
366
- class: "flex items-center gap-2"
367
- }, [(D = t == null ? void 0 : t.bottom) == null ? void 0 : D.call(t), i.pagination && e(he, re(Z.value, {
368
- simple: u.value < 768
369
- }), {
370
- prefix: () => {
371
- var a;
372
- return e("div", null, [r("components.list.total", {
373
- total: ((a = w == null ? void 0 : w.value) == null ? void 0 : a.total) || 0
374
- })]);
375
- }
376
- })])]), e(ke, {
377
- number: l.checkeds.value.length,
378
- group: [[{
379
- icon: "i-tabler:x",
380
- onClick: () => {
381
- var a;
382
- l.checkeds.value = [], (a = l.onUpdateChecked) == null || a.call(l, []);
383
- }
384
- }], [{
385
- label: r("components.button.export"),
386
- icon: "i-tabler:file-export",
387
- loading: G.value,
388
- onClick: X
389
- }, {
390
- label: r("components.button.delete"),
391
- type: "error",
392
- icon: "i-tabler:trash"
393
- }]]
394
- }, null), e(ve, {
395
- draggable: !0,
396
- class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
397
- show: g.show,
398
- onUpdateShow: (a) => g.show = a
389
+ default: () => [e(he, {
390
+ showLabel: !0,
391
+ labelPlacement: "top"
392
+ }, be(r = R(H)) ? r : {
393
+ default: () => [r]
394
+ })]
395
+ });
396
+ }
397
+ }), e(j, {
398
+ show: p.show,
399
+ onUpdateShow: (l) => p.show = l,
400
+ autoFocus: !1,
401
+ placement: "left"
402
+ }, {
403
+ default: () => [e(N, {
404
+ title: t.sideLeftTitle || i("components.button.sideLeft"),
405
+ onClose: () => p.show = !1,
406
+ scrollbar: !1
399
407
  }, {
400
- default: ({
401
- draggableClass: a
402
- }) => {
403
- let f;
404
- return e(be, {
405
- title: r("components.button.filter"),
406
- handle: a,
407
- onClose: () => g.show = !1
408
- }, {
409
- default: () => [e(Se, {
410
- showLabel: !0,
411
- labelPlacement: "top"
412
- }, Ce(f = O(ae)) ? f : {
413
- default: () => [f]
414
- })]
415
- });
416
- }
417
- }), e(I, {
418
- show: h.show,
419
- onUpdateShow: (a) => h.show = a,
420
- autoFocus: !1,
421
- placement: "left"
408
+ default: () => [o?.sideLeft?.()]
409
+ })]
410
+ }), e(j, {
411
+ show: m.show,
412
+ onUpdateShow: (l) => m.show = l,
413
+ autoFocus: !1,
414
+ placement: "right"
415
+ }, {
416
+ default: () => [e(N, {
417
+ title: t.sideRightTitle || i("components.button.sideRight"),
418
+ onClose: () => m.show = !1,
419
+ scrollbar: !1
422
420
  }, {
423
- default: () => [e(M, {
424
- title: i.sideLeftTitle || r("components.button.sideLeft"),
425
- onClose: () => h.show = !1,
426
- scrollbar: !1
427
- }, {
428
- default: () => {
429
- var a;
430
- return [(a = t == null ? void 0 : t.sideLeft) == null ? void 0 : a.call(t)];
431
- }
432
- })]
433
- }), e(I, {
434
- show: v.show,
435
- onUpdateShow: (a) => v.show = a,
436
- autoFocus: !1,
437
- placement: "right"
438
- }, {
439
- default: () => [e(M, {
440
- title: i.sideRightTitle || r("components.button.sideRight"),
441
- onClose: () => v.show = !1,
442
- scrollbar: !1
443
- }, {
444
- default: () => {
445
- var a;
446
- return [(a = t == null ? void 0 : t.sideRight) == null ? void 0 : a.call(t)];
447
- }
448
- })]
449
- })]);
450
- }
421
+ default: () => [o?.sideRight?.()]
422
+ })]
423
+ })])
451
424
  });
452
425
  }
453
426
  });
454
427
  export {
455
- yt as DuxListLayout
428
+ gt as DuxListLayout
456
429
  };