@hkyhy/marsun-components-core 0.1.28 → 0.1.30

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 (44) hide show
  1. package/dist/components/Auth/UserProfileCard/UserProfileCard.d.ts +7 -1
  2. package/dist/components/Auth/UserProfileCard/UserProfileCard.js +59 -28
  3. package/dist/components/Auth/UserProfileCard/UserProfileCard.js.map +1 -1
  4. package/dist/components/Auth/UserProfileCard/style.module.scss.js +16 -10
  5. package/dist/components/Auth/UserProfileCard/style.module.scss.js.map +1 -1
  6. package/dist/components/Filter/CommonFilter/index.js +88 -53
  7. package/dist/components/Filter/CommonFilter/index.js.map +1 -1
  8. package/dist/components/Filter/FilterDatePicker/index.js +102 -84
  9. package/dist/components/Filter/FilterDatePicker/index.js.map +1 -1
  10. package/dist/components/Filter/FilterDateRange/index.js +84 -66
  11. package/dist/components/Filter/FilterDateRange/index.js.map +1 -1
  12. package/dist/components/Filter/FilterInput/index.js +51 -33
  13. package/dist/components/Filter/FilterInput/index.js.map +1 -1
  14. package/dist/components/Filter/FilterNumberRange/index.d.ts +8 -0
  15. package/dist/components/Filter/FilterNumberRange/index.js +133 -59
  16. package/dist/components/Filter/FilterNumberRange/index.js.map +1 -1
  17. package/dist/components/Filter/FilterNumberRange/style.module.scss.js +7 -5
  18. package/dist/components/Filter/FilterNumberRange/style.module.scss.js.map +1 -1
  19. package/dist/components/Filter/FilterPopover/index.d.ts +2 -2
  20. package/dist/components/Filter/FilterPopover/index.js +7 -7
  21. package/dist/components/Filter/FilterPopover/index.js.map +1 -1
  22. package/dist/components/Filter/FilterSelect/index.d.ts +14 -2
  23. package/dist/components/Filter/FilterSelect/index.js +216 -177
  24. package/dist/components/Filter/FilterSelect/index.js.map +1 -1
  25. package/dist/components/Filter/FilterSelect/style.module.scss.js +15 -14
  26. package/dist/components/Filter/FilterSelect/style.module.scss.js.map +1 -1
  27. package/dist/components/Filter/FilterTreeSelect/index.d.ts +12 -1
  28. package/dist/components/Filter/FilterTreeSelect/index.js +233 -190
  29. package/dist/components/Filter/FilterTreeSelect/index.js.map +1 -1
  30. package/dist/components/Filter/FilterTreeSelect/style.module.scss.js +14 -13
  31. package/dist/components/Filter/FilterTreeSelect/style.module.scss.js.map +1 -1
  32. package/dist/components/Filter/FilterTrigger/index.js +34 -14
  33. package/dist/components/Filter/FilterTrigger/index.js.map +1 -1
  34. package/dist/components/Filter/index.d.ts +4 -3
  35. package/dist/components/Filter/types.d.ts +27 -1
  36. package/dist/components/Filter/types.js +24 -7
  37. package/dist/components/Filter/types.js.map +1 -1
  38. package/dist/components/Filter/useFilterState.d.ts +37 -5
  39. package/dist/components/Filter/useFilterState.js +74 -23
  40. package/dist/components/Filter/useFilterState.js.map +1 -1
  41. package/dist/index.js +170 -164
  42. package/dist/marsun-components-core.css +1 -1
  43. package/dist/styles/global.css +1 -1
  44. package/package.json +1 -1
@@ -1,309 +1,352 @@
1
- import { jsxs as D, jsx as x } from "react/jsx-runtime";
2
- import { ChevronDown as oe, ChevronRight as ae, Check as fe, X as de } from "../../Icons/index.js";
3
- import { useFetchData as he } from "../../../hooks/useFetchData.js";
4
- import { Input as pe, Checkbox as ue, Space as me } from "antd";
5
- import Y from "classnames";
6
- import { useState as V, useEffect as Z, useMemo as L, useCallback as C } from "react";
7
- import ge from "../FilterPopover/index.js";
8
- import { resolveFilterVisible as O } from "../types.js";
9
- import { useFilterRegister as xe } from "../useFilterState.js";
10
- import g from "./style.module.scss.js";
11
- import { useMarsunFetch as ve } from "../../../provider/context.js";
12
- const { Search: we } = pe;
13
- function ee(u, f = 0, v = null) {
14
- var N;
15
- const h = [];
16
- for (const p of u)
17
- h.push({ id: p.id, name: p.name, depth: f, parentId: v }), (N = p.children) != null && N.length && h.push(...ee(p.children, f + 1, p.id));
18
- return h;
1
+ import { jsxs as U, jsx as x } from "react/jsx-runtime";
2
+ import { ChevronDown as ke, ChevronRight as Ne, Check as Le, X as Fe } from "../../Icons/index.js";
3
+ import { useFetchData as Ee } from "../../../hooks/useFetchData.js";
4
+ import { Input as Te, Checkbox as Pe, Space as Re } from "antd";
5
+ import H from "classnames";
6
+ import { useRef as ie, useState as V, useEffect as W, useMemo as E, useCallback as X } from "react";
7
+ import ze from "../FilterPopover/index.js";
8
+ import { resolveFilterVisible as le } from "../types.js";
9
+ import { useFilterFieldBridge as Ae, useFilterRegister as je } from "../useFilterState.js";
10
+ import m from "./style.module.scss.js";
11
+ import { useMarsunFetch as Ue } from "../../../provider/context.js";
12
+ const { Search: Ve } = Te;
13
+ function oe(h, g = 0, u = null) {
14
+ var L;
15
+ const a = [];
16
+ for (const p of h)
17
+ a.push({ id: p.id, name: p.name, depth: g, parentId: u }), (L = p.children) != null && L.length && a.push(...oe(p.children, g + 1, p.id));
18
+ return a;
19
19
  }
20
- function Me(u, f) {
21
- if (!f) return u;
22
- const v = f.toLowerCase();
23
- function h(N) {
24
- var P;
20
+ function Be(h, g) {
21
+ if (!g) return h;
22
+ const u = g.toLowerCase();
23
+ function a(L) {
24
+ var b;
25
25
  const p = [];
26
- for (const d of N) {
27
- const l = (P = d.children) != null && P.length ? h(d.children) : [];
28
- (d.name.toLowerCase().includes(v) || l.length > 0) && p.push({ ...d, children: l.length > 0 ? l : void 0 });
26
+ for (const F of L) {
27
+ const d = (b = F.children) != null && b.length ? a(F.children) : [];
28
+ (F.name.toLowerCase().includes(u) || d.length > 0) && p.push({ ...F, children: d.length > 0 ? d : void 0 });
29
29
  }
30
30
  return p;
31
31
  }
32
- return h(u);
32
+ return a(h);
33
33
  }
34
- function te(u) {
35
- var v;
36
- const f = [];
37
- for (const h of u)
38
- (v = h.children) != null && v.length && (f.push(h.id), f.push(...te(h.children)));
39
- return f;
34
+ function fe(h) {
35
+ var u;
36
+ const g = [];
37
+ for (const a of h)
38
+ (u = a.children) != null && u.length && (g.push(a.id), g.push(...fe(a.children)));
39
+ return g;
40
40
  }
41
- function Se(u, f) {
42
- const v = /* @__PURE__ */ new Map(), h = (N) => {
43
- for (const p of N)
44
- v.set(p.id, f(p)), p.children && h(p.children);
41
+ function ye(h, g) {
42
+ const u = /* @__PURE__ */ new Map(), a = (L) => {
43
+ for (const p of L)
44
+ u.set(p.id, g(p)), p.children && a(p.children);
45
45
  };
46
- return h(u), v;
46
+ return a(h), u;
47
47
  }
48
- const Re = ({
49
- filterKey: u,
50
- label: f,
51
- treeData: v,
52
- fetchUrl: h,
53
- fetchOptions: N,
48
+ const _e = ({
49
+ filterKey: h,
50
+ label: g,
51
+ treeData: u,
52
+ fetchUrl: a,
53
+ fetchOptions: L,
54
54
  transformData: p,
55
- enabled: P = !0,
55
+ loadData: b,
56
+ enabled: F = !0,
56
57
  value: d,
57
- onChange: l,
58
- showSearch: E = !1,
59
- multiple: o = !1,
58
+ onChange: f,
59
+ showSearch: P = !1,
60
+ multiple: i = !1,
60
61
  leafOnly: k = !1,
61
- active: se,
62
- hidden: U,
63
- display: B,
64
- getNodeLabel: _ = (z) => z.name
62
+ active: ae,
63
+ hidden: $,
64
+ display: q,
65
+ dependsOn: de,
66
+ clearOnDepsChange: he = !0,
67
+ getNodeLabel: ee = (R) => R.name,
68
+ panelExtra: C,
69
+ panelWidth: ue
65
70
  }) => {
66
- const z = ve(), { data: re } = he({
67
- data: v,
68
- fetchUrl: h,
69
- fetchOptions: N,
71
+ const R = ie(f);
72
+ R.current = f;
73
+ const pe = ue ?? (C ? 460 : void 0), { resolvedLabel: A, values: me, depsKey: ge } = Ae({
74
+ filterKey: h,
75
+ value: d,
76
+ label: g,
77
+ dependsOn: de,
78
+ clearOnDepsChange: he,
79
+ onDepsClear: () => {
80
+ var e;
81
+ return (e = R.current) == null ? void 0 : e.call(R, i ? [] : void 0);
82
+ }
83
+ }), G = Ue(), te = u != null || !b && !!a, { data: ve } = Ee({
84
+ data: u,
85
+ fetchUrl: te && !b ? a : void 0,
86
+ fetchOptions: L,
70
87
  transformData: p,
71
- enabled: P,
72
- baseUrl: z.baseUrl,
73
- defaultHeaders: z.headers,
74
- timeoutMs: z.timeoutMs
75
- }), M = re ?? [], [ce, R] = V(!1), [m, w] = V(
76
- d ?? (o ? [] : void 0)
77
- ), [H, y] = V(/* @__PURE__ */ new Set()), [T, X] = V(""), A = xe(), $ = { filterKey: u, label: f, value: d };
78
- Z(() => {
79
- w(d ?? (o ? [] : void 0)), d == null && X("");
80
- }, [d, o]), Z(() => {
81
- M.length && y(new Set(te(M)));
88
+ enabled: F && te && !b,
89
+ baseUrl: G.baseUrl,
90
+ defaultHeaders: G.headers,
91
+ timeoutMs: G.timeoutMs
92
+ }), [xe, se] = V([]), J = ie(b);
93
+ J.current = b, W(() => {
94
+ if (!J.current || u != null || !F) return;
95
+ let e = !1;
96
+ return (async () => {
97
+ try {
98
+ const t = await J.current({ values: me });
99
+ e || se(t ?? []);
100
+ } catch {
101
+ e || se([]);
102
+ }
103
+ })(), () => {
104
+ e = !0;
105
+ };
106
+ }, [ge, F, u, b]);
107
+ const M = u ?? (b ? xe : ve ?? []), [we, B] = V(!1), [v, w] = V(
108
+ d ?? (i ? [] : void 0)
109
+ ), [Q, re] = V(/* @__PURE__ */ new Set()), [T, Y] = V(""), j = je(), Z = { filterKey: h, label: A, value: d };
110
+ W(() => {
111
+ w(d ?? (i ? [] : void 0)), d == null && Y("");
112
+ }, [d, i]), W(() => {
113
+ M.length && re(new Set(fe(M)));
82
114
  }, [M]);
83
- const j = L(
84
- () => Se(M, _),
85
- [M, _]
86
- ), q = L(() => {
115
+ const y = E(
116
+ () => ye(M, ee),
117
+ [M, ee]
118
+ ), _ = E(() => {
87
119
  if (!M.length || d == null) return "";
88
- if (o) {
120
+ if (i) {
89
121
  const e = d;
90
- return e.length > 0 ? e.map((t) => j.get(t) ?? t).join("、") : "";
122
+ return e.length > 0 ? e.map((t) => y.get(t) ?? t).join("、") : "";
91
123
  }
92
- return j.get(d) ?? "";
93
- }, [M, d, o, j]);
94
- Z(() => {
95
- if (A) {
96
- if (!O({ display: B, hidden: U }, $)) {
97
- A.unregister(u);
124
+ return y.get(d) ?? "";
125
+ }, [M, d, i, y]);
126
+ W(() => {
127
+ if (j) {
128
+ if (!le({ display: q, hidden: $ }, Z)) {
129
+ j.unregister(h);
98
130
  return;
99
131
  }
100
- q ? A.register(u, {
101
- label: f,
102
- valueLabel: q,
103
- onRemove: () => l == null ? void 0 : l(o ? [] : void 0)
104
- }) : A.unregister(u);
132
+ _ ? j.register(h, {
133
+ label: A,
134
+ valueLabel: _,
135
+ onRemove: () => f == null ? void 0 : f(i ? [] : void 0)
136
+ }) : j.unregister(h);
105
137
  }
106
138
  }, [
139
+ _,
140
+ h,
141
+ A,
107
142
  q,
108
- u,
143
+ $,
144
+ j,
109
145
  f,
110
- B,
111
- U,
112
- A,
113
- l,
114
- o,
115
- $
146
+ i,
147
+ Z
116
148
  ]);
117
- const S = L(
118
- () => E && T ? Me(M, T) : M,
119
- [E, T, M]
120
- ), K = L(() => ee(S), [S]), F = L(() => {
121
- const e = /* @__PURE__ */ new Map(), t = (a) => {
149
+ const S = E(
150
+ () => P && T ? Be(M, T) : M,
151
+ [P, T, M]
152
+ ), ce = E(() => oe(S), [S]), z = E(() => {
153
+ const e = /* @__PURE__ */ new Map(), t = (o) => {
122
154
  var r;
123
- for (const s of a)
155
+ for (const s of o)
124
156
  e.set(s.id, !!((r = s.children) != null && r.length)), s.children && t(s.children);
125
157
  };
126
158
  return t(S), e;
127
- }, [S]), G = L(() => {
128
- const e = /* @__PURE__ */ new Map(), t = (a) => {
159
+ }, [S]), K = E(() => {
160
+ const e = /* @__PURE__ */ new Map(), t = (o) => {
129
161
  var r;
130
- for (const s of a)
162
+ for (const s of o)
131
163
  if ((r = s.children) != null && r.length) {
132
- const c = [], i = (n) => {
133
- var b;
134
- c.push(n.id), (b = n.children) == null || b.forEach(i);
164
+ const c = [], l = (n) => {
165
+ var N;
166
+ c.push(n.id), (N = n.children) == null || N.forEach(l);
135
167
  };
136
- s.children.forEach(i), e.set(s.id, c), t(s.children);
168
+ s.children.forEach(l), e.set(s.id, c), t(s.children);
137
169
  }
138
170
  };
139
171
  return t(S), e;
140
- }, [S]), I = L(() => {
141
- const e = /* @__PURE__ */ new Map(), t = (a) => {
172
+ }, [S]), ne = E(() => {
173
+ const e = /* @__PURE__ */ new Map(), t = (o) => {
142
174
  var r;
143
- for (const s of a)
175
+ for (const s of o)
144
176
  if ((r = s.children) != null && r.length) {
145
177
  for (const c of s.children) e.set(c.id, s.id);
146
178
  t(s.children);
147
179
  }
148
180
  };
149
181
  return t(S), e;
150
- }, [S]), J = L(() => {
151
- const e = /* @__PURE__ */ new Map(), t = (a) => {
182
+ }, [S]), D = E(() => {
183
+ const e = /* @__PURE__ */ new Map(), t = (o) => {
152
184
  var r;
153
- for (const s of a) {
185
+ for (const s of o) {
154
186
  if (!((r = s.children) != null && r.length)) continue;
155
- const c = [], i = (n) => {
156
- var b;
157
- if (!((b = n.children) != null && b.length)) {
187
+ const c = [], l = (n) => {
188
+ var N;
189
+ if (!((N = n.children) != null && N.length)) {
158
190
  c.push(n.id);
159
191
  return;
160
192
  }
161
- n.children.forEach(i);
193
+ n.children.forEach(l);
162
194
  };
163
- s.children.forEach(i), e.set(s.id, c), t(s.children);
195
+ s.children.forEach(l), e.set(s.id, c), t(s.children);
164
196
  }
165
197
  };
166
198
  return t(S), e;
167
- }, [S]), Q = C((e) => {
168
- y((t) => {
169
- const a = new Set(t);
170
- return a.has(e) ? a.delete(e) : a.add(e), a;
199
+ }, [S]), I = X((e) => {
200
+ re((t) => {
201
+ const o = new Set(t);
202
+ return o.has(e) ? o.delete(e) : o.add(e), o;
171
203
  });
172
- }, []), ne = C(
204
+ }, []), be = X(
173
205
  (e) => {
174
- if (k && F.get(e)) {
175
- Q(e);
206
+ if (k && z.get(e)) {
207
+ I(e);
176
208
  return;
177
209
  }
178
- const t = m === e ? void 0 : e;
179
- w(t), l == null || l(t), R(!1);
210
+ const t = v === e ? void 0 : e;
211
+ w(t), f == null || f(t), B(!1);
180
212
  },
181
- [m, l, k, F, Q]
182
- ), W = C(
213
+ [v, f, k, z, I]
214
+ ), O = X(
183
215
  (e) => {
184
- const t = (m || []).slice(), a = G.get(e), r = J.get(e), s = I.get(e);
216
+ const t = (v || []).slice(), o = K.get(e), r = D.get(e), s = ne.get(e);
185
217
  if (k && (r != null && r.length)) {
186
- if (r.every((i) => t.includes(i))) {
187
- const i = new Set(r);
188
- w(t.filter((n) => !i.has(n)));
218
+ if (r.every((l) => t.includes(l))) {
219
+ const l = new Set(r);
220
+ w(t.filter((n) => !l.has(n)));
189
221
  } else
190
222
  w([.../* @__PURE__ */ new Set([...t, ...r])]);
191
223
  return;
192
224
  }
193
- if (a)
225
+ if (o)
194
226
  if (t.includes(e)) {
195
- const i = /* @__PURE__ */ new Set([e, ...a]);
196
- w(t.filter((n) => !i.has(n)));
227
+ const l = /* @__PURE__ */ new Set([e, ...o]);
228
+ w(t.filter((n) => !l.has(n)));
197
229
  } else
198
- w([.../* @__PURE__ */ new Set([...t, e, ...a])]);
230
+ w([.../* @__PURE__ */ new Set([...t, e, ...o])]);
199
231
  else if (t.includes(e)) {
200
- const c = t.filter((i) => i !== e);
232
+ const c = t.filter((l) => l !== e);
201
233
  w(
202
- s && c.includes(s) ? c.filter((i) => i !== s) : c
234
+ s && c.includes(s) ? c.filter((l) => l !== s) : c
203
235
  );
204
236
  } else {
205
237
  const c = [...t, e];
206
- s && !k && (G.get(s) || []).every((n) => c.includes(n)) ? w([.../* @__PURE__ */ new Set([...c, s])]) : w(c);
238
+ s && !k && (K.get(s) || []).every((n) => c.includes(n)) ? w([.../* @__PURE__ */ new Set([...c, s])]) : w(c);
207
239
  }
208
240
  },
209
- [m, G, I, k, J]
210
- ), ie = C(
211
- (e) => e.parentId === null || E && T ? !0 : H.has(e.parentId),
212
- [H, E, T]
241
+ [v, K, ne, k, D]
242
+ ), Me = X(
243
+ (e) => e.parentId === null || P && T ? !0 : Q.has(e.parentId),
244
+ [Q, P, T]
213
245
  );
214
- return O({ display: B, hidden: U }, $) ? /* @__PURE__ */ D(
215
- ge,
246
+ return le({ display: q, hidden: $ }, Z) ? /* @__PURE__ */ U(
247
+ ze,
216
248
  {
217
- label: f,
218
- active: se || (o ? (m == null ? void 0 : m.length) > 0 : !!d),
219
- open: ce,
220
- onOpenChange: R,
221
- onConfirm: o ? () => {
222
- let e = m;
223
- k && Array.isArray(e) && (e = e.filter((t) => !F.get(t))), l == null || l(e), R(!1);
249
+ label: A,
250
+ active: ae || (i ? (v == null ? void 0 : v.length) > 0 : !!d),
251
+ open: we,
252
+ onOpenChange: B,
253
+ width: pe,
254
+ onConfirm: i ? () => {
255
+ let e = v;
256
+ k && Array.isArray(e) && (e = e.filter((t) => !z.get(t))), f == null || f(e), B(!1);
224
257
  } : void 0,
225
258
  onReset: () => {
226
- const e = o ? [] : void 0;
227
- w(e), X(""), l == null || l(e), R(!1);
259
+ const e = i ? [] : void 0;
260
+ w(e), Y(""), f == null || f(e), B(!1);
228
261
  },
229
262
  children: [
230
- E && /* @__PURE__ */ x(
231
- we,
263
+ P && /* @__PURE__ */ x(
264
+ Ve,
232
265
  {
233
- placeholder: `搜索${f}`,
266
+ placeholder: `搜索${A}`,
234
267
  allowClear: !0,
235
268
  size: "middle",
236
- className: Y("filter-tree-select-search", g["filter-tree-select-search"]),
269
+ className: H("filter-tree-select-search", m["filter-tree-select-search"]),
237
270
  value: T,
238
- onChange: (e) => X(e.target.value)
271
+ onChange: (e) => Y(e.target.value)
239
272
  }
240
273
  ),
241
- /* @__PURE__ */ D(
274
+ C ? /* @__PURE__ */ x(
275
+ "div",
276
+ {
277
+ className: H(
278
+ "filter-tree-select-panel-extra",
279
+ m["filter-tree-select-panel-extra"]
280
+ ),
281
+ children: C
282
+ }
283
+ ) : null,
284
+ /* @__PURE__ */ U(
242
285
  "div",
243
286
  {
244
- className: Y("filter-tree-select-options", g["filter-tree-select-options"]),
287
+ className: H("filter-tree-select-options", m["filter-tree-select-options"]),
245
288
  children: [
246
- K.map((e) => {
247
- if (!ie(e)) return null;
248
- const t = !F.get(e.id), a = H.has(e.id), r = !o && m === e.id, s = o ? m || [] : [];
249
- let c = o && s.includes(e.id), i = !1;
250
- if (o && k && !t) {
251
- const n = J.get(e.id) || [], b = n.filter((le) => s.includes(le)).length;
252
- c = n.length > 0 && b === n.length, i = b > 0 && b < n.length;
289
+ ce.map((e) => {
290
+ if (!Me(e)) return null;
291
+ const t = !z.get(e.id), o = Q.has(e.id), r = !i && v === e.id, s = i ? v || [] : [];
292
+ let c = i && s.includes(e.id), l = !1;
293
+ if (i && k && !t) {
294
+ const n = D.get(e.id) || [], N = n.filter((Se) => s.includes(Se)).length;
295
+ c = n.length > 0 && N === n.length, l = N > 0 && N < n.length;
253
296
  }
254
- return /* @__PURE__ */ D(
297
+ return /* @__PURE__ */ U(
255
298
  "div",
256
299
  {
257
- className: Y(
300
+ className: H(
258
301
  "filter-tree-select-option",
259
- g["filter-tree-select-option"],
260
- r && g["filter-tree-select-option-selected"]
302
+ m["filter-tree-select-option"],
303
+ r && m["filter-tree-select-option-selected"]
261
304
  ),
262
305
  style: { paddingLeft: 8 + e.depth * 20 },
263
- onClick: () => o ? W(e.id) : ne(e.id),
306
+ onClick: () => i ? O(e.id) : be(e.id),
264
307
  children: [
265
- t ? /* @__PURE__ */ x("span", { className: g["filter-tree-select-expand-placeholder"] }) : /* @__PURE__ */ x(
308
+ t ? /* @__PURE__ */ x("span", { className: m["filter-tree-select-expand-placeholder"] }) : /* @__PURE__ */ x(
266
309
  "span",
267
310
  {
268
- className: g["filter-tree-select-expand-icon"],
311
+ className: m["filter-tree-select-expand-icon"],
269
312
  onClick: (n) => {
270
- n.stopPropagation(), Q(e.id);
313
+ n.stopPropagation(), I(e.id);
271
314
  },
272
- children: a || E && T ? /* @__PURE__ */ x(oe, { style: { fontSize: 10 } }) : /* @__PURE__ */ x(ae, { style: { fontSize: 10 } })
315
+ children: o || P && T ? /* @__PURE__ */ x(ke, { style: { fontSize: 10 } }) : /* @__PURE__ */ x(Ne, { style: { fontSize: 10 } })
273
316
  }
274
317
  ),
275
- o && /* @__PURE__ */ x(
276
- ue,
318
+ i && /* @__PURE__ */ x(
319
+ Pe,
277
320
  {
278
321
  checked: c,
279
- indeterminate: i,
322
+ indeterminate: l,
280
323
  onClick: (n) => n.stopPropagation(),
281
- onChange: () => W(e.id)
324
+ onChange: () => O(e.id)
282
325
  }
283
326
  ),
284
- /* @__PURE__ */ x("span", { className: g["filter-tree-select-node-label"], children: e.name }),
285
- !o && r && /* @__PURE__ */ x(fe, { className: g["filter-tree-select-option-check"] })
327
+ /* @__PURE__ */ x("span", { className: m["filter-tree-select-node-label"], children: e.name }),
328
+ !i && r && /* @__PURE__ */ x(Le, { className: m["filter-tree-select-option-check"] })
286
329
  ]
287
330
  },
288
331
  e.id
289
332
  );
290
333
  }),
291
- K.length === 0 && /* @__PURE__ */ x("div", { className: g["filter-tree-select-empty"], children: "暂无数据" })
334
+ ce.length === 0 && /* @__PURE__ */ x("div", { className: m["filter-tree-select-empty"], children: "暂无数据" })
292
335
  ]
293
336
  }
294
337
  ),
295
- o && (k ? (m || []).some((e) => !F.get(e)) : (m || []).length > 0) && /* @__PURE__ */ D("div", { className: g["filter-tree-select-selected-bar"], children: [
296
- /* @__PURE__ */ x("div", { className: g["filter-tree-select-selected-label"], children: "已选:" }),
297
- /* @__PURE__ */ x(me, { size: [4, 4], wrap: !0, children: (m || []).filter((e) => !(k && F.get(e))).map((e) => /* @__PURE__ */ D(
338
+ i && (k ? (v || []).some((e) => !z.get(e)) : (v || []).length > 0) && /* @__PURE__ */ U("div", { className: m["filter-tree-select-selected-bar"], children: [
339
+ /* @__PURE__ */ x("div", { className: m["filter-tree-select-selected-label"], children: "已选:" }),
340
+ /* @__PURE__ */ x(Re, { size: [4, 4], wrap: !0, children: (v || []).filter((e) => !(k && z.get(e))).map((e) => /* @__PURE__ */ U(
298
341
  "span",
299
342
  {
300
- className: g["filter-tree-select-selected-tag"],
343
+ className: m["filter-tree-select-selected-tag"],
301
344
  onClick: (t) => {
302
- t.stopPropagation(), W(e);
345
+ t.stopPropagation(), O(e);
303
346
  },
304
347
  children: [
305
- j.get(e) ?? e,
306
- /* @__PURE__ */ x(de, { className: g["filter-tree-select-selected-remove"] })
348
+ y.get(e) ?? e,
349
+ /* @__PURE__ */ x(Fe, { className: m["filter-tree-select-selected-remove"] })
307
350
  ]
308
351
  },
309
352
  e
@@ -314,6 +357,6 @@ const Re = ({
314
357
  ) : null;
315
358
  };
316
359
  export {
317
- Re as default
360
+ _e as default
318
361
  };
319
362
  //# sourceMappingURL=index.js.map