@witlink/usercenter 1.0.0

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 (49) hide show
  1. package/README.md +155 -0
  2. package/dist/404.e6ab6ba0.mjs +10 -0
  3. package/dist/Card.71482621.mjs +1078 -0
  4. package/dist/DictEx.754c617b.mjs +156 -0
  5. package/dist/FooterToolBar.2546fb1f.mjs +33 -0
  6. package/dist/RegionSelect.5272534b.mjs +71 -0
  7. package/dist/Standard.64ae6a8d.mjs +113 -0
  8. package/dist/WebClient.0ac67ce0.mjs +153 -0
  9. package/dist/assets/FooterToolBar.d4297046.css +1 -0
  10. package/dist/assets/Standard.badeec91.css +1 -0
  11. package/dist/assets/WebClient.2a3e464e.css +1 -0
  12. package/dist/assets/index.01a0fb63.css +1 -0
  13. package/dist/assets/index.19e5ba4c.css +1 -0
  14. package/dist/assets/index.2164de3b.css +1 -0
  15. package/dist/assets/index.269f5360.css +1 -0
  16. package/dist/assets/index.28bdbdc3.css +1 -0
  17. package/dist/assets/index.3150518d.css +1 -0
  18. package/dist/assets/index.3a0797c4.css +1 -0
  19. package/dist/assets/index.53c37fa8.css +1 -0
  20. package/dist/assets/index.7c8e2d8f.css +1 -0
  21. package/dist/assets/index.b965b94b.css +1 -0
  22. package/dist/assets/index.fb7724ee.css +1 -0
  23. package/dist/index.003313e6.mjs +69436 -0
  24. package/dist/index.05ef920d.mjs +1129 -0
  25. package/dist/index.1953dbda.mjs +498 -0
  26. package/dist/index.1af0e30d.mjs +10 -0
  27. package/dist/index.2242d1a7.mjs +125 -0
  28. package/dist/index.2291c8e2.mjs +125 -0
  29. package/dist/index.3c2af165.mjs +761 -0
  30. package/dist/index.919ac6b4.mjs +7431 -0
  31. package/dist/index.941a34c0.mjs +874 -0
  32. package/dist/index.96479524.mjs +754 -0
  33. package/dist/index.9803c44f.mjs +125 -0
  34. package/dist/index.a000e9cf.mjs +1445 -0
  35. package/dist/index.b3eb7c5d.mjs +10 -0
  36. package/dist/index.c9138cba.mjs +1104 -0
  37. package/dist/index.ceea88a4.mjs +1073 -0
  38. package/dist/index.da7dd593.mjs +10 -0
  39. package/dist/index.e271ee9d.mjs +643 -0
  40. package/dist/index.e7802e27.mjs +786 -0
  41. package/dist/index.ef2e93a1.mjs +386 -0
  42. package/dist/index.f701b909.mjs +142 -0
  43. package/dist/index.f9becca6.mjs +6 -0
  44. package/dist/index.fa4bb855.mjs +7645 -0
  45. package/dist/index.html +1 -0
  46. package/dist/use-dict-by-type.c90c1d31.mjs +24 -0
  47. package/dist/usercenter.umd.js +6237 -0
  48. package/package.json +26 -0
  49. package/version.md +2 -0
