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