@yqg/permission 1.3.14-beta.1 → 1.3.14

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.
@@ -1,7 +1,7 @@
1
- import { a as ht, p as pt, d as Ie, r as pe, c as y, w as we, q as gt, s as j, E as ae, e as U, b as Qe, y as re, a0 as mt, G as yt, K as et, R as je, L as oe, M as Be, P as $e, N as Ce, S as de, u as H, F as bt, Y as Ct, j as St, z as wt } from "./index-D_ujkA5Y.js";
2
- import { a as X, _ as b, W as xt, X as Vt, ae as it, aX as tt, Y as Ne, P as he, N as It, Q as ut, V as Nt, aN as We, a0 as kt, ar as Tt, as as Lt, aY as _t, c as at, b as Et, ai as Ue, ak as ze, am as Dt, $ as Pt, aj as At, aV as Kt, aP as Se, aS as Ft } from "./yqg-permission-C8hIbxln.js";
3
- import { u as Ot, a as Ht, b as Mt, c as Rt, d as jt, t as lt, B as Bt, e as $t, f as Wt, g as Ut } from "./index-D-ZB-Fhd.js";
4
- import { K as ve, T as zt, c as Xt, a as Ye, u as Yt, g as qt, b as Gt, d as Qt, F as Jt, e as Zt, f as ea, r as ta, h as aa, i as la } from "./apply-modal-CbdSpFHD.js";
1
+ import { a as ht, p as pt, d as Ie, r as pe, c as C, w as we, q as gt, s as j, E as ae, e as U, b as Qe, y as re, a0 as mt, G as yt, K as et, R as je, L as oe, M as Be, P as $e, N as Ce, S as de, u as H, F as bt, Y as Ct, j as St, z as wt } from "./index-CfdXHF81.js";
2
+ import { a as X, _ as S, W as xt, X as Vt, ae as it, aX as tt, Y as Ne, P as he, N as It, Q as ut, V as Nt, aN as We, a0 as kt, ar as Tt, as as Lt, aY as _t, c as at, b as Et, ai as Ue, ak as ze, am as Dt, $ as Pt, aj as At, aV as Kt, aP as Se, aS as Ft } from "./yqg-permission-Btr34HIx.js";
3
+ import { u as Ot, a as Ht, b as Mt, c as Rt, d as jt, t as lt, B as Bt, e as $t, f as Wt, g as Ut } from "./index-BWIdbsw2.js";
4
+ import { K as ve, T as zt, c as Xt, a as Ye, u as Yt, g as qt, b as Gt, d as Qt, F as Jt, e as Zt, f as ea, r as ta, h as aa, i as la } from "./apply-modal-BHiQP1sQ.js";
5
5
  function na(e) {
6
6
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
7
7
  }
