@fewangsit/wangsvue-fats 1.0.1-alpha.62 → 1.0.1-alpha.64

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.
@@ -87,7 +87,8 @@ export type TimelineItem = {
87
87
  _id: string;
88
88
  nickName: string;
89
89
  };
90
- detail?: KeyValue | DetailType;
90
+ // Detail can be a record of any type if using the detail slot
91
+ detail?: KeyValue | DetailType | SlotDetailType;
91
92
  };
92
93
 
93
94
  export type TimelineProps = {
@@ -124,6 +125,10 @@ export type TimelineSlots = {
124
125
  *
125
126
  */
126
127
  date(slotProps: { date: string }): VNode[];
128
+ /**
129
+ * Custom user template.
130
+ */
131
+ user(slotProps: { user: string; detail: DetailAnyRecord }): VNode[];
127
132
  };
128
133
 
129
134
  /**
@@ -1,4 +1,4 @@
1
- import { defineComponent as N, inject as V, createBlock as p, openBlock as t, unref as a, ref as A, normalizeClass as D, withCtx as b, createElementVNode as n, createElementBlock as l, createCommentVNode as c, mergeProps as u, normalizeProps as x, guardReactiveProps as v, renderSlot as $, createTextVNode as O, toDisplayString as m, Fragment as g, renderList as j, createVNode as S } from "vue";
1
+ import { defineComponent as N, inject as V, createBlock as p, openBlock as t, unref as a, ref as A, normalizeClass as b, withCtx as x, createElementVNode as n, createElementBlock as l, createCommentVNode as c, renderSlot as k, mergeProps as u, normalizeProps as $, guardReactiveProps as v, createTextVNode as O, toDisplayString as f, Fragment as g, renderList as j, createVNode as S } from "vue";
2
2
  import { a as T } from "../utils/date.util.es.js";
3
3
  import { s as P } from "../vendor/primevue/timeline/timeline.esm.es.js";
4
4
  import { _ as F } from "../icon/index.es.js";
@@ -37,43 +37,48 @@ const L = ["onClick"], z = { class: "flex justify-between items-center" }, E = {
37
37
  return typeof d != "string" ? d : { nickName: d };
38
38
  }, B = (s) => s.replace(/`([^`]*)`/g, "<b>$1</b>");
39
39
  return (s, d) => (t(), p(a(P), {
40
- class: D([{ "overflow-auto": !s.noScroll }]),
40
+ class: b([{ "overflow-auto": !s.noScroll }]),
41
41
  value: A(s.value).value,
42
42
  style: { "scrollbar-width": "none" }
43
43
  }, {
44
- marker: b(({ item: e }) => {
45
- var f, _, y;
44
+ marker: x(({ item: e }) => {
45
+ var m, _, y;
46
46
  return [
47
47
  n("div", u({
48
48
  onClick: (r) => e.showDetail = !e.showDetail
49
- }, (f = a(i)) == null ? void 0 : f.marker, { "data-wv-section": "timelinemarker" }), [
49
+ }, (m = a(i)) == null ? void 0 : m.marker, { "data-wv-section": "timelinemarker" }), [
50
50
  S(F, u((_ = a(i)) == null ? void 0 : _.markerArrow(e), { icon: "arrow-down" }), null, 16),
51
- n("div", x(v((y = a(i)) == null ? void 0 : y.markerDot(e))), null, 16)
51
+ n("div", $(v((y = a(i)) == null ? void 0 : y.markerDot(e))), null, 16)
52
52
  ], 16, L)
53
53
  ];
54
54
  }),
55
- content: b(({ item: e }) => {
56
- var f, _, y;
55
+ content: x(({ item: e }) => {
56
+ var m, _, y;
57
57
  return [
58
58
  n("div", z, [
59
59
  n("div", E, [
60
60
  n("h3", u({
61
61
  innerHTML: B(e.action)
62
- }, (f = a(i)) == null ? void 0 : f.contentHeader, {
62
+ }, (m = a(i)) == null ? void 0 : m.contentHeader, {
63
63
  onClick: (r) => e.showDetail = !e.showDetail
64
64
  }), null, 16, M),
65
- e.user || e.username ? (t(), p(H, {
66
- key: 0,
67
- user: C(e),
68
- type: "icon",
69
- "user-name-field": "nickName"
70
- }, null, 8, ["user"])) : c("", !0)
65
+ k(s.$slots, "user", {
66
+ detail: e.detail,
67
+ user: e.user || e.username
68
+ }, () => [
69
+ e.user || e.username ? (t(), p(H, {
70
+ key: 0,
71
+ user: C(e),
72
+ type: "icon",
73
+ "user-name-field": "nickName"
74
+ }, null, 8, ["user"])) : c("", !0)
75
+ ])
71
76
  ]),
72
- n("span", x(v((_ = a(i)) == null ? void 0 : _.contentDate)), [
73
- $(s.$slots, "date", {
77
+ n("span", $(v((_ = a(i)) == null ? void 0 : _.contentDate)), [
78
+ k(s.$slots, "date", {
74
79
  date: e.createdAt
75
80
  }, () => [
76
- O(m(s.noFormatDate ? e.createdAt : a(T)(e.createdAt)), 1)
81
+ O(f(s.noFormatDate ? e.createdAt : a(T)(e.createdAt)), 1)
77
82
  ])
78
83
  ], 16)
79
84
  ]),
@@ -84,30 +89,30 @@ const L = ["onClick"], z = { class: "flex justify-between items-center" }, E = {
84
89
  }, null, 8, ["detail"])) : (y = Object.keys(e.detail ?? {})) != null && y.length ? (t(), l("div", I, [
85
90
  s.$props.alignDetail ? (t(), l("div", K, [
86
91
  (t(!0), l(g, null, j(Object.entries(e.detail), ([r, o]) => (t(), l(g, { key: r }, [
87
- n("span", R, m(r), 1),
92
+ n("span", R, f(r), 1),
88
93
  d[0] || (d[0] = n("span", { class: "font-semibold whitespace-nowrap" }, " : ", -1)),
89
- typeof o == "string" ? (t(), l("span", U, m(o), 1)) : "type" in o ? (t(), p(h, {
94
+ typeof o == "string" ? (t(), l("span", U, f(o), 1)) : "type" in o ? (t(), p(h, {
90
95
  key: 1,
91
96
  detail: o
92
97
  }, null, 8, ["detail"])) : c("", !0)
93
98
  ], 64))), 128))
94
- ])) : (t(!0), l(g, { key: 1 }, j(Object.entries(e.detail), ([r, o]) => $(s.$slots, "detail", u({
99
+ ])) : (t(!0), l(g, { key: 1 }, j(Object.entries(e.detail), ([r, o]) => k(s.$slots, "detail", u({
95
100
  key: r,
96
101
  ref_for: !0
97
102
  }, { key: r, value: o }), () => {
98
- var k, w;
103
+ var w, D;
99
104
  return [
100
105
  typeof o == "string" ? (t(), l("div", q, [
101
- n("span", u({ ref_for: !0 }, (k = a(i)) == null ? void 0 : k.contentDetailKey), m(r) + ": ", 17),
102
- n("span", u({ ref_for: !0 }, (w = a(i)) == null ? void 0 : w.contentDetailValue), m(o), 17)
106
+ n("span", u({ ref_for: !0 }, (w = a(i)) == null ? void 0 : w.contentDetailKey), f(r) + ": ", 17),
107
+ n("span", u({ ref_for: !0 }, (D = a(i)) == null ? void 0 : D.contentDetailValue), f(o), 17)
103
108
  ])) : "type" in o ? (t(), l("div", G, [
104
109
  n("span", {
105
- class: D([
110
+ class: b([
106
111
  "flex gap-1",
107
112
  { "flex-col": o.type === "embed" }
108
113
  ])
109
114
  }, [
110
- n("span", J, m(r) + ": ", 1),
115
+ n("span", J, f(r) + ": ", 1),
111
116
  o.type !== "json" ? (t(), p(h, {
112
117
  key: 0,
113
118
  detail: o
package/tree/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export interface TreeProps extends BaseTreeProps {
23
23
  * For query: roleType, transactionAttribute, systemRole is already stringified in components default props, but for the rest of query params need to be stringified outside
24
24
  */
25
25
  params?: QueryParams;
26
- selectedKeys?: TreeSelectionKeys | number[] | undefined;
26
+ selectedKeys?: TreeSelectionKeys | string[] | number[] | undefined;
27
27
  selectedTreeNodes?: TreeNode[] | undefined;
28
28
  selectionMode?: 'single' | 'checkbox' | undefined;
29
29
  /**
@@ -56,11 +56,11 @@ export interface TreeProps extends BaseTreeProps {
56
56
  /**
57
57
  * A list of node keys that should be disabled along with their children.
58
58
  */
59
- disableKeys?: number[];
59
+ disableKeys?: string[] | number[];
60
60
  /**
61
61
  * A list of node keys that should be disabled, affecting only the specified nodes and not their children.
62
62
  */
63
- exactDisableKeys?: number[];
63
+ exactDisableKeys?: string[] | number[];
64
64
  /**
65
65
  * Defines the tree is readonly and disabled.
66
66
  */
@@ -76,7 +76,7 @@ export interface TreeProps extends BaseTreeProps {
76
76
  /**
77
77
  * Defines the group tree to disable excluded keys
78
78
  */
79
- excludedKeys?: number[];
79
+ excludedKeys?: string[] | number[];
80
80
  /**
81
81
  * Will emit update selection when value is `true`
82
82
  *
package/tree/index.es.js CHANGED
@@ -1,12 +1,12 @@
1
- import { defineComponent as te, useSlots as se, computed as W, onMounted as le, onBeforeUnmount as oe, ref as i, shallowRef as ne, nextTick as $, watch as U, createBlock as ae, openBlock as de, mergeProps as ie, createSlots as re, withCtx as ce, renderSlot as ue } from "vue";
2
- import { e as S } from "../event-bus/index.es.js";
1
+ import { defineComponent as te, useSlots as se, computed as $, onMounted as le, onBeforeUnmount as oe, ref as i, shallowRef as ne, nextTick as J, watch as U, createBlock as ae, openBlock as de, mergeProps as ie, createSlots as re, withCtx as ce, renderSlot as ue } from "vue";
2
+ import { e as k } from "../event-bus/index.es.js";
3
3
  import { u as pe } from "../plugins/WangsVue.es.js";
4
4
  import { m as fe } from "../utils/mergePropsWithDefaults.util.es.js";
5
5
  import { _ as ye } from "../basetree/index.es.js";
6
6
  const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => Object.fromEntries(
7
- Object.entries(r).filter(([K, s]) => {
8
- const C = s.checked && !s.partialChecked, O = c || K != "-1";
9
- return C && O;
7
+ Object.entries(r).filter(([S, s]) => {
8
+ const K = s.checked && !s.partialChecked, C = c || S != "-1";
9
+ return K && C;
10
10
  })
11
11
  ), j = (r) => r ? r.flatMap((c) => [
12
12
  { ...c },
@@ -62,14 +62,14 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
62
62
  nodeSelectedWhen: {}
63
63
  },
64
64
  emits: ["update:selectedKeys", "update:selectedTreeNodes", "nodeSelect", "nodeUnselect", "toggleMenu"],
65
- setup(r, { expose: c, emit: K }) {
66
- const s = r, C = se(), { defaultProps: O } = pe("Tree"), G = W(() => fe(s, O)), p = K;
65
+ setup(r, { expose: c, emit: S }) {
66
+ const s = r, K = se(), { defaultProps: C } = pe("Tree"), G = $(() => fe(s, C)), p = S;
67
67
  le(() => {
68
- S.on("tree:update-tree-nodes", x), E(s.filter), k();
68
+ k.on("tree:update-tree-nodes", A), M(s.filter), b();
69
69
  }), oe(() => {
70
- S.off("tree:update-tree-nodes", x);
70
+ k.off("tree:update-tree-nodes", A);
71
71
  });
72
- const g = i(!0), F = i((/* @__PURE__ */ new Date()).getTime().toString()), H = i(), y = i([]), h = i([]), v = i({}), b = i(!1), d = i({ "-1": !0 }), w = i(!1), m = W({
72
+ const v = i(!0), F = i((/* @__PURE__ */ new Date()).getTime().toString()), H = i(), f = i([]), y = i([]), m = i({}), N = i(!1), d = i({ "-1": !0 }), O = i(!1), g = $({
73
73
  get: () => s.selectedKeys ?? {},
74
74
  set: (e) => {
75
75
  p("update:selectedKeys", e);
@@ -78,17 +78,17 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
78
78
  if (s.selectionMode === "checkbox") {
79
79
  const t = (l, o) => {
80
80
  l.forEach((n) => {
81
- var N;
82
- const f = JSON.stringify(n.key), a = !!(e != null && e.includes(Number(n.key)));
83
- u.value[f] = { checked: a }, (N = n.children) != null && N.length && t(n.children, f), o && z(o);
81
+ var a;
82
+ const h = !!(e != null && e.includes(n.key));
83
+ u.value[n.key] = { checked: h }, (a = n.children) != null && a.length && t(n.children, n.key), o && z(o);
84
84
  });
85
85
  };
86
- t(y.value);
86
+ t(f.value);
87
87
  } else {
88
88
  const t = e == null ? void 0 : e[0];
89
89
  t && (u.value = { [t]: !0 });
90
90
  }
91
- }, V = (e) => Array.isArray(e) && e.every((t) => typeof t == "number"), z = (e) => {
91
+ }, V = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), z = (e) => {
92
92
  const t = Q(e), l = u.value[e].checked || t, o = !t && X(e);
93
93
  u.value[e] = {
94
94
  // It should be checked when not partial checked, when it partially checked, the checked value should be false
@@ -97,60 +97,62 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
97
97
  };
98
98
  }, Q = (e) => {
99
99
  var t;
100
- return (t = v.value[e]) == null ? void 0 : t.every((l) => {
100
+ return (t = m.value[e]) == null ? void 0 : t.every((l) => {
101
101
  var n;
102
102
  const o = JSON.stringify(l);
103
103
  return (n = u.value[o]) == null ? void 0 : n.checked;
104
104
  });
105
105
  }, X = (e) => {
106
106
  var t;
107
- return (t = v.value[e]) == null ? void 0 : t.some((l) => {
108
- var n, f;
107
+ return (t = m.value[e]) == null ? void 0 : t.some((l) => {
108
+ var n, h;
109
109
  const o = JSON.stringify(l);
110
- return ((n = u.value[o]) == null ? void 0 : n.checked) || ((f = u.value[o]) == null ? void 0 : f.partialChecked);
110
+ return ((n = u.value[o]) == null ? void 0 : n.checked) || ((h = u.value[o]) == null ? void 0 : h.partialChecked);
111
111
  });
112
- }, A = (e) => e.map((t) => {
112
+ }, w = (e) => e.map((t) => {
113
113
  var l;
114
- return (l = t.children) != null && l.length && (v.value = {
115
- ...v.value,
116
- [t.key.toString()]: t.children.map((o) => Number(o.key))
117
- }, t.children = A(t.children)), s.disableNodeWhen && (t.selectable = !s.disableNodeWhen(t)), t;
118
- }), x = () => {
119
- (async () => (p("update:selectedKeys", {}), await k(!1), M()))();
120
- }, k = async (e = !0) => {
114
+ return t.key = t.key ?? t._id, (l = t.children) != null && l.length && (m.value = {
115
+ ...m.value,
116
+ [t.key.toString()]: t.children.map(
117
+ (o) => o.key
118
+ )
119
+ }, t.children = w(t.children)), s.disableNodeWhen && (t.selectable = !s.disableNodeWhen(t)), t;
120
+ }), A = () => {
121
+ (async () => (p("update:selectedKeys", {}), await b(!1), L()))();
122
+ }, b = async (e = !0) => {
121
123
  try {
122
- g.value = !0;
124
+ v.value = !0;
123
125
  const { data: t } = await G.value.fetchTree(
124
126
  s.type,
125
127
  s.params
126
128
  ) ?? { data: [] };
127
129
  if (t) {
128
- const l = A(t);
129
- h.value = j(t), y.value = l, sessionStorage.setItem(`${s.type}Tree`, JSON.stringify(l)), sessionStorage.setItem(
130
+ const l = w(t);
131
+ y.value = j(l), f.value = l, sessionStorage.setItem(`${s.type}Tree`, JSON.stringify(l)), sessionStorage.setItem(
130
132
  `flatten${s.type}nodes`,
131
- JSON.stringify(h.value)
133
+ JSON.stringify(y.value)
132
134
  );
133
135
  }
134
- s.selectLastNode && s.selectionMode === "single" && await $(Y), s.autoSelectAll && s.selectionMode === "checkbox" && await $(q);
136
+ s.selectLastNode && s.selectionMode === "single" && await J(Y), s.autoSelectAll && s.selectionMode === "checkbox" && await J(q);
135
137
  } finally {
136
- V(s.selectedKeys) && (R(s.selectedKeys), m.value = u.value), e || S.emit("tree:tree-updated"), g.value = !1;
138
+ V(s.selectedKeys) && (R(s.selectedKeys), g.value = u.value), e || k.emit("tree:tree-updated"), v.value = !1;
137
139
  }
138
140
  }, Y = async () => {
139
- var N, D;
141
+ var I, D;
140
142
  const e = sessionStorage.getItem(
141
143
  `${s.type.toLowerCase()}Node`
142
- ), t = (N = y.value) == null ? void 0 : N[0], l = (D = t == null ? void 0 : t.children) == null ? void 0 : D[0], o = e ? JSON.parse(e) : null, n = (o == null ? void 0 : o.key) == -1, f = s.disableNodeAll ? l : t, a = n && s.disableNodeAll ? (
144
+ ), t = (I = f.value) == null ? void 0 : I[0], l = (D = t == null ? void 0 : t.children) == null ? void 0 : D[0], o = e ? JSON.parse(e) : null, n = (o == null ? void 0 : o.key) == -1, h = s.disableNodeAll ? l : t, a = n && s.disableNodeAll ? (
143
145
  // When last node is All, and disableNodeExist, it should select the firstChild of all
144
146
  l
145
- ) : o ?? f;
147
+ ) : o ?? h;
146
148
  if ((a == null ? void 0 : a.key) != null && Z(a == null ? void 0 : a.key)) {
147
- m.value = { [a == null ? void 0 : a.key]: !0 };
148
- const J = sessionStorage.getItem(
149
+ g.value = { [a == null ? void 0 : a.key]: !0 };
150
+ const W = sessionStorage.getItem(
149
151
  `${s.type.toLowerCase()}NodeExpandedKeys`
150
152
  );
151
- J && (d.value = JSON.parse(J)), B(a);
153
+ W && (d.value = JSON.parse(W)), x(a);
152
154
  }
153
- }, Z = (e) => h.value.some((t) => t.key === e), B = (e) => {
155
+ }, Z = (e) => y.value.some((t) => t.key === e), x = (e) => {
154
156
  p("nodeSelect", e), s.shouldEmitEventOnChange && (sessionStorage.setItem(
155
157
  `${s.type.toLowerCase()}Node`,
156
158
  JSON.stringify(e)
@@ -160,67 +162,67 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
160
162
  ));
161
163
  }, q = () => {
162
164
  const e = {};
163
- h.value.forEach((t) => {
165
+ y.value.forEach((t) => {
164
166
  e[t.key] = {
165
167
  checked: !0,
166
168
  partialChecked: !1
167
169
  };
168
- }), m.value = e;
169
- }, T = () => {
170
- b.value = !0;
171
- for (const e of y.value)
172
- L(e);
170
+ }), g.value = e;
171
+ }, B = () => {
172
+ N.value = !0;
173
+ for (const e of f.value)
174
+ T(e);
173
175
  d.value = { ...d.value };
174
- }, L = (e) => {
176
+ }, T = (e) => {
175
177
  var t;
176
178
  if ((t = e.children) != null && t.length) {
177
179
  d.value[e.key ?? ""] = !0;
178
180
  for (const l of e.children)
179
- L(l);
181
+ T(l);
180
182
  }
181
183
  }, _ = () => {
182
- d.value = { "-1": !0 }, b.value = !1;
183
- }, M = () => {
184
+ d.value = { "-1": !0 }, N.value = !1;
185
+ }, L = () => {
184
186
  if (s.selectedKeys) {
185
187
  const e = Array.isArray(s.selectedKeys) ? s.selectedKeys : Object.keys(
186
188
  P(s.selectedKeys, s.includeNodeAllKey)
187
- ).map(Number), t = h.value.filter(
188
- (l) => e.includes(l.key)
189
+ ), t = y.value.filter(
190
+ (l) => e.includes(l._id)
189
191
  );
190
192
  s.shouldEmitEventOnChange && (sessionStorage.setItem(
191
193
  `${s.type.toLowerCase()}Keys`,
192
194
  JSON.stringify(e)
193
- ), S.emit("tree:selection-changed", {
195
+ ), k.emit("tree:selection-changed", {
194
196
  keys: JSON.stringify(e)
195
197
  })), p("update:selectedTreeNodes", t);
196
198
  }
197
- }, E = (e) => {
198
- e != null && e.length ? T() : I();
199
+ }, M = (e) => {
200
+ e != null && e.length ? B() : E();
199
201
  }, ee = (e) => {
200
- s.readonly || B(e);
201
- }, I = () => {
202
+ s.readonly || x(e);
203
+ }, E = () => {
202
204
  d.value = { "-1": !0 };
203
205
  };
204
206
  return U(
205
207
  () => s.filter,
206
208
  (e) => {
207
- E(e);
209
+ M(e);
208
210
  }
209
211
  ), U(
210
212
  () => [s.selectedKeys, s.type],
211
213
  async (e, t) => {
212
- e[1] !== t[1] && (p("update:selectedKeys", {}), await k()), M();
214
+ e[1] !== t[1] && (p("update:selectedKeys", {}), await b()), L();
213
215
  }
214
216
  ), c({
215
- treeNodes: y,
216
- flatNodes: h,
217
- isLoading: g,
218
- showDisposableGroups: w,
219
- isExpandedAll: b,
217
+ treeNodes: f,
218
+ flatNodes: y,
219
+ isLoading: v,
220
+ showDisposableGroups: O,
221
+ isExpandedAll: N,
220
222
  collapseAll: _,
221
- expandAll: T,
222
- expandNodeAll: I,
223
- fetchTreeList: k
223
+ expandAll: B,
224
+ expandNodeAll: E,
225
+ fetchTreeList: b
224
226
  }), (e, t) => (de(), ae(ye, ie({
225
227
  id: F.value,
226
228
  ref_key: "tree",
@@ -228,8 +230,8 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
228
230
  }, e.$attrs, {
229
231
  "expanded-keys": d.value,
230
232
  "onUpdate:expandedKeys": t[0] || (t[0] = (l) => d.value = l),
231
- "selection-keys": m.value,
232
- "onUpdate:selectionKeys": t[1] || (t[1] = (l) => m.value = l),
233
+ "selection-keys": g.value,
234
+ "onUpdate:selectionKeys": t[1] || (t[1] = (l) => g.value = l),
233
235
  class: { readonly: s.readonly },
234
236
  "disable-keys": e.disableKeys,
235
237
  "disable-node-all": s.disableNodeAll,
@@ -238,21 +240,21 @@ const be = (r, c = !1) => Object.keys(P(r, c)).map(Number), P = (r, c = !1) => O
238
240
  "exact-disable-node-when": e.exactDisableNodeWhen,
239
241
  "filter-text": e.filter,
240
242
  "list-labels-no-option": e.listLabelsNoOption,
241
- loading: g.value,
243
+ loading: v.value,
242
244
  "node-selected-when": e.nodeSelectedWhen,
243
245
  "propagate-selection": e.propagateSelection,
244
246
  "selection-mode": s.selectionMode,
245
- "show-disposable-groups": w.value,
247
+ "show-disposable-groups": O.value,
246
248
  "tree-node-menus": e.treeNodeMenus,
247
249
  "use-option": e.useOption,
248
- value: y.value,
249
- onNodeCollapse: t[2] || (t[2] = (l) => b.value = !1),
250
+ value: f.value,
251
+ onNodeCollapse: t[2] || (t[2] = (l) => N.value = !1),
250
252
  onNodeSelect: ee,
251
253
  onNodeUnselect: t[3] || (t[3] = (l) => p("nodeUnselect", l)),
252
254
  onToggleMenu: t[4] || (t[4] = (l) => p("toggleMenu", l)),
253
255
  "filter-by": "name"
254
256
  }), re({ _: 2 }, [
255
- C.default ? {
257
+ K.default ? {
256
258
  name: "default",
257
259
  fn: ce(({ node: l, checked: o, disabled: n }) => [
258
260
  ue(e.$slots, "default", {
@@ -1,10 +1,10 @@
1
- import { defineComponent as xe, inject as Le, ref as oe, computed as i, onMounted as Be, resolveComponent as Ie, createElementBlock as N, openBlock as a, Fragment as V, createElementVNode as C, createBlock as u, createCommentVNode as K, mergeProps as y, unref as d, resolveDynamicComponent as F, normalizeClass as w, withModifiers as A, toDisplayString as le, renderList as Oe, withCtx as We, createVNode as Pe, nextTick as ae } from "vue";
1
+ import { defineComponent as xe, inject as Le, ref as oe, computed as i, onMounted as Be, resolveComponent as Ie, createElementBlock as N, openBlock as a, Fragment as V, createElementVNode as C, createBlock as u, createCommentVNode as K, mergeProps as y, unref as d, resolveDynamicComponent as $, normalizeClass as w, withModifiers as A, toDisplayString as le, renderList as Oe, withCtx as We, createVNode as Pe, nextTick as ae } from "vue";
2
2
  import { D as m } from "../vendor/primevue/utils/utils.esm.es.js";
3
3
  import { _ as Ve } from "../button/index.es.js";
4
- import { _ as Fe } from "../checkbox/index.es.js";
4
+ import { _ as $e } from "../checkbox/index.es.js";
5
5
  import { _ as x } from "../icon/index.es.js";
6
- import { _ as Ge } from "../menu/index.es.js";
7
- const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-posinset", "aria-selected", "aria-setsize", "tabindex"], $e = ["data-p-highlight", "data-p-selectable"], ze = ["data-node-has-children", "data-node-key", "data-node-selected"], He = {
6
+ import { _ as Fe } from "../menu/index.es.js";
7
+ const Ge = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-posinset", "aria-selected", "aria-setsize", "tabindex"], Ue = ["data-p-highlight", "data-p-selectable"], ze = ["data-node-has-children", "data-node-key", "data-node-selected"], He = {
8
8
  "aria-hidden": "true",
9
9
  class: "flex items-center justify-start gap-2 px-4 py-1.5 hover:bg-surface-50 text-xs no-underline overflow-hidden cursor-pointer select-none",
10
10
  "data-pc-section": "action",
@@ -58,7 +58,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
58
58
  var e;
59
59
  return ((e = t.node) == null ? void 0 : e.children) && t.node.children.length > 0;
60
60
  }
61
- ), G = i(
61
+ ), F = i(
62
62
  () => {
63
63
  var e;
64
64
  return +t.node.key != -1 && t.useOption && !((e = t.listLabelsNoOption) != null && e.includes(t.node.name));
@@ -67,7 +67,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
67
67
  () => t.expandedKeys && t.expandedKeys[t.node.key] === !0
68
68
  ), I = i(
69
69
  () => t.node.leaf === !1 ? !1 : !(t.node.children && t.node.children.length)
70
- ), U = i(() => v(t.node) || E(t.node) || t.node.selectable === !1 ? !1 : t.selectionMode != null), D = i(
70
+ ), G = i(() => v(t.node) || E(t.node) || t.node.selectable === !1 ? !1 : t.selectionMode != null), D = i(
71
71
  () => {
72
72
  var e;
73
73
  return ((e = t.nodeSelectedWhen) == null ? void 0 : e.call(t, t.node)) || (t.selectionMode && t.selectionKeys ? t.selectionKeys[t.node.key] === !0 : !1);
@@ -104,7 +104,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
104
104
  ve() ? me(e.type === "dblclick" || t.node.key === -1) : p("nodeClick", {
105
105
  originalEvent: e,
106
106
  nodeTouched: M,
107
- node: { ...t.node, selectable: U.value }
107
+ node: { ...t.node, selectable: G.value }
108
108
  // To prevent selection when the node disabled by disableKeys or exactDisableKeys
109
109
  }), M = !1;
110
110
  }, fe = (e) => {
@@ -120,11 +120,11 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
120
120
  }
121
121
  }, k = (e, n, o) => {
122
122
  e.tabIndex = -1, n.tabIndex = 0, De(o || n);
123
- }, $ = (e) => {
123
+ }, U = (e) => {
124
124
  const n = e.closest("ul").closest("li");
125
125
  if (n) {
126
126
  const o = m.findSingle(n, "button");
127
- return o && o.style.visibility !== "hidden" ? n : $(e.previousElementSibling);
127
+ return o && o.style.visibility !== "hidden" ? n : U(e.previousElementSibling);
128
128
  }
129
129
  return null;
130
130
  }, z = () => {
@@ -245,7 +245,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
245
245
  return !1;
246
246
  if (h.value && !I.value)
247
247
  return n.click(), !1;
248
- const o = $(
248
+ const o = U(
249
249
  e.currentTarget
250
250
  );
251
251
  o && k(e.currentTarget, o);
@@ -295,10 +295,10 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
295
295
  e.focus();
296
296
  }, v = (e) => {
297
297
  var n, o;
298
- return ((n = t.disableKeys) == null ? void 0 : n.includes(+e.key)) || t.disabled || e.selectable == !1 || e.disabled == !0 || ((o = t.disableNodeWhen) == null ? void 0 : o.call(t, e));
298
+ return ((n = t.disableKeys) == null ? void 0 : n.includes(e.key)) || t.disabled || e.selectable == !1 || e.disabled == !0 || ((o = t.disableNodeWhen) == null ? void 0 : o.call(t, e));
299
299
  }, E = (e) => {
300
300
  var n, o;
301
- return e.selectable == !1 || ((n = t.exactDisableKeys) == null ? void 0 : n.includes(+e.key)) || t.disableNodeAll && +e.key == -1 || ((o = t.exactDisableNodeWhen) == null ? void 0 : o.call(t, e));
301
+ return e.selectable == !1 || ((n = t.exactDisableKeys) == null ? void 0 : n.includes(e.key)) || t.disableNodeAll && +e.key == -1 || ((o = t.exactDisableNodeWhen) == null ? void 0 : o.call(t, e));
302
302
  };
303
303
  return Be(() => {
304
304
  z();
@@ -318,7 +318,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
318
318
  "aria-setsize": e.node.children ? e.node.children.length : 0,
319
319
  tabindex: e.index === 0 ? 0 : -1,
320
320
  onKeydown: Ne
321
- }, (l = t.pt ?? d(s)) == null ? void 0 : l.node, {
321
+ }, ((l = t.pt ?? d(s)) == null ? void 0 : l.node) & e.$attrs, {
322
322
  "data-wv-name": "treenode",
323
323
  role: "treeitem"
324
324
  }), [
@@ -333,7 +333,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
333
333
  }),
334
334
  {
335
335
  "data-p-highlight": O.value ? g.value : D.value,
336
- "data-p-selectable": U.value,
336
+ "data-p-selectable": G.value,
337
337
  style: e.node.style,
338
338
  onClick: W,
339
339
  onTouchend: he
@@ -350,7 +350,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
350
350
  class: "animate-spin",
351
351
  icon: "spinner"
352
352
  })) : (a(), N(V, { key: 1 }, [
353
- e.templates.togglericon ? (a(), u(F(e.templates.togglericon), {
353
+ e.templates.togglericon ? (a(), u($(e.templates.togglericon), {
354
354
  key: 0,
355
355
  class: w([...(b = t.pt ?? d(s)) == null ? void 0 : b.togglericon.class]),
356
356
  expanded: h.value,
@@ -366,7 +366,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
366
366
  }, null, 8, ["class"]))
367
367
  ], 64))
368
368
  ], 16),
369
- O.value ? (a(), u(Fe, y({
369
+ O.value ? (a(), u($e, y({
370
370
  key: 0,
371
371
  binary: !1
372
372
  }, (Q = t.pt ?? d(s)) == null ? void 0 : Q.nodeCheckbox.root, {
@@ -380,7 +380,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
380
380
  "data-wv-section": "nodecheckbox",
381
381
  "tri-state": ""
382
382
  }), null, 16, ["disabled", "model-value"])) : K("", !0),
383
- e.templates.nodeicon ? (a(), u(F(e.templates.nodeicon), {
383
+ e.templates.nodeicon ? (a(), u($(e.templates.nodeicon), {
384
384
  key: 1,
385
385
  class: w([...(X = t.pt ?? d(s)) == null ? void 0 : X.nodeicon().class]),
386
386
  node: e.node
@@ -402,7 +402,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
402
402
  }, ["stop"]))
403
403
  }
404
404
  ), [
405
- e.templates[e.node.type] || e.templates.default ? (a(), u(F(e.templates[e.node.type] || e.templates.default), {
405
+ e.templates[e.node.type] || e.templates.default ? (a(), u($(e.templates[e.node.type] || e.templates.default), {
406
406
  key: 0,
407
407
  checked: g.value,
408
408
  disabled: E(e.node) || v(e.node),
@@ -421,7 +421,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
421
421
  info: "Disposable Group",
422
422
  "tooltip-pos": "left"
423
423
  })) : K("", !0),
424
- G.value ? (a(), u(Ve, {
424
+ F.value ? (a(), u(Ve, {
425
425
  key: 3,
426
426
  class: w([
427
427
  "!w-4 !h-4 !min-w-4 p-0.5",
@@ -437,7 +437,7 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
437
437
  "tooltip-pos": "left"
438
438
  })) : K("", !0)
439
439
  ], 16)
440
- ], 16, $e),
440
+ ], 16, Ue),
441
441
  de.value && h.value ? (a(), N("ul", y({
442
442
  key: 0,
443
443
  role: "group"
@@ -473,8 +473,8 @@ const Ue = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-p
473
473
  }), null, 16, ["class", "disable-keys", "disabled", "exact-disable-keys", "expanded-keys", "level", "list-labels-no-option", "loading-mode", "node", "propagate-selection", "pt", "selection-keys", "selection-mode", "show-disposable-groups", "templates", "tree-node-menus", "unstyled", "use-option"]);
474
474
  }), 128))
475
475
  ], 16)) : K("", !0)
476
- ], 16, Ue),
477
- G.value ? (a(), u(Ge, {
476
+ ], 16, Ge),
477
+ F.value ? (a(), u(Fe, {
478
478
  key: 0,
479
479
  ref_key: "treeNodeMenu",
480
480
  ref: L,
@@ -32,7 +32,7 @@ const f = /* @__PURE__ */ c(class extends i {
32
32
  return `icon ic-${this.icon} cursor-pointer !shrink-0`;
33
33
  }
34
34
  render() {
35
- return a(u, { key: "5cab8f5fe45204596e7fa4a154bd03c23bf2b525", class: this.getIconClass() });
35
+ return a(u, { key: "fb2fed3480089f5fb0962fd829037c2e0c3cda0f", class: this.getIconClass() });
36
36
  }
37
37
  }, [0, "wangs-icon", {
38
38
  icon: [1],