@das-fed/ui 7.0.2 → 7.0.4-beta.1

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 (50) hide show
  1. package/package.json +6 -5
  2. package/packages/business-components/ai-panel/{index-SfzdqhGf.js → index-CD2YNg3j.js} +761 -755
  3. package/packages/business-components/ai-panel/index-CD2YNg3j.js.gz +0 -0
  4. package/packages/business-components/ai-panel/{index-ClgczXAD.js → index-DWHxqEh3.js} +1 -1
  5. package/packages/business-components/ai-panel/index-DWHxqEh3.js.gz +0 -0
  6. package/packages/business-components/ai-panel/index.js +1 -1
  7. package/packages/business-components/ai-panel/src/dasAI/apis.d.ts +1 -0
  8. package/packages/business-components/ai-panel/style.css +1 -1
  9. package/packages/business-components/ai-panel/style.css.gz +0 -0
  10. package/packages/business-components/payment/index.js +8 -8
  11. package/packages/business-components/payment/index.js.gz +0 -0
  12. package/packages/components/image-upload/index.d.ts +1 -0
  13. package/packages/components/image-upload/index.js +767 -114
  14. package/packages/components/image-upload/index.js.gz +0 -0
  15. package/packages/components/image-upload/src/Index.vue.d.ts +1 -0
  16. package/packages/components/image-upload/src/hooks/use-compress-image.d.ts +1 -0
  17. package/packages/components/image-upload/src/type.d.ts +3 -0
  18. package/packages/components/image-upload/style.css +1 -1
  19. package/packages/components/image-upload/style.css.gz +0 -0
  20. package/packages/components/image-viewer/index.d.ts +1 -0
  21. package/packages/components/image-viewer/index.js +1086 -434
  22. package/packages/components/image-viewer/index.js.gz +0 -0
  23. package/packages/components/image-viewer/src/Index.vue.d.ts +1 -0
  24. package/packages/components/image-viewer/src/hooks/use-compress-image.d.ts +1 -0
  25. package/packages/components/image-viewer/src/type.d.ts +3 -0
  26. package/packages/components/image-viewer/style.css +1 -1
  27. package/packages/components/image-viewer/style.css.gz +0 -0
  28. package/packages/components/radio-tabs/index.js +1 -1
  29. package/packages/components/radio-tabs/index.js.gz +0 -0
  30. package/packages/components/radio-tabs/style.css +1 -1
  31. package/packages/components/radio-tabs/style.css.gz +0 -0
  32. package/packages/components/select-list/index.d.ts +3 -3
  33. package/packages/components/select-list/index.js +390 -377
  34. package/packages/components/select-list/index.js.gz +0 -0
  35. package/packages/components/select-list/src/Index.vue.d.ts +4 -3
  36. package/packages/components/select-list/src/hooks/use-select-list.d.ts +1 -0
  37. package/packages/components/select-list/src/type.d.ts +1 -1
  38. package/packages/components/select-list/style.css +1 -1
  39. package/packages/components/select-list/style.css.gz +0 -0
  40. package/packages/components/tree/index.js +90 -86
  41. package/packages/components/tree/index.js.gz +0 -0
  42. package/packages/components/tree-table/index.js +291 -263
  43. package/packages/components/tree-table/index.js.gz +0 -0
  44. package/packages/components/tree-table/src/hooks/use-five.d.ts +4 -0
  45. package/packages/components/tree-table/src/hooks/use-four.d.ts +4 -0
  46. package/packages/components/tree-table/src/type.d.ts +1 -1
  47. package/packages/components/tree-table/style.css +1 -1
  48. package/packages/components/tree-table/style.css.gz +0 -0
  49. package/packages/business-components/ai-panel/index-ClgczXAD.js.gz +0 -0
  50. package/packages/business-components/ai-panel/index-SfzdqhGf.js.gz +0 -0
@@ -1,71 +1,97 @@
1
1
  import '@das-fed/ui/packages/components/tree-table/style.css';
2
- import { defineComponent as he, mergeModels as ee, ref as U, useModel as ce, computed as I, watch as le, createElementBlock as V, openBlock as K, normalizeStyle as j, normalizeClass as ie, createElementVNode as $, renderSlot as L, createCommentVNode as w, toDisplayString as A, Fragment as G, renderList as J, createBlock as Q, unref as N, withCtx as F, createTextVNode as S, withDirectives as M, createVNode as W, vShow as H } from "vue";
3
- import { withInstall as ve } from "@das-fed/utils/with-install/index";
4
- import { setThemeRule as ke } from "@das-fed/web/packages/theme/index";
5
- import { DasTree as be } from "@das-fed/ui/packages/components/tree/index";
6
- import { DasVirtualTree as ye } from "@das-fed/ui/packages/components/virtual-tree/index";
2
+ import { defineComponent as ke, mergeModels as le, ref as U, useModel as ye, computed as V, watch as ae, createElementBlock as $, openBlock as L, normalizeStyle as j, normalizeClass as ne, createElementVNode as E, renderSlot as I, createCommentVNode as T, toDisplayString as R, Fragment as G, renderList as J, createBlock as Q, unref as A, withCtx as p, createTextVNode as S, withDirectives as M, createVNode as W, vShow as H } from "vue";
3
+ import { withInstall as be } from "@das-fed/utils/with-install/index";
4
+ import { setThemeRule as ge } from "@das-fed/web/packages/theme/index";
5
+ import { DasTree as me } from "@das-fed/ui/packages/components/tree/index";
6
+ import { DasVirtualTree as Ke } from "@das-fed/ui/packages/components/virtual-tree/index";
7
7
  import { DasCheckbox as X } from "@das-fed/ui/packages/components/checkbox/index";