@@ -0,0 +1,1104 @@
1
+ import { d as k, T as Fe, a2 as je, bj as be, bk as ye, ab as We, al as Y, f as Z, i as Ae, bl as He, af as Oe, a4 as oe, q as we, bm as Be, bn as ze, an as Xe, P as Se, j as Ue, aw as qe, b5 as Ge, aG as Ye, u as Je, n as Qe, be as Ze, p as et, bf as tt, o as nt, bo as lt, e as at, bp as ot, bq as st, ar as it, br as rt, bg as ct, bs as Ve, bt as ut } from "./index.003313e6.mjs";
2
+ import { computed as S, shallowRef as Ee, ref as q, watchEffect as ie, provide as dt, inject as vt, watch as De, createVNode as T, defineComponent as xe, onMounted as pt, toRef as pe, toRefs as ht } from "vue";
3
+ import { a as ft, b as gt, d as Ce, r as mt } from "./index.96479524.mjs";
4
+ const Ie = "__RC_CASCADER_SPLIT__", Te = "SHOW_PARENT", $e = "SHOW_CHILD";
5
+ function ee(e) {
6
+ return e.join(Ie);
7
+ }
8
+ function se(e) {
9
+ return e.map(ee);
10
+ }
11
+ function Ct(e) {
12
+ return e.split(Ie);
13
+ }
14
+ function bt(e) {
15
+ const {
16
+ label: l,
17
+ value: t,
18
+ children: a
19
+ } = e || {}, n = t || "value";
20
+ return {
21
+ label: l || "label",
22
+ value: n,
23
+ key: n,
24
+ children: a || "children"
25
+ };
26
+ }
27
+ function ce(e, l) {
28
+ var t, a;
29
+ return (t = e.isLeaf) !== null && t !== void 0 ? t : !(!((a = e[l.children]) === null || a === void 0) && a.length);
30
+ }
31
+ function St(e) {
32
+ const l = e.parentElement;
33
+ if (!l)
34
+ return;
35
+ const t = e.offsetTop - l.offsetTop;
36
+ t - l.scrollTop < 0 ? l.scrollTo({
37
+ top: t
38
+ }) : t + e.offsetHeight - l.scrollTop > l.offsetHeight && l.scrollTo({
39
+ top: t + e.offsetHeight - l.offsetHeight
40
+ });
41
+ }
42
+ const yt = (e, l) => S(() => ft(e.value, {
43
+ fieldNames: l.value,
44
+ initWrapper: (a) => k(k({}, a), {
45
+ pathKeyEntities: {}
46
+ }),
47
+ processEntity: (a, n) => {
48
+ const i = a.nodes.map((c) => c[l.value.value]).join(Ie);
49
+ n.pathKeyEntities[i] = a, a.key = i;
50
+ }
51
+ }).pathKeyEntities);
52
+ function wt(e) {
53
+ const l = Ee(!1), t = q({});
54
+ return ie(() => {
55
+ if (!e.value) {
56
+ l.value = !1, t.value = {};
57
+ return;
58
+ }
59
+ let a = {
60
+ matchInputWidth: !0,
61
+ limit: 50
62
+ };
63
+ e.value && typeof e.value == "object" && (a = k(k({}, a), e.value)), a.limit <= 0 && (delete a.limit, process.env.NODE_ENV !== "production" && Fe(!1, "'limit' of showSearch should be positive number or false.")), l.value = !0, t.value = a;
64
+ }), {
65
+ showSearch: l,
66
+ searchConfig: t
67
+ };
68
+ }
69
+ const ue = "__rc_cascader_search_mark__", xt = (e, l, t) => {
70
+ let {
71
+ label: a
72
+ } = t;
73
+ return l.some((n) => String(n[a]).toLowerCase().includes(e.toLowerCase()));
74
+ }, It = (e) => {
75
+ let {
76
+ path: l,
77
+ fieldNames: t
78
+ } = e;
79
+ return l.map((a) => a[t.label]).join(" / ");
80
+ }, Pt = (e, l, t, a, n, i) => S(() => {
81
+ const {
82
+ filter: c = xt,
83
+ render: d = It,
84
+ limit: v = 50,
85
+ sort: r
86
+ } = n.value, o = [];
87
+ if (!e.value)
88
+ return [];
89
+ function C(P, y) {
90
+ P.forEach((D) => {
91
+ if (!r && v > 0 && o.length >= v)
92
+ return;
93
+ const g = [...y, D], w = D[t.value.children];
94
+ (!w || w.length === 0 || i.value) && c(e.value, g, {
95
+ label: t.value.label
96
+ }) && o.push(k(k({}, D), {
97
+ [t.value.label]: d({
98
+ inputValue: e.value,
99
+ path: g,
100
+ prefixCls: a.value,
101
+ fieldNames: t.value
102
+ }),
103
+ [ue]: g
104
+ })), w && C(D[t.value.children], g);
105
+ });
106
+ }
107
+ return C(l.value, []), r && o.sort((P, y) => r(P[ue], y[ue], e.value, t.value)), v > 0 ? o.slice(0, v) : o;
108
+ });
109
+ function ke(e, l, t) {
110
+ const a = new Set(e);
111
+ return e.filter((n) => {
112
+ const i = l[n], c = i ? i.parent : null, d = i ? i.children : null;
113
+ return t === $e ? !(d && d.some((v) => v.key && a.has(v.key))) : !(c && !c.node.disabled && a.has(c.key));
114
+ });
115
+ }
116
+ function de(e, l, t) {
117
+ let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
118
+ var n;
119
+ let i = l;
120
+ const c = [];
121
+ for (let d = 0; d < e.length; d += 1) {
122
+ const v = e[d], r = i == null ? void 0 : i.findIndex((C) => {
123
+ const P = C[t.value];
124
+ return a ? String(P) === String(v) : P === v;
125
+ }), o = r !== -1 ? i == null ? void 0 : i[r] : null;
126
+ c.push({
127
+ value: (n = o == null ? void 0 : o[t.value]) !== null && n !== void 0 ? n : v,
128
+ index: r,
129
+ option: o
130
+ }), i = o == null ? void 0 : o[t.children];
131
+ }
132
+ return c;
133
+ }
134
+ const Ot = (e, l, t) => S(() => {
135
+ const a = [], n = [];
136
+ return t.value.forEach((i) => {
137
+ de(i, e.value, l.value).every((d) => d.option) ? n.push(i) : a.push(i);
138
+ }), [n, a];
139
+ }), Vt = (e, l, t, a, n) => S(() => {
140
+ const i = n.value || ((c) => {
141
+ let {
142
+ labels: d
143
+ } = c;
144
+ const v = a.value ? d.slice(-1) : d, r = " / ";
145
+ return v.every((o) => ["string", "number"].includes(typeof o)) ? v.join(r) : v.reduce((o, C, P) => {
146
+ const y = je(C) ? be(C, {
147
+ key: P
148
+ }) : C;
149
+ return P === 0 ? [y] : [...o, r, y];
150
+ }, []);
151
+ });
152
+ return e.value.map((c) => {
153
+ const d = de(c, l.value, t.value), v = i({
154
+ labels: d.map((o) => {
155
+ let {
156
+ option: C,
157
+ value: P
158
+ } = o;
159
+ var y;
160
+ return (y = C == null ? void 0 : C[t.value.label]) !== null && y !== void 0 ? y : P;
161
+ }),
162
+ selectedOptions: d.map((o) => {
163
+ let {
164
+ option: C
165
+ } = o;
166
+ return C;
167
+ })
168
+ }), r = ee(c);
169
+ return {
170
+ label: v,
171
+ value: r,
172
+ key: r,
173
+ valueCells: c
174
+ };
175
+ });
176
+ }), Re = Symbol("CascaderContextKey"), kt = (e) => {
177
+ dt(Re, e);
178
+ }, he = () => vt(Re), _t = () => {
179
+ const e = ye(), {
180
+ values: l
181
+ } = he(), [t, a] = We([]);
182
+ return De(() => e.open, () => {
183
+ if (e.open && !e.multiple) {
184
+ const n = l.value[0];
185
+ a(n || []);
186
+ }
187
+ }, {
188
+ immediate: !0
189
+ }), [t, a];
190
+ }, At = (e, l, t, a, n, i) => {
191
+ const c = ye(), d = S(() => c.direction === "rtl"), [v, r, o] = [q([]), q(), q([])];
192
+ ie(() => {
193
+ let g = -1, w = l.value;
194
+ const p = [], x = [], E = a.value.length;
195
+ for (let _ = 0; _ < E && w; _ += 1) {
196
+ const R = w.findIndex(($) => $[t.value.value] === a.value[_]);
197
+ if (R === -1)
198
+ break;
199
+ g = R, p.push(g), x.push(a.value[_]), w = w[g][t.value.children];
200
+ }
201
+ let O = l.value;
202
+ for (let _ = 0; _ < p.length - 1; _ += 1)
203
+ O = O[p[_]][t.value.children];
204
+ [v.value, r.value, o.value] = [x, g, O];
205
+ });
206
+ const C = (g) => {
207
+ n(g);
208
+ }, P = (g) => {
209
+ const w = o.value.length;
210
+ let p = r.value;
211
+ p === -1 && g < 0 && (p = w);
212
+ for (let x = 0; x < w; x += 1) {
213
+ p = (p + g + w) % w;
214
+ const E = o.value[p];
215
+ if (E && !E.disabled) {
216
+ const O = E[t.value.value], _ = v.value.slice(0, -1).concat(O);
217
+ C(_);
218
+ return;
219
+ }
220
+ }
221
+ }, y = () => {
222
+ if (v.value.length > 1) {
223
+ const g = v.value.slice(0, -1);
224
+ C(g);
225
+ } else
226
+ c.toggleOpen(!1);
227
+ }, D = () => {
228
+ var g;
229
+ const p = (((g = o.value[r.value]) === null || g === void 0 ? void 0 : g[t.value.children]) || []).find((x) => !x.disabled);
230
+ if (p) {
231
+ const x = [...v.value, p[t.value.value]];
232
+ C(x);
233
+ }
234
+ };
235
+ e.expose({
236
+ onKeydown: (g) => {
237
+ const {
238
+ which: w
239
+ } = g;
240
+ switch (w) {
241
+ case Y.UP:
242
+ case Y.DOWN: {
243
+ let p = 0;
244
+ w === Y.UP ? p = -1 : w === Y.DOWN && (p = 1), p !== 0 && P(p);
245
+ break;
246
+ }
247
+ case Y.LEFT: {
248
+ d.value ? D() : y();
249
+ break;
250
+ }
251
+ case Y.RIGHT: {
252
+ d.value ? y() : D();
253
+ break;
254
+ }
255
+ case Y.BACKSPACE: {
256
+ c.searchValue || y();
257
+ break;
258
+ }
259
+ case Y.ENTER: {
260
+ if (v.value.length) {
261
+ const p = o.value[r.value], x = (p == null ? void 0 : p[ue]) || [];
262
+ x.length ? i(x.map((E) => E[t.value.value]), x[x.length - 1]) : i(v.value, p);
263
+ }
264
+ break;
265
+ }
266
+ case Y.ESC:
267
+ c.toggleOpen(!1), open && g.stopPropagation();
268
+ }
269
+ },
270
+ onKeyup: () => {
271
+ }
272
+ });
273
+ };
274
+ function fe(e) {
275
+ let {
276
+ prefixCls: l,
277
+ checked: t,
278
+ halfChecked: a,
279
+ disabled: n,
280
+ onClick: i
281
+ } = e;
282
+ const {
283
+ customSlots: c,
284
+ checkable: d
285
+ } = he(), v = d.value !== !1 ? c.value.checkable : d.value, r = typeof v == "function" ? v() : typeof v == "boolean" ? null : v;
286
+ return T("span", {
287
+ class: {
288
+ [l]: !0,
289
+ [`${l}-checked`]: t,
290
+ [`${l}-indeterminate`]: !t && a,
291
+ [`${l}-disabled`]: n
292
+ },
293
+ onClick: i
294
+ }, [r]);
295
+ }
296
+ fe.props = ["prefixCls", "checked", "halfChecked", "disabled", "onClick"];
297
+ fe.displayName = "Checkbox";
298
+ fe.inheritAttrs = !1;
299
+ const Ne = "__cascader_fix_label__";
300
+ function ge(e) {
301
+ let {
302
+ prefixCls: l,
303
+ multiple: t,
304
+ options: a,
305
+ activeValue: n,
306
+ prevValuePath: i,
307
+ onToggleOpen: c,
308
+ onSelect: d,
309
+ onActive: v,
310
+ checkedSet: r,
311
+ halfCheckedSet: o,
312
+ loadingKeys: C,
313
+ isSelectable: P
314
+ } = e;
315
+ var y, D, g, w, p, x;
316
+ const E = `${l}-menu`, O = `${l}-menu-item`, {
317
+ fieldNames: _,
318
+ changeOnSelect: R,
319
+ expandTrigger: $,
320
+ expandIcon: X,
321
+ loadingIcon: J,
322
+ dropdownMenuColumnStyle: U,
323
+ customSlots: M
324
+ } = he(), F = (y = X.value) !== null && y !== void 0 ? y : (g = (D = M.value).expandIcon) === null || g === void 0 ? void 0 : g.call(D), j = (w = J.value) !== null && w !== void 0 ? w : (x = (p = M.value).loadingIcon) === null || x === void 0 ? void 0 : x.call(p), te = $.value === "hover";
325
+ return T("ul", {
326
+ class: E,
327
+ role: "menu"
328
+ }, [a.map((N) => {
329
+ var h;
330
+ const {
331
+ disabled: I
332
+ } = N, s = N[ue], b = (h = N[Ne]) !== null && h !== void 0 ? h : N[_.value.label], m = N[_.value.value], V = ce(N, _.value), K = s ? s.map((u) => u[_.value.value]) : [...i, m], W = ee(K), H = C.includes(W), Q = r.has(W), ne = o.has(W), le = () => {
333
+ !I && (!te || !V) && v(K);
334
+ }, B = () => {
335
+ P(N) && d(K, V);
336
+ };
337
+ let G;
338
+ return typeof N.title == "string" ? G = N.title : typeof b == "string" && (G = b), T("li", {
339
+ key: W,
340
+ class: [O, {
341
+ [`${O}-expand`]: !V,
342
+ [`${O}-active`]: n === m,
343
+ [`${O}-disabled`]: I,
344
+ [`${O}-loading`]: H
345
+ }],
346
+ style: U.value,
347
+ role: "menuitemcheckbox",
348
+ title: G,
349
+ "aria-checked": Q,
350
+ "data-path-key": W,
351
+ onClick: () => {
352
+ le(), (!t || V) && B();
353
+ },
354
+ onDblclick: () => {
355
+ R.value && c(!1);
356
+ },
357
+ onMouseenter: () => {
358
+ te && le();
359
+ },
360
+ onMousedown: (u) => {
361
+ u.preventDefault();
362
+ }
363
+ }, [t && T(fe, {
364
+ prefixCls: `${l}-checkbox`,
365
+ checked: Q,
366
+ halfChecked: ne,
367
+ disabled: I,
368
+ onClick: (u) => {
369
+ u.stopPropagation(), B();
370
+ }
371
+ }, null), T("div", {
372
+ class: `${O}-content`
373
+ }, [b]), !H && F && !V && T("div", {
374
+ class: `${O}-expand-icon`
375
+ }, [be(F)]), H && j && T("div", {
376
+ class: `${O}-loading-icon`
377
+ }, [be(j)])]);
378
+ })]);
379
+ }
380
+ ge.props = ["prefixCls", "multiple", "options", "activeValue", "prevValuePath", "onToggleOpen", "onSelect", "onActive", "checkedSet", "halfCheckedSet", "loadingKeys", "isSelectable"];
381
+ ge.displayName = "Column";
382
+ ge.inheritAttrs = !1;
383
+ const Et = xe({
384
+ compatConfig: {
385
+ MODE: 3
386
+ },
387
+ name: "OptionList",
388
+ inheritAttrs: !1,
389
+ setup(e, l) {
390
+ const {
391
+ attrs: t,
392
+ slots: a
393
+ } = l, n = ye(), i = q(), c = S(() => n.direction === "rtl"), {
394
+ options: d,
395
+ values: v,
396
+ halfValues: r,
397
+ fieldNames: o,
398
+ changeOnSelect: C,
399
+ onSelect: P,
400
+ searchOptions: y,
401
+ dropdownPrefixCls: D,
402
+ loadData: g,
403
+ expandTrigger: w,
404
+ customSlots: p
405
+ } = he(), x = S(() => D.value || n.prefixCls), E = Ee([]), O = (h) => {
406
+ if (!g.value || n.searchValue)
407
+ return;
408
+ const s = de(h, d.value, o.value).map((m) => {
409
+ let {
410
+ option: V
411
+ } = m;
412
+ return V;
413
+ }), b = s[s.length - 1];
414
+ if (b && !ce(b, o.value)) {
415
+ const m = ee(h);
416
+ E.value = [...E.value, m], g.value(s);
417
+ }
418
+ };
419
+ ie(() => {
420
+ E.value.length && E.value.forEach((h) => {
421
+ const I = Ct(h), s = de(I, d.value, o.value, !0).map((m) => {
422
+ let {
423
+ option: V
424
+ } = m;
425
+ return V;
426
+ }), b = s[s.length - 1];
427
+ (!b || b[o.value.children] || ce(b, o.value)) && (E.value = E.value.filter((m) => m !== h));
428
+ });
429
+ });
430
+ const _ = S(() => new Set(se(v.value))), R = S(() => new Set(se(r.value))), [$, X] = _t(), J = (h) => {
431
+ X(h), O(h);
432
+ }, U = (h) => {
433
+ const {
434
+ disabled: I
435
+ } = h, s = ce(h, o.value);
436
+ return !I && (s || C.value || n.multiple);
437
+ }, M = function(h, I) {
438
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
439
+ P(h), !n.multiple && (I || C.value && (w.value === "hover" || s)) && n.toggleOpen(!1);
440
+ }, F = S(() => n.searchValue ? y.value : d.value), j = S(() => {
441
+ const h = [{
442
+ options: F.value
443
+ }];
444
+ let I = F.value;
445
+ for (let s = 0; s < $.value.length; s += 1) {
446
+ const b = $.value[s], m = I.find((K) => K[o.value.value] === b), V = m == null ? void 0 : m[o.value.children];
447
+ if (!(V != null && V.length))
448
+ break;
449
+ I = V, h.push({
450
+ options: V
451
+ });
452
+ }
453
+ return h;
454
+ });
455
+ At(l, F, o, $, J, (h, I) => {
456
+ U(I) && M(h, ce(I, o.value), !0);
457
+ });
458
+ const N = (h) => {
459
+ h.preventDefault();
460
+ };
461
+ return pt(() => {
462
+ De($, (h) => {
463
+ var I;
464
+ for (let s = 0; s < h.length; s += 1) {
465
+ const b = h.slice(0, s + 1), m = ee(b), V = (I = i.value) === null || I === void 0 ? void 0 : I.querySelector(`li[data-path-key="${m.replace(/\\{0,2}"/g, '\\"')}"]`);
466
+ V && St(V);
467
+ }
468
+ }, {
469
+ flush: "post",
470
+ immediate: !0
471
+ });
472
+ }), () => {
473
+ var h, I, s, b, m;
474
+ const {
475
+ notFoundContent: V = ((h = a.notFoundContent) === null || h === void 0 ? void 0 : h.call(a)) || ((s = (I = p.value).notFoundContent) === null || s === void 0 ? void 0 : s.call(I)),
476
+ multiple: K,
477
+ toggleOpen: W
478
+ } = n, H = !(!((m = (b = j.value[0]) === null || b === void 0 ? void 0 : b.options) === null || m === void 0) && m.length), Q = [{
479
+ [o.value.value]: "__EMPTY__",
480
+ [Ne]: V,
481
+ disabled: !0
482
+ }], ne = k(k({}, t), {
483
+ multiple: !H && K,
484
+ onSelect: M,
485
+ onActive: J,
486
+ onToggleOpen: W,
487
+ checkedSet: _.value,
488
+ halfCheckedSet: R.value,
489
+ loadingKeys: E.value,
490
+ isSelectable: U
491
+ }), B = (H ? [{
492
+ options: Q
493
+ }] : j.value).map((G, u) => {
494
+ const f = $.value.slice(0, u), A = $.value[u];
495
+ return T(ge, Z(Z({
496
+ key: u
497
+ }, ne), {}, {
498
+ prefixCls: x.value,
499
+ options: G.options,
500
+ prevValuePath: f,
501
+ activeValue: A
502
+ }), null);
503
+ });
504
+ return T("div", {
505
+ class: [`${x.value}-menus`, {
506
+ [`${x.value}-menu-empty`]: H,
507
+ [`${x.value}-rtl`]: c.value
508
+ }],
509
+ onMousedown: N,
510
+ ref: i
511
+ }, [B]);
512
+ };
513
+ }
514
+ });
515
+ function Dt() {
516
+ return k(k({}, we(ze(), ["tokenSeparators", "mode", "showSearch"])), {
517
+ id: String,
518
+ prefixCls: String,
519
+ fieldNames: Xe(),
520
+ children: Array,
521
+ value: {
522
+ type: [String, Number, Array]
523
+ },
524
+ defaultValue: {
525
+ type: [String, Number, Array]
526
+ },
527
+ changeOnSelect: {
528
+ type: Boolean,
529
+ default: void 0
530
+ },
531
+ displayRender: Function,
532
+ checkable: {
533
+ type: Boolean,
534
+ default: void 0
535
+ },
536
+ showCheckedStrategy: {
537
+ type: String,
538
+ default: Te
539
+ },
540
+ showSearch: {
541
+ type: [Boolean, Object],
542
+ default: void 0
543
+ },
544
+ searchValue: String,
545
+ onSearch: Function,
546
+ expandTrigger: String,
547
+ options: Array,
548
+ dropdownPrefixCls: String,
549
+ loadData: Function,
550
+ popupVisible: {
551
+ type: Boolean,
552
+ default: void 0
553
+ },
554
+ dropdownClassName: String,
555
+ dropdownMenuColumnStyle: {
556
+ type: Object,
557
+ default: void 0
558
+ },
559
+ popupStyle: {
560
+ type: Object,
561
+ default: void 0
562
+ },
563
+ dropdownStyle: {
564
+ type: Object,
565
+ default: void 0
566
+ },
567
+ popupPlacement: String,
568
+ placement: String,
569
+ onPopupVisibleChange: Function,
570
+ onDropdownVisibleChange: Function,
571
+ expandIcon: Se.any,
572
+ loadingIcon: Se.any
573
+ });
574
+ }
575
+ function Le() {
576
+ return k(k({}, Dt()), {
577
+ onChange: Function,
578
+ customSlots: Object
579
+ });
580
+ }
581
+ function Tt(e) {
582
+ return Array.isArray(e) && Array.isArray(e[0]);
583
+ }
584
+ function _e(e) {
585
+ return e ? Tt(e) ? e : (e.length === 0 ? [] : [e]).map((l) => Array.isArray(l) ? l : [l]) : [];
586
+ }
587
+ const $t = xe({
588
+ compatConfig: {
589
+ MODE: 3
590
+ },
591
+ name: "Cascader",
592
+ inheritAttrs: !1,
593
+ props: Ae(Le(), {}),
594
+ setup(e, l) {
595
+ let {
596
+ attrs: t,
597
+ expose: a,
598
+ slots: n
599
+ } = l;
600
+ const i = He(pe(e, "id")), c = S(() => !!e.checkable), [d, v] = Oe(e.defaultValue, {
601
+ value: S(() => e.value),
602
+ postState: _e
603
+ }), r = S(() => bt(e.fieldNames)), o = S(() => e.options || []), C = yt(o, r), P = (u) => {
604
+ const f = C.value;
605
+ return u.map((A) => {
606
+ const {
607
+ nodes: L
608
+ } = f[A];
609
+ return L.map((z) => z[r.value.value]);
610
+ });
611
+ }, [y, D] = Oe("", {
612
+ value: S(() => e.searchValue),
613
+ postState: (u) => u || ""
614
+ }), g = (u, f) => {
615
+ D(u), f.source !== "blur" && e.onSearch && e.onSearch(u);
616
+ }, {
617
+ showSearch: w,
618
+ searchConfig: p
619
+ } = wt(pe(e, "showSearch")), x = Pt(y, o, r, S(() => e.dropdownPrefixCls || e.prefixCls), p, pe(e, "changeOnSelect")), E = Ot(o, r, d), [O, _, R] = [q([]), q([]), q([])], {
620
+ maxLevel: $,
621
+ levelEntities: X
622
+ } = gt(C);
623
+ ie(() => {
624
+ const [u, f] = E.value;
625
+ if (!c.value || !d.value.length) {
626
+ [O.value, _.value, R.value] = [u, [], f];
627
+ return;
628
+ }
629
+ const A = se(u), L = C.value, {
630
+ checkedKeys: z,
631
+ halfCheckedKeys: re
632
+ } = Ce(A, !0, L, $.value, X.value);
633
+ [O.value, _.value, R.value] = [P(z), P(re), f];
634
+ });
635
+ const J = S(() => {
636
+ const u = se(O.value), f = ke(u, C.value, e.showCheckedStrategy);
637
+ return [...R.value, ...P(f)];
638
+ }), U = Vt(J, o, r, c, pe(e, "displayRender")), M = (u) => {
639
+ if (v(u), e.onChange) {
640
+ const f = _e(u), A = f.map((re) => de(re, o.value, r.value).map((ve) => ve.option)), L = c.value ? f : f[0], z = c.value ? A : A[0];
641
+ e.onChange(L, z);
642
+ }
643
+ }, F = (u) => {
644
+ if (D(""), !c.value)
645
+ M(u);
646
+ else {
647
+ const f = ee(u), A = se(O.value), L = se(_.value), z = A.includes(f), re = R.value.some((ae) => ee(ae) === f);
648
+ let ve = O.value, Pe = R.value;
649
+ if (re && !z)
650
+ Pe = R.value.filter((ae) => ee(ae) !== f);
651
+ else {
652
+ const ae = z ? A.filter((Me) => Me !== f) : [...A, f];
653
+ let me;
654
+ z ? {
655
+ checkedKeys: me
656
+ } = Ce(ae, {
657
+ checked: !1,
658
+ halfCheckedKeys: L
659
+ }, C.value, $.value, X.value) : {
660
+ checkedKeys: me
661
+ } = Ce(ae, !0, C.value, $.value, X.value);
662
+ const Ke = ke(me, C.value, e.showCheckedStrategy);
663
+ ve = P(Ke);
664
+ }
665
+ M([...Pe, ...ve]);
666
+ }
667
+ }, j = (u, f) => {
668
+ if (f.type === "clear") {
669
+ M([]);
670
+ return;
671
+ }
672
+ const {
673
+ valueCells: A
674
+ } = f.values[0];
675
+ F(A);
676
+ };
677
+ process.env.NODE_ENV !== "production" && ie(() => {
678
+ oe(!e.onPopupVisibleChange, "Cascader", "`popupVisibleChange` is deprecated. Please use `dropdownVisibleChange` instead."), oe(e.popupVisible === void 0, "Cascader", "`popupVisible` is deprecated. Please use `open` instead."), oe(e.popupPlacement === void 0, "Cascader", "`popupPlacement` is deprecated. Please use `placement` instead."), oe(e.popupStyle === void 0, "Cascader", "`popupStyle` is deprecated. Please use `dropdownStyle` instead.");
679
+ });
680
+ const te = S(() => e.open !== void 0 ? e.open : e.popupVisible), N = S(() => e.dropdownStyle || e.popupStyle || {}), h = S(() => e.placement || e.popupPlacement), I = (u) => {
681
+ var f, A;
682
+ (f = e.onDropdownVisibleChange) === null || f === void 0 || f.call(e, u), (A = e.onPopupVisibleChange) === null || A === void 0 || A.call(e, u);
683
+ }, {
684
+ changeOnSelect: s,
685
+ checkable: b,
686
+ dropdownPrefixCls: m,
687
+ loadData: V,
688
+ expandTrigger: K,
689
+ expandIcon: W,
690
+ loadingIcon: H,
691
+ dropdownMenuColumnStyle: Q,
692
+ customSlots: ne,
693
+ dropdownClassName: le
694
+ } = ht(e);
695
+ kt({
696
+ options: o,
697
+ fieldNames: r,
698
+ values: O,
699
+ halfValues: _,
700
+ changeOnSelect: s,
701
+ onSelect: F,
702
+ checkable: b,
703
+ searchOptions: x,
704
+ dropdownPrefixCls: m,
705
+ loadData: V,
706
+ expandTrigger: K,
707
+ expandIcon: W,
708
+ loadingIcon: H,
709
+ dropdownMenuColumnStyle: Q,
710
+ customSlots: ne
711
+ });
712
+ const B = q();
713
+ a({
714
+ focus() {
715
+ var u;
716
+ (u = B.value) === null || u === void 0 || u.focus();
717
+ },
718
+ blur() {
719
+ var u;
720
+ (u = B.value) === null || u === void 0 || u.blur();
721
+ },
722
+ scrollTo(u) {
723
+ var f;
724
+ (f = B.value) === null || f === void 0 || f.scrollTo(u);
725
+ }
726
+ });
727
+ const G = S(() => we(e, [
728
+ "id",
729
+ "prefixCls",
730
+ "fieldNames",
731
+ "defaultValue",
732
+ "value",
733
+ "changeOnSelect",
734
+ "onChange",
735
+ "displayRender",
736
+ "checkable",
737
+ "searchValue",
738
+ "onSearch",
739
+ "showSearch",
740
+ "expandTrigger",
741
+ "options",
742
+ "dropdownPrefixCls",
743
+ "loadData",
744
+ "popupVisible",
745
+ "open",
746
+ "dropdownClassName",
747
+ "dropdownMenuColumnStyle",
748
+ "popupPlacement",
749
+ "placement",
750
+ "onDropdownVisibleChange",
751
+ "onPopupVisibleChange",
752
+ "expandIcon",
753
+ "loadingIcon",
754
+ "customSlots",
755
+ "showCheckedStrategy",
756
+ "children"
757
+ ]));
758
+ return () => {
759
+ const u = !(y.value ? x.value : o.value).length, {
760
+ dropdownMatchSelectWidth: f = !1
761
+ } = e, A = y.value && p.value.matchInputWidth || u ? {} : {
762
+ minWidth: "auto"
763
+ };
764
+ return T(Be, Z(Z(Z({}, G.value), t), {}, {
765
+ ref: B,
766
+ id: i,
767
+ prefixCls: e.prefixCls,
768
+ dropdownMatchSelectWidth: f,
769
+ dropdownStyle: k(k({}, N.value), A),
770
+ displayValues: U.value,
771
+ onDisplayValuesChange: j,
772
+ mode: c.value ? "multiple" : void 0,
773
+ searchValue: y.value,
774
+ onSearch: g,
775
+ showSearch: w.value,
776
+ OptionList: Et,
777
+ emptyOptions: u,
778
+ open: te.value,
779
+ dropdownClassName: le.value,
780
+ placement: h.value,
781
+ onDropdownVisibleChange: I,
782
+ getRawInputElement: () => {
783
+ var L;
784
+ return (L = n.default) === null || L === void 0 ? void 0 : L.call(n);
785
+ }
786
+ }), n);
787
+ };
788
+ }
789
+ }), Rt = (e) => {
790
+ const {
791
+ prefixCls: l,
792
+ componentCls: t,
793
+ antCls: a
794
+ } = e, n = `${t}-menu-item`, i = `
795
+ &${n}-expand ${n}-expand-icon,
796
+ ${n}-loading-icon
797
+ `, c = Math.round((e.controlHeight - e.fontSize * e.lineHeight) / 2);
798
+ return [
799
+ {
800
+ [t]: {
801
+ width: e.controlWidth
802
+ }
803
+ },
804
+ {
805
+ [`${t}-dropdown`]: [
806
+ mt(`${l}-checkbox`, e),
807
+ {
808
+ [`&${a}-select-dropdown`]: {
809
+ padding: 0
810
+ }
811
+ },
812
+ {
813
+ [t]: {
814
+ "&-checkbox": {
815
+ top: 0,
816
+ marginInlineEnd: e.paddingXS
817
+ },
818
+ "&-menus": {
819
+ display: "flex",
820
+ flexWrap: "nowrap",
821
+ alignItems: "flex-start",
822
+ [`&${t}-menu-empty`]: {
823
+ [`${t}-menu`]: {
824
+ width: "100%",
825
+ height: "auto",
826
+ [n]: {
827
+ color: e.colorTextDisabled
828
+ }
829
+ }
830
+ }
831
+ },
832
+ "&-menu": {
833
+ flexGrow: 1,
834
+ minWidth: e.controlItemWidth,
835
+ height: e.dropdownHeight,
836
+ margin: 0,
837
+ padding: e.paddingXXS,
838
+ overflow: "auto",
839
+ verticalAlign: "top",
840
+ listStyle: "none",
841
+ "-ms-overflow-style": "-ms-autohiding-scrollbar",
842
+ "&:not(:last-child)": {
843
+ borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`
844
+ },
845
+ "&-item": k(k({}, qe), {
846
+ display: "flex",
847
+ flexWrap: "nowrap",
848
+ alignItems: "center",
849
+ padding: `${c}px ${e.paddingSM}px`,
850
+ lineHeight: e.lineHeight,
851
+ cursor: "pointer",
852
+ transition: `all ${e.motionDurationMid}`,
853
+ borderRadius: e.borderRadiusSM,
854
+ "&:hover": {
855
+ background: e.controlItemBgHover
856
+ },
857
+ "&-disabled": {
858
+ color: e.colorTextDisabled,
859
+ cursor: "not-allowed",
860
+ "&:hover": {
861
+ background: "transparent"
862
+ },
863
+ [i]: {
864
+ color: e.colorTextDisabled
865
+ }
866
+ },
867
+ [`&-active:not(${n}-disabled)`]: {
868
+ ["&, &:hover"]: {
869
+ fontWeight: e.fontWeightStrong,
870
+ backgroundColor: e.controlItemBgActive
871
+ }
872
+ },
873
+ "&-content": {
874
+ flex: "auto"
875
+ },
876
+ [i]: {
877
+ marginInlineStart: e.paddingXXS,
878
+ color: e.colorTextDescription,
879
+ fontSize: e.fontSizeIcon
880
+ },
881
+ "&-keyword": {
882
+ color: e.colorHighlight
883
+ }
884
+ })
885
+ }
886
+ }
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ [`${t}-dropdown-rtl`]: {
892
+ direction: "rtl"
893
+ }
894
+ },
895
+ Ge(e)
896
+ ];
897
+ }, Nt = Ue("Cascader", (e) => [Rt(e)], {
898
+ controlWidth: 184,
899
+ controlItemWidth: 111,
900
+ dropdownHeight: 180
901
+ });
902
+ var Lt = globalThis && globalThis.__rest || function(e, l) {
903
+ var t = {};
904
+ for (var a in e)
905
+ Object.prototype.hasOwnProperty.call(e, a) && l.indexOf(a) < 0 && (t[a] = e[a]);
906
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
907
+ for (var n = 0, a = Object.getOwnPropertySymbols(e); n < a.length; n++)
908
+ l.indexOf(a[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[n]) && (t[a[n]] = e[a[n]]);
909
+ return t;
910
+ };
911
+ function Kt(e, l, t) {
912
+ const a = e.toLowerCase().split(l).reduce((c, d, v) => v === 0 ? [d] : [...c, l, d], []), n = [];
913
+ let i = 0;
914
+ return a.forEach((c, d) => {
915
+ const v = i + c.length;
916
+ let r = e.slice(i, v);
917
+ i = v, d % 2 === 1 && (r = T("span", {
918
+ class: `${t}-menu-item-keyword`,
919
+ key: "seperator"
920
+ }, [r])), n.push(r);
921
+ }), n;
922
+ }
923
+ const Mt = (e) => {
924
+ let {
925
+ inputValue: l,
926
+ path: t,
927
+ prefixCls: a,
928
+ fieldNames: n
929
+ } = e;
930
+ const i = [], c = l.toLowerCase();
931
+ return t.forEach((d, v) => {
932
+ v !== 0 && i.push(" / ");
933
+ let r = d[n.label];
934
+ const o = typeof r;
935
+ (o === "string" || o === "number") && (r = Kt(String(r), c, a)), i.push(r);
936
+ }), i;
937
+ };
938
+ function Ft() {
939
+ return k(k({}, we(Le(), ["customSlots", "checkable", "options"])), {
940
+ multiple: {
941
+ type: Boolean,
942
+ default: void 0
943
+ },
944
+ size: String,
945
+ bordered: {
946
+ type: Boolean,
947
+ default: void 0
948
+ },
949
+ placement: {
950
+ type: String
951
+ },
952
+ suffixIcon: Se.any,
953
+ status: String,
954
+ options: Array,
955
+ popupClassName: String,
956
+ dropdownClassName: String,
957
+ "onUpdate:value": Function
958
+ });
959
+ }
960
+ const jt = xe({
961
+ compatConfig: {
962
+ MODE: 3
963
+ },
964
+ name: "ACascader",
965
+ inheritAttrs: !1,
966
+ props: Ae(Ft(), {
967
+ bordered: !0,
968
+ choiceTransitionName: "",
969
+ allowClear: !0
970
+ }),
971
+ setup(e, l) {
972
+ let {
973
+ attrs: t,
974
+ expose: a,
975
+ slots: n,
976
+ emit: i
977
+ } = l;
978
+ process.env.NODE_ENV !== "production" && oe(!e.dropdownClassName, "Cascader", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
979
+ const c = Je(), d = Qe.useInject(), v = S(() => Ze(d.status, e.status)), {
980
+ prefixCls: r,
981
+ rootPrefixCls: o,
982
+ getPrefixCls: C,
983
+ direction: P,
984
+ getPopupContainer: y,
985
+ renderEmpty: D,
986
+ size: g,
987
+ disabled: w
988
+ } = et("cascader", e), p = S(() => C("select", e.prefixCls)), {
989
+ compactSize: x,
990
+ compactItemClassnames: E
991
+ } = tt(p, P), O = S(() => x.value || g.value), _ = nt(), R = S(() => {
992
+ var s;
993
+ return (s = w.value) !== null && s !== void 0 ? s : _.value;
994
+ }), [$, X] = lt(p), [J] = Nt(r), U = S(() => P.value === "rtl");
995
+ process.env.NODE_ENV !== "production" && ie(() => {
996
+ oe(!e.multiple || !e.displayRender || !n.displayRender, "Cascader", "`displayRender` not work on `multiple`. Please use `tagRender` instead.");
997
+ });
998
+ const M = S(() => {
999
+ if (!e.showSearch)
1000
+ return e.showSearch;
1001
+ let s = {
1002
+ render: Mt
1003
+ };
1004
+ return typeof e.showSearch == "object" && (s = k(k({}, s), e.showSearch)), s;
1005
+ }), F = S(() => at(e.popupClassName || e.dropdownClassName, `${r.value}-dropdown`, {
1006
+ [`${r.value}-dropdown-rtl`]: U.value
1007
+ }, X.value)), j = q();
1008
+ a({
1009
+ focus() {
1010
+ var s;
1011
+ (s = j.value) === null || s === void 0 || s.focus();
1012
+ },
1013
+ blur() {
1014
+ var s;
1015
+ (s = j.value) === null || s === void 0 || s.blur();
1016
+ }
1017
+ });
1018
+ const te = function() {
1019
+ for (var s = arguments.length, b = new Array(s), m = 0; m < s; m++)
1020
+ b[m] = arguments[m];
1021
+ i("update:value", b[0]), i("change", ...b), c.onFieldChange();
1022
+ }, N = function() {
1023
+ for (var s = arguments.length, b = new Array(s), m = 0; m < s; m++)
1024
+ b[m] = arguments[m];
1025
+ i("blur", ...b), c.onFieldBlur();
1026
+ }, h = S(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !e.multiple), I = S(() => e.placement !== void 0 ? e.placement : P.value === "rtl" ? "bottomRight" : "bottomLeft");
1027
+ return () => {
1028
+ var s, b;
1029
+ const {
1030
+ notFoundContent: m = (s = n.notFoundContent) === null || s === void 0 ? void 0 : s.call(n),
1031
+ expandIcon: V = (b = n.expandIcon) === null || b === void 0 ? void 0 : b.call(n),
1032
+ multiple: K,
1033
+ bordered: W,
1034
+ allowClear: H,
1035
+ choiceTransitionName: Q,
1036
+ transitionName: ne,
1037
+ id: le = c.id.value
1038
+ } = e, B = Lt(e, ["notFoundContent", "expandIcon", "multiple", "bordered", "allowClear", "choiceTransitionName", "transitionName", "id"]), G = m || D("Cascader");
1039
+ let u = V;
1040
+ V || (u = U.value ? T(ot, null, null) : T(st, null, null));
1041
+ const f = T("span", {
1042
+ class: `${p.value}-menu-item-loading-icon`
1043
+ }, [T(it, {
1044
+ spin: !0
1045
+ }, null)]), {
1046
+ suffixIcon: A,
1047
+ removeIcon: L,
1048
+ clearIcon: z
1049
+ } = rt(k(k({}, e), {
1050
+ hasFeedback: d.hasFeedback,
1051
+ feedbackIcon: d.feedbackIcon,
1052
+ multiple: K,
1053
+ prefixCls: p.value,
1054
+ showArrow: h.value
1055
+ }), n);
1056
+ return J($(T($t, Z(Z(Z({}, B), t), {}, {
1057
+ id: le,
1058
+ prefixCls: p.value,
1059
+ class: [r.value, {
1060
+ [`${p.value}-lg`]: O.value === "large",
1061
+ [`${p.value}-sm`]: O.value === "small",
1062
+ [`${p.value}-rtl`]: U.value,
1063
+ [`${p.value}-borderless`]: !W,
1064
+ [`${p.value}-in-form-item`]: d.isFormItemInput
1065
+ }, ct(p.value, v.value, d.hasFeedback), E.value, t.class, X.value],
1066
+ disabled: R.value,
1067
+ direction: P.value,
1068
+ placement: I.value,
1069
+ notFoundContent: G,
1070
+ allowClear: H,
1071
+ showSearch: M.value,
1072
+ expandIcon: u,
1073
+ inputIcon: A,
1074
+ removeIcon: L,
1075
+ clearIcon: z,
1076
+ loadingIcon: f,
1077
+ checkable: !!K,
1078
+ dropdownClassName: F.value,
1079
+ dropdownPrefixCls: r.value,
1080
+ choiceTransitionName: Ve(o.value, "", Q),
1081
+ transitionName: Ve(o.value, ut(I.value), ne),
1082
+ getPopupContainer: y == null ? void 0 : y.value,
1083
+ customSlots: k(k({}, n), {
1084
+ checkable: () => T("span", {
1085
+ class: `${r.value}-checkbox-inner`
1086
+ }, null)
1087
+ }),
1088
+ tagRender: e.tagRender || n.tagRender,
1089
+ displayRender: e.displayRender || n.displayRender,
1090
+ maxTagPlaceholder: e.maxTagPlaceholder || n.maxTagPlaceholder,
1091
+ showArrow: d.hasFeedback || e.showArrow,
1092
+ onChange: te,
1093
+ onBlur: N,
1094
+ ref: j
1095
+ }), n)));
1096
+ };
1097
+ }
1098
+ }), zt = Ye(k(jt, {
1099
+ SHOW_CHILD: $e,
1100
+ SHOW_PARENT: Te
1101
+ }));
1102
+ export {
1103
+ zt as _
1104
+ };