@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 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,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 ve } from "../../pages/page.js";
29
+ import { DuxPage as be } from "../../pages/page.js";
28
30
  import "../../pages/page404.js";
29
31
  import "@iconify-json/tabler/icons.json";
30
- import { DuxTableFilter as be } from "./filter.js";
31
- import { DuxTableTools as he } from "./tools.js";
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
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";
33
47
  import "dayjs";
34
- import { useDrawer as xe } from "../../hooks/drawer.js";
35
48
  import "@tanstack/vue-query";
36
- import { useTable as ye } from "../../hooks/table.js";
49
+ import { useTable as we } from "../../hooks/table.js";
37
50
  import "pinia";
38
- const at = /* @__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({
39
55
  name: "DuxTableLayout",
40
56
  props: {
41
57
  path: {
@@ -52,7 +68,8 @@ const at = /* @__PURE__ */ $({
52
68
  type: Array
53
69
  },
54
70
  pagination: {
55
- type: [Boolean, Object]
71
+ type: [Boolean, Object],
72
+ default: !0
56
73
  },
57
74
  tabs: {
58
75
  type: Array
@@ -73,164 +90,130 @@ const at = /* @__PURE__ */ $({
73
90
  default: ""
74
91
  }
75
92
  },
76
- setup(a, {
93
+ setup(i, {
77
94
  slots: e
78
95
  }) {
79
- var C, N;
80
- const m = ee(a.filter || {}), {
81
- t: l
82
- } = ne(), {
83
- renderAction: O
84
- } = ge(), y = ye({
85
- path: a.path,
86
- filters: m.value,
87
- columns: a.columns || [],
88
- 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
89
106
  }), {
90
- meta: g,
91
- columns: w,
107
+ columns: R,
92
108
  tablePagination: W,
93
- table: V,
109
+ table: I,
94
110
  onUpdateColumnSelected: B,
95
- onUpdateChecked: v,
96
- columnSelected: U,
97
- autoRefetch: q,
98
- autoCountdown: R,
99
- onAutoRefetch: F,
100
- isExporting: b,
101
- isExportingRows: H,
102
- isImporting: J,
103
- onExport: K,
104
- onExportRows: G,
105
- onImport: M
106
- } = y, Q = p(() => w.value.filter((i) => "title" in i && "key" in i).map((i) => ({
107
- label: i.title,
108
- 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
109
125
  }))), {
110
126
  width: u
111
- } = 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({
112
- show: !1,
113
- collapse: !1
114
- }), k = ie(), {
115
- height: Y
116
- } = oe(k);
117
- ae(Y, (i) => {
118
- i > 35 ? d.show = !0 : d.show = !1;
119
- }, {
120
- immediate: !0,
121
- deep: !0
122
- });
123
- 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) => {
124
134
  const {
125
- title: c,
126
- ...n
127
- } = i;
135
+ label: c,
136
+ ...o
137
+ } = r;
128
138
  return {
129
- tag: be,
139
+ tag: he,
130
140
  attrs: {
131
141
  label: c
132
142
  },
133
- children: n
143
+ children: o
134
144
  };
135
145
  })), {
136
- render: Z
137
- } = E({
138
- data: (C = h.value) == null ? void 0 : C.slice(1),
139
- components: {
140
- NInput: I
141
- }
146
+ render: $
147
+ } = O({
148
+ data: (S = y.value) == null ? void 0 : S.slice(1)
142
149
  }), {
143
- render: _
144
- } = E({
145
- data: (N = h.value) == null ? void 0 : N.slice(0, 1),
146
- components: {
147
- NInput: I
148
- }
149
- }), x = p(() => ({
150
+ render: ee
151
+ } = O({
152
+ data: (k = y.value) == null ? void 0 : k.slice(0, 1)
153
+ }), x = b(() => ({
150
154
  import: !0,
151
155
  export: !0,
152
156
  refresh: !0,
153
- ...a.tools
154
- })), {
155
- show: T
156
- } = xe();
157
- return () => t(ve, {
158
- actions: a.actions,
157
+ ...i.tools
158
+ }));
159
+ return () => t(be, {
160
+ actions: i.actions,
159
161
  scrollbar: !1
160
162
  }, {
161
163
  sideLeft: () => {
162
- var i;
163
- 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;
164
166
  },
165
167
  sideRight: () => {
166
- var i;
167
- 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;
168
170
  },
169
171
  default: () => {
170
- var i, c, n, S, s, z, j, L, P;
172
+ var r, c, o, j, L, N, T, z, D;
171
173
  return t("div", {
172
- class: "flex flex-col gap-3 h-full relative"
174
+ class: "flex flex-col gap-2 h-full relative"
173
175
  }, [t("div", {
174
- class: "flex gap-3 justify-between flex-col lg:flex-row"
175
- }, [a.tabs && t("div", {
176
+ class: "flex gap-2 justify-between flex-col lg:flex-row"
177
+ }, [i.tabs && t("div", {
176
178
  class: "flex flex-none"
177
- }, [t(ue, {
179
+ }, [t(oe, {
178
180
  type: "segment",
179
181
  size: "small",
180
182
  style: {
181
183
  "--n-tab-padding": "4px 10px"
182
184
  },
183
- "default-value": (c = (i = a.tabs) == null ? void 0 : i[0]) == null ? void 0 : c.value,
184
- value: (n = m.value) == null ? void 0 : n.tab,
185
- onUpdateValue: (r) => {
186
- 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;
187
189
  }
188
190
  }, {
189
191
  default: () => {
190
- var r;
191
- return [(r = a.tabs) == null ? void 0 : r.map((A) => t(ce, {
192
- name: A.value,
193
- 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
194
196
  }, null))];
195
197
  }
196
198
  })]), t("div", {
197
- class: ["overflow-hidden flex-1 flex gap-2", d.collapse ? "h-auto" : "h-8.5"]
198
- }, [(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, {
199
201
  class: "flex-none",
200
202
  secondary: !0,
201
- loading: b.value,
202
203
  onClick: () => {
203
- T({
204
- title: a.sideLeftTitle,
205
- component: () => {
206
- var r;
207
- return t("div", null, [(r = e == null ? void 0 : e.sideLeft) == null ? void 0 : r.call(e)]);
208
- },
209
- width: 300,
210
- placement: "left"
211
- });
204
+ f.show = !f.show;
212
205
  }
213
206
  }, {
214
207
  icon: () => t("div", {
215
208
  class: "i-tabler:layout-sidebar-inactive size-4"
216
209
  }, null)
217
210
  }), t("div", {
218
- ref: k,
219
- class: ["flex-1 lg:flex gap-2 flex-wrap", a.tabs ? "justify-end" : "justify-start"]
220
- }, [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, {
221
213
  class: "flex-none",
222
214
  secondary: !0,
223
- loading: b.value,
224
215
  onClick: () => {
225
- T({
226
- title: a.sideRightTitle,
227
- component: () => {
228
- var r;
229
- return t("div", null, [(r = e == null ? void 0 : e.sideRight) == null ? void 0 : r.call(e)]);
230
- },
231
- width: 300,
232
- placement: "right"
233
- });
216
+ m.show = !m.show;
234
217
  }
235
218
  }, {
236
219
  icon: () => t("div", {
@@ -238,38 +221,30 @@ const at = /* @__PURE__ */ $({
238
221
  }, null)
239
222
  })]), t("div", {
240
223
  class: "flex gap-2 justify-between lg:justify-end"
241
- }, [h.value.length > 1 && t(de, {
242
- trigger: "click",
243
- displayDirective: "show"
244
- }, {
245
- trigger: () => t(o, {
246
- iconPlacement: "right",
247
- onClick: () => {
248
- d.collapse = !d.collapse;
249
- }
250
- }, {
251
- default: () => l("components.button.filter"),
252
- icon: () => t("div", {
253
- class: ["i-tabler:chevrons-down size-4 transition-all"]
254
- }, null)
255
- }),
256
- default: () => t("div", {
257
- class: "flex flex-col gap-2 py-1"
258
- }, [D(Z)])
259
- }), t("div", {
224
+ }, [t("div", {
260
225
  class: "flex gap-2 items-center"
261
- }, [(S = e == null ? void 0 : e.tools) == null ? void 0 : S.call(e), t(pe, {
262
- options: Q.value,
263
- value: U.value,
264
- onUpdateValue: (r) => {
265
- 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);
266
241
  },
267
242
  multiple: !0,
268
243
  placement: "bottom-start",
269
244
  trigger: "click"
270
245
  }, {
271
- default: () => [t(f, null, {
272
- trigger: () => t(o, {
246
+ default: () => [t(h, null, {
247
+ trigger: () => t(l, {
273
248
  secondary: !0,
274
249
  "icon-placement": "right"
275
250
  }, {
@@ -277,93 +252,145 @@ const at = /* @__PURE__ */ $({
277
252
  class: "i-tabler:columns size-4"
278
253
  }, null)
279
254
  }),
280
- default: () => l("components.list.columnSetting")
255
+ default: () => n("components.list.columnSetting")
281
256
  })]
282
- }), x.value.export && t(f, null, {
283
- trigger: () => t(o, {
257
+ }), x.value.export && t(h, null, {
258
+ trigger: () => t(l, {
284
259
  secondary: !0,
285
- loading: b.value,
286
- onClick: K
260
+ loading: J.value,
261
+ onClick: H
287
262
  }, {
288
263
  icon: () => t("div", {
289
264
  class: "i-tabler:database-export size-4"
290
265
  }, null)
291
266
  }),
292
- default: () => l("components.button.export")
293
- }), x.value.import && t(f, null, {
294
- trigger: () => t(o, {
267
+ default: () => n("components.button.export")
268
+ }), x.value.import && t(h, null, {
269
+ trigger: () => t(l, {
295
270
  secondary: !0,
296
- loading: J.value,
297
- onClick: M
271
+ loading: G.value,
272
+ onClick: X
298
273
  }, {
299
274
  icon: () => t("div", {
300
275
  class: "i-tabler:database-import size-4"
301
276
  }, null)
302
277
  }),
303
- default: () => l("components.button.import")
304
- }), x.value.refresh && t(f, null, {
305
- trigger: () => t(o, {
278
+ default: () => n("components.button.import")
279
+ }), x.value.refresh && t(h, null, {
280
+ trigger: () => t(l, {
306
281
  secondary: !0,
307
- onClick: F
282
+ onClick: q
308
283
  }, {
309
- icon: () => q.value ? t(fe, {
284
+ icon: () => _.value ? t(ce, {
310
285
  class: "size-4",
311
286
  type: "circle",
312
- percentage: R.value * 10,
287
+ percentage: C.value * 10,
313
288
  strokeWidth: 20,
314
289
  color: "rgba(var(--ui-color-primary))"
315
290
  }, {
316
291
  default: () => [t("span", {
317
292
  class: "text-8px"
318
- }, [R.value])]
293
+ }, [C.value])]
319
294
  }) : t("div", {
320
295
  class: "i-tabler:refresh size-4"
321
296
  }, null)
322
297
  }),
323
- default: () => l("components.button.autoRefresh")
298
+ default: () => n("components.button.autoRefresh")
324
299
  })]), t("div", {
325
300
  class: "flex gap-2 justify-end"
326
- }, [(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({
327
302
  type: u.value < 1024 ? "dropdown" : "button",
328
- items: a.actions
303
+ items: i.actions
329
304
  })])])]), t("div", {
330
305
  class: "flex-1 min-h-0"
331
- }, [(j = e == null ? void 0 : e.default) == null ? void 0 : j.call(e, {
332
- ...y,
333
- width: X.value
306
+ }, [(T = e == null ? void 0 : e.default) == null ? void 0 : T.call(e, {
307
+ ...v,
308
+ width: Z.value
334
309
  })]), t("div", {
335
310
  class: "flex justify-between"
336
- }, [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, {
337
312
  simple: u.value < 768
338
313
  }), {
339
- prefix: () => {
340
- var r;
341
- return t("div", null, [l("components.list.total", {
342
- total: ((r = g == null ? void 0 : g.value) == null ? void 0 : r.total) || 0
343
- })]);
344
- }
345
- })])]), t(he, {
346
- 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,
347
319
  group: [[{
348
320
  icon: "i-tabler:x",
349
321
  onClick: () => {
350
- v == null || v([]);
322
+ w == null || w([]);
351
323
  }
352
324
  }], [{
353
- label: l("components.button.export"),
325
+ label: n("components.button.export"),
354
326
  icon: "i-tabler:file-export",
355
- loading: H.value,
356
- onClick: G
327
+ loading: K.value,
328
+ onClick: Q
357
329
  }, {
358
- label: l("components.button.delete"),
330
+ label: n("components.button.delete"),
359
331
  type: "error",
360
332
  icon: "i-tabler:trash"
361
333
  }]]
362
- }, 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
+ })]);
363
390
  }
364
391
  });
365
392
  }
366
393
  });
367
394
  export {
368
- at as DuxTableLayout
395
+ gt as DuxTableLayout
369
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";
@@ -26,10 +26,21 @@ import "@duxweb/dvha-naiveui";
26
26
  import "../../pages/page404.js";
27
27
  import "@iconify-json/tabler/icons.json";
28
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";
29
40
  import "dayjs";
30
41
  import { useLevel as c } from "../../hooks/level.js";
31
42
  import "pinia";
32
- const T = /* @__PURE__ */ v({
43
+ const me = /* @__PURE__ */ v({
33
44
  name: "DuxLevel",
34
45
  props: {
35
46
  value: {
@@ -59,46 +70,46 @@ const T = /* @__PURE__ */ v({
59
70
  },
60
71
  emits: ["update:value"],
61
72
  setup(e, {
62
- emit: r
73
+ emit: m
63
74
  }) {
64
- const i = g(e, "value", r, {
75
+ const r = g(e, "value", m, {
65
76
  passive: !0,
66
77
  defaultValue: []
67
78
  }), {
68
- regions: o,
69
- onChange: m,
79
+ regions: a,
80
+ onChange: l,
70
81
  isLoading: p
71
82
  } = c({
72
- value: i,
83
+ value: r,
73
84
  path: e.path,
74
85
  nameField: e.nameField,
75
86
  maxLevel: e.maxLevel,
76
87
  labelField: e.labelField,
77
88
  valueField: e.valueField
78
- }), u = (t, a) => {
79
- m(t, a);
89
+ }), u = (t, i) => {
90
+ l(t, i);
80
91
  }, n = f(() => Array.from({
81
92
  length: e.maxLevel
82
- }, (t, a) => {
83
- const d = o.value[a] || [];
93
+ }, (t, i) => {
94
+ const d = a.value[i] || [];
84
95
  return {
85
- index: a,
96
+ index: i,
86
97
  options: d,
87
- value: i.value[a] || null
98
+ value: r.value[i] || null
88
99
  };
89
100
  }));
90
- return () => l("div", {
101
+ return () => o("div", {
91
102
  class: ["grid grid-cols-1 gap-2", "lg:grid-cols-[repeat(auto-fit,minmax(120px,1fr))]"]
92
- }, [n.value.map((t) => l(s, {
103
+ }, [n.value.map((t) => o(s, {
93
104
  key: t.index,
94
105
  value: t.value,
95
106
  options: t.options,
96
107
  clearable: !0,
97
108
  loading: p.value,
98
- onUpdateValue: (a) => u(a, t.index)
109
+ onUpdateValue: (i) => u(i, t.index)
99
110
  }, null))]);
100
111
  }
101
112
  });
102
113
  export {
103
- T as DuxLevel
114
+ me as DuxLevel
104
115
  };