8
- import { vOverlay as ae } from "@das-fed/ui/packages/components/overlay/index";
9
- import { DasEmpty as ge } from "@das-fed/ui/packages/components/empty/index";
10
- import { DasSpin as me } from "@das-fed/ui/packages/components/spin/index";
11
- import { treeFind as Ce, flatTree as te } from "@das-fed/utils/common-tools";
12
- const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
8
+ import { vOverlay as te } from "@das-fed/ui/packages/components/overlay/index";
9
+ import { DasEmpty as Ce } from "@das-fed/ui/packages/components/empty/index";
10
+ import { DasSpin as we } from "@das-fed/ui/packages/components/spin/index";
11
+ import { treeFind as Y, flatTree as ie } from "@das-fed/utils/common-tools";
12
+ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
13
13
  let n = null;
14
- if (g ? n = (i) => {
15
- var u, c, h;
16
- i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
17
- n && n(o), o[v + "-targetId"] == T && d.nodeKey && !t(i, p) && !y(i) && (b[i[d.nodeKey]].data[v] = !0, b[i[d.nodeKey]].data[v + "-targetId"] = T);
14
+ if (b ? n = (l) => {
15
+ var s, v, h;
16
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
17
+ n && n(d), d[r + "-targetId"] == K && o.nodeKey && !i(l, C) && !g(l) && (f[l[o.nodeKey]].data[r] = !0, f[l[o.nodeKey]].data[r + "-targetId"] = K);
18
18
  });
19
- } : n = (i) => {
20
- var u, c, h;
21
- i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
22
- i[v + "-targetId"] == o[E.value] && d.nodeKey && !t(o, p) && !y(o) && (b[o[d.nodeKey]].data[v] = !1, b[o[d.nodeKey]].data[v + "-targetId"] = o[d.nodeKey]), n && n(o);
19
+ } : n = (l) => {
20
+ var s, v, h;
21
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
22
+ l[r + "-targetId"] == d[N.value] && o.nodeKey && !i(d, C) && !g(d) && (f[d[o.nodeKey]].data[r] = !1, f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n && n(d);
23
23
  });
24
24
  }, k.value && k.value.length)
25
- for (let i = 0; i < k.value.length; i++)
26
- n && n(k.value[i]);
27
- } }), Ke = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
25
+ for (let l = 0; l < k.value.length; l++)
26
+ n && n(k.value[l]);
27
+ } }), Le = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
28
28
  let n = null;
29
- if (g ? n = (i) => {
30
- var u, c, h;
31
- i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
32
- i[v + "-targetId"] == o[E.value] && d.nodeKey && (!t(o, p) && !y(o) && (b[o[d.nodeKey]].data[v] = !0), b[o[d.nodeKey]].data[v + "-targetId"] = o[d.nodeKey]), n && n(o);
29
+ if (b ? n = (l) => {
30
+ var s, v, h;
31
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
32
+ l[r + "-targetId"] == d[N.value] && o.nodeKey && (!i(d, C) && !g(d) && (f[d[o.nodeKey]].data[r] = !0), f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n && n(d);
33
33
  });
34
- } : n = (i) => {
35
- var u, c, h;
36
- i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
37
- n && n(o), o[v + "-targetId"] == T && d.nodeKey && (!t(i, p) && !y(i) && (b[i[d.nodeKey]].data[v] = !1), b[i[d.nodeKey]].data[v + "-targetId"] = T);
34
+ } : n = (l) => {
35
+ var s, v, h;
36
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
37
+ n && n(d), d[r + "-targetId"] == K && o.nodeKey && (!i(l, C) && !g(l) && (f[l[o.nodeKey]].data[r] = !1), f[l[o.nodeKey]].data[r + "-targetId"] = K);
38
38
  });
39
39
  }, k.value && k.value.length)
40
- for (let i = 0; i < k.value.length; i++)
41
- n && n(k.value[i]);
42
- } }), Te = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
40
+ for (let l = 0; l < k.value.length; l++)
41
+ n && n(k.value[l]);
42
+ } }), Ie = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
43
43
  let n = null;
44
- if (g ? n = (i) => {
45
- var u, c, h;
46
- i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
47
- i[v + "-targetId"] == o[E.value] && d.nodeKey && (!t(o, p) && !y(o) && (b[o[d.nodeKey]].data[v] = !0), b[o[d.nodeKey]].data[v + "-targetId"] = o[d.nodeKey]), n && n(o);
44
+ if (b ? n = (l) => {
45
+ var s, v, h;
46
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
47
+ l[r + "-targetId"] == d[N.value] && o.nodeKey && (!i(d, C) && !g(d) && (f[d[o.nodeKey]].data[r] = !0), f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n && n(d);
48
48
  });
49
- } : n = (i) => {
50
- var u, c, h;
51
- i[d.nodeKey] === T ? delete b[i[d.nodeKey]].data[v + "-targetId"] : i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
52
- o[d.nodeKey] == T ? d.nodeKey && delete b[o[d.nodeKey]].data[v + "-targetId"] : n && n(o);
49
+ } : n = (l) => {
50
+ var s, v, h;
51
+ l[o.nodeKey] === K ? delete f[l[o.nodeKey]].data[r + "-targetId"] : l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
52
+ d[o.nodeKey] == K ? o.nodeKey && delete f[d[o.nodeKey]].data[r + "-targetId"] : n && n(d);
53
53
  });
54
54
  }, k.value && k.value.length) {
55
- const i = Ce(k.value, (u) => u[d.nodeKey] === T);
56
- n && n(i);
55
+ const l = Y(k.value, (s) => s[o.nodeKey] === K);
56
+ n && n(l);
57
57
  }
58
- } }), pe = { class: "table-header" }, Le = { class: "title table-label" }, Ie = {
58
+ } }), Ve = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
59
+ let n = null;
60
+ if (b ? n = (l) => {
61
+ var s, v, h;
62
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
63
+ o.nodeKey && (f[d[o.nodeKey]].data[r] = !0, f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n == null || n(d);
64
+ });
65
+ } : n = (l) => {
66
+ var s, v, h;
67
+ l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
68
+ o.nodeKey && (f[d[o.nodeKey]].data[r] = !1, delete f[d[o.nodeKey]].data[r + "-targetId"]), n == null || n(d);
69
+ });
70
+ }, k.value && k.value.length) {
71
+ const l = Y(k.value, (s) => s[o.nodeKey] === K);
72
+ n && n(l);
73
+ }
74
+ } }), $e = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
75
+ let n = null;
76
+ if (b ? n = (l) => {
77
+ o.nodeKey && (!i(l, C) && !g(l) && (f[l[o.nodeKey]].data[r] = !0), f[l[o.nodeKey]].data[r + "-targetId"] = l[o.nodeKey]);
78
+ } : n = (l) => {
79
+ o.nodeKey && (delete f[l[o.nodeKey]].data[r + "-targetId"], f[l[o.nodeKey]].data[r] = !1);
80
+ }, k.value && k.value.length) {
81
+ const l = Y(k.value, (s) => s[o.nodeKey] === K);
82
+ n && l && n(l);
83
+ }
84
+ } }), Ee = { class: "table-header" }, Ne = { class: "title table-label" }, Fe = {
59
85
  key: 0,
60
86
  class: "table-label"
61
- }, Ve = {
62
- class: /* @__PURE__ */ ie(["table-body", "das-tree-box"])
63
- }, $e = { class: "tree-node" }, Ne = { class: "tree-node" }, Ee = { class: "first-column" }, De = { class: "title" }, Ae = { class: "tree-node" }, Be = { class: "tree-node" }, Re = { class: "first-column" }, Fe = { class: "title" }, Me = {
87
+ }, Ae = {
88
+ class: /* @__PURE__ */ ne(["table-body", "das-tree-box"])
89
+ }, Be = { class: "tree-node" }, Re = { class: "tree-node" }, De = { class: "first-column" }, pe = { class: "title" }, Me = { class: "tree-node" }, Oe = { class: "tree-node" }, Se = { class: "first-column" }, Ue = { class: "title" }, ze = {
64
90
  name: "DasTreeTable",
65
91
  inheritAttrs: !1
66
- }, Oe = /* @__PURE__ */ he({
67
- ...Me,
68
- props: /* @__PURE__ */ ee({
92
+ }, je = /* @__PURE__ */ ke({
93
+ ...ze,
94
+ props: /* @__PURE__ */ le({
69
95
  virtual: { type: Boolean, default: !0 },
70
96
  linkageType: { default: "first" },
71
97
  keyword: {},
@@ -91,128 +117,130 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
91
117
  keyword: { type: String, default: "" },
92
118
  keywordModifiers: {}
93
119
  }),
94
- emits: /* @__PURE__ */ ee(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
95
- setup(d, { expose: B, emit: r }) {
96
- const t = d, y = r, E = U(), k = ce(d, "keyword"), D = I(() => {
120
+ emits: /* @__PURE__ */ le(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
121
+ setup(o, { expose: B, emit: c }) {
122
+ const i = o, g = c, N = U(), k = ye(o, "keyword"), F = V(() => {
97
123
  var e;
98
- return t.checkNum ?? ((e = t.checkboxLabels) == null ? void 0 : e.length) ?? 0;
99
- }), T = I(() => t != null && t.height ? t.height + "px" : "100%"), v = I(() => {
100
- if (t != null && t.height) {
101
- if (typeof t.height == "string") {
102
- if (t.height.includes("%")) return;
103
- if (t.height.includes("px")) return Number(t.height.replace("px", ""));
124
+ return i.checkNum ?? ((e = i.checkboxLabels) == null ? void 0 : e.length) ?? 0;
125
+ }), K = V(() => i != null && i.height ? i.height + "px" : "100%"), r = V(() => {
126
+ if (i != null && i.height) {
127
+ if (typeof i.height == "string") {
128
+ if (i.height.includes("%")) return;
129
+ if (i.height.includes("px")) return Number(i.height.replace("px", ""));
104
130
  }
105
- return t.height;
131
+ return i.height;
106
132
  }
107
- }), g = I(() => {
108
- const e = { ...t.props };
109
- return e != null && e.disabled && delete e.disabled, e != null && e.hidden && delete e.hidden, e != null && e.parentId && delete e.parentId, { children: "children", disabled: "disabled", isLeaf: "leaf", ...e, label: t.fistLabel };
110
- }), b = I(() => {
133
+ }), b = V(() => {
134
+ const e = { ...i.props };
135
+ return e != null && e.disabled && delete e.disabled, e != null && e.hidden && delete e.hidden, e != null && e.parentId && delete e.parentId, { children: "children", disabled: "disabled", isLeaf: "leaf", ...e, label: i.fistLabel };
136
+ }), f = V(() => {
111
137
  var e;
112
- return ((e = t.props) == null ? void 0 : e.parentId) ?? "parentId";
113
- }), p = I(() => {
114
- var a, l, s, f, C, R;
138
+ return ((e = i.props) == null ? void 0 : e.parentId) ?? "parentId";
139
+ }), C = V(() => {
140
+ var t, a, u, y, w, D;
115
141
  let e = [];
116
- return (a = t.props) != null && a.disabled && ((l = t.props) != null && l.disabled.length) ? ((s = t.props) != null && s.disabled[0] ? e[0] = (f = t.props) == null ? void 0 : f.disabled[0] : e[0] = "disabled1", (C = t.props) != null && C.disabled[1] ? e[1] = (R = t.props) == null ? void 0 : R.disabled[1] : e[1] = "disabled2") : e = ["disabled1", "disabled2"], e;
117
- }), n = (e, a) => typeof p.value[a] == "function" ? p.value[a](e, a) : e[p.value[a]], i = I(() => {
142
+ return (t = i.props) != null && t.disabled && ((a = i.props) != null && a.disabled.length) ? ((u = i.props) != null && u.disabled[0] ? e[0] = (y = i.props) == null ? void 0 : y.disabled[0] : e[0] = "disabled1", (w = i.props) != null && w.disabled[1] ? e[1] = (D = i.props) == null ? void 0 : D.disabled[1] : e[1] = "disabled2") : e = ["disabled1", "disabled2"], e;
143
+ }), n = (e, t) => typeof C.value[t] == "function" ? C.value[t](e, t) : e[C.value[t]], l = V(() => {
118
144
  var e;
119
- return ((e = t.props) == null ? void 0 : e.hidden) ?? "hidden";
120
- }), u = (e) => typeof i.value == "function" ? i.value(e) : e[i.value], c = U(), h = U([!1, !1]), o = U([!1, !1]), m = I({
121
- get: () => t.data,
122
- set: (e) => y("update:data", e)
123
- }), Y = (e) => {
124
- const a = {};
125
- return Array.isArray(e) && e.forEach((l) => {
126
- const s = { data: l };
127
- a[l[t.nodeKey]] = s, Array.isArray(l[g.value.children]) && Object.assign(a, Y(l[g.value.children]));
128
- }), a;
129
- }, Z = () => Y(m.value), _ = (e, a, l) => {
130
- t.allCheckboxDisabled[l] || (e > 0 && a > 0 ? (h.value[l] = !1, o.value[l] = !0) : e == 0 && a >= 0 ? (h.value[l] = !1, o.value[l] = !1) : (h.value[l] = !0, o.value[l] = !1));
145
+ return ((e = i.props) == null ? void 0 : e.hidden) ?? "hidden";
146
+ }), s = (e) => typeof l.value == "function" ? l.value(e) : e[l.value], v = U(), h = U([!1, !1]), d = U([!1, !1]), m = V({
147
+ get: () => i.data,
148
+ set: (e) => g("update:data", e)
149
+ }), _ = (e) => {
150
+ const t = {};
151
+ return Array.isArray(e) && e.forEach((a) => {
152
+ const u = { data: a };
153
+ t[a[i.nodeKey]] = u, Array.isArray(a[b.value.children]) && Object.assign(t, _(a[b.value.children]));
154
+ }), t;
155
+ }, Z = () => _(m.value), P = (e, t, a) => {
156
+ i.allCheckboxDisabled[a] || (e > 0 && t > 0 ? (h.value[a] = !1, d.value[a] = !0) : e == 0 && t >= 0 ? (h.value[a] = !1, d.value[a] = !1) : (h.value[a] = !0, d.value[a] = !1));
131
157
  }, oe = (e) => {
132
- const a = g.value.children;
133
- let l = [];
134
- l = te(m.value, a);
135
- for (let s = 0; s < D.value; s++) {
136
- let f = 0, C = 0;
137
- l.forEach((R) => {
138
- n(R, s) || u(R) || (R[t.checkboxLabels[s]] ? f++ : C++);
139
- }), _(f, C, s);
158
+ const t = b.value.children;
159
+ let a = [];
160
+ a = ie(m.value, t);
161
+ for (let u = 0; u < F.value; u++) {
162
+ let y = 0, w = 0;
163
+ a.forEach((D) => {
164
+ n(D, u) || s(D) || (D[i.checkboxLabels[u]] ? y++ : w++);
165
+ }), P(y, w, u);
140
166
  }
141
- }, { linkCheck: se } = we(
142
- t,
143
- y,
167
+ }, { linkCheck: de } = Te(
168
+ i,
144
169
  g,
145
- n,
146
- u,
147
170
  b,
171
+ n,
172
+ s,
173
+ f,
148
174
  m
149
- ), { linkCheck: ne } = Ke(t, y, g, n, u, b, m), { linkCheck: de } = Te(
150
- t,
151
- y,
175
+ ), { linkCheck: se } = Le(i, g, b, n, s, f, m), { linkCheck: ue } = Ie(
176
+ i,
152
177
  g,
153
- n,
154
- u,
155
178
  b,
179
+ n,
180
+ s,
181
+ f,
156
182
  m
157
- ), ue = (e, a, l, s, f) => t.linkageType === "custom" ? void 0 : {
158
- first: se,
159
- two: ne,
160
- three: de
161
- }[t.linkageType](e, a, l, s, f), z = (e, a) => {
162
- y("all-check", e, a), h.value[a] = e, o.value[a] = !1;
163
- const l = Z();
164
- if (l)
165
- for (let s in l)
166
- !n(l[s].data, a) && !u(l[s].data) && (l[s].data[t.checkboxLabels[a]] = e, delete l[s].data[t.checkboxLabels[a] + "-targetId"]);
167
- if (t.twoLinkFirstCheck) {
183
+ ), { linkCheck: ce } = Ve(i, g, b, n, s, f, m), { linkCheck: re } = $e(i, g, b, n, s, f, m), fe = (e, t, a, u, y) => i.linkageType === "custom" ? void 0 : {
184
+ first: de,
185
+ two: se,
186
+ three: ue,
187
+ four: ce,
188
+ five: re
189
+ }[i.linkageType](e, t, a, u, y), z = (e, t) => {
190
+ g("all-check", e, t), h.value[t] = e, d.value[t] = !1;
191
+ const a = Z();
192
+ if (a)
193
+ for (let u in a)
194
+ !n(a[u].data, t) && !s(a[u].data) && (a[u].data[i.checkboxLabels[t]] = e, delete a[u].data[i.checkboxLabels[t] + "-targetId"]);
195
+ if (i.twoLinkFirstCheck) {
168
196
  if (e) {
169
- if (a === 1) {
170
- if (t.allCheckboxDisabled[a - 1]) return;
171
- z(e, a - 1);
197
+ if (t === 1) {
198
+ if (i.allCheckboxDisabled[t - 1]) return;
199
+ z(e, t - 1);
172
200
  }
173
- } else if (a === 0) {
174
- if (t.allCheckboxDisabled[a + 1]) return;
175
- z(e, a + 1);
201
+ } else if (t === 0) {
202
+ if (i.allCheckboxDisabled[t + 1]) return;
203
+ z(e, t + 1);
176
204
  }
177
205
  }
178
- }, re = I(() => {
206
+ }, he = V(() => {
179
207
  let e = [];
180
208
  if (!m.value || !m.value.length) return e;
181
- const a = g.value.children;
182
- return e = te(m.value, a).filter(
183
- (s) => s[g.value.label].toLowerCase().includes(k.value.toLowerCase())
209
+ const t = b.value.children;
210
+ return e = ie(m.value, t).filter(
211
+ (u) => u[b.value.label].toLowerCase().includes(k.value.toLowerCase())
184
212
  ), e;
185
- }), q = I(() => {
186
- var a;
213
+ }), q = V(() => {
214
+ var t;
187
215
  let e = !1;
188
- return (!m.value || !m.value.length) && (e = !0), k.value && !((a = re.value) != null && a.length) && (e = !0), e;
189
- }), fe = () => new Promise((e) => {
190
- const a = () => {
191
- var l;
192
- if ((l = c.value) != null && l.treeRef) return e(!0);
193
- setTimeout(() => a(), 50);
216
+ return (!m.value || !m.value.length) && (e = !0), k.value && !((t = he.value) != null && t.length) && (e = !0), e;
217
+ }), ve = () => new Promise((e) => {
218
+ const t = () => {
219
+ var a;
220
+ if ((a = v.value) != null && a.treeRef) return e(!0);
221
+ setTimeout(() => t(), 50);
194
222
  };
195
- a();
223
+ t();
196
224
  });
197
- let P = "";
198
- const x = async () => {
199
- var e, a;
200
- P != k.value && (await fe(), (a = (e = c.value) == null ? void 0 : e.treeRef) == null || a.filter(k.value), P = k.value);
225
+ let x = "";
226
+ const ee = async () => {
227
+ var e, t;
228
+ x != k.value && (await ve(), (t = (e = v.value) == null ? void 0 : e.treeRef) == null || t.filter(k.value), x = k.value);
201
229
  };
202
- le(
230
+ ae(
203
231
  () => m.value,
204
232
  () => {
205
- oe(), x();
233
+ oe(), ee();
206
234
  },
207
235
  { immediate: !0, deep: !0 }
208
- ), le(() => k.value, x);
209
- const O = (e, a, l) => {
210
- y("item-check", e, a, l);
211
- const s = Z(), f = t.checkboxLabels[l];
212
- s && (s[a[t.nodeKey]].data[f + "-targetId"] = a[t.nodeKey], s[a[t.nodeKey]].data[f] = e), ue(a[t.nodeKey], f, e, s, l), t.twoLinkFirstCheck && (e ? l === 1 && !n(a, l - 1) && !u(a) && O(e, a, l - 1) : l === 0 && !n(a, l + 1) && !u(a) && O(e, a, l + 1));
236
+ ), ae(() => k.value, ee);
237
+ const O = (e, t, a) => {
238
+ g("item-check", e, t, a);
239
+ const u = Z(), y = i.checkboxLabels[a];
240
+ u && (u[t[i.nodeKey]].data[y + "-targetId"] = t[i.nodeKey], u[t[i.nodeKey]].data[y] = e), fe(t[i.nodeKey], y, e, u, a), i.twoLinkFirstCheck && (e ? a === 1 && !n(t, a - 1) && !s(t) && O(e, t, a - 1) : a === 0 && !n(t, a + 1) && !s(t) && O(e, t, a + 1));
213
241
  };
214
242
  return B({
215
- $treeTableBody: c,
243
+ $treeTableBody: v,
216
244
  /** 获取树的节点数据 */
217
245
  getTreeNodesMap: Z,
218
246
  /** 手动全选/取消全选;参数val,index */
@@ -220,57 +248,57 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
220
248
  /** 手动选中/取消选中;参数val,data,index */
221
249
  setCheck: O,
222
250
  /** 手动联动全选;参数trueNum,falseNum,index */
223
- linkAllCheck: _
224
- }), (e, a) => (K(), V(
251
+ linkAllCheck: P
252
+ }), (e, t) => (L(), $(
225
253
  "div",
226
254
  {
227
255
  ref_key: "dasTreeTableRef",
228
- ref: E,
229
- class: ie(["das-ui-tree-table", e.border ? "is-border" : ""]),
230
- style: j({ height: T.value })
256
+ ref: N,
257
+ class: ne(["das-ui-tree-table", e.border ? "is-border" : ""]),
258
+ style: j({ height: K.value })
231
259
  },
232
260
  [
233
- $("div", pe, [
234
- $(
261
+ E("div", Ee, [
262
+ E(
235
263
  "div",
236
- Le,
237
- A(e.title),
264
+ Ne,
265
+ R(e.title),
238
266
  1
239
267
  /* TEXT */
240
268
  ),
241
- e.$slots.headerLeft ? L(e.$slots, "headerLeft", { key: 0 }, void 0, !0) : w("v-if", !0),
242
- (K(!0), V(
269
+ e.$slots.headerLeft ? I(e.$slots, "headerLeft", { key: 0 }, void 0, !0) : T("v-if", !0),
270
+ (L(!0), $(
243
271
  G,
244
272
  null,
245
- J(D.value, (l) => (K(), V(
273
+ J(F.value, (a) => (L(), $(
246
274
  "div",
247
275
  {
248
276
  class: "check-item",
249
277
  style: j({ width: e.checkboxWidth[0] })
250
278
  },
251
279
  [
252
- L(e.$slots, e.checkboxLabels[l - 1] + "Header", {}, () => [
253
- e.isView ? (K(), V(
280
+ I(e.$slots, e.checkboxLabels[a - 1] + "Header", {}, () => [
281
+ e.isView ? (L(), $(
254
282
  "span",
255
- Ie,
256
- A(e.allCheckboxNames[l - 1] ?? ""),
283
+ Fe,
284
+ R(e.allCheckboxNames[a - 1] ?? ""),
257
285
  1
258
286
  /* TEXT */
259
- )) : (K(), Q(N(X), {
287
+ )) : (L(), Q(A(X), {
260
288
  key: 1,
261
- modelValue: h.value[l - 1],
262
- "onUpdate:modelValue": (s) => h.value[l - 1] = s,
289
+ modelValue: h.value[a - 1],
290
+ "onUpdate:modelValue": (u) => h.value[a - 1] = u,
263
291
  checkboxType: "default",
264
- indeterminate: o.value[l - 1],
265
- disabled: e.allCheckboxDisabled[l - 1] || !m.value || !m.value.length,
292
+ indeterminate: d.value[a - 1],
293
+ disabled: e.allCheckboxDisabled[a - 1] || !m.value || !m.value.length,
266
294
  isView: e.isView,
267
- onChange: (s) => {
268
- z(s, l - 1);
295
+ onChange: (u) => {
296
+ z(u, a - 1);
269
297
  }
270
298
  }, {
271
- default: F(() => [
299
+ default: p(() => [
272
300
  S(
273
- A(e.allCheckboxNames[l - 1] ?? ""),
301
+ R(e.allCheckboxNames[a - 1] ?? ""),
274
302
  1
275
303
  /* TEXT */
276
304
  )
@@ -286,74 +314,74 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
286
314
  256
287
315
  /* UNKEYED_FRAGMENT */
288
316
  )),
289
- e.$slots.headerRight ? L(e.$slots, "headerRight", { key: 1 }, void 0, !0) : w("v-if", !0)
317
+ e.$slots.headerRight ? I(e.$slots, "headerRight", { key: 1 }, void 0, !0) : T("v-if", !0)
290
318
  ]),
291
- $("div", Ve, [
292
- e.virtual ? M((K(), Q(N(ye), {
319
+ E("div", Ae, [
320
+ e.virtual ? M((L(), Q(A(Ke), {
293
321
  key: 0,
294
322
  ref_key: "$treeTableBody",
295
- ref: c,
323
+ ref: v,
296
324
  nodeKey: e.nodeKey,
297
325
  data: m.value,
298
- props: g.value,
326
+ props: b.value,
299
327
  "expand-on-click-node": !1,
300
328
  "default-expand-all": e.defaultExpandAll,
301
329
  overlayZIndex: "auto",
302
- height: v.value,
330
+ height: r.value,
303
331
  style: { width: "100%" }
304
332
  }, {
305
- default: F(({ data: l, node: s }) => [
306
- M((K(), V("div", $e, [
307
- $("div", Ne, [
308
- $("div", Ee, [
309
- e.$slots.icon ? L(e.$slots, "icon", {
333
+ default: p(({ data: a, node: u }) => [
334
+ M((L(), $("div", Be, [
335
+ E("div", Re, [
336
+ E("div", De, [
337
+ e.$slots.icon ? I(e.$slots, "icon", {
310
338
  key: 0,
311
- node: s,
312
- data: l
339
+ node: u,
340
+ data: a
313
341
  }, () => [
314
- a[0] || (a[0] = S("icon"))
315
- ], !0) : w("v-if", !0),
316
- L(e.$slots, "title", {
317
- node: s,
318
- data: l
342
+ t[0] || (t[0] = S("icon"))
343
+ ], !0) : T("v-if", !0),
344
+ I(e.$slots, "title", {
345
+ node: u,
346
+ data: a
319
347
  }, () => [
320
- $(
348
+ E(
321
349
  "span",
322
- De,
323
- A(l[e.fistLabel]),
350
+ pe,
351
+ R(a[e.fistLabel]),
324
352
  1
325
353
  /* TEXT */
326
354
  )
327
355
  ], !0)
328
356
  ]),
329
- e.$slots.bodyLeft ? L(e.$slots, "bodyLeft", {
357
+ e.$slots.bodyLeft ? I(e.$slots, "bodyLeft", {
330
358
  key: 0,
331
- node: s,
332
- data: l
333
- }, void 0, !0) : w("v-if", !0),
334
- u(l) ? w("v-if", !0) : (K(!0), V(
359
+ node: u,
360
+ data: a
361
+ }, void 0, !0) : T("v-if", !0),
362
+ s(a) ? T("v-if", !0) : (L(!0), $(
335
363
  G,
336
364
  { key: 1 },
337
- J(D.value, (f) => (K(), V(
365
+ J(F.value, (y) => (L(), $(
338
366
  "div",
339
367
  {
340
368
  class: "check-item",
341
- style: j({ width: e.checkboxWidth[f - 1] })
369
+ style: j({ width: e.checkboxWidth[y - 1] })
342
370
  },
343
371
  [
344
- W(N(X), {
345
- modelValue: l[e.checkboxLabels[f - 1]],
346
- "onUpdate:modelValue": (C) => l[e.checkboxLabels[f - 1]] = C,
372
+ W(A(X), {
373
+ modelValue: a[e.checkboxLabels[y - 1]],
374
+ "onUpdate:modelValue": (w) => a[e.checkboxLabels[y - 1]] = w,
347
375
  checkboxType: "default",
348
376
  isView: e.isView,
349
- disabled: n(l, f - 1),
350
- onChange: (C) => {
351
- O(C, l, f - 1);
377
+ disabled: n(a, y - 1),
378
+ onChange: (w) => {
379
+ O(w, a, y - 1);
352
380
  }
353
381
  }, {
354
- default: F(() => [
382
+ default: p(() => [
355
383
  S(
356
- A(e.checkboxNames[f - 1] ?? ""),
384
+ R(e.checkboxNames[y - 1] ?? ""),
357
385
  1
358
386
  /* TEXT */
359
387
  )
@@ -368,86 +396,86 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
368
396
  256
369
397
  /* UNKEYED_FRAGMENT */
370
398
  )),
371
- e.$slots.bodyRight ? L(e.$slots, "bodyRight", {
399
+ e.$slots.bodyRight ? I(e.$slots, "bodyRight", {
372
400
  key: 2,
373
- node: s,
374
- data: l
375
- }, void 0, !0) : w("v-if", !0)
401
+ node: u,
402
+ data: a
403
+ }, void 0, !0) : T("v-if", !0)
376
404
  ])
377
405
  ])), [
378
- [N(ae), { x: !1, "z-index": "auto" }]
406
+ [A(te), { x: !1, "z-index": "auto" }]
379
407
  ])
380
408
  ]),
381
409
  _: 3
382
410
  /* FORWARDED */
383
411
  }, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
384
412
  [H, !q.value && !e.loading]
385
- ]) : w("v-if", !0),
386
- e.virtual ? w("v-if", !0) : M((K(), Q(N(be), {
413
+ ]) : T("v-if", !0),
414
+ e.virtual ? T("v-if", !0) : M((L(), Q(A(me), {
387
415
  key: 1,
388
416
  ref_key: "$treeTableBody",
389
- ref: c,
417
+ ref: v,
390
418
  nodeKey: e.nodeKey,
391
419
  data: m.value,
392
- props: g.value,
420
+ props: b.value,
393
421
  "expand-on-click-node": !1,
394
422
  "default-expand-all": e.defaultExpandAll,
395
423
  overlayZIndex: "auto",
396
- height: v.value,
424
+ height: r.value,
397
425
  style: { width: "100%" }
398
426
  }, {
399
- default: F(({ data: l, node: s }) => [
400
- M((K(), V("div", Ae, [
401
- $("div", Be, [
402
- $("div", Re, [
403
- e.$slots.icon ? L(e.$slots, "icon", {
427
+ default: p(({ data: a, node: u }) => [
428
+ M((L(), $("div", Me, [
429
+ E("div", Oe, [
430
+ E("div", Se, [
431
+ e.$slots.icon ? I(e.$slots, "icon", {
404
432
  key: 0,
405
- node: s,
406
- data: l
433
+ node: u,
434
+ data: a
407
435
  }, () => [
408
- a[1] || (a[1] = S("icon"))
409
- ], !0) : w("v-if", !0),
410
- L(e.$slots, "title", {
411
- node: s,
412
- data: l
436
+ t[1] || (t[1] = S("icon"))
437
+ ], !0) : T("v-if", !0),
438
+ I(e.$slots, "title", {
439
+ node: u,
440
+ data: a
413
441
  }, () => [
414
- $(
442
+ E(
415
443
  "span",
416
- Fe,
417
- A(l[e.fistLabel]),
444
+ Ue,
445
+ R(a[e.fistLabel]),
418
446
  1
419
447
  /* TEXT */
420
448
  )
421
449
  ], !0)
422
450
  ]),
423
- e.$slots.bodyLeft ? L(e.$slots, "bodyLeft", {
451
+ e.$slots.bodyLeft ? I(e.$slots, "bodyLeft", {
424
452
  key: 0,
425
- node: s,
426
- data: l
427
- }, void 0, !0) : w("v-if", !0),
428
- u(l) ? w("v-if", !0) : (K(!0), V(
453
+ node: u,
454
+ data: a
455
+ }, void 0, !0) : T("v-if", !0),
456
+ s(a) ? T("v-if", !0) : (L(!0), $(
429
457
  G,
430
458
  { key: 1 },
431
- J(D.value, (f) => (K(), V(
459
+ J(F.value, (y) => (L(), $(
432
460
  "div",
433
461
  {
434
462
  class: "check-item",
435
- style: j({ width: e.checkboxWidth[f - 1] })
463
+ style: j({ width: e.checkboxWidth[y - 1] })
436
464
  },
437
465
  [
438
- W(N(X), {
439
- modelValue: l[e.checkboxLabels[f - 1]],
440
- "onUpdate:modelValue": (C) => l[e.checkboxLabels[f - 1]] = C,
466
+ W(A(X), {
467
+ modelValue: a[e.checkboxLabels[y - 1]],
468
+ "onUpdate:modelValue": (w) => a[e.checkboxLabels[y - 1]] = w,
441
469
  checkboxType: "default",
442
470
  isView: e.isView,
443
- disabled: n(l, f - 1),
444
- onChange: (C) => {
445
- O(C, l, f - 1);
471
+ disabled: n(a, y - 1),
472
+ onChange: (w) => {
473
+ O(w, a, y - 1);
446
474
  }
447
475
  }, {
448
- default: F(() => [
476
+ default: p(() => [
449
477
  S(
450
- A(e.checkboxNames[f - 1] ?? ""),
478
+ R(e.checkboxNames[y - 1] ?? ""),
451
479
  1
452
480
  /* TEXT */
453
481
  )
@@ -462,14 +490,14 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
462
490
  256
463
491
  /* UNKEYED_FRAGMENT */
464
492
  )),
465
- e.$slots.bodyRight ? L(e.$slots, "bodyRight", {
493
+ e.$slots.bodyRight ? I(e.$slots, "bodyRight", {
466
494
  key: 2,
467
- node: s,
468
- data: l
469
- }, void 0, !0) : w("v-if", !0)
495
+ node: u,
496
+ data: a
497
+ }, void 0, !0) : T("v-if", !0)
470
498
  ])
471
499
  ])), [
472
- [N(ae), { x: !1, "z-index": "auto" }]
500
+ [A(te), { x: !1, "z-index": "auto" }]
473
501
  ])
474
502
  ]),
475
503
  _: 3
@@ -477,9 +505,9 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
477
505
  }, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
478
506
  [H, !q.value && !e.loading]
479
507
  ]),
480
- w(" 空状态 "),
508
+ T(" 空状态 "),
481
509
  M(W(
482
- N(ge),
510
+ A(Ce),
483
511
  null,
484
512
  null,
485
513
  512
@@ -487,13 +515,13 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
487
515
  ), [
488
516
  [H, q.value && !e.loading]
489
517
  ]),
490
- w(" 加载状态 "),
491
- M(W(N(me), {
518
+ T(" 加载状态 "),
519
+ M(W(A(we), {
492
520
  size: "small",
493
521
  spinning: e.loading
494
522
  }, {
495
- default: F(() => a[2] || (a[2] = [
496
- $(
523
+ default: p(() => t[2] || (t[2] = [
524
+ E(
497
525
  "div",
498
526
  { style: { width: "100%", height: "100%" } },
499
527
  null,
@@ -512,21 +540,21 @@ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
512
540
  /* CLASS, STYLE */
513
541
  ));
514
542
  }
515
- }), Se = (d, B) => {
516
- const r = d.__vccOpts || d;
517
- for (const [t, y] of B)
518
- r[t] = y;
519
- return r;
520
- }, Ue = /* @__PURE__ */ Se(Oe, [["__scopeId", "data-v-5e8ac73d"]]), ze = {
543
+ }), We = (o, B) => {
544
+ const c = o.__vccOpts || o;
545
+ for (const [i, g] of B)
546
+ c[i] = g;
547
+ return c;
548
+ }, He = /* @__PURE__ */ We(je, [["__scopeId", "data-v-56fc5c0d"]]), Ze = {
521
549
  "--das-ui-tree-table-highlight-color": "#5582f3",
522
550
  "--das-ui-tree-table-header-color": "#212121",
523
551
  "--das-ui-tree-table-header-bg-color": "#F2F2F2",
524
552
  "--das-ui-tree-table-border-color": "#D9D9D9"
525
553
  };
526
- ke(ze);
527
- const _e = ve(Ue), Pe = () => U(null), xe = { name: "tree-table 表格树" };
554
+ ge(Ze);
555
+ const ll = be(He), al = () => U(null), tl = { name: "tree-table 表格树" };
528
556
  export {
529
- _e as DasTreeTable,
530
- Pe as DasTreeTableRef,
531
- xe as default
557
+ ll as DasTreeTable,
558
+ al as DasTreeTableRef,
559
+ tl as default
532
560
  };