@yqg/permission 1.3.0 → 1.3.1-1.bate.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { a as ht, p as pt, d as Ve, r as fe, c as y, w as be, q as mt, s as M, E as ae, e as U, b as Ge, y as oe, $ as gt, G as yt, K as ie, L as Ze, M as Me, N as Be, R as ye, u as W, P as we, F as bt, Y as Ct, f as St, U as et, z as wt } from "./index-XvlOgi6s.js";
2
- import { a as X, _ as b, W as xt, X as Vt, ae as ut, aX as tt, Y as Ie, P as ve, N as It, R as it, V as kt, aN as $e, $ as Nt, ar as Tt, as as Lt, aY as Et, c as at, b as _t, ak as je, aj as Pt, a0 as Dt, ai as At, am as We, aU as Kt, aP as xe, aS as Ft } from "./yqg-permission-BrOMv4sA.js";
3
- import { u as Ot, a as Ht, b as Rt, c as Mt, d as Bt, t as lt, B as $t, e as jt, f as Wt, g as Ut } from "./index-CAVNFmBo.js";
4
- import { K as de, T as zt, c as Xt, a as Xe, u as Yt, g as qt, b as Gt, d as Jt, F as Qt, e as Zt, f as ea, r as ta, h as aa, i as la } from "./apply-modal-Ct9rKeUf.js";
1
+ import { a as ht, p as pt, d as Ve, r as fe, c as y, w as be, q as mt, s as R, E as ae, e as U, b as Ge, y as oe, a0 as gt, G as yt, K as Ze, R as et, L as ie, M as Re, P as je, N as we, S as ye, u as W, F as bt, Y as Ct, j as St, z as wt } from "./index-Cnz2SLUX.js";
2
+ import { a as X, _ as b, W as xt, X as Vt, ae as ut, aX as tt, Y as Ie, P as ve, N as It, Q as it, V as kt, aN as Be, a0 as Nt, ar as Tt, as as Lt, aY as Et, c as at, b as _t, ai as $e, ak as We, am as Pt, $ as Dt, aj as At, aV as Kt, aP as xe, aS as Ft } from "./yqg-permission-BPhYJ3ps.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-qdB6FW1K.js";
4
+ import { K as de, T as zt, c as Xt, a as Xe, 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-BFzYTq8s.js";
5
5
  function na(e) {
6
6
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
7
7
  }
@@ -24,10 +24,10 @@ function Ye(e) {
24
24
  function ra(e, s) {
25
25
  const l = [];
26
26
  function t(a) {
27
- a.forEach((n) => {
28
- l.push(n[s.value]);
29
- const o = n[s.children];
30
- o && t(o);
27
+ a.forEach((o) => {
28
+ l.push(o[s.value]);
29
+ const n = o[s.children];
30
+ n && t(n);
31
31
  });
32
32
  }
33
33
  return t(e), l;
@@ -62,12 +62,12 @@ const ua = {
62
62
  slots: l,
63
63
  expose: t
64
64
  } = s;
65
- const a = Ot(), n = Ht(), o = ca(), r = fe(), d = Rt(() => o.treeData, [() => a.open, () => o.treeData], (v) => v[0]), c = y(() => {
65
+ const a = Ot(), o = Ht(), n = ca(), r = fe(), d = Mt(() => n.treeData, [() => a.open, () => n.treeData], (v) => v[0]), c = y(() => {
66
66
  const {
67
67
  checkable: v,
68
68
  halfCheckedKeys: V,
69
69
  checkedKeys: E
70
- } = n;
70
+ } = o;
71
71
  return v ? {
72
72
  checked: E,
73
73
  halfChecked: V
@@ -76,23 +76,23 @@ const ua = {
76
76
  be(() => a.open, () => {
77
77
  mt(() => {
78
78
  var v;
79
- a.open && !a.multiple && n.checkedKeys.length && ((v = r.value) === null || v === void 0 || v.scrollTo({
80
- key: n.checkedKeys[0]
79
+ a.open && !a.multiple && o.checkedKeys.length && ((v = r.value) === null || v === void 0 || v.scrollTo({
80
+ key: o.checkedKeys[0]
81
81
  }));
82
82
  });
83
83
  }, {
84
84
  immediate: !0,
85
85
  flush: "post"
86
86
  });
87
- const u = y(() => String(a.searchValue).toLowerCase()), f = (v) => u.value ? String(v[n.treeNodeFilterProp]).toLowerCase().includes(u.value) : !1, p = M(n.treeDefaultExpandedKeys), w = M(null);
87
+ const u = y(() => String(a.searchValue).toLowerCase()), f = (v) => u.value ? String(v[o.treeNodeFilterProp]).toLowerCase().includes(u.value) : !1, p = R(o.treeDefaultExpandedKeys), w = R(null);
88
88
  be(() => a.searchValue, () => {
89
- a.searchValue && (w.value = ra(ae(o.treeData), ae(o.fieldNames)));
89
+ a.searchValue && (w.value = ra(ae(n.treeData), ae(n.fieldNames)));
90
90
  }, {
91
91
  immediate: !0
92
92
  });
93
- const x = y(() => n.treeExpandedKeys ? n.treeExpandedKeys.slice() : a.searchValue ? w.value : p.value), S = (v) => {
93
+ const x = y(() => o.treeExpandedKeys ? o.treeExpandedKeys.slice() : a.searchValue ? w.value : p.value), S = (v) => {
94
94
  var V;
95
- p.value = v, w.value = v, (V = n.onTreeExpand) === null || V === void 0 || V.call(n, v);
95
+ p.value = v, w.value = v, (V = o.onTreeExpand) === null || V === void 0 || V.call(o, v);
96
96
  }, g = (v) => {
97
97
  v.preventDefault();
98
98
  }, F = (v, V) => {
@@ -103,11 +103,11 @@ const ua = {
103
103
  const {
104
104
  checkable: z,
105
105
  checkedKeys: Y
106
- } = n;
107
- z && Ye(E) || ((D = o.onSelect) === null || D === void 0 || D.call(o, E.key, {
106
+ } = o;
107
+ z && Ye(E) || ((D = n.onSelect) === null || D === void 0 || D.call(n, E.key, {
108
108
  selected: !Y.includes(E.key)
109
109
  }), a.multiple || (T = a.toggleOpen) === null || T === void 0 || T.call(a, !1));
110
- }, A = fe(null), K = y(() => n.keyEntities[A.value]), O = (v) => {
110
+ }, A = fe(null), K = y(() => o.keyEntities[A.value]), O = (v) => {
111
111
  A.value = v;
112
112
  };
113
113
  return t({
@@ -138,7 +138,7 @@ const ua = {
138
138
  node: {
139
139
  key: A.value
140
140
  },
141
- selected: !n.checkedKeys.includes(T)
141
+ selected: !o.checkedKeys.includes(T)
142
142
  });
143
143
  }
144
144
  break;
@@ -159,11 +159,11 @@ const ua = {
159
159
  notFoundContent: z = (v = l.notFoundContent) === null || v === void 0 ? void 0 : v.call(l)
160
160
  } = a, {
161
161
  listHeight: Y,
162
- listItemHeight: B,
162
+ listItemHeight: j,
163
163
  virtual: le,
164
164
  dropdownMatchSelectWidth: q,
165
165
  treeExpandAction: re
166
- } = o, {
166
+ } = n, {
167
167
  checkable: se,
168
168
  treeDefaultExpandAll: ce,
169
169
  treeIcon: ne,
@@ -175,17 +175,17 @@ const ua = {
175
175
  treeMotion: C,
176
176
  onTreeLoad: _,
177
177
  checkedKeys: H
178
- } = n;
178
+ } = o;
179
179
  if (d.value.length === 0)
180
180
  return U("div", {
181
181
  role: "listbox",
182
182
  class: `${V}-empty`,
183
183
  onMousedown: g
184
184
  }, [z]);
185
- const J = {
186
- fieldNames: o.fieldNames
185
+ const Q = {
186
+ fieldNames: n.fieldNames
187
187
  };
188
- return ue && (J.loadedKeys = ue), x.value && (J.expandedKeys = x.value), U("div", {
188
+ return ue && (Q.loadedKeys = ue), x.value && (Q.expandedKeys = x.value), U("div", {
189
189
  onMousedown: g
190
190
  }, [K.value && T && U("span", {
191
191
  style: ua,
@@ -196,7 +196,7 @@ const ua = {
196
196
  prefixCls: `${V}-tree`,
197
197
  treeData: d.value,
198
198
  height: Y,
199
- itemHeight: B,
199
+ itemHeight: j,
200
200
  virtual: le !== !1 && q !== !1,
201
201
  multiple: E,
202
202
  icon: ne,
@@ -211,7 +211,7 @@ const ua = {
211
211
  checkedKeys: c.value,
212
212
  selectedKeys: se ? [] : H,
213
213
  defaultExpandAll: ce
214
- }, J), {}, {
214
+ }, Q), {}, {
215
215
  onActiveChange: O,
216
216
  onSelect: F,
217
217
  onCheck: F,
@@ -220,28 +220,28 @@ const ua = {
220
220
  filterTreeNode: f,
221
221
  expandAction: re
222
222
  }), b(b({}, l), {
223
- checkable: n.customSlots.treeCheckable
223
+ checkable: o.customSlots.treeCheckable
224
224
  }))]);
225
225
  };
226
226
  }
227
- }), da = "SHOW_ALL", vt = "SHOW_PARENT", Je = "SHOW_CHILD";
227
+ }), da = "SHOW_ALL", vt = "SHOW_PARENT", Qe = "SHOW_CHILD";
228
228
  function ot(e, s, l, t) {
229
229
  const a = new Set(e);
230
- return s === Je ? e.filter((n) => {
231
- const o = l[n];
232
- return !(o && o.children && o.children.some((r) => {
230
+ return s === Qe ? e.filter((o) => {
231
+ const n = l[o];
232
+ return !(n && n.children && n.children.some((r) => {
233
233
  let {
234
234
  node: d
235
235
  } = r;
236
236
  return a.has(d[t.value]);
237
- }) && o.children.every((r) => {
237
+ }) && n.children.every((r) => {
238
238
  let {
239
239
  node: d
240
240
  } = r;
241
241
  return Ye(d) || a.has(d[t.value]);
242
242
  }));
243
- }) : s === vt ? e.filter((n) => {
244
- const o = l[n], r = o ? o.parent : null;
243
+ }) : s === vt ? e.filter((o) => {
244
+ const n = l[o], r = n ? n.parent : null;
245
245
  return !(r && !Ye(r.node) && a.has(r.key));
246
246
  }) : e;
247
247
  }
@@ -263,7 +263,7 @@ function ha(e) {
263
263
  function s() {
264
264
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
265
265
  return xt(l).map((t) => {
266
- var a, n, o;
266
+ var a, o, n;
267
267
  if (!fa(t))
268
268
  return null;
269
269
  const r = t.children || {}, d = t.key, c = {};
@@ -283,8 +283,8 @@ function ha(e) {
283
283
  disableCheckbox: x || x === "" || void 0
284
284
  }, g = b(b({}, c), S), {
285
285
  title: F = (a = r.title) === null || a === void 0 ? void 0 : a.call(r, g),
286
- switcherIcon: A = (n = r.switcherIcon) === null || n === void 0 ? void 0 : n.call(r, g)
287
- } = c, K = va(c, ["title", "switcherIcon"]), O = (o = r.default) === null || o === void 0 ? void 0 : o.call(r), v = b(b(b({}, K), {
286
+ switcherIcon: A = (o = r.switcherIcon) === null || o === void 0 ? void 0 : o.call(r, g)
287
+ } = c, K = va(c, ["title", "switcherIcon"]), O = (n = r.default) === null || n === void 0 ? void 0 : n.call(r), v = b(b(b({}, K), {
288
288
  title: F,
289
289
  switcherIcon: A,
290
290
  key: d,
@@ -305,16 +305,16 @@ function qe(e) {
305
305
  }
306
306
  }), s;
307
307
  }
308
- function pa(e, s, l, t, a, n) {
309
- let o = null, r = null;
308
+ function pa(e, s, l, t, a, o) {
309
+ let n = null, r = null;
310
310
  function d() {
311
311
  function c(u) {
312
312
  let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "0", p = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
313
313
  return u.map((w, x) => {
314
- const S = `${f}-${x}`, g = w[n.value], F = l.includes(g), A = c(w[n.children] || [], S, F), K = U(he, w, {
314
+ const S = `${f}-${x}`, g = w[o.value], F = l.includes(g), A = c(w[o.children] || [], S, F), K = U(he, w, {
315
315
  default: () => [A.map((O) => O.node)]
316
316
  });
317
- if (s === g && (o = K), F) {
317
+ if (s === g && (n = K), F) {
318
318
  const O = {
319
319
  pos: S,
320
320
  node: K,
@@ -345,7 +345,7 @@ function pa(e, s, l, t, a, n) {
345
345
  }
346
346
  Object.defineProperty(e, "triggerNode", {
347
347
  get() {
348
- return d(), o;
348
+ return d(), n;
349
349
  }
350
350
  }), Object.defineProperty(e, "allCheckedNodes", {
351
351
  get() {
@@ -364,17 +364,17 @@ function ma(e, s) {
364
364
  pId: t,
365
365
  rootPId: a
366
366
  } = s;
367
- const n = {}, o = [];
367
+ const o = {}, n = [];
368
368
  return e.map((d) => {
369
369
  const c = b({}, d), u = c[l];
370
- return n[u] = c, c.key = c.key || u, c;
370
+ return o[u] = c, c.key = c.key || u, c;
371
371
  }).forEach((d) => {
372
- const c = d[t], u = n[c];
373
- u && (u.children = u.children || [], u.children.push(d)), (c === a || !u && a === null) && o.push(d);
374
- }), o;
372
+ const c = d[t], u = o[c];
373
+ u && (u.children = u.children || [], u.children.push(d)), (c === a || !u && a === null) && n.push(d);
374
+ }), n;
375
375
  }
376
376
  function ga(e, s, l) {
377
- const t = M();
377
+ const t = R();
378
378
  return be([l, e, s], () => {
379
379
  const a = l.value;
380
380
  e.value ? t.value = l.value ? ma(ae(e.value), b({
@@ -388,9 +388,9 @@ function ga(e, s, l) {
388
388
  }), t;
389
389
  }
390
390
  const ya = (e) => {
391
- const s = M({
391
+ const s = R({
392
392
  valueLabels: /* @__PURE__ */ new Map()
393
- }), l = M();
393
+ }), l = R();
394
394
  return be(e, () => {
395
395
  l.value = ae(e.value);
396
396
  }, {
@@ -398,37 +398,37 @@ const ya = (e) => {
398
398
  }), [y(() => {
399
399
  const {
400
400
  valueLabels: a
401
- } = s.value, n = /* @__PURE__ */ new Map(), o = l.value.map((r) => {
401
+ } = s.value, o = /* @__PURE__ */ new Map(), n = l.value.map((r) => {
402
402
  var d;
403
403
  const {
404
404
  value: c
405
405
  } = r, u = (d = r.label) !== null && d !== void 0 ? d : a.get(c);
406
- return n.set(c, u), b(b({}, r), {
406
+ return o.set(c, u), b(b({}, r), {
407
407
  label: u
408
408
  });
409
409
  });
410
- return s.value.valueLabels = n, o;
410
+ return s.value.valueLabels = o, n;
411
411
  })];
412
412
  }, ba = (e, s) => {
413
- const l = M(/* @__PURE__ */ new Map()), t = M({});
413
+ const l = R(/* @__PURE__ */ new Map()), t = R({});
414
414
  return Ge(() => {
415
- const a = s.value, n = Xt(e.value, {
415
+ const a = s.value, o = Xt(e.value, {
416
416
  fieldNames: a,
417
- initWrapper: (o) => b(b({}, o), {
417
+ initWrapper: (n) => b(b({}, n), {
418
418
  valueEntities: /* @__PURE__ */ new Map()
419
419
  }),
420
- processEntity: (o, r) => {
421
- const d = o.node[a.value];
422
- r.valueEntities.set(d, o);
420
+ processEntity: (n, r) => {
421
+ const d = n.node[a.value];
422
+ r.valueEntities.set(d, n);
423
423
  }
424
424
  });
425
- l.value = n.valueEntities, t.value = n.keyEntities;
425
+ l.value = o.valueEntities, t.value = o.keyEntities;
426
426
  }), {
427
427
  valueEntities: l,
428
428
  keyEntities: t
429
429
  };
430
- }, Ca = (e, s, l, t, a, n) => {
431
- const o = M([]), r = M([]);
430
+ }, Ca = (e, s, l, t, a, o) => {
431
+ const n = R([]), r = R([]);
432
432
  return Ge(() => {
433
433
  let d = e.value.map((f) => {
434
434
  let {
@@ -445,18 +445,18 @@ const ya = (e) => {
445
445
  l.value && ({
446
446
  checkedKeys: d,
447
447
  halfCheckedKeys: c
448
- } = Xe(d, !0, t.value, a.value, n.value)), o.value = Array.from(/* @__PURE__ */ new Set([...u, ...d])), r.value = c;
449
- }), [o, r];
448
+ } = Xe(d, !0, t.value, a.value, o.value)), n.value = Array.from(/* @__PURE__ */ new Set([...u, ...d])), r.value = c;
449
+ }), [n, r];
450
450
  }, Sa = (e, s, l) => {
451
451
  let {
452
452
  treeNodeFilterProp: t,
453
453
  filterTreeNode: a,
454
- fieldNames: n
454
+ fieldNames: o
455
455
  } = l;
456
456
  return y(() => {
457
457
  const {
458
- children: o
459
- } = n.value, r = s.value, d = t == null ? void 0 : t.value;
458
+ children: n
459
+ } = o.value, r = s.value, d = t == null ? void 0 : t.value;
460
460
  if (!r || a.value === !1)
461
461
  return e.value;
462
462
  let c;
@@ -473,9 +473,9 @@ const ya = (e) => {
473
473
  let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
474
474
  const w = [];
475
475
  for (let x = 0, S = f.length; x < S; x++) {
476
- const g = f[x], F = g[o], A = p || c(r, qe(g)), K = u(F || [], A);
476
+ const g = f[x], F = g[n], A = p || c(r, qe(g)), K = u(F || [], A);
477
477
  (A || K.length) && w.push(b(b({}, g), {
478
- [o]: K
478
+ [n]: K
479
479
  }));
480
480
  }
481
481
  return w;
@@ -484,7 +484,7 @@ const ya = (e) => {
484
484
  });
485
485
  };
486
486
  function ft() {
487
- return b(b({}, Ie(jt(), ["mode"])), {
487
+ return b(b({}, Ie($t(), ["mode"])), {
488
488
  prefixCls: String,
489
489
  id: String,
490
490
  value: {
@@ -633,7 +633,7 @@ const xa = Ve({
633
633
  props: ut(ft(), {
634
634
  treeNodeFilterProp: "value",
635
635
  autoClearSearchValue: !0,
636
- showCheckedStrategy: Je,
636
+ showCheckedStrategy: Qe,
637
637
  listHeight: 200,
638
638
  listItemHeight: 20,
639
639
  prefixCls: "vc-tree-select"
@@ -644,7 +644,7 @@ const xa = Ve({
644
644
  expose: t,
645
645
  slots: a
646
646
  } = s;
647
- const n = Mt(oe(e, "id")), o = y(() => e.treeCheckable && !e.treeCheckStrictly), r = y(() => e.treeCheckable || e.treeCheckStrictly), d = y(() => e.treeCheckStrictly || e.labelInValue), c = y(() => r.value || e.multiple), u = y(() => oa(e.fieldNames)), [f, p] = tt("", {
647
+ const o = Rt(oe(e, "id")), n = y(() => e.treeCheckable && !e.treeCheckStrictly), r = y(() => e.treeCheckable || e.treeCheckStrictly), d = y(() => e.treeCheckStrictly || e.labelInValue), c = y(() => r.value || e.multiple), u = y(() => oa(e.fieldNames)), [f, p] = tt("", {
648
648
  value: y(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
649
649
  postState: (i) => i || ""
650
650
  }), w = (i) => {
@@ -698,7 +698,7 @@ const xa = Ve({
698
698
  };
699
699
  }), [V, E] = tt(e.defaultValue, {
700
700
  value: oe(e, "value")
701
- }), D = y(() => O(V.value)), T = M([]), z = M([]);
701
+ }), D = y(() => O(V.value)), T = R([]), z = R([]);
702
702
  Ge(() => {
703
703
  const i = [], h = [];
704
704
  D.value.forEach((m) => {
@@ -706,12 +706,12 @@ const xa = Ve({
706
706
  }), T.value = i, z.value = h;
707
707
  });
708
708
  const Y = y(() => T.value.map((i) => i.value)), {
709
- maxLevel: B,
709
+ maxLevel: j,
710
710
  levelEntities: le
711
- } = Yt(S), [q, re] = Ca(T, z, o, S, B, le), se = y(() => {
711
+ } = Yt(S), [q, re] = Ca(T, z, n, S, j, le), se = y(() => {
712
712
  const m = ot(q.value, e.showCheckedStrategy, S.value, u.value).map((L) => {
713
- var I, N, R;
714
- return (R = (N = (I = S.value[L]) === null || I === void 0 ? void 0 : I.node) === null || N === void 0 ? void 0 : N[u.value.value]) !== null && R !== void 0 ? R : L;
713
+ var I, N, M;
714
+ return (M = (N = (I = S.value[L]) === null || I === void 0 ? void 0 : I.node) === null || N === void 0 ? void 0 : N[u.value.value]) !== null && M !== void 0 ? M : L;
715
715
  }).map((L) => {
716
716
  const I = T.value.find((N) => N.value === L);
717
717
  return {
@@ -729,7 +729,7 @@ const xa = Ve({
729
729
  const k = v(i);
730
730
  if (E(k), e.autoClearSearchValue && p(""), e.onChange) {
731
731
  let P = i;
732
- o.value && (P = ot(i, e.showCheckedStrategy, S.value, u.value).map((te) => {
732
+ n.value && (P = ot(i, e.showCheckedStrategy, S.value, u.value).map((te) => {
733
733
  const Se = g.value.get(te);
734
734
  return Se ? Se.node[u.value.value] : te;
735
735
  }));
@@ -742,18 +742,18 @@ const xa = Ve({
742
742
  };
743
743
  let N = P;
744
744
  if (e.treeCheckStrictly) {
745
- const j = z.value.filter((te) => !P.includes(te.value));
746
- N = [...N, ...j];
745
+ const $ = z.value.filter((te) => !P.includes(te.value));
746
+ N = [...N, ...$];
747
747
  }
748
- const R = v(N), Z = {
748
+ const M = v(N), Z = {
749
749
  // [Legacy] Always return as array contains label & value
750
750
  preValue: T.value,
751
751
  triggerValue: L
752
752
  };
753
753
  let ee = !0;
754
754
  (e.treeCheckStrictly || m === "selection" && !I) && (ee = !1), pa(Z, L, i, x.value, ee, u.value), r.value ? Z.checked = I : Z.selected = I;
755
- const $ = d.value ? R : R.map((j) => j.value);
756
- e.onChange(c.value ? $ : $[0], d.value ? null : R.map((j) => j.label), Z);
755
+ const B = d.value ? M : M.map(($) => $.value);
756
+ e.onChange(c.value ? B : B[0], d.value ? null : M.map(($) => $.label), Z);
757
757
  }
758
758
  }, G = (i, h) => {
759
759
  let {
@@ -761,35 +761,34 @@ const xa = Ve({
761
761
  source: k
762
762
  } = h;
763
763
  var P, L, I;
764
- const N = ae(S.value), R = ae(g.value), Z = N[i], ee = Z == null ? void 0 : Z.node, $ = (P = ee == null ? void 0 : ee[u.value.value]) !== null && P !== void 0 ? P : i;
764
+ const N = ae(S.value), M = ae(g.value), Z = N[i], ee = Z == null ? void 0 : Z.node, B = (P = ee == null ? void 0 : ee[u.value.value]) !== null && P !== void 0 ? P : i;
765
765
  if (!c.value)
766
- ne([$], {
766
+ ne([B], {
767
767
  selected: !0,
768
- triggerValue: $
768
+ triggerValue: B
769
769
  }, "option");
770
770
  else {
771
- let j = m ? [...Y.value, $] : q.value.filter((te) => te !== $);
772
- if (o.value) {
771
+ let $ = m ? [...Y.value, B] : q.value.filter((te) => te !== B);
772
+ if (n.value) {
773
773
  const {
774
774
  missingRawValues: te,
775
775
  existRawValues: Se
776
- } = F(j), Qe = Se.map((Re) => R.get(Re).key);
776
+ } = F($), Je = Se.map((Me) => M.get(Me).key);
777
777
  let He;
778
778
  m ? {
779
779
  checkedKeys: He
780
- } = Xe(Qe, !0, N, B.value, le.value) : {
780
+ } = Xe(Je, !0, N, j.value, le.value) : {
781
781
  checkedKeys: He
782
- } = Xe(Qe, {
783
- checked: !1,
782
+ } = Xe(Je, {
784
783
  halfCheckedKeys: re.value
785
- }, N, B.value, le.value), j = [...te, ...He.map((Re) => N[Re].node[u.value.value])];
784
+ }, N, j.value, le.value), $ = [...te, ...He.map((Me) => N[Me].node[u.value.value])];
786
785
  }
787
- ne(j, {
786
+ ne($, {
788
787
  selected: m,
789
- triggerValue: $
788
+ triggerValue: B
790
789
  }, k || "option");
791
790
  }
792
- m || !c.value ? (L = e.onSelect) === null || L === void 0 || L.call(e, $, qe(ee)) : (I = e.onDeselect) === null || I === void 0 || I.call(e, $, qe(ee));
791
+ m || !c.value ? (L = e.onSelect) === null || L === void 0 || L.call(e, B, qe(ee)) : (I = e.onDeselect) === null || I === void 0 || I.call(e, B, qe(ee));
793
792
  }, pe = (i) => {
794
793
  if (e.onDropdownVisibleChange) {
795
794
  const h = {};
@@ -817,7 +816,7 @@ const xa = Ve({
817
816
  onTreeLoad: _,
818
817
  // Expanded
819
818
  treeDefaultExpandAll: H,
820
- treeExpandedKeys: J,
819
+ treeExpandedKeys: Q,
821
820
  treeDefaultExpandedKeys: ke,
822
821
  onTreeExpand: Ne,
823
822
  // Options
@@ -834,7 +833,7 @@ const xa = Ve({
834
833
  dropdownMatchSelectWidth: Fe,
835
834
  treeExpandAction: Oe
836
835
  } = gt(e);
837
- Bt(lt({
836
+ jt(lt({
838
837
  checkable: r,
839
838
  loadData: ue,
840
839
  treeLoadedKeys: C,
@@ -842,7 +841,7 @@ const xa = Ve({
842
841
  checkedKeys: q,
843
842
  halfCheckedKeys: re,
844
843
  treeDefaultExpandAll: H,
845
- treeExpandedKeys: J,
844
+ treeExpandedKeys: Q,
846
845
  treeDefaultExpandedKeys: ke,
847
846
  onTreeExpand: Ne,
848
847
  treeIcon: Ce,
@@ -863,19 +862,19 @@ const xa = Ve({
863
862
  dropdownMatchSelectWidth: Fe,
864
863
  treeExpandAction: Oe
865
864
  }));
866
- const Q = fe();
865
+ const J = fe();
867
866
  return t({
868
867
  focus() {
869
868
  var i;
870
- (i = Q.value) === null || i === void 0 || i.focus();
869
+ (i = J.value) === null || i === void 0 || i.focus();
871
870
  },
872
871
  blur() {
873
872
  var i;
874
- (i = Q.value) === null || i === void 0 || i.blur();
873
+ (i = J.value) === null || i === void 0 || i.blur();
875
874
  },
876
875
  scrollTo(i) {
877
876
  var h;
878
- (h = Q.value) === null || h === void 0 || h.scrollTo(i);
877
+ (h = J.value) === null || h === void 0 || h.scrollTo(i);
879
878
  }
880
879
  }), () => {
881
880
  var i;
@@ -930,10 +929,10 @@ const xa = Ve({
930
929
  "switcherIcon",
931
930
  "treeMotion"
932
931
  ]);
933
- return U($t, X(X(X({
934
- ref: Q
932
+ return U(Bt, X(X(X({
933
+ ref: J
935
934
  }, l), h), {}, {
936
- id: n,
935
+ id: o,
937
936
  prefixCls: e.prefixCls,
938
937
  mode: c.value ? "multiple" : void 0,
939
938
  displayValues: ce.value,
@@ -1009,18 +1008,18 @@ const rt = (e, s, l) => l !== void 0 ? l : `${e}-${s}`;
1009
1008
  function ka() {
1010
1009
  return b(b({}, Ie(ft(), ["showTreeIcon", "treeMotion", "inputIcon", "getInputElement", "treeLine", "customSlots"])), {
1011
1010
  suffixIcon: ve.any,
1012
- size: je(),
1013
- bordered: Pt(),
1011
+ size: We(),
1012
+ bordered: At(),
1014
1013
  treeLine: Dt([Boolean, Object]),
1015
- replaceFields: At(),
1016
- placement: je(),
1017
- status: je(),
1014
+ replaceFields: Pt(),
1015
+ placement: We(),
1016
+ status: We(),
1018
1017
  popupClassName: String,
1019
1018
  /** @deprecated Please use `popupClassName` instead */
1020
1019
  dropdownClassName: String,
1021
- "onUpdate:value": We(),
1022
- "onUpdate:treeExpandedKeys": We(),
1023
- "onUpdate:searchValue": We()
1020
+ "onUpdate:value": $e(),
1021
+ "onUpdate:treeExpandedKeys": $e(),
1022
+ "onUpdate:searchValue": $e()
1024
1023
  });
1025
1024
  }
1026
1025
  const Ue = Ve({
@@ -1042,10 +1041,10 @@ const Ue = Ve({
1042
1041
  attrs: l,
1043
1042
  slots: t,
1044
1043
  expose: a,
1045
- emit: n
1044
+ emit: o
1046
1045
  } = s;
1047
- kt(!(e.treeData === void 0 && t.default)), $e(e.multiple !== !1 || !e.treeCheckable, "TreeSelect", "`multiple` will always be `true` when `treeCheckable` is true"), $e(e.replaceFields === void 0, "TreeSelect", "`replaceFields` is deprecated, please use fieldNames instead"), $e(!e.dropdownClassName, "TreeSelect", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
1048
- const o = Jt(), r = Qt.useInject(), d = y(() => Zt(r.status, e.status)), {
1046
+ kt(!(e.treeData === void 0 && t.default)), Be(e.multiple !== !1 || !e.treeCheckable, "TreeSelect", "`multiple` will always be `true` when `treeCheckable` is true"), Be(e.replaceFields === void 0, "TreeSelect", "`replaceFields` is deprecated, please use fieldNames instead"), Be(!e.dropdownClassName, "TreeSelect", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
1047
+ const n = Qt(), r = Jt.useInject(), d = y(() => Zt(r.status, e.status)), {
1049
1048
  prefixCls: c,
1050
1049
  renderEmpty: u,
1051
1050
  direction: f,
@@ -1061,8 +1060,8 @@ const Ue = Ve({
1061
1060
  } = Tt(c, f), O = y(() => A.value || x.value), v = Lt(), V = y(() => {
1062
1061
  var C;
1063
1062
  return (C = F.value) !== null && C !== void 0 ? C : v.value;
1064
- }), E = y(() => g()), D = y(() => e.placement !== void 0 ? e.placement : f.value === "rtl" ? "bottomRight" : "bottomLeft"), T = y(() => rt(E.value, Et(D.value), e.transitionName)), z = y(() => rt(E.value, "", e.choiceTransitionName)), Y = y(() => g("select-tree", e.prefixCls)), B = y(() => g("tree-select", e.prefixCls)), [le, q] = Wt(c), [re] = Ia(B, Y), se = y(() => at(e.popupClassName || e.dropdownClassName, `${B.value}-dropdown`, {
1065
- [`${B.value}-dropdown-rtl`]: f.value === "rtl"
1063
+ }), E = y(() => g()), D = y(() => e.placement !== void 0 ? e.placement : f.value === "rtl" ? "bottomRight" : "bottomLeft"), T = y(() => rt(E.value, Et(D.value), e.transitionName)), z = y(() => rt(E.value, "", e.choiceTransitionName)), Y = y(() => g("select-tree", e.prefixCls)), j = y(() => g("tree-select", e.prefixCls)), [le, q] = Wt(c), [re] = Ia(j, Y), se = y(() => at(e.popupClassName || e.dropdownClassName, `${j.value}-dropdown`, {
1064
+ [`${j.value}-dropdown-rtl`]: f.value === "rtl"
1066
1065
  }, q.value)), ce = y(() => !!(e.treeCheckable || e.multiple)), ne = y(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !ce.value), G = fe();
1067
1066
  a({
1068
1067
  focus() {
@@ -1077,18 +1076,18 @@ const Ue = Ve({
1077
1076
  const pe = function() {
1078
1077
  for (var C = arguments.length, _ = new Array(C), H = 0; H < C; H++)
1079
1078
  _[H] = arguments[H];
1080
- n("update:value", _[0]), n("change", ..._), o.onFieldChange();
1079
+ o("update:value", _[0]), o("change", ..._), n.onFieldChange();
1081
1080
  }, me = (C) => {
1082
- n("update:treeExpandedKeys", C), n("treeExpand", C);
1081
+ o("update:treeExpandedKeys", C), o("treeExpand", C);
1083
1082
  }, ge = (C) => {
1084
- n("update:searchValue", C), n("search", C);
1083
+ o("update:searchValue", C), o("search", C);
1085
1084
  }, ue = (C) => {
1086
- n("blur", C), o.onFieldBlur();
1085
+ o("blur", C), n.onFieldBlur();
1087
1086
  };
1088
1087
  return () => {
1089
1088
  var C, _, H;
1090
1089
  const {
1091
- notFoundContent: J = (C = t.notFoundContent) === null || C === void 0 ? void 0 : C.call(t),
1090
+ notFoundContent: Q = (C = t.notFoundContent) === null || C === void 0 ? void 0 : C.call(t),
1092
1091
  prefixCls: ke,
1093
1092
  bordered: Ne,
1094
1093
  listHeight: Te,
@@ -1099,11 +1098,11 @@ const Ue = Ve({
1099
1098
  showArrow: Pe,
1100
1099
  switcherIcon: De = (_ = t.switcherIcon) === null || _ === void 0 ? void 0 : _.call(t),
1101
1100
  fieldNames: Ae = e.replaceFields,
1102
- id: Ke = o.id.value,
1101
+ id: Ke = n.id.value,
1103
1102
  placeholder: Fe = (H = t.placeholder) === null || H === void 0 ? void 0 : H.call(t)
1104
1103
  } = e, {
1105
1104
  isFormItemInput: Oe,
1106
- hasFeedback: Q,
1105
+ hasFeedback: J,
1107
1106
  feedbackIcon: i
1108
1107
  } = r, {
1109
1108
  suffixIcon: h,
@@ -1112,19 +1111,19 @@ const Ue = Ve({
1112
1111
  } = Ut(b(b({}, e), {
1113
1112
  multiple: ce.value,
1114
1113
  showArrow: ne.value,
1115
- hasFeedback: Q,
1114
+ hasFeedback: J,
1116
1115
  feedbackIcon: i,
1117
1116
  prefixCls: c.value
1118
1117
  }), t);
1119
1118
  let P;
1120
- J !== void 0 ? P = J : P = u("Select");
1121
- const L = Ie(e, ["suffixIcon", "itemIcon", "removeIcon", "clearIcon", "switcherIcon", "bordered", "status", "onUpdate:value", "onUpdate:treeExpandedKeys", "onUpdate:searchValue"]), I = at(!ke && B.value, {
1119
+ Q !== void 0 ? P = Q : P = u("Select");
1120
+ const L = Ie(e, ["suffixIcon", "itemIcon", "removeIcon", "clearIcon", "switcherIcon", "bordered", "status", "onUpdate:value", "onUpdate:treeExpandedKeys", "onUpdate:searchValue"]), I = at(!ke && j.value, {
1122
1121
  [`${c.value}-lg`]: O.value === "large",
1123
1122
  [`${c.value}-sm`]: O.value === "small",
1124
1123
  [`${c.value}-rtl`]: f.value === "rtl",
1125
1124
  [`${c.value}-borderless`]: !Ne,
1126
1125
  [`${c.value}-in-form-item`]: Oe
1127
- }, ea(c.value, d.value, Q), K.value, l.class, q.value), N = {};
1126
+ }, ea(c.value, d.value, J), K.value, l.class, q.value), N = {};
1128
1127
  return e.treeData === void 0 && t.default && (N.children = _t(t.default())), le(re(U(xa, X(X(X(X({}, l), L), {}, {
1129
1128
  disabled: V.value,
1130
1129
  virtual: p.value,
@@ -1141,7 +1140,7 @@ const Ue = Ve({
1141
1140
  multiple: Ee,
1142
1141
  removeIcon: m,
1143
1142
  clearIcon: k,
1144
- switcherIcon: (R) => ta(Y.value, De, R, t.leafIcon, Ce),
1143
+ switcherIcon: (M) => ta(Y.value, De, M, t.leafIcon, Ce),
1145
1144
  showTreeIcon: _e,
1146
1145
  notFoundContent: P,
1147
1146
  getPopupContainer: S == null ? void 0 : S.value,
@@ -1161,7 +1160,7 @@ const Ue = Ve({
1161
1160
  }),
1162
1161
  maxTagPlaceholder: e.maxTagPlaceholder || t.maxTagPlaceholder,
1163
1162
  placement: D.value,
1164
- showArrow: Q || Pe,
1163
+ showArrow: J || Pe,
1165
1164
  placeholder: Fe
1166
1165
  }), b(b({}, t), {
1167
1166
  treeCheckable: () => U("span", {
@@ -1174,15 +1173,15 @@ const Ue = Ve({
1174
1173
  TreeNode: he,
1175
1174
  SHOW_ALL: da,
1176
1175
  SHOW_PARENT: vt,
1177
- SHOW_CHILD: Je,
1176
+ SHOW_CHILD: Qe,
1178
1177
  install: (e) => (e.component(Ue.name, Ue), e.component(st.displayName, st), e)
1179
1178
  }), ze = yt({});
1180
1179
  function Na(e) {
1181
1180
  return be(() => e.categoryList, (s) => {
1182
1181
  s.forEach(async (l) => {
1183
1182
  if (!ze[l.id]) {
1184
- const t = await Kt.getCategoryValues(l.id), { flatAttributeValue: a, treeAttributeValue: n, showWay: o } = t.body;
1185
- ze[l.id] = o === "TREE" ? n : a;
1183
+ const t = await Kt.getCategoryValues(l.id), { flatAttributeValue: a, treeAttributeValue: o, showWay: n } = t.body;
1184
+ ze[l.id] = n === "TREE" ? o : a;
1186
1185
  }
1187
1186
  });
1188
1187
  }, { immediate: !0, deep: !0 }), {
@@ -1206,26 +1205,30 @@ const Ta = { class: "crane-required" }, La = { class: "crane-category-tips" }, E
1206
1205
  setup(e, { expose: s }) {
1207
1206
  const l = ct.SHOW_PARENT, t = e, a = y(() => ({
1208
1207
  categoryList: t.categoryList
1209
- })), n = y(() => Object.values(d).some((u) => u.length > 0)), o = fe(), r = fe(""), { categoryValuesMap: d } = Na(t);
1208
+ })), o = y(() => Object.values(d).some((u) => u.length > 0)), n = fe(), r = fe(""), { categoryValuesMap: d } = Na(t);
1210
1209
  return s({
1211
1210
  validate: () => new Promise((u, f) => {
1212
- o.value.validate().then(() => {
1211
+ if (!n.value) {
1212
+ u(!0);
1213
+ return;
1214
+ }
1215
+ n.value.validate().then(() => {
1213
1216
  u(!0);
1214
1217
  }).catch(() => {
1215
1218
  f(!1);
1216
1219
  });
1217
1220
  })
1218
- }), (u, f) => n.value ? (ie(), Ze(W(la), {
1221
+ }), (u, f) => o.value ? (ie(), Ze(W(la), {
1219
1222
  key: 0,
1220
1223
  class: "crane-category-wraper",
1221
1224
  model: a.value,
1222
1225
  ref_key: "formRef",
1223
- ref: o
1226
+ ref: n
1224
1227
  }, {
1225
- default: Me(() => [
1226
- Be("div", Ta, ye(W(xe)("category")), 1),
1227
- Be("div", La, ye(W(xe)("categotySelectTips")), 1),
1228
- f[1] || (f[1] = Be("div", { class: "crane-category-line" }, null, -1)),
1228
+ default: Re(() => [
1229
+ je("div", Ta, ye(W(xe)("category")), 1),
1230
+ je("div", La, ye(W(xe)("categotySelectTips")), 1),
1231
+ f[1] || (f[1] = je("div", { class: "crane-category-line" }, null, -1)),
1229
1232
  (ie(!0), we(bt, null, Ct(a.value.categoryList, (p, w) => {
1230
1233
  var x;
1231
1234
  return St((ie(), Ze(W(aa), {
@@ -1234,7 +1237,7 @@ const Ta = { class: "crane-required" }, La = { class: "crane-category-tips" }, E
1234
1237
  name: ["categoryList", w, "attributeValueIds_view"],
1235
1238
  rules: [{ required: !0, message: W(xe)("pleaseChoose"), trigger: ["change", "blur"] }]
1236
1239
  }, {
1237
- default: Me(() => {
1240
+ default: Re(() => {
1238
1241
  var S;
1239
1242
  return [
1240
1243
  U(W(ct), {
@@ -1252,7 +1255,7 @@ const Ta = { class: "crane-required" }, La = { class: "crane-category-tips" }, E
1252
1255
  treeNodeLabelProp: "attributeName",
1253
1256
  "show-checked-strategy": W(l)
1254
1257
  }, {
1255
- title: Me(({ attributeName: g }) => [
1258
+ title: Re(({ attributeName: g }) => [
1256
1259
  r.value.toLowerCase() && g.includes(r.value.toLowerCase()) ? (ie(), we("span", Ea, ye(g), 1)) : (ie(), we("span", _a, ye(g), 1))
1257
1260
  ]),
1258
1261
  _: 2
@@ -1266,10 +1269,11 @@ const Ta = { class: "crane-required" }, La = { class: "crane-category-tips" }, E
1266
1269
  ]);
1267
1270
  }), 128))
1268
1271
  ]),
1269
- _: 1
1272
+ _: 1,
1273
+ __: [1]
1270
1274
  }, 8, ["model"])) : et("", !0);
1271
1275
  }
1272
- }), Ha = /* @__PURE__ */ Ft(Da, [["__scopeId", "data-v-1b90e3f1"]]);
1276
+ }), Ha = /* @__PURE__ */ Ft(Da, [["__scopeId", "data-v-5a082038"]]);
1273
1277
  export {
1274
1278
  Ha as default
1275
1279
  };