@@ -24,9 +24,9 @@ function qe(e) {
24
24
  function oa(e, i) {
25
25
  const c = [];
26
26
  function a(t) {
27
- t.forEach((l) => {
28
- c.push(l[i.value]);
29
- const n = l[i.children];
27
+ t.forEach((r) => {
28
+ c.push(r[i.value]);
29
+ const n = r[i.children];
30
30
  n && a(n);
31
31
  });
32
32
  }
@@ -62,83 +62,83 @@ const ia = {
62
62
  slots: c,
63
63
  expose: a
64
64
  } = i;
65
- const t = Ot(), l = Ht(), n = ca(), r = pe(), u = Mt(() => n.treeData, [() => t.open, () => n.treeData], (p) => p[0]), s = y(() => {
65
+ const t = Ot(), r = Ht(), n = ca(), l = pe(), u = Mt(() => n.treeData, [() => t.open, () => n.treeData], (h) => h[0]), s = C(() => {
66
66
  const {
67
- checkable: p,
68
- halfCheckedKeys: w,
69
- checkedKeys: E
70
- } = l;
71
- return p ? {
72
- checked: E,
73
- halfChecked: w
67
+ checkable: h,
68
+ halfCheckedKeys: V,
69
+ checkedKeys: D
70
+ } = r;
71
+ return h ? {
72
+ checked: D,
73
+ halfChecked: V
74
74
  } : null;
75
75
  });
76
76
  we(() => t.open, () => {
77
77
  gt(() => {
78
- var p;
79
- t.open && !t.multiple && l.checkedKeys.length && ((p = r.value) === null || p === void 0 || p.scrollTo({
80
- key: l.checkedKeys[0]
78
+ var h;
79
+ t.open && !t.multiple && r.checkedKeys.length && ((h = l.value) === null || h === void 0 || h.scrollTo({
80
+ key: r.checkedKeys[0]
81
81
  }));
82
82
  });
83
83
  }, {
84
84
  immediate: !0,
85
85
  flush: "post"
86
86
  });
87
- const o = y(() => String(t.searchValue).toLowerCase()), f = (p) => o.value ? String(p[l.treeNodeFilterProp]).toLowerCase().includes(o.value) : !1, v = j(l.treeDefaultExpandedKeys), h = j(null);
87
+ const o = C(() => String(t.searchValue).toLowerCase()), f = (h) => o.value ? String(h[r.treeNodeFilterProp]).toLowerCase().includes(o.value) : !1, v = j(r.treeDefaultExpandedKeys), p = j(null);
88
88
  we(() => t.searchValue, () => {
89
- t.searchValue && (h.value = oa(ae(n.treeData), ae(n.fieldNames)));
89
+ t.searchValue && (p.value = oa(ae(n.treeData), ae(n.fieldNames)));
90
90
  }, {
91
91
  immediate: !0
92
92
  });
93
- const x = y(() => l.treeExpandedKeys ? l.treeExpandedKeys.slice() : t.searchValue ? h.value : v.value), S = (p) => {
94
- var w;
95
- v.value = p, h.value = p, (w = l.onTreeExpand) === null || w === void 0 || w.call(l, p);
96
- }, V = (p) => {
97
- p.preventDefault();
98
- }, k = (p, w) => {
93
+ const y = C(() => r.treeExpandedKeys ? r.treeExpandedKeys.slice() : t.searchValue ? p.value : v.value), g = (h) => {
94
+ var V;
95
+ v.value = h, p.value = h, (V = r.onTreeExpand) === null || V === void 0 || V.call(r, h);
96
+ }, N = (h) => {
97
+ h.preventDefault();
98
+ }, K = (h, V) => {
99
99
  let {
100
- node: E
101
- } = w;
102
- var A, L;
100
+ node: D
101
+ } = V;
102
+ var F, L;
103
103
  const {
104
104
  checkable: z,
105
105
  checkedKeys: Y
106
- } = l;
107
- z && qe(E) || ((A = n.onSelect) === null || A === void 0 || A.call(n, E.key, {
108
- selected: !Y.includes(E.key)
106
+ } = r;
107
+ z && qe(D) || ((F = n.onSelect) === null || F === void 0 || F.call(n, D.key, {
108
+ selected: !Y.includes(D.key)
109
109
  }), t.multiple || (L = t.toggleOpen) === null || L === void 0 || L.call(t, !1));
110
- }, K = pe(null), F = y(() => l.keyEntities[K.value]), O = (p) => {
111
- K.value = p;
110
+ }, E = pe(null), x = C(() => r.keyEntities[E.value]), O = (h) => {
111
+ E.value = h;
112
112
  };
113
113
  return a({
114
114
  scrollTo: function() {
115
- for (var p, w, E = arguments.length, A = new Array(E), L = 0; L < E; L++)
116
- A[L] = arguments[L];
117
- return (w = (p = r.value) === null || p === void 0 ? void 0 : p.scrollTo) === null || w === void 0 ? void 0 : w.call(p, ...A);
115
+ for (var h, V, D = arguments.length, F = new Array(D), L = 0; L < D; L++)
116
+ F[L] = arguments[L];
117
+ return (V = (h = l.value) === null || h === void 0 ? void 0 : h.scrollTo) === null || V === void 0 ? void 0 : V.call(h, ...F);
118
118
  },
119
- onKeydown: (p) => {
120
- var w;
119
+ onKeydown: (h) => {
120
+ var V;
121
121
  const {
122
- which: E
123
- } = p;
124
- switch (E) {
122
+ which: D
123
+ } = h;
124
+ switch (D) {
125
125
  case ve.UP:
126
126
  case ve.DOWN:
127
127
  case ve.LEFT:
128
128
  case ve.RIGHT:
129
- (w = r.value) === null || w === void 0 || w.onKeydown(p);
129
+ (V = l.value) === null || V === void 0 || V.onKeydown(h);
130
130
  break;
131
131
  case ve.ENTER: {
132
- if (F.value) {
132
+ if (x.value) {
133
133
  const {
134
- selectable: A,
134
+ selectable: F,
135
135
  value: L
136
- } = F.value.node || {};
137
- A !== !1 && k(null, {
136
+ } = x.value.node || {};
137
+ F !== !1 && K(null, {
138
138
  node: {
139
- key: K.value
139
+ key: E.value
140
140
  },
141
- selected: !l.checkedKeys.includes(L)
141
+ selected: !r.checkedKeys.includes(L)
142
142
  });
143
143
  }
144
144
  break;
@@ -150,13 +150,13 @@ const ia = {
150
150
  onKeyup: () => {
151
151
  }
152
152
  }), () => {
153
- var p;
153
+ var h;
154
154
  const {
155
- prefixCls: w,
156
- multiple: E,
157
- searchValue: A,
155
+ prefixCls: V,
156
+ multiple: D,
157
+ searchValue: F,
158
158
  open: L,
159
- notFoundContent: z = (p = c.notFoundContent) === null || p === void 0 ? void 0 : p.call(c)
159
+ notFoundContent: z = (h = c.notFoundContent) === null || h === void 0 ? void 0 : h.call(c)
160
160
  } = t, {
161
161
  listHeight: Y,
162
162
  listItemHeight: B,
@@ -172,40 +172,40 @@ const ia = {
172
172
  treeLine: ye,
173
173
  loadData: be,
174
174
  treeLoadedKeys: ue,
175
- treeMotion: C,
176
- onTreeLoad: D,
175
+ treeMotion: w,
176
+ onTreeLoad: P,
177
177
  checkedKeys: M
178
- } = l;
178
+ } = r;
179
179
  if (u.value.length === 0)
180
180
  return U("div", {
181
181
  role: "listbox",
182
- class: `${w}-empty`,
183
- onMousedown: V
182
+ class: `${V}-empty`,
183
+ onMousedown: N
184
184
  }, [z]);
185
185
  const Q = {
186
186
  fieldNames: n.fieldNames
187
187
  };
188
- return ue && (Q.loadedKeys = ue), x.value && (Q.expandedKeys = x.value), U("div", {
189
- onMousedown: V
190
- }, [F.value && L && U("span", {
188
+ return ue && (Q.loadedKeys = ue), y.value && (Q.expandedKeys = y.value), U("div", {
189
+ onMousedown: N
190
+ }, [x.value && L && U("span", {
191
191
  style: ia,
192
192
  "aria-live": "assertive"
193
- }, [F.value.node.value]), U(zt, X(X({
194
- ref: r,
193
+ }, [x.value.node.value]), U(zt, X(X({
194
+ ref: l,
195
195
  focusable: !1,
196
- prefixCls: `${w}-tree`,
196
+ prefixCls: `${V}-tree`,
197
197
  treeData: u.value,
198
198
  height: Y,
199
199
  itemHeight: B,
200
200
  virtual: le !== !1 && q !== !1,
201
- multiple: E,
201
+ multiple: D,
202
202
  icon: ne,
203
203
  showIcon: G,
204
204
  switcherIcon: me,
205
205
  showLine: ye,
206
- loadData: A ? null : be,
207
- motion: C,
208
- activeKey: K.value,
206
+ loadData: F ? null : be,
207
+ motion: w,
208
+ activeKey: E.value,
209
209
  checkable: ce,
210
210
  checkStrictly: !0,
211
211
  checkedKeys: s.value,
@@ -213,36 +213,36 @@ const ia = {
213
213
  defaultExpandAll: ie
214
214
  }, Q), {}, {
215
215
  onActiveChange: O,
216
- onSelect: k,
217
- onCheck: k,
218
- onExpand: S,
219
- onLoad: D,
216
+ onSelect: K,
217
+ onCheck: K,
218
+ onExpand: g,
219
+ onLoad: P,
220
220
  filterTreeNode: f,
221
221
  expandAction: se
222
- }), b(b({}, c), {
223
- checkable: l.customSlots.treeCheckable
222
+ }), S(S({}, c), {
223
+ checkable: r.customSlots.treeCheckable
224
224
  }))]);
225
225
  };
226
226
  }
227
227
  }), da = "SHOW_ALL", vt = "SHOW_PARENT", Je = "SHOW_CHILD";
228
228
  function rt(e, i, c, a) {
229
229
  const t = new Set(e);
230
- return i === Je ? e.filter((l) => {
231
- const n = c[l];
232
- return !(n && n.children && n.children.some((r) => {
230
+ return i === Je ? e.filter((r) => {
231
+ const n = c[r];
232
+ return !(n && n.children && n.children.some((l) => {
233
233
  let {
234
234
  node: u
235
- } = r;
235
+ } = l;
236
236
  return t.has(u[a.value]);
237
- }) && n.children.every((r) => {
237
+ }) && n.children.every((l) => {
238
238
  let {
239
239
  node: u
240
- } = r;
240
+ } = l;
241
241
  return qe(u) || t.has(u[a.value]);
242
242
  }));
243
- }) : i === vt ? e.filter((l) => {
244
- const n = c[l], r = n ? n.parent : null;
245
- return !(r && !qe(r.node) && t.has(r.key));
243
+ }) : i === vt ? e.filter((r) => {
244
+ const n = c[r], l = n ? n.parent : null;
245
+ return !(l && !qe(l.node) && t.has(l.key));
246
246
  }) : e;
247
247
  }
248
248
  const ge = () => null;
@@ -263,34 +263,34 @@ function ha(e) {
263
263
  function i() {
264
264
  let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
265
265
  return xt(c).map((a) => {
266
- var t, l, n;
266
+ var t, r, n;
267
267
  if (!fa(a))
268
268
  return null;
269
- const r = a.children || {}, u = a.key, s = {};
270
- for (const [E, A] of Object.entries(a.props))
271
- s[Vt(E)] = A;
269
+ const l = a.children || {}, u = a.key, s = {};
270
+ for (const [D, F] of Object.entries(a.props))
271
+ s[Vt(D)] = F;
272
272
  const {
273
273
  isLeaf: o,
274
274
  checkable: f,
275
275
  selectable: v,
276
- disabled: h,
277
- disableCheckbox: x
278
- } = s, S = {
276
+ disabled: p,
277
+ disableCheckbox: y
278
+ } = s, g = {
279
279
  isLeaf: o || o === "" || void 0,
280
280
  checkable: f || f === "" || void 0,
281
281
  selectable: v || v === "" || void 0,
282
- disabled: h || h === "" || void 0,
283
- disableCheckbox: x || x === "" || void 0
284
- }, V = b(b({}, s), S), {
285
- title: k = (t = r.title) === null || t === void 0 ? void 0 : t.call(r, V),
286
- switcherIcon: K = (l = r.switcherIcon) === null || l === void 0 ? void 0 : l.call(r, V)
287
- } = s, F = va(s, ["title", "switcherIcon"]), O = (n = r.default) === null || n === void 0 ? void 0 : n.call(r), p = b(b(b({}, F), {
288
- title: k,
289
- switcherIcon: K,
282
+ disabled: p || p === "" || void 0,
283
+ disableCheckbox: y || y === "" || void 0
284
+ }, N = S(S({}, s), g), {
285
+ title: K = (t = l.title) === null || t === void 0 ? void 0 : t.call(l, N),
286
+ switcherIcon: E = (r = l.switcherIcon) === null || r === void 0 ? void 0 : r.call(l, N)
287
+ } = s, x = va(s, ["title", "switcherIcon"]), O = (n = l.default) === null || n === void 0 ? void 0 : n.call(l), h = S(S(S({}, x), {
288
+ title: K,
289
+ switcherIcon: E,
290
290
  key: u,
291
291
  isLeaf: o
292
- }), S), w = i(O);
293
- return w.length && (p.children = w), p;
292
+ }), g), V = i(O);
293
+ return V.length && (h.children = V), h;
294
294
  });
295
295
  }
296
296
  return i(e);
@@ -298,34 +298,34 @@ function ha(e) {
298
298
  function Ge(e) {
299
299
  if (!e)
300
300
  return e;
301
- const i = b({}, e);
301
+ const i = S({}, e);
302
302
  return "props" in i || Object.defineProperty(i, "props", {
303
303
  get() {
304
304
  return i;
305
305
  }
306
306
  }), i;
307
307
  }
308
- function pa(e, i, c, a, t, l) {
309
- let n = null, r = null;
308
+ function pa(e, i, c, a, t, r) {
309
+ let n = null, l = null;
310
310
  function u() {
311
311
  function s(o) {
312
312
  let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "0", v = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
313
- return o.map((h, x) => {
314
- const S = `${f}-${x}`, V = h[l.value], k = c.includes(V), K = s(h[l.children] || [], S, k), F = U(ge, h, {
315
- default: () => [K.map((O) => O.node)]
313
+ return o.map((p, y) => {
314
+ const g = `${f}-${y}`, N = p[r.value], K = c.includes(N), E = s(p[r.children] || [], g, K), x = U(ge, p, {
315
+ default: () => [E.map((O) => O.node)]
316
316
  });
317
- if (i === V && (n = F), k) {
317
+ if (i === N && (n = x), K) {
318
318
  const O = {
319
- pos: S,
320
- node: F,
321
- children: K
319
+ pos: g,
320
+ node: x,
321
+ children: E
322
322
  };
323
- return v || r.push(O), O;
323
+ return v || l.push(O), O;
324
324
  }
325
325
  return null;
326
- }).filter((h) => h);
326
+ }).filter((p) => p);
327
327
  }
328
- r || (r = [], s(a), r.sort((o, f) => {
328
+ l || (l = [], s(a), l.sort((o, f) => {
329
329
  let {
330
330
  node: {
331
331
  props: {
@@ -335,12 +335,12 @@ function pa(e, i, c, a, t, l) {
335
335
  } = o, {
336
336
  node: {
337
337
  props: {
338
- value: h
338
+ value: p
339
339
  }
340
340
  }
341
341
  } = f;
342
- const x = c.indexOf(v), S = c.indexOf(h);
343
- return x - S;
342
+ const y = c.indexOf(v), g = c.indexOf(p);
343
+ return y - g;
344
344
  }));
345
345
  }
346
346
  Object.defineProperty(e, "triggerNode", {
@@ -349,7 +349,7 @@ function pa(e, i, c, a, t, l) {
349
349
  }
350
350
  }), Object.defineProperty(e, "allCheckedNodes", {
351
351
  get() {
352
- return u(), t ? r : r.map((s) => {
352
+ return u(), t ? l : l.map((s) => {
353
353
  let {
354
354
  node: o
355
355
  } = s;
@@ -364,12 +364,12 @@ function ga(e, i) {
364
364
  pId: a,
365
365
  rootPId: t
366
366
  } = i;
367
- const l = {}, n = [];
367
+ const r = {}, n = [];
368
368
  return e.map((u) => {
369
- const s = b({}, u), o = s[c];
370
- return l[o] = s, s.key = s.key || o, s;
369
+ const s = S({}, u), o = s[c];
370
+ return r[o] = s, s.key = s.key || o, s;
371
371
  }).forEach((u) => {
372
- const s = u[a], o = l[s];
372
+ const s = u[a], o = r[s];
373
373
  o && (o.children = o.children || [], o.children.push(u)), (s === t || !o && t === null) && n.push(u);
374
374
  }), n;
375
375
  }
@@ -377,7 +377,7 @@ function ma(e, i, c) {
377
377
  const a = j();
378
378
  return we([c, e, i], () => {
379
379
  const t = c.value;
380
- e.value ? a.value = c.value ? ga(ae(e.value), b({
380
+ e.value ? a.value = c.value ? ga(ae(e.value), S({
381
381
  id: "id",
382
382
  pId: "pId",
383
383
  rootPId: null
@@ -395,40 +395,40 @@ const ya = (e) => {
395
395
  c.value = ae(e.value);
396
396
  }, {
397
397
  immediate: !0
398
- }), [y(() => {
398
+ }), [C(() => {
399
399
  const {
400
400
  valueLabels: t
401
- } = i.value, l = /* @__PURE__ */ new Map(), n = c.value.map((r) => {
401
+ } = i.value, r = /* @__PURE__ */ new Map(), n = c.value.map((l) => {
402
402
  var u;
403
403
  const {
404
404
  value: s
405
- } = r, o = (u = r.label) !== null && u !== void 0 ? u : t.get(s);
406
- return l.set(s, o), b(b({}, r), {
405
+ } = l, o = (u = l.label) !== null && u !== void 0 ? u : t.get(s);
406
+ return r.set(s, o), S(S({}, l), {
407
407
  label: o
408
408
  });
409
409
  });
410
- return i.value.valueLabels = l, n;
410
+ return i.value.valueLabels = r, n;
411
411
  })];
412
412
  }, ba = (e, i) => {
413
413
  const c = j(/* @__PURE__ */ new Map()), a = j({});
414
414
  return Qe(() => {
415
- const t = i.value, l = Xt(e.value, {
415
+ const t = i.value, r = Xt(e.value, {
416
416
  fieldNames: t,
417
- initWrapper: (n) => b(b({}, n), {
417
+ initWrapper: (n) => S(S({}, n), {
418
418
  valueEntities: /* @__PURE__ */ new Map()
419
419
  }),
420
- processEntity: (n, r) => {
420
+ processEntity: (n, l) => {
421
421
  const u = n.node[t.value];
422
- r.valueEntities.set(u, n);
422
+ l.valueEntities.set(u, n);
423
423
  }
424
424
  });
425
- c.value = l.valueEntities, a.value = l.keyEntities;
425
+ c.value = r.valueEntities, a.value = r.keyEntities;
426
426
  }), {
427
427
  valueEntities: c,
428
428
  keyEntities: a
429
429
  };
430
- }, Ca = (e, i, c, a, t, l) => {
431
- const n = j([]), r = j([]);
430
+ }, Ca = (e, i, c, a, t, r) => {
431
+ const n = j([]), l = j([]);
432
432
  return Qe(() => {
433
433
  let u = e.value.map((f) => {
434
434
  let {
@@ -445,46 +445,46 @@ const ya = (e) => {
445
445
  c.value && ({
446
446
  checkedKeys: u,
447
447
  halfCheckedKeys: s
448
- } = Ye(u, !0, a.value, t.value, l.value)), n.value = Array.from(/* @__PURE__ */ new Set([...o, ...u])), r.value = s;
449
- }), [n, r];
448
+ } = Ye(u, !0, a.value, t.value, r.value)), n.value = Array.from(/* @__PURE__ */ new Set([...o, ...u])), l.value = s;
449
+ }), [n, l];
450
450
  }, Sa = (e, i, c) => {
451
451
  let {
452
452
  treeNodeFilterProp: a,
453
453
  filterTreeNode: t,
454
- fieldNames: l
454
+ fieldNames: r
455
455
  } = c;
456
- return y(() => {
456
+ return C(() => {
457
457
  const {
458
458
  children: n
459
- } = l.value, r = i.value, u = a == null ? void 0 : a.value;
460
- if (!r || t.value === !1)
459
+ } = r.value, l = i.value, u = a == null ? void 0 : a.value;
460
+ if (!l || t.value === !1)
461
461
  return e.value;
462
462
  let s;
463
463
  if (typeof t.value == "function")
464
464
  s = t.value;
465
465
  else {
466
- const f = r.toUpperCase();
467
- s = (v, h) => {
468
- const x = h[u];
469
- return String(x).toUpperCase().includes(f);
466
+ const f = l.toUpperCase();
467
+ s = (v, p) => {
468
+ const y = p[u];
469
+ return String(y).toUpperCase().includes(f);
470
470
  };
471
471
  }
472
472
  function o(f) {
473
473
  let v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
474
- const h = [];
475
- for (let x = 0, S = f.length; x < S; x++) {
476
- const V = f[x], k = V[n], K = v || s(r, Ge(V)), F = o(k || [], K);
477
- (K || F.length) && h.push(b(b({}, V), {
478
- [n]: F
474
+ const p = [];
475
+ for (let y = 0, g = f.length; y < g; y++) {
476
+ const N = f[y], K = N[n], E = v || s(l, Ge(N)), x = o(K || [], E);
477
+ (E || x.length) && p.push(S(S({}, N), {
478
+ [n]: x
479
479
  }));
480
480
  }
481
- return h;
481
+ return p;
482
482
  }
483
483
  return o(e.value);
484
484
  });
485
485
  };
486
486
  function ft() {
487
- return b(b({}, Ne($t(), ["mode"])), {
487
+ return S(S({}, Ne($t(), ["mode"])), {
488
488
  prefixCls: String,
489
489
  id: String,
490
490
  value: {
@@ -644,138 +644,138 @@ const xa = Ie({
644
644
  expose: a,
645
645
  slots: t
646
646
  } = i;
647
- const l = Rt(re(e, "id")), n = y(() => e.treeCheckable && !e.treeCheckStrictly), r = y(() => e.treeCheckable || e.treeCheckStrictly), u = y(() => e.treeCheckStrictly || e.labelInValue), s = y(() => r.value || e.multiple), o = y(() => ra(e.fieldNames)), [f, v] = tt("", {
648
- value: y(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
647
+ const r = Rt(re(e, "id")), n = C(() => e.treeCheckable && !e.treeCheckStrictly), l = C(() => e.treeCheckable || e.treeCheckStrictly), u = C(() => e.treeCheckStrictly || e.labelInValue), s = C(() => l.value || e.multiple), o = C(() => ra(e.fieldNames)), [f, v] = tt("", {
648
+ value: C(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
649
649
  postState: (d) => d || ""
650
- }), h = (d) => {
651
- var g;
652
- v(d), (g = e.onSearch) === null || g === void 0 || g.call(e, d);
653
- }, x = ma(re(e, "treeData"), re(e, "children"), re(e, "treeDataSimpleMode")), {
654
- keyEntities: S,
655
- valueEntities: V
656
- } = ba(x, o), k = (d) => {
657
- const g = [], m = [];
658
- return d.forEach((N) => {
659
- V.value.has(N) ? m.push(N) : g.push(N);
650
+ }), p = (d) => {
651
+ var m;
652
+ v(d), (m = e.onSearch) === null || m === void 0 || m.call(e, d);
653
+ }, y = ma(re(e, "treeData"), re(e, "children"), re(e, "treeDataSimpleMode")), {
654
+ keyEntities: g,
655
+ valueEntities: N
656
+ } = ba(y, o), K = (d) => {
657
+ const m = [], b = [];
658
+ return d.forEach((k) => {
659
+ N.value.has(k) ? b.push(k) : m.push(k);
660
660
  }), {
661
- missingRawValues: g,
662
- existRawValues: m
661
+ missingRawValues: m,
662
+ existRawValues: b
663
663
  };
664
- }, K = Sa(x, f, {
664
+ }, E = Sa(y, f, {
665
665
  fieldNames: o,
666
666
  treeNodeFilterProp: re(e, "treeNodeFilterProp"),
667
667
  filterTreeNode: re(e, "filterTreeNode")
668
- }), F = (d) => {
668
+ }), x = (d) => {
669
669
  if (d) {
670
670
  if (e.treeNodeLabelProp)
671
671
  return d[e.treeNodeLabelProp];
672
672
  const {
673
- _title: g
673
+ _title: m
674
674
  } = o.value;
675
- for (let m = 0; m < g.length; m += 1) {
676
- const N = d[g[m]];
677
- if (N !== void 0)
678
- return N;
675
+ for (let b = 0; b < m.length; b += 1) {
676
+ const k = d[m[b]];
677
+ if (k !== void 0)
678
+ return k;
679
679
  }
680
680
  }
681
- }, O = (d) => na(d).map((m) => wa(m) ? {
682
- value: m
683
- } : m), p = (d) => O(d).map((m) => {
681
+ }, O = (d) => na(d).map((b) => wa(b) ? {
682
+ value: b
683
+ } : b), h = (d) => O(d).map((b) => {
684
684
  let {
685
- label: N
686
- } = m;
685
+ label: k
686
+ } = b;
687
687
  const {
688
- value: P,
688
+ value: A,
689
689
  halfChecked: _
690
- } = m;
690
+ } = b;
691
691
  let I;
692
- const T = V.value.get(P);
693
- return T && (N = N ?? F(T.node), I = T.node.disabled), {
694
- label: N,
695
- value: P,
692
+ const T = N.value.get(A);
693
+ return T && (k = k ?? x(T.node), I = T.node.disabled), {
694
+ label: k,
695
+ value: A,
696
696
  halfChecked: _,
697
697
  disabled: I
698
698
  };
699
- }), [w, E] = tt(e.defaultValue, {
699
+ }), [V, D] = tt(e.defaultValue, {
700
700
  value: re(e, "value")
701
- }), A = y(() => O(w.value)), L = j([]), z = j([]);
701
+ }), F = C(() => O(V.value)), L = j([]), z = j([]);
702
702
  Qe(() => {
703
- const d = [], g = [];
704
- A.value.forEach((m) => {
705
- m.halfChecked ? g.push(m) : d.push(m);
706
- }), L.value = d, z.value = g;
703
+ const d = [], m = [];
704
+ F.value.forEach((b) => {
705
+ b.halfChecked ? m.push(b) : d.push(b);
706
+ }), L.value = d, z.value = m;
707
707
  });
708
- const Y = y(() => L.value.map((d) => d.value)), {
708
+ const Y = C(() => L.value.map((d) => d.value)), {
709
709
  maxLevel: B,
710
710
  levelEntities: le
711
- } = Yt(S), [q, se] = Ca(L, z, n, S, B, le), ce = y(() => {
712
- const m = rt(q.value, e.showCheckedStrategy, S.value, o.value).map((_) => {
711
+ } = Yt(g), [q, se] = Ca(L, z, n, g, B, le), ce = C(() => {
712
+ const b = rt(q.value, e.showCheckedStrategy, g.value, o.value).map((_) => {
713
713
  var I, T, R;
714
- return (R = (T = (I = S.value[_]) === null || I === void 0 ? void 0 : I.node) === null || T === void 0 ? void 0 : T[o.value.value]) !== null && R !== void 0 ? R : _;
714
+ return (R = (T = (I = g.value[_]) === null || I === void 0 ? void 0 : I.node) === null || T === void 0 ? void 0 : T[o.value.value]) !== null && R !== void 0 ? R : _;
715
715
  }).map((_) => {
716
716
  const I = L.value.find((T) => T.value === _);
717
717
  return {
718
718
  value: _,
719
719
  label: I == null ? void 0 : I.label
720
720
  };
721
- }), N = p(m), P = N[0];
722
- return !s.value && P && nt(P.value) && nt(P.label) ? [] : N.map((_) => {
721
+ }), k = h(b), A = k[0];
722
+ return !s.value && A && nt(A.value) && nt(A.label) ? [] : k.map((_) => {
723
723
  var I;
724
- return b(b({}, _), {
724
+ return S(S({}, _), {
725
725
  label: (I = _.label) !== null && I !== void 0 ? I : _.value
726
726
  });
727
727
  });
728
- }), [ie] = ya(ce), ne = (d, g, m) => {
729
- const N = p(d);
730
- if (E(N), e.autoClearSearchValue && v(""), e.onChange) {
731
- let P = d;
732
- n.value && (P = rt(d, e.showCheckedStrategy, S.value, o.value).map((te) => {
733
- const Ve = V.value.get(te);
728
+ }), [ie] = ya(ce), ne = (d, m, b) => {
729
+ const k = h(d);
730
+ if (D(k), e.autoClearSearchValue && v(""), e.onChange) {
731
+ let A = d;
732
+ n.value && (A = rt(d, e.showCheckedStrategy, g.value, o.value).map((te) => {
733
+ const Ve = N.value.get(te);
734
734
  return Ve ? Ve.node[o.value.value] : te;
735
735
  }));
736
736
  const {
737
737
  triggerValue: _,
738
738
  selected: I
739
- } = g || {
739
+ } = m || {
740
740
  triggerValue: void 0,
741
741
  selected: void 0
742
742
  };
743
- let T = P;
743
+ let T = A;
744
744
  if (e.treeCheckStrictly) {
745
- const W = z.value.filter((te) => !P.includes(te.value));
745
+ const W = z.value.filter((te) => !A.includes(te.value));
746
746
  T = [...T, ...W];
747
747
  }
748
- const R = p(T), Z = {
748
+ const R = h(T), Z = {
749
749
  // [Legacy] Always return as array contains label & value
750
750
  preValue: L.value,
751
751
  triggerValue: _
752
752
  };
753
753
  let ee = !0;
754
- (e.treeCheckStrictly || m === "selection" && !I) && (ee = !1), pa(Z, _, d, x.value, ee, o.value), r.value ? Z.checked = I : Z.selected = I;
754
+ (e.treeCheckStrictly || b === "selection" && !I) && (ee = !1), pa(Z, _, d, y.value, ee, o.value), l.value ? Z.checked = I : Z.selected = I;
755
755
  const $ = u.value ? R : R.map((W) => W.value);
756
756
  e.onChange(s.value ? $ : $[0], u.value ? null : R.map((W) => W.label), Z);
757
757
  }
758
- }, G = (d, g) => {
758
+ }, G = (d, m) => {
759
759
  let {
760
- selected: m,
761
- source: N
762
- } = g;
763
- var P, _, I;
764
- const T = ae(S.value), R = ae(V.value), Z = T[d], ee = Z == null ? void 0 : Z.node, $ = (P = ee == null ? void 0 : ee[o.value.value]) !== null && P !== void 0 ? P : d;
760
+ selected: b,
761
+ source: k
762
+ } = m;
763
+ var A, _, I;
764
+ const T = ae(g.value), R = ae(N.value), Z = T[d], ee = Z == null ? void 0 : Z.node, $ = (A = ee == null ? void 0 : ee[o.value.value]) !== null && A !== void 0 ? A : d;
765
765
  if (!s.value)
766
766
  ne([$], {
767
767
  selected: !0,
768
768
  triggerValue: $
769
769
  }, "option");
770
770
  else {
771
- let W = m ? [...Y.value, $] : q.value.filter((te) => te !== $);
771
+ let W = b ? [...Y.value, $] : q.value.filter((te) => te !== $);
772
772
  if (n.value) {
773
773
  const {
774
774
  missingRawValues: te,
775
775
  existRawValues: Ve
776
- } = k(W), Ze = Ve.map((Re) => R.get(Re).key);
776
+ } = K(W), Ze = Ve.map((Re) => R.get(Re).key);
777
777
  let Me;
778
- m ? {
778
+ b ? {
779
779
  checkedKeys: Me
780
780
  } = Ye(Ze, !0, T, B.value, le.value) : {
781
781
  checkedKeys: Me
@@ -784,27 +784,27 @@ const xa = Ie({
784
784
  }, T, B.value, le.value), W = [...te, ...Me.map((Re) => T[Re].node[o.value.value])];
785
785
  }
786
786
  ne(W, {
787
- selected: m,
787
+ selected: b,
788
788
  triggerValue: $
789
- }, N || "option");
789
+ }, k || "option");
790
790
  }
791
- m || !s.value ? (_ = e.onSelect) === null || _ === void 0 || _.call(e, $, Ge(ee)) : (I = e.onDeselect) === null || I === void 0 || I.call(e, $, Ge(ee));
791
+ b || !s.value ? (_ = e.onSelect) === null || _ === void 0 || _.call(e, $, Ge(ee)) : (I = e.onDeselect) === null || I === void 0 || I.call(e, $, Ge(ee));
792
792
  }, me = (d) => {
793
793
  if (e.onDropdownVisibleChange) {
794
- const g = {};
795
- Object.defineProperty(g, "documentClickClose", {
794
+ const m = {};
795
+ Object.defineProperty(m, "documentClickClose", {
796
796
  get() {
797
797
  return !1;
798
798
  }
799
- }), e.onDropdownVisibleChange(d, g);
799
+ }), e.onDropdownVisibleChange(d, m);
800
800
  }
801
- }, ye = (d, g) => {
802
- const m = d.map((N) => N.value);
803
- if (g.type === "clear") {
804
- ne(m, {}, "selection");
801
+ }, ye = (d, m) => {
802
+ const b = d.map((k) => k.value);
803
+ if (m.type === "clear") {
804
+ ne(b, {}, "selection");
805
805
  return;
806
806
  }
807
- g.values.length && G(g.values[0].value, {
807
+ m.values.length && G(m.values[0].value, {
808
808
  selected: !1,
809
809
  source: "selection"
810
810
  });
@@ -812,8 +812,8 @@ const xa = Ie({
812
812
  treeNodeFilterProp: be,
813
813
  // Data
814
814
  loadData: ue,
815
- treeLoadedKeys: C,
816
- onTreeLoad: D,
815
+ treeLoadedKeys: w,
816
+ onTreeLoad: P,
817
817
  // Expanded
818
818
  treeDefaultExpandAll: M,
819
819
  treeExpandedKeys: Q,
@@ -834,10 +834,10 @@ const xa = Ie({
834
834
  treeExpandAction: He
835
835
  } = mt(e);
836
836
  jt(lt({
837
- checkable: r,
837
+ checkable: l,
838
838
  loadData: ue,
839
- treeLoadedKeys: C,
840
- onTreeLoad: D,
839
+ treeLoadedKeys: w,
840
+ onTreeLoad: P,
841
841
  checkedKeys: q,
842
842
  halfCheckedKeys: se,
843
843
  treeDefaultExpandAll: M,
@@ -850,13 +850,13 @@ const xa = Ie({
850
850
  switcherIcon: Ae,
851
851
  treeLine: De,
852
852
  treeNodeFilterProp: be,
853
- keyEntities: S,
853
+ keyEntities: g,
854
854
  customSlots: Fe
855
855
  })), sa(lt({
856
856
  virtual: Le,
857
857
  listHeight: _e,
858
858
  listItemHeight: Ee,
859
- treeData: K,
859
+ treeData: E,
860
860
  fieldNames: o,
861
861
  onSelect: G,
862
862
  dropdownMatchSelectWidth: Oe,
@@ -873,12 +873,12 @@ const xa = Ie({
873
873
  (d = J.value) === null || d === void 0 || d.blur();
874
874
  },
875
875
  scrollTo(d) {
876
- var g;
877
- (g = J.value) === null || g === void 0 || g.scrollTo(d);
876
+ var m;
877
+ (m = J.value) === null || m === void 0 || m.scrollTo(d);
878
878
  }
879
879
  }), () => {
880
880
  var d;
881
- const g = Ne(e, [
881
+ const m = Ne(e, [
882
882
  "id",
883
883
  "prefixCls",
884
884
  "customSlots",
@@ -931,16 +931,16 @@ const xa = Ie({
931
931
  ]);
932
932
  return U(Bt, X(X(X({
933
933
  ref: J
934
- }, c), g), {}, {
935
- id: l,
934
+ }, c), m), {}, {
935
+ id: r,
936
936
  prefixCls: e.prefixCls,
937
937
  mode: s.value ? "multiple" : void 0,
938
938
  displayValues: ie.value,
939
939
  onDisplayValuesChange: ye,
940
940
  searchValue: f.value,
941
- onSearch: h,
941
+ onSearch: p,
942
942
  OptionList: ua,
943
- emptyOptions: !x.value.length,
943
+ emptyOptions: !y.value.length,
944
944
  onDropdownVisibleChange: me,
945
945
  tagRender: e.tagRender || t.tagRender,
946
946
  dropdownMatchSelectWidth: (d = e.dropdownMatchSelectWidth) !== null && d !== void 0 ? d : !0
@@ -1006,7 +1006,7 @@ function Ia(e, i) {
1006
1006
  }
1007
1007
  const ot = (e, i, c) => c !== void 0 ? c : `${e}-${i}`;
1008
1008
  function Na() {
1009
- return b(b({}, Ne(ft(), ["showTreeIcon", "treeMotion", "inputIcon", "getInputElement", "treeLine", "customSlots"])), {
1009
+ return S(S({}, Ne(ft(), ["showTreeIcon", "treeMotion", "inputIcon", "getInputElement", "treeLine", "customSlots"])), {
1010
1010
  suffixIcon: he.any,
1011
1011
  size: ze(),
1012
1012
  bordered: At(),
@@ -1041,53 +1041,53 @@ const Xe = Ie({
1041
1041
  attrs: c,
1042
1042
  slots: a,
1043
1043
  expose: t,
1044
- emit: l
1044
+ emit: r
1045
1045
  } = i;
1046
1046
  Nt(!(e.treeData === void 0 && a.default)), We(e.multiple !== !1 || !e.treeCheckable, "TreeSelect", "`multiple` will always be `true` when `treeCheckable` is true"), We(e.replaceFields === void 0, "TreeSelect", "`replaceFields` is deprecated, please use fieldNames instead"), We(!e.dropdownClassName, "TreeSelect", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
1047
- const n = Qt(), r = Jt.useInject(), u = y(() => Zt(r.status, e.status)), {
1047
+ const n = Qt(), l = Jt.useInject(), u = C(() => Zt(l.status, e.status)), {
1048
1048
  prefixCls: s,
1049
1049
  renderEmpty: o,
1050
1050
  direction: f,
1051
1051
  virtual: v,
1052
- dropdownMatchSelectWidth: h,
1053
- size: x,
1054
- getPopupContainer: S,
1055
- getPrefixCls: V,
1056
- disabled: k
1052
+ dropdownMatchSelectWidth: p,
1053
+ size: y,
1054
+ getPopupContainer: g,
1055
+ getPrefixCls: N,
1056
+ disabled: K
1057
1057
  } = kt("select", e), {
1058
- compactSize: K,
1059
- compactItemClassnames: F
1060
- } = Tt(s, f), O = y(() => K.value || x.value), p = Lt(), w = y(() => {
1061
- var C;
1062
- return (C = k.value) !== null && C !== void 0 ? C : p.value;
1063
- }), E = y(() => V()), A = y(() => e.placement !== void 0 ? e.placement : f.value === "rtl" ? "bottomRight" : "bottomLeft"), L = y(() => ot(E.value, _t(A.value), e.transitionName)), z = y(() => ot(E.value, "", e.choiceTransitionName)), Y = y(() => V("select-tree", e.prefixCls)), B = y(() => V("tree-select", e.prefixCls)), [le, q] = Wt(s), [se] = Ia(B, Y), ce = y(() => at(e.popupClassName || e.dropdownClassName, `${B.value}-dropdown`, {
1058
+ compactSize: E,
1059
+ compactItemClassnames: x
1060
+ } = Tt(s, f), O = C(() => E.value || y.value), h = Lt(), V = C(() => {
1061
+ var w;
1062
+ return (w = K.value) !== null && w !== void 0 ? w : h.value;
1063
+ }), D = C(() => N()), F = C(() => e.placement !== void 0 ? e.placement : f.value === "rtl" ? "bottomRight" : "bottomLeft"), L = C(() => ot(D.value, _t(F.value), e.transitionName)), z = C(() => ot(D.value, "", e.choiceTransitionName)), Y = C(() => N("select-tree", e.prefixCls)), B = C(() => N("tree-select", e.prefixCls)), [le, q] = Wt(s), [se] = Ia(B, Y), ce = C(() => at(e.popupClassName || e.dropdownClassName, `${B.value}-dropdown`, {
1064
1064
  [`${B.value}-dropdown-rtl`]: f.value === "rtl"
1065
- }, q.value)), ie = y(() => !!(e.treeCheckable || e.multiple)), ne = y(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !ie.value), G = pe();
1065
+ }, q.value)), ie = C(() => !!(e.treeCheckable || e.multiple)), ne = C(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !ie.value), G = pe();
1066
1066
  t({
1067
1067
  focus() {
1068
- var C, D;
1069
- (D = (C = G.value).focus) === null || D === void 0 || D.call(C);
1068
+ var w, P;
1069
+ (P = (w = G.value).focus) === null || P === void 0 || P.call(w);
1070
1070
  },
1071
1071
  blur() {
1072
- var C, D;
1073
- (D = (C = G.value).blur) === null || D === void 0 || D.call(C);
1072
+ var w, P;
1073
+ (P = (w = G.value).blur) === null || P === void 0 || P.call(w);
1074
1074
  }
1075
1075
  });
1076
1076
  const me = function() {
1077
- for (var C = arguments.length, D = new Array(C), M = 0; M < C; M++)
1078
- D[M] = arguments[M];
1079
- l("update:value", D[0]), l("change", ...D), n.onFieldChange();
1080
- }, ye = (C) => {
1081
- l("update:treeExpandedKeys", C), l("treeExpand", C);
1082
- }, be = (C) => {
1083
- l("update:searchValue", C), l("search", C);
1084
- }, ue = (C) => {
1085
- l("blur", C), n.onFieldBlur();
1077
+ for (var w = arguments.length, P = new Array(w), M = 0; M < w; M++)
1078
+ P[M] = arguments[M];
1079
+ r("update:value", P[0]), r("change", ...P), n.onFieldChange();
1080
+ }, ye = (w) => {
1081
+ r("update:treeExpandedKeys", w), r("treeExpand", w);
1082
+ }, be = (w) => {
1083
+ r("update:searchValue", w), r("search", w);
1084
+ }, ue = (w) => {
1085
+ r("blur", w), n.onFieldBlur();
1086
1086
  };
1087
1087
  return () => {
1088
- var C, D, M;
1088
+ var w, P, M;
1089
1089
  const {
1090
- notFoundContent: Q = (C = a.notFoundContent) === null || C === void 0 ? void 0 : C.call(a),
1090
+ notFoundContent: Q = (w = a.notFoundContent) === null || w === void 0 ? void 0 : w.call(a),
1091
1091
  prefixCls: ke,
1092
1092
  bordered: Te,
1093
1093
  listHeight: Le,
@@ -1096,7 +1096,7 @@ const Xe = Ie({
1096
1096
  treeIcon: De,
1097
1097
  treeLine: xe,
1098
1098
  showArrow: Pe,
1099
- switcherIcon: Ae = (D = a.switcherIcon) === null || D === void 0 ? void 0 : D.call(a),
1099
+ switcherIcon: Ae = (P = a.switcherIcon) === null || P === void 0 ? void 0 : P.call(a),
1100
1100
  fieldNames: Ke = e.replaceFields,
1101
1101
  id: Fe = n.id.value,
1102
1102
  placeholder: Oe = (M = a.placeholder) === null || M === void 0 ? void 0 : M.call(a)
@@ -1104,30 +1104,30 @@ const Xe = Ie({
1104
1104
  isFormItemInput: He,
1105
1105
  hasFeedback: J,
1106
1106
  feedbackIcon: d
1107
- } = r, {
1108
- suffixIcon: g,
1109
- removeIcon: m,
1110
- clearIcon: N
1111
- } = Ut(b(b({}, e), {
1107
+ } = l, {
1108
+ suffixIcon: m,
1109
+ removeIcon: b,
1110
+ clearIcon: k
1111
+ } = Ut(S(S({}, e), {
1112
1112
  multiple: ie.value,
1113
1113
  showArrow: ne.value,
1114
1114
  hasFeedback: J,
1115
1115
  feedbackIcon: d,
1116
1116
  prefixCls: s.value
1117
1117
  }), a);
1118
- let P;
1119
- Q !== void 0 ? P = Q : P = o("Select");
1118
+ let A;
1119
+ Q !== void 0 ? A = Q : A = o("Select");
1120
1120
  const _ = Ne(e, ["suffixIcon", "itemIcon", "removeIcon", "clearIcon", "switcherIcon", "bordered", "status", "onUpdate:value", "onUpdate:treeExpandedKeys", "onUpdate:searchValue"]), I = at(!ke && B.value, {
1121
1121
  [`${s.value}-lg`]: O.value === "large",
1122
1122
  [`${s.value}-sm`]: O.value === "small",
1123
1123
  [`${s.value}-rtl`]: f.value === "rtl",
1124
1124
  [`${s.value}-borderless`]: !Te,
1125
1125
  [`${s.value}-in-form-item`]: He
1126
- }, ea(s.value, u.value, J), F.value, c.class, q.value), T = {};
1126
+ }, ea(s.value, u.value, J), x.value, c.class, q.value), T = {};
1127
1127
  return e.treeData === void 0 && a.default && (T.children = Et(a.default())), le(se(U(xa, X(X(X(X({}, c), _), {}, {
1128
- disabled: w.value,
1128
+ disabled: V.value,
1129
1129
  virtual: v.value,
1130
- dropdownMatchSelectWidth: h.value,
1130
+ dropdownMatchSelectWidth: p.value,
1131
1131
  id: Fe,
1132
1132
  fieldNames: Ke,
1133
1133
  ref: G,
@@ -1136,14 +1136,14 @@ const Xe = Ie({
1136
1136
  listHeight: Le,
1137
1137
  listItemHeight: _e,
1138
1138
  treeLine: !!xe,
1139
- inputIcon: g,
1139
+ inputIcon: m,
1140
1140
  multiple: Ee,
1141
- removeIcon: m,
1142
- clearIcon: N,
1141
+ removeIcon: b,
1142
+ clearIcon: k,
1143
1143
  switcherIcon: (R) => ta(Y.value, Ae, R, a.leafIcon, xe),
1144
1144
  showTreeIcon: De,
1145
- notFoundContent: P,
1146
- getPopupContainer: S == null ? void 0 : S.value,
1145
+ notFoundContent: A,
1146
+ getPopupContainer: g == null ? void 0 : g.value,
1147
1147
  treeMotion: null,
1148
1148
  dropdownClassName: ce.value,
1149
1149
  choiceTransitionName: z.value,
@@ -1153,23 +1153,23 @@ const Xe = Ie({
1153
1153
  onTreeExpand: ye
1154
1154
  }, T), {}, {
1155
1155
  transitionName: L.value,
1156
- customSlots: b(b({}, a), {
1156
+ customSlots: S(S({}, a), {
1157
1157
  treeCheckable: () => U("span", {
1158
1158
  class: `${s.value}-tree-checkbox-inner`
1159
1159
  }, null)
1160
1160
  }),
1161
1161
  maxTagPlaceholder: e.maxTagPlaceholder || a.maxTagPlaceholder,
1162
- placement: A.value,
1162
+ placement: F.value,
1163
1163
  showArrow: J || Pe,
1164
1164
  placeholder: Oe
1165
- }), b(b({}, a), {
1165
+ }), S(S({}, a), {
1166
1166
  treeCheckable: () => U("span", {
1167
1167
  class: `${s.value}-tree-checkbox-inner`
1168
1168
  }, null)
1169
1169
  }))));
1170
1170
  };
1171
1171
  }
1172
- }), st = ge, ct = b(Xe, {
1172
+ }), st = ge, ct = S(Xe, {
1173
1173
  TreeNode: ge,
1174
1174
  SHOW_ALL: da,
1175
1175
  SHOW_PARENT: vt,
@@ -1178,54 +1178,54 @@ const Xe = Ie({
1178
1178
  }), fe = yt({});
1179
1179
  function ka(e) {
1180
1180
  we(() => e.categoryList, (t) => {
1181
- t.forEach(async (l) => {
1182
- if (!fe[l.id]) {
1183
- const n = await Kt.getCategoryValues(l.id), { flatAttributeValue: r, treeAttributeValue: u, showWay: s } = n.body;
1184
- fe[l.id] = s === "TREE" ? u : r;
1181
+ t.forEach(async (r) => {
1182
+ if (!fe[r.id]) {
1183
+ const n = await Kt.getCategoryValues(r.id), { flatAttributeValue: l, treeAttributeValue: u, showWay: s } = n.body;
1184
+ fe[r.id] = s === "TREE" ? u : l;
1185
1185
  }
1186
1186
  });
1187
1187
  }, { immediate: !0, deep: !0 });
1188
- const i = (t, l) => {
1189
- for (let n = 0; n < l.length; n++) {
1190
- const r = l[n];
1191
- if (r.id === t)
1192
- return r.attributeName;
1193
- if (r.children && r.children.length) {
1194
- const u = i(t, r.children);
1188
+ const i = (t, r) => {
1189
+ for (let n = 0; n < r.length; n++) {
1190
+ const l = r[n];
1191
+ if (l.id === t)
1192
+ return l.attributeName;
1193
+ if (l.children && l.children.length) {
1194
+ const u = i(t, l.children);
1195
1195
  if (u)
1196
1196
  return u;
1197
1197
  }
1198
1198
  }
1199
1199
  return "";
1200
- }, c = (t, l) => {
1201
- const n = [], r = /* @__PURE__ */ new Set(), u = (o) => {
1202
- if (r.has(o.id) || (r.add(o.id), n.push(o)), o.children && o.children.length)
1200
+ }, c = (t, r) => {
1201
+ const n = [], l = /* @__PURE__ */ new Set(), u = (o) => {
1202
+ if (l.has(o.id) || (l.add(o.id), n.push(o)), o.children && o.children.length)
1203
1203
  for (let f = 0; f < o.children.length; f++)
1204
1204
  u(o.children[f]);
1205
1205
  }, s = (o, f) => {
1206
1206
  for (let v = 0; v < f.length; v++) {
1207
- const h = f[v];
1208
- if (h.id === o)
1209
- return u(h), !0;
1210
- if (h.children && h.children.length && s(o, h.children))
1207
+ const p = f[v];
1208
+ if (p.id === o)
1209
+ return u(p), !0;
1210
+ if (p.children && p.children.length && s(o, p.children))
1211
1211
  return !0;
1212
1212
  }
1213
1213
  return !1;
1214
1214
  };
1215
1215
  for (let o = 0; o < t.length; o++)
1216
- s(t[o], l);
1216
+ s(t[o], r);
1217
1217
  return n;
1218
1218
  };
1219
1219
  return {
1220
1220
  categoryValuesMap: fe,
1221
1221
  getDeleteAttributesNames: (t) => {
1222
1222
  var o, f;
1223
- const l = c(t.attributeValueIds_view || [], fe[t.id] || []), n = /* @__PURE__ */ new Set();
1224
- for (let v = 0; v < l.length; v++)
1225
- n.add(l[v].id);
1226
- const r = c(t.defaultValueIds || [], fe[t.id] || []), u = /* @__PURE__ */ new Map();
1223
+ const r = c(t.attributeValueIds_view || [], fe[t.id] || []), n = /* @__PURE__ */ new Set();
1227
1224
  for (let v = 0; v < r.length; v++)
1228
- u.set(r[v].id, r[v].attributeName);
1225
+ n.add(r[v].id);
1226
+ const l = c(t.defaultValueIds || [], fe[t.id] || []), u = /* @__PURE__ */ new Map();
1227
+ for (let v = 0; v < l.length; v++)
1228
+ u.set(l[v].id, l[v].attributeName);
1229
1229
  return (f = (o = t.defaultValueIds) == null ? void 0 : o.filter((v) => !n.has(v))) == null ? void 0 : f.map((v) => u.get(v) || i(v, fe[t.id] || [])).filter(Boolean).join("、");
1230
1230
  }
1231
1231
  };
@@ -1247,83 +1247,85 @@ const Ta = { class: "crane-required" }, La = { class: "crane-category-tips" }, _
1247
1247
  default: () => []
1248
1248
  }
1249
1249
  },
1250
- setup(e, { expose: i }) {
1251
- const c = ct.SHOW_PARENT, a = e, t = pe(), l = pe(""), {
1252
- categoryValuesMap: n,
1253
- getDeleteAttributesNames: r
1254
- } = ka(a), u = y(() => ({
1255
- categoryList: a.categoryList
1256
- })), s = y(() => Object.values(n).some((f) => f.length > 0));
1250
+ emits: ["onChange"],
1251
+ setup(e, { expose: i, emit: c }) {
1252
+ const a = ct.SHOW_PARENT, t = e, r = c, n = pe(), l = pe(""), {
1253
+ categoryValuesMap: u,
1254
+ getDeleteAttributesNames: s
1255
+ } = ka(t), o = C(() => ({
1256
+ categoryList: t.categoryList
1257
+ })), f = C(() => Object.values(u).some((p) => p.length > 0));
1257
1258
  return i({
1258
- validate: () => new Promise((f, v) => {
1259
- if (!t.value) {
1260
- f(!0);
1259
+ validate: () => new Promise((p, y) => {
1260
+ if (!n.value) {
1261
+ p(!0);
1261
1262
  return;
1262
1263
  }
1263
- t.value.validate().then(() => {
1264
- f(!0);
1264
+ n.value.validate().then(() => {
1265
+ p(!0);
1265
1266
  }).catch(() => {
1266
- v(!1);
1267
+ y(!1);
1267
1268
  });
1268
1269
  })
1269
- }), (f, v) => s.value ? (oe(), et(H(la), {
1270
+ }), (p, y) => f.value ? (oe(), et(H(la), {
1270
1271
  key: 0,
1271
1272
  class: "crane-category-wraper",
1272
- model: u.value,
1273
+ model: o.value,
1273
1274
  ref_key: "formRef",
1274
- ref: t
1275
+ ref: n
1275
1276
  }, {
1276
1277
  default: Be(() => [
1277
1278
  $e("div", Ta, de(H(Se)("category")), 1),
1278
1279
  $e("div", La, de(H(Se)("categotySelectTips")), 1),
1279
- v[1] || (v[1] = $e("div", { class: "crane-category-line" }, null, -1)),
1280
- (oe(!0), Ce(bt, null, Ct(u.value.categoryList, (h, x) => {
1281
- var S;
1280
+ y[2] || (y[2] = $e("div", { class: "crane-category-line" }, null, -1)),
1281
+ (oe(!0), Ce(bt, null, Ct(o.value.categoryList, (g, N) => {
1282
+ var K;
1282
1283
  return St((oe(), et(H(aa), {
1283
- key: h.id,
1284
- label: h.categoryName,
1285
- name: ["categoryList", x, "attributeValueIds_view"],
1284
+ key: g.id,
1285
+ label: g.categoryName,
1286
+ name: ["categoryList", N, "attributeValueIds_view"],
1286
1287
  rules: [{ required: !0, message: H(Se)("pleaseChoose"), trigger: ["change", "blur"] }]
1287
1288
  }, {
1288
1289
  default: Be(() => {
1289
- var V;
1290
+ var E;
1290
1291
  return [
1291
1292
  U(H(ct), {
1292
1293
  treeCheckable: "",
1293
1294
  treeDefaultExpandAll: "",
1294
- "tree-data": H(n)[h.id],
1295
+ "tree-data": H(u)[g.id],
1295
1296
  showSearch: "",
1296
1297
  allowClear: "",
1297
- value: h.attributeValueIds_view,
1298
- "onUpdate:value": (k) => h.attributeValueIds_view = k,
1298
+ value: g.attributeValueIds_view,
1299
+ "onUpdate:value": (x) => g.attributeValueIds_view = x,
1299
1300
  treeNodeFilterProp: "attributeName",
1300
1301
  searchValue: l.value,
1301
- "onUpdate:searchValue": v[0] || (v[0] = (k) => l.value = k),
1302
+ "onUpdate:searchValue": y[0] || (y[0] = (x) => l.value = x),
1302
1303
  fieldNames: { label: "attributeName", value: "id" },
1303
1304
  treeNodeLabelProp: "attributeName",
1304
- "show-checked-strategy": H(c),
1305
- virtual: !0
1305
+ "show-checked-strategy": H(a),
1306
+ virtual: !0,
1307
+ onChange: y[1] || (y[1] = (x) => r("onChange"))
1306
1308
  }, {
1307
- title: Be(({ attributeName: k }) => [
1308
- l.value.toLowerCase() && k.includes(l.value.toLowerCase()) ? (oe(), Ce("span", _a, de(k), 1)) : (oe(), Ce("span", Ea, de(k), 1))
1309
+ title: Be(({ attributeName: x }) => [
1310
+ l.value.toLowerCase() && x.includes(l.value.toLowerCase()) ? (oe(), Ce("span", _a, de(x), 1)) : (oe(), Ce("span", Ea, de(x), 1))
1309
1311
  ]),
1310
1312
  _: 2
1311
1313
  }, 1032, ["tree-data", "value", "onUpdate:value", "searchValue", "show-checked-strategy"]),
1312
- (V = h.attributeValueIds_view) != null && V.includes(-1) ? (oe(), Ce("span", Da, de(H(Se)("categoryChangeTips", { category: h.categoryName })), 1)) : je("", !0),
1313
- H(r)(h) ? (oe(), Ce("span", Pa, de(H(Se)("deleteCategoryTips", { categorys: H(r)(h) })), 1)) : je("", !0)
1314
+ (E = g.attributeValueIds_view) != null && E.includes(-1) ? (oe(), Ce("span", Da, de(H(Se)("categoryChangeTips", { category: g.categoryName })), 1)) : je("", !0),
1315
+ H(s)(g) ? (oe(), Ce("span", Pa, de(H(Se)("deleteCategoryTips", { categorys: H(s)(g) })), 1)) : je("", !0)
1314
1316
  ];
1315
1317
  }),
1316
1318
  _: 2
1317
1319
  }, 1032, ["label", "name", "rules"])), [
1318
- [wt, (S = H(n)[h.id]) == null ? void 0 : S.length]
1320
+ [wt, (K = H(u)[g.id]) == null ? void 0 : K.length]
1319
1321
  ]);
1320
1322
  }), 128))
1321
1323
  ]),
1322
1324
  _: 1,
1323
- __: [1]
1325
+ __: [2]
1324
1326
  }, 8, ["model"])) : je("", !0);
1325
1327
  }
1326
- }), Ma = /* @__PURE__ */ Ft(Aa, [["__scopeId", "data-v-b0210ff6"]]);
1328
+ }), Ma = /* @__PURE__ */ Ft(Aa, [["__scopeId", "data-v-db9afb32"]]);
1327
1329
  export {
1328
1330
  Ma as default
1329
1331
  };