cd-personselector 1.3.1 → 1.3.3

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.
package/dist/index.mjs CHANGED
@@ -1,23 +1,26 @@
1
- import { defineComponent as ke, ref as h, computed as M, watch as F, resolveComponent as N, createBlock as W, openBlock as l, withCtx as S, createElementVNode as u, createElementBlock as d, createCommentVNode as k, createVNode as g, Fragment as X, renderList as Y, createTextVNode as Z, normalizeClass as ne, withModifiers as ge, toDisplayString as v, nextTick as xe, normalizeStyle as Ne } from "vue";
2
- const Te = { class: "cd-ps-container" }, ze = {
1
+ import { defineComponent as ge, ref as y, computed as A, watch as H, resolveComponent as x, openBlock as l, createBlock as E, withCtx as N, createElementVNode as p, createElementBlock as c, createVNode as S, Fragment as G, renderList as te, createCommentVNode as _, normalizeClass as ee, withModifiers as _e, toDisplayString as h, createTextVNode as oe, nextTick as Ne, normalizeStyle as Te } from "vue";
2
+ const ze = { class: "cd-ps-container" }, $e = {
3
3
  key: 0,
4
4
  class: "cd-ps-search"
5
5
  }, we = {
6
6
  key: 0,
7
7
  class: "cd-ps-org-select"
8
- }, $e = { class: "cd-ps-search-input" }, Be = { class: "cd-ps-content" }, Pe = { class: "cd-ps-left" }, De = {
9
- key: 0,
10
- class: "cd-ps-search-results"
11
- }, Oe = { class: "cd-ps-search-header" }, Re = {
8
+ }, Be = { class: "cd-ps-search-input" }, De = { class: "cd-ps-content" }, Oe = { class: "cd-ps-left" }, Pe = {
12
9
  key: 0,
13
10
  class: "cd-ps-loading"
14
- }, We = {
11
+ }, Re = {
15
12
  key: 1,
16
13
  class: "cd-ps-empty"
17
- }, Le = {
14
+ }, We = {
18
15
  key: 2,
19
16
  class: "cd-ps-result-list"
20
- }, Me = ["onClick"], Ee = { class: "cd-ps-avatar" }, Ae = { class: "cd-ps-info" }, Je = { class: "cd-ps-name" }, je = { class: "cd-ps-meta" }, Fe = { key: 0 }, qe = { key: 1 }, Ge = { key: 2 }, He = { class: "cd-ps-tree" }, Qe = { class: "cd-ps-node-name" }, Xe = {
17
+ }, Ee = ["onClick"], Le = { class: "cd-ps-info" }, Me = { class: "cd-ps-name" }, Ae = { class: "cd-ps-meta" }, je = {
18
+ key: 0,
19
+ class: "cd-ps-type-tag"
20
+ }, Je = { key: 1 }, Fe = { key: 2 }, qe = { key: 3 }, Ge = { key: 4 }, He = {
21
+ key: 1,
22
+ class: "cd-ps-tree"
23
+ }, Qe = { class: "cd-ps-node-name" }, Xe = {
21
24
  key: 0,
22
25
  class: "cd-ps-position"
23
26
  }, Ye = {
@@ -32,7 +35,7 @@ const Te = { class: "cd-ps-container" }, ze = {
32
35
  }, lt = {
33
36
  key: 1,
34
37
  class: "cd-ps-selected-list"
35
- }, nt = { class: "cd-ps-item-info" }, ot = { class: "cd-ps-info" }, it = { class: "cd-ps-name" }, dt = { class: "cd-ps-meta" }, ct = { key: 0 }, ut = { key: 1 }, rt = { key: 2 }, pt = { key: 3 }, vt = /* @__PURE__ */ ke({
38
+ }, nt = { class: "cd-ps-item-info" }, ot = { class: "cd-ps-info" }, it = { class: "cd-ps-name" }, ct = { class: "cd-ps-meta" }, dt = { key: 0 }, ut = { key: 1 }, rt = { key: 2 }, pt = { key: 3 }, vt = /* @__PURE__ */ ge({
36
39
  __name: "PersonSelector",
37
40
  props: {
38
41
  visible: { type: Boolean, default: !1 },
@@ -45,167 +48,202 @@ const Te = { class: "cd-ps-container" }, ze = {
45
48
  showOrg: { type: Boolean, default: !0 },
46
49
  multiple: { type: Boolean, default: !0 }
47
50
  },
48
- emits: ["update:visible", "update:modelValue", "confirm", "load-users", "search", "org-change"],
49
- setup(y, { expose: q, emit: b }) {
50
- var me, fe;
51
- const c = y, U = b, T = h(c.visible), I = h(((fe = (me = c.tabs) == null ? void 0 : me[0]) == null ? void 0 : fe.key) || ""), z = h(null), P = h(""), r = h([]), x = h(/* @__PURE__ */ new Map()), G = h({}), H = h(!1), J = h(!1), D = h([]), oe = M(() => c.tabs || []), K = M(() => c.organizations || []);
52
- M(() => c.tips || "");
53
- const ie = M(() => c.showSearch), L = M(() => c.showOrg), de = M(() => c.dialogWidth), O = h({});
54
- F(() => c.tabs, (a) => {
55
- if (a && a.length > 0) {
51
+ emits: ["update:visible", "update:modelValue", "confirm", "load-users", "search", "org-change", "tab-change"],
52
+ setup(b, { expose: Q, emit: C }) {
53
+ var he, me;
54
+ const r = b, V = C, T = y(r.visible), U = y(((me = (he = r.tabs) == null ? void 0 : he[0]) == null ? void 0 : me.key) || ""), z = y(null), W = y(""), v = y([]), I = y(/* @__PURE__ */ new Map()), X = y({}), j = y(!1), F = y(!1), D = y({}), ie = A(() => r.tabs || []), ae = A(() => r.organizations || []);
55
+ A(() => r.tips || "");
56
+ const ce = A(() => r.showSearch), L = A(() => r.showOrg), de = A(() => r.dialogWidth), R = y({});
57
+ H(() => r.tabs, (t) => {
58
+ if (t && t.length > 0) {
56
59
  const e = {};
57
- a.forEach((o) => {
58
- e[o.key] = JSON.parse(JSON.stringify(o.tree));
59
- }), O.value = e, (!I.value || !a.find((o) => o.key === I.value)) && (I.value = a[0].key);
60
+ t.forEach((s) => {
61
+ e[s.key] = JSON.parse(JSON.stringify(s.tree));
62
+ }), R.value = e, (!U.value || !t.find((s) => s.key === U.value)) && (U.value = t[0].key);
60
63
  }
61
64
  }, { immediate: !0, deep: !0 });
62
- function ee() {
63
- if (c.modelValue && c.modelValue.length > 0) {
64
- const a = c.modelValue[0];
65
- typeof a == "object" && a !== null && "id" in a ? (r.value = c.modelValue.map((e) => e.id), x.value.clear(), c.modelValue.forEach((e) => {
66
- x.value.set(e.id, e);
67
- })) : r.value = [...c.modelValue];
65
+ function se() {
66
+ if (r.modelValue && r.modelValue.length > 0) {
67
+ const t = r.modelValue[0];
68
+ typeof t == "object" && t !== null && "id" in t ? (v.value = r.modelValue.map((e) => e.id), I.value.clear(), r.modelValue.forEach((e) => {
69
+ I.value.set(e.id, e);
70
+ })) : v.value = [...r.modelValue];
68
71
  } else
69
- r.value = [], x.value.clear();
72
+ v.value = [], I.value.clear();
70
73
  }
71
- F(() => c.modelValue, (a) => {
72
- T.value && a && ee();
73
- }, { deep: !0 }), F(() => c.visible, (a) => {
74
- T.value = a, a && (ee(), c.organizations.length > 0 && !z.value && (z.value = c.organizations[0].id));
75
- }), F(T, (a) => {
76
- U("update:visible", a);
74
+ H(() => r.modelValue, (t) => {
75
+ T.value && t && se();
76
+ }, { deep: !0 }), H(() => r.visible, (t) => {
77
+ T.value = t, t && (se(), r.organizations.length > 0 && !z.value && (z.value = r.organizations[0].id));
78
+ }), H(T, (t) => {
79
+ V("update:visible", t);
77
80
  });
78
- function ce(a, e) {
79
- e && (G.value[a] = e);
81
+ function ue(t, e) {
82
+ e && (X.value[t] = e);
80
83
  }
81
- function te(a, e) {
82
- for (const o of a) {
83
- if (o.id === e) return o;
84
- if (o.children) {
85
- const p = te(o.children, e);
86
- if (p) return p;
84
+ function Y(t, e) {
85
+ for (const s of t) {
86
+ if (s.id === e) return s;
87
+ if (s.children) {
88
+ const u = Y(s.children, e);
89
+ if (u) return u;
87
90
  }
88
91
  }
89
92
  return null;
90
93
  }
91
- const E = M(() => r.value.map((a) => x.value.get(a)).filter(Boolean));
92
- function ae(a, e) {
93
- r.value.includes(a) || r.value.push(a), x.value.set(a, e);
94
+ const J = A(() => v.value.map((t) => I.value.get(t)).filter(Boolean));
95
+ function le(t, e) {
96
+ v.value.includes(t) || v.value.push(t), I.value.set(t, e);
94
97
  }
95
- function t(a) {
96
- r.value = r.value.filter((e) => e !== a), x.value.delete(a);
98
+ function a(t) {
99
+ v.value = v.value.filter((e) => e !== t), I.value.delete(t);
97
100
  }
98
- const i = () => {
99
- P.value = "";
100
- }, m = (a) => {
101
+ const i = (t) => {
102
+ var s;
103
+ if (!j.value) return t.name;
104
+ const e = ((s = D.value[t.key]) == null ? void 0 : s.length) ?? 0;
105
+ return e > 0 ? `${t.name} (${e})` : t.name;
106
+ }, k = (t) => {
107
+ j.value || (W.value = "", V("tab-change", { tabKey: t }));
108
+ }, O = (t) => {
101
109
  const e = {};
102
- c.tabs.forEach((o) => {
103
- e[o.key] = [];
104
- }), O.value = e, U("org-change", a);
110
+ r.tabs.forEach((u) => {
111
+ e[u.key] = [];
112
+ }), R.value = e;
113
+ const s = () => {
114
+ };
115
+ V("org-change", { orgId: t, tabKey: U.value, callback: s });
105
116
  };
106
- let _ = null;
107
- const A = () => {
108
- if (_ && clearTimeout(_), !P.value.trim()) {
109
- n();
117
+ let w = null;
118
+ const P = () => {
119
+ if (w && clearTimeout(w), !W.value.trim()) {
120
+ ne();
110
121
  return;
111
122
  }
112
- H.value = !0, J.value = !0, _ = setTimeout(() => B(), 300);
113
- }, B = () => {
114
- D.value = [];
115
- const a = (e) => {
116
- D.value = e.map((o) => ({ ...o, isUser: !0 })), J.value = !1;
123
+ j.value = !0, F.value = !0, w = setTimeout(() => o(), 300);
124
+ }, o = () => {
125
+ D.value = {};
126
+ const t = (e) => {
127
+ const s = {};
128
+ e.forEach((u) => {
129
+ const m = { ...u, isUser: u.isUser !== !1 }, $ = u.nodeType || (u.isUser !== !1 ? "user" : "department");
130
+ s[$] || (s[$] = []), s[$].push(m);
131
+ }), D.value = s, F.value = !1;
117
132
  };
118
- U("search", { keyword: P.value, orgId: z.value || void 0, callback: a });
119
- }, n = () => {
120
- _ && (clearTimeout(_), _ = null), H.value = !1, P.value = "", D.value = [], J.value = !1;
121
- }, ue = (a) => {
122
- r.value.indexOf(a.id) > -1 ? t(a.id) : (c.multiple || (r.value = [], x.value.clear()), ae(a.id, { ...a, isUser: !0, typeName: "搜索结果", orgId: z.value }), c.multiple || re());
133
+ V("search", { keyword: W.value, orgId: z.value || void 0, callback: t });
134
+ }, ne = () => {
135
+ w && (clearTimeout(w), w = null), j.value = !1, W.value = "", D.value = {}, F.value = !1;
136
+ }, be = (t) => {
137
+ if (v.value.indexOf(t.id) > -1)
138
+ a(t.id);
139
+ else {
140
+ r.multiple || (v.value = [], I.value.clear());
141
+ const s = t.isUser ? "搜索结果" : t.isPost ? "职位" : "部门";
142
+ le(t.id, { ...t, typeName: s, orgId: z.value }), r.multiple || re();
143
+ }
123
144
  };
124
- function Ce(a) {
125
- const e = [], o = (p) => {
126
- for (const f of p)
127
- e.push(f.id), f.children && o(f.children);
145
+ function Ce(t) {
146
+ const e = [], s = (u) => {
147
+ for (const m of u)
148
+ e.push(m.id), m.children && s(m.children);
128
149
  };
129
- return o(a), e;
150
+ return s(t), e;
130
151
  }
131
- const Ve = (a, e) => {
132
- var C, w;
133
- const o = e == null ? void 0 : e.node;
134
- if (o) {
135
- const $ = o.value ?? ((C = o.data) == null ? void 0 : C.id);
136
- if ($ !== void 0) {
137
- if (o.checked) {
138
- c.multiple || (r.value = [], x.value.clear());
139
- const j = c.tabs.find((pe) => pe.key === I.value), Q = j ? j.name.replace(/^按/, "") : "";
140
- ae($, { ...o.data, typeName: Q, orgId: z.value }), !c.multiple && ((w = o.data) != null && w.isUser) && re();
152
+ const Ve = (t, e) => {
153
+ var B, g;
154
+ const s = e == null ? void 0 : e.node;
155
+ if (s) {
156
+ const f = s.value ?? ((B = s.data) == null ? void 0 : B.id);
157
+ if (f !== void 0) {
158
+ if (s.checked) {
159
+ r.multiple || (v.value = [], I.value.clear());
160
+ const q = r.tabs.find((K) => K.key === U.value), Z = q ? q.name.replace(/^按/, "") : "";
161
+ le(f, { ...s.data, typeName: Z, orgId: z.value }), !r.multiple && ((g = s.data) != null && g.isUser) && re();
141
162
  } else
142
- t($);
163
+ a(f);
143
164
  return;
144
165
  }
145
166
  }
146
- const p = O.value[I.value] || [], f = Ce(p), R = r.value.filter(($) => !f.includes($));
147
- r.value = [...R, ...a];
167
+ const u = R.value[U.value] || [], m = Ce(u), $ = v.value.filter((f) => !m.includes(f));
168
+ v.value = [...$, ...t];
148
169
  };
149
- function ve(a, e, o) {
150
- for (const p of a) {
151
- if (p.id === e)
152
- return p.children = p.children || [], p.children.push(...o), p.loaded = !0, !0;
153
- if (p.children && ve(p.children, e, o))
170
+ function ve(t, e, s) {
171
+ for (const u of t) {
172
+ if (u.id === e)
173
+ return u.children = u.children || [], u.children.push(...s), u.loaded = !0, !0;
174
+ if (u.children && ve(u.children, e, s))
154
175
  return !0;
155
176
  }
156
177
  return !1;
157
178
  }
158
- async function Se(a, e) {
159
- const o = a.value, p = G.value[e];
160
- U("load-users", { tabKey: e, nodeId: o, node: a, callback: async (R) => {
161
- if (R.length > 0) {
162
- const C = R.map(($) => {
163
- const { id: se, name: j, ...Q } = $;
164
- return { ...Q, id: se, name: $.displayName || j, isUser: !0 };
165
- }), w = O.value[e];
166
- if (w && ve(w, o, C), p) {
167
- p.appendTo(o, C), a.data.loaded = !0, await xe();
179
+ async function Ue(t, e) {
180
+ var $;
181
+ const s = t.value, u = X.value[e];
182
+ if (t.data.loaded) {
183
+ const B = R.value[e];
184
+ if (B) {
185
+ const g = Y(B, s);
186
+ g && g.children && (g.children = g.children.filter((f) => !f.isUser));
187
+ }
188
+ u && ((($ = u.getItem(s)) == null ? void 0 : $.children) || []).filter((f) => {
189
+ var M;
190
+ return (M = f.data) == null ? void 0 : M.isUser;
191
+ }).forEach((f) => {
192
+ try {
193
+ u.remove(f.value);
194
+ } catch {
195
+ }
196
+ }), t.data.loaded = !1;
197
+ }
198
+ V("load-users", { tabKey: e, nodeId: s, node: t, callback: async (B) => {
199
+ if (B.length > 0) {
200
+ const g = B.map((M) => {
201
+ const { id: q, name: Z, ...K } = M;
202
+ return { ...K, id: q, name: M.displayName || Z, isUser: !0 };
203
+ }), f = R.value[e];
204
+ if (f && ve(f, s, g), u) {
205
+ u.appendTo(s, g), t.data.loaded = !0, await Ne();
168
206
  try {
169
- p.setItem(o, { expanded: !0 });
207
+ u.setItem(s, { expanded: !0 });
170
208
  } catch {
171
209
  }
172
210
  }
173
211
  } else {
174
- a.data.loaded = !0;
175
- const C = O.value[e];
176
- if (C) {
177
- const w = te(C, o);
178
- w && (w.loaded = !0);
212
+ t.data.loaded = !0;
213
+ const g = R.value[e];
214
+ if (g) {
215
+ const f = Y(g, s);
216
+ f && (f.loaded = !0);
179
217
  }
180
218
  }
181
219
  } });
182
220
  }
183
- const Ue = (a) => {
184
- t(a);
185
- }, he = () => {
186
- r.value = [], x.value.clear();
221
+ const Se = (t) => {
222
+ a(t);
223
+ }, fe = () => {
224
+ v.value = [], I.value.clear();
187
225
  }, re = () => {
188
- U("update:modelValue", r.value), U("confirm", E.value), T.value = !1;
226
+ V("update:modelValue", v.value), V("confirm", J.value), T.value = !1;
189
227
  }, Ie = () => {
190
228
  T.value = !1;
191
229
  };
192
- return q({
193
- clearSelection: he,
194
- appendUsers: (a, e, o) => {
195
- const p = G.value[a];
196
- if (p && o.length > 0) {
197
- const f = o.map((R) => {
198
- const { id: C, name: w, ...$ } = R;
199
- return { ...$, id: C, name: R.displayName || w, isUser: !0 };
230
+ return Q({
231
+ clearSelection: fe,
232
+ appendUsers: (t, e, s) => {
233
+ const u = X.value[t];
234
+ if (u && s.length > 0) {
235
+ const m = s.map(($) => {
236
+ const { id: B, name: g, ...f } = $;
237
+ return { ...f, id: B, name: $.displayName || g, isUser: !0 };
200
238
  });
201
- p.appendTo(e, f);
239
+ u.appendTo(e, m);
202
240
  }
203
241
  }
204
- }), (a, e) => {
205
- const o = N("t-option"), p = N("t-select"), f = N("t-icon"), R = N("t-input"), C = N("t-button"), w = N("t-loading"), $ = N("t-checkbox"), se = N("t-tree"), j = N("t-tab-panel"), Q = N("t-tabs"), pe = N("t-dialog");
206
- return l(), W(pe, {
242
+ }), (t, e) => {
243
+ const s = x("t-option"), u = x("t-select"), m = x("t-icon"), $ = x("t-input"), B = x("t-loading"), g = x("t-checkbox"), f = x("t-button"), M = x("t-tree"), q = x("t-tab-panel"), Z = x("t-tabs"), K = x("t-dialog");
244
+ return l(), E(K, {
207
245
  visible: T.value,
208
- "onUpdate:visible": e[4] || (e[4] = (s) => T.value = s),
246
+ "onUpdate:visible": e[4] || (e[4] = (n) => T.value = n),
209
247
  header: "选择人员",
210
248
  width: de.value,
211
249
  footer: !0,
@@ -214,223 +252,213 @@ const Te = { class: "cd-ps-container" }, ze = {
214
252
  onConfirm: re,
215
253
  onClose: Ie
216
254
  }, {
217
- default: S(() => [
218
- u("div", Te, [
219
- ie.value ? (l(), d("div", ze, [
220
- L.value && K.value.length > 0 ? (l(), d("div", we, [
221
- g(p, {
255
+ default: N(() => [
256
+ p("div", ze, [
257
+ ce.value ? (l(), c("div", $e, [
258
+ L.value && ae.value.length > 0 ? (l(), c("div", we, [
259
+ S(u, {
222
260
  modelValue: z.value,
223
- "onUpdate:modelValue": e[0] || (e[0] = (s) => z.value = s),
261
+ "onUpdate:modelValue": e[0] || (e[0] = (n) => z.value = n),
224
262
  placeholder: "选择组织",
225
263
  style: { width: "200px" },
226
- onChange: m
264
+ onChange: O
227
265
  }, {
228
- default: S(() => [
229
- (l(!0), d(X, null, Y(K.value, (s) => (l(), W(o, {
230
- key: s.id,
231
- value: s.id,
232
- label: s.displayName || s.name
266
+ default: N(() => [
267
+ (l(!0), c(G, null, te(ae.value, (n) => (l(), E(s, {
268
+ key: n.id,
269
+ value: n.id,
270
+ label: n.displayName || n.name
233
271
  }, null, 8, ["value", "label"]))), 128))
234
272
  ]),
235
273
  _: 1
236
274
  }, 8, ["modelValue"])
237
- ])) : k("", !0),
238
- u("div", $e, [
239
- g(R, {
240
- modelValue: P.value,
241
- "onUpdate:modelValue": e[1] || (e[1] = (s) => P.value = s),
275
+ ])) : _("", !0),
276
+ p("div", Be, [
277
+ S($, {
278
+ modelValue: W.value,
279
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => W.value = n),
242
280
  placeholder: "输入手机号/工号/姓名/部门/职位搜索",
243
281
  clearable: "",
244
- onInput: A,
245
- onClear: n
282
+ inputProps: { autocomplete: "off" },
283
+ onInput: P,
284
+ onClear: ne
246
285
  }, {
247
- "prefix-icon": S(() => [
248
- g(f, { name: "search" })
286
+ "prefix-icon": N(() => [
287
+ S(m, { name: "search" })
249
288
  ]),
250
289
  _: 1
251
290
  }, 8, ["modelValue"])
252
291
  ])
253
- ])) : k("", !0),
254
- u("div", Be, [
255
- u("div", Pe, [
256
- H.value ? (l(), d("div", De, [
257
- u("div", Oe, [
258
- e[6] || (e[6] = u("span", null, "搜索结果", -1)),
259
- g(C, {
260
- size: "small",
261
- variant: "text",
262
- onClick: n
263
- }, {
264
- default: S(() => [...e[5] || (e[5] = [
265
- Z("返回", -1)
266
- ])]),
267
- _: 1
268
- })
269
- ]),
270
- J.value ? (l(), d("div", Re, [
271
- g(w),
272
- e[7] || (e[7] = u("span", null, "搜索中...", -1))
273
- ])) : D.value.length === 0 ? (l(), d("div", We, [
274
- g(f, {
275
- name: "search",
276
- size: "48px",
277
- style: { color: "#ddd" }
278
- }),
279
- e[8] || (e[8] = u("p", null, "未找到匹配的人员", -1))
280
- ])) : (l(), d("div", Le, [
281
- (l(!0), d(X, null, Y(D.value, (s) => (l(), d("div", {
282
- key: s.id,
283
- class: ne(["cd-ps-result-item", { "cd-ps-selected": r.value.includes(s.id) }]),
284
- onClick: (le) => ue(s)
285
- }, [
286
- g($, {
287
- checked: r.value.includes(s.id),
288
- onClick: e[2] || (e[2] = ge(() => {
289
- }, ["stop"]))
290
- }, null, 8, ["checked"]),
291
- u("div", Ee, [
292
- g(f, { name: "user" })
293
- ]),
294
- u("div", Ae, [
295
- u("div", Je, v(s.displayName || s.name), 1),
296
- u("div", je, [
297
- s.position ? (l(), d("span", Fe, v(s.position), 1)) : k("", !0),
298
- s.department ? (l(), d("span", qe, v(s.department), 1)) : k("", !0),
299
- s.phone ? (l(), d("span", Ge, v(s.phone), 1)) : k("", !0)
300
- ])
301
- ])
302
- ], 10, Me))), 128))
303
- ]))
304
- ])) : (l(), W(Q, {
305
- key: 1,
306
- modelValue: I.value,
307
- "onUpdate:modelValue": e[3] || (e[3] = (s) => I.value = s),
308
- onChange: i
292
+ ])) : _("", !0),
293
+ p("div", De, [
294
+ p("div", Oe, [
295
+ S(Z, {
296
+ modelValue: U.value,
297
+ "onUpdate:modelValue": e[3] || (e[3] = (n) => U.value = n),
298
+ onChange: k
309
299
  }, {
310
- default: S(() => [
311
- (l(!0), d(X, null, Y(oe.value, (s) => (l(), W(j, {
312
- key: s.key,
313
- value: s.key,
314
- label: s.name
300
+ default: N(() => [
301
+ (l(!0), c(G, null, te(ie.value, (n) => (l(), E(q, {
302
+ key: n.key,
303
+ value: n.key,
304
+ label: i(n)
315
305
  }, {
316
- default: S(() => {
317
- var le;
306
+ default: N(() => {
307
+ var pe;
318
308
  return [
319
- u("div", He, [
320
- ((le = O.value[s.key]) == null ? void 0 : le.length) > 0 ? (l(), W(se, {
309
+ j.value ? (l(), c(G, { key: 0 }, [
310
+ F.value ? (l(), c("div", Pe, [
311
+ S(B),
312
+ e[5] || (e[5] = p("span", null, "搜索中...", -1))
313
+ ])) : !D.value[n.key] || D.value[n.key].length === 0 ? (l(), c("div", Re, [
314
+ S(m, {
315
+ name: "search",
316
+ size: "48px",
317
+ style: { color: "#ddd" }
318
+ }),
319
+ e[6] || (e[6] = p("p", null, "暂无结果", -1))
320
+ ])) : (l(), c("div", We, [
321
+ (l(!0), c(G, null, te(D.value[n.key], (d) => (l(), c("div", {
322
+ key: d.id,
323
+ class: ee(["cd-ps-result-item", { "cd-ps-selected": v.value.includes(d.id), "cd-ps-dept-result": !d.isUser }]),
324
+ onClick: (xe) => be(d)
325
+ }, [
326
+ S(g, {
327
+ checked: v.value.includes(d.id),
328
+ onClick: e[2] || (e[2] = _e(() => {
329
+ }, ["stop"]))
330
+ }, null, 8, ["checked"]),
331
+ p("div", {
332
+ class: ee(["cd-ps-avatar", { "cd-ps-avatar-dept": !d.isUser }])
333
+ }, [
334
+ S(m, {
335
+ name: d.isUser ? "user" : d.isPost ? "assignment-checked" : "folder"
336
+ }, null, 8, ["name"])
337
+ ], 2),
338
+ p("div", Le, [
339
+ p("div", Me, h(d.displayName || d.name), 1),
340
+ p("div", Ae, [
341
+ d.isUser ? _("", !0) : (l(), c("span", je, h(d.isPost ? "职位" : "部门"), 1)),
342
+ d.position ? (l(), c("span", Je, h(d.position), 1)) : _("", !0),
343
+ d.department ? (l(), c("span", Fe, h(d.department), 1)) : _("", !0),
344
+ d.phone ? (l(), c("span", qe, h(d.phone), 1)) : _("", !0),
345
+ d.userCount ? (l(), c("span", Ge, h(d.userCount) + "人", 1)) : _("", !0)
346
+ ])
347
+ ])
348
+ ], 10, Ee))), 128))
349
+ ]))
350
+ ], 64)) : (l(), c("div", He, [
351
+ ((pe = R.value[n.key]) == null ? void 0 : pe.length) > 0 ? (l(), E(M, {
321
352
  key: 0,
322
353
  ref_for: !0,
323
- ref: (V) => ce(s.key, V),
324
- data: O.value[s.key],
354
+ ref: (d) => ue(n.key, d),
355
+ data: R.value[n.key],
325
356
  keys: { value: "id", label: "name", children: "children" },
326
357
  hover: "",
327
358
  checkable: "",
328
359
  "expand-all": !1,
329
- value: r.value,
360
+ value: v.value,
330
361
  onChange: Ve
331
362
  }, {
332
- label: S(({ node: V }) => {
333
- var _e;
334
- return [
335
- u("div", {
336
- class: ne(["cd-ps-node", { "cd-ps-node-user": V.data.isUser }])
337
- }, [
338
- g(f, {
339
- name: V.data.isUser ? "user" : s.icon || "folder"
340
- }, null, 8, ["name"]),
341
- u("span", Qe, [
342
- Z(v(V.label) + " ", 1),
343
- V.data.isUser && V.data.position ? (l(), d("span", Xe, v(V.data.position), 1)) : k("", !0)
363
+ label: N(({ node: d }) => [
364
+ p("div", {
365
+ class: ee(["cd-ps-node", { "cd-ps-node-user": d.data.isUser }])
366
+ }, [
367
+ S(m, {
368
+ name: d.data.isUser ? "user" : n.icon || "folder"
369
+ }, null, 8, ["name"]),
370
+ p("span", Qe, [
371
+ oe(h(d.label) + " ", 1),
372
+ d.data.isUser && d.data.position ? (l(), c("span", Xe, h(d.data.position), 1)) : _("", !0)
373
+ ]),
374
+ d.data.userCount && !d.data.isUser ? (l(), c("span", Ye, "(" + h(d.data.userCount) + ")", 1)) : _("", !0),
375
+ d.data.isUser ? _("", !0) : (l(), E(f, {
376
+ key: 1,
377
+ size: "small",
378
+ variant: "text",
379
+ class: "cd-ps-load-btn",
380
+ onClick: _e((xe) => Ue(d, n.key), ["stop"])
381
+ }, {
382
+ default: N(() => [
383
+ oe(h(d.data.loaded ? "刷新人员" : "显示人员"), 1)
344
384
  ]),
345
- V.data.userCount && !V.data.isUser ? (l(), d("span", Ye, "(" + v(V.data.userCount) + ")", 1)) : k("", !0),
346
- !V.data.isUser && !((_e = V.data.children) != null && _e.length) && !V.data.loaded ? (l(), W(C, {
347
- key: 1,
348
- size: "small",
349
- variant: "text",
350
- class: "cd-ps-load-btn",
351
- onClick: ge((xt) => Se(V, s.key), ["stop"])
352
- }, {
353
- default: S(() => [...e[9] || (e[9] = [
354
- Z("显示人员", -1)
355
- ])]),
356
- _: 1
357
- }, 8, ["onClick"])) : k("", !0)
358
- ], 2)
359
- ];
360
- }),
385
+ _: 2
386
+ }, 1032, ["onClick"]))
387
+ ], 2)
388
+ ]),
361
389
  _: 2
362
- }, 1032, ["data", "value"])) : (l(), d("div", Ze, [
363
- g(f, {
364
- name: s.icon || "folder-open",
390
+ }, 1032, ["data", "value"])) : (l(), c("div", Ze, [
391
+ S(m, {
392
+ name: n.icon || "folder-open",
365
393
  size: "48px",
366
394
  style: { color: "#ddd" }
367
395
  }, null, 8, ["name"]),
368
- e[10] || (e[10] = u("p", null, "暂无数据", -1))
396
+ e[7] || (e[7] = p("p", null, "暂无数据", -1))
369
397
  ]))
370
- ])
398
+ ]))
371
399
  ];
372
400
  }),
373
401
  _: 2
374
402
  }, 1032, ["value", "label"]))), 128))
375
403
  ]),
376
404
  _: 1
377
- }, 8, ["modelValue"]))
405
+ }, 8, ["modelValue"])
378
406
  ]),
379
- u("div", Ke, [
380
- u("div", et, [
381
- e[12] || (e[12] = u("span", { class: "cd-ps-title" }, "已选择", -1)),
382
- u("span", tt, v(E.value.length) + " 项", 1),
383
- E.value.length > 0 ? (l(), W(C, {
407
+ p("div", Ke, [
408
+ p("div", et, [
409
+ e[9] || (e[9] = p("span", { class: "cd-ps-title" }, "已选择", -1)),
410
+ p("span", tt, h(J.value.length) + " 项", 1),
411
+ J.value.length > 0 ? (l(), E(f, {
384
412
  key: 0,
385
413
  size: "small",
386
414
  variant: "text",
387
- onClick: he
415
+ onClick: fe
388
416
  }, {
389
- default: S(() => [...e[11] || (e[11] = [
390
- Z("清空", -1)
417
+ default: N(() => [...e[8] || (e[8] = [
418
+ oe("清空", -1)
391
419
  ])]),
392
420
  _: 1
393
- })) : k("", !0)
421
+ })) : _("", !0)
394
422
  ]),
395
- u("div", at, [
396
- E.value.length === 0 ? (l(), d("div", st, [
397
- g(f, {
423
+ p("div", at, [
424
+ J.value.length === 0 ? (l(), c("div", st, [
425
+ S(m, {
398
426
  name: "user-checked",
399
427
  size: "64px",
400
428
  style: { color: "#ddd" }
401
429
  }),
402
- e[13] || (e[13] = u("p", null, "暂无选择", -1))
403
- ])) : (l(), d("div", lt, [
404
- (l(!0), d(X, null, Y(E.value, (s) => (l(), d("div", {
405
- key: s.id,
406
- class: ne(["cd-ps-selected-item", { "cd-ps-dept-item": !s.isUser }])
430
+ e[10] || (e[10] = p("p", null, "暂无选择", -1))
431
+ ])) : (l(), c("div", lt, [
432
+ (l(!0), c(G, null, te(J.value, (n) => (l(), c("div", {
433
+ key: n.id,
434
+ class: ee(["cd-ps-selected-item", { "cd-ps-dept-item": !n.isUser }])
407
435
  }, [
408
- u("div", nt, [
409
- u("div", {
410
- class: ne(["cd-ps-avatar", { "cd-ps-avatar-dept": !s.isUser }])
436
+ p("div", nt, [
437
+ p("div", {
438
+ class: ee(["cd-ps-avatar", { "cd-ps-avatar-dept": !n.isUser }])
411
439
  }, [
412
- g(f, {
413
- name: s.isUser ? "user" : "folder"
440
+ S(m, {
441
+ name: n.isUser ? "user" : "folder"
414
442
  }, null, 8, ["name"])
415
443
  ], 2),
416
- u("div", ot, [
417
- u("div", it, v(s.displayName || s.name), 1),
418
- u("div", dt, [
419
- s.isUser && s.position ? (l(), d("span", ct, v(s.position), 1)) : k("", !0),
420
- s.isUser && s.department ? (l(), d("span", ut, v(s.department), 1)) : k("", !0),
421
- s.isUser ? k("", !0) : (l(), d("span", rt, v(s.typeName || "部门"), 1)),
422
- !s.isUser && s.userCount ? (l(), d("span", pt, v(s.userCount) + "人", 1)) : k("", !0)
444
+ p("div", ot, [
445
+ p("div", it, h(n.displayName || n.name), 1),
446
+ p("div", ct, [
447
+ n.isUser && n.position ? (l(), c("span", dt, h(n.position), 1)) : _("", !0),
448
+ n.isUser && n.department ? (l(), c("span", ut, h(n.department), 1)) : _("", !0),
449
+ n.isUser ? _("", !0) : (l(), c("span", rt, h(n.typeName || "部门"), 1)),
450
+ !n.isUser && n.userCount ? (l(), c("span", pt, h(n.userCount) + "人", 1)) : _("", !0)
423
451
  ])
424
452
  ])
425
453
  ]),
426
- g(C, {
454
+ S(f, {
427
455
  size: "small",
428
456
  variant: "text",
429
457
  shape: "circle",
430
- onClick: (le) => Ue(s.id)
458
+ onClick: (pe) => Se(n.id)
431
459
  }, {
432
- icon: S(() => [
433
- g(f, { name: "close" })
460
+ icon: N(() => [
461
+ S(m, { name: "close" })
434
462
  ]),
435
463
  _: 1
436
464
  }, 8, ["onClick"])
@@ -445,18 +473,18 @@ const Te = { class: "cd-ps-container" }, ze = {
445
473
  }, 8, ["visible", "width"]);
446
474
  };
447
475
  }
448
- }), ye = (y, q) => {
449
- const b = y.__vccOpts || y;
450
- for (const [c, U] of q)
451
- b[c] = U;
452
- return b;
453
- }, be = /* @__PURE__ */ ye(vt, [["__scopeId", "data-v-d9ce1a42"]]), ht = { class: "cd-input-select" }, mt = {
476
+ }), ye = (b, Q) => {
477
+ const C = b.__vccOpts || b;
478
+ for (const [r, V] of Q)
479
+ C[r] = V;
480
+ return C;
481
+ }, ke = /* @__PURE__ */ ye(vt, [["__scopeId", "data-v-19347ac6"]]), ft = { class: "cd-input-select" }, ht = {
454
482
  key: 0,
455
483
  class: "cd-input-select__panel"
456
- }, ft = { class: "cd-input-select__option-content" }, _t = {
484
+ }, mt = { class: "cd-input-select__option-content" }, _t = {
457
485
  key: 0,
458
486
  class: "cd-input-select__option-avatar"
459
- }, gt = ["src", "alt"], kt = { class: "cd-input-select__option-info" }, yt = { class: "cd-input-select__option-name" }, bt = {
487
+ }, gt = ["src", "alt"], yt = { class: "cd-input-select__option-info" }, kt = { class: "cd-input-select__option-name" }, bt = {
460
488
  key: 0,
461
489
  class: "cd-input-select__option-desc"
462
490
  }, Ct = {
@@ -465,10 +493,10 @@ const Te = { class: "cd-ps-container" }, ze = {
465
493
  }, Vt = {
466
494
  key: 1,
467
495
  class: "cd-input-select__loading"
468
- }, St = {
496
+ }, Ut = {
469
497
  key: 2,
470
498
  class: "cd-input-select__empty"
471
- }, Ut = /* @__PURE__ */ ke({
499
+ }, St = /* @__PURE__ */ ge({
472
500
  name: "CdInputPersonSelector",
473
501
  __name: "InputSelect",
474
502
  props: {
@@ -479,76 +507,76 @@ const Te = { class: "cd-ps-container" }, ze = {
479
507
  organizations: {}
480
508
  },
481
509
  emits: ["update:modelValue", "search", "load-users"],
482
- setup(y, { emit: q }) {
483
- const b = y, c = q, U = h(!1), T = h([]), I = h(!1), z = h([]), P = h([]), r = h(!1), x = h(""), G = M(() => b.modelValue.map((t) => ({
484
- label: t.name,
485
- value: t.id
486
- }))), H = (t) => t ? t.substring(0, 2).toUpperCase() : "", J = (t) => {
510
+ setup(b, { emit: Q }) {
511
+ const C = b, r = Q, V = y(!1), T = y([]), U = y(!1), z = y([]), W = y([]), v = y(!1), I = y(""), X = A(() => C.modelValue.map((a) => ({
512
+ label: a.name,
513
+ value: a.id
514
+ }))), j = (a) => a ? a.substring(0, 2).toUpperCase() : "", F = (a) => {
487
515
  const i = ["#1890ff", "#52c41a", "#faad14", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#fa8c16"];
488
- let m = 0;
489
- for (let _ = 0; _ < t.length; _++)
490
- m = t.charCodeAt(_) + ((m << 5) - m);
491
- return i[Math.abs(m) % i.length];
492
- }, D = (t) => String(t).startsWith("dept-"), oe = (t) => {
493
- const i = String(t);
516
+ let k = 0;
517
+ for (let O = 0; O < a.length; O++)
518
+ k = a.charCodeAt(O) + ((k << 5) - k);
519
+ return i[Math.abs(k) % i.length];
520
+ }, D = (a) => String(a).startsWith("dept-"), ie = (a) => {
521
+ const i = String(a);
494
522
  return i.startsWith("dept-") ? "warning" : i.startsWith("u-") ? "primary" : i.startsWith("pos-") ? "success" : i.startsWith("role-") ? "info" : "default";
495
- }, K = (t) => b.modelValue.some((i) => i.id === t), ie = (t) => ({
496
- id: t.id,
497
- name: t.displayName || t.name || t.title || String(t.id),
498
- avatar: t.avatar || "",
499
- department: t.department || "",
500
- position: t.position || "",
501
- phone: t.phone || "",
502
- isUser: t.isUser !== !1
503
- }), L = (t) => {
504
- c("update:modelValue", t), P.value = t;
505
- }, de = (t) => {
506
- t || (T.value = [], x.value = "");
507
- }, O = (t, i) => {
508
- t ? b.multiple ? L([...b.modelValue, i]) : (L([i]), r.value = !1) : L(b.modelValue.filter((m) => m.id !== i.id));
509
- }, ee = (t, i) => {
510
- const { trigger: m, index: _ } = i;
511
- if ((m === "tag-remove" || m === "backspace") && (r.value = !1), m === "clear")
523
+ }, ae = (a) => C.modelValue.some((i) => i.id === a), ce = (a) => ({
524
+ id: a.id,
525
+ name: a.displayName || a.name || a.title || String(a.id),
526
+ avatar: a.avatar || "",
527
+ department: a.department || "",
528
+ position: a.position || "",
529
+ phone: a.phone || "",
530
+ isUser: a.isUser !== !1
531
+ }), L = (a) => {
532
+ r("update:modelValue", a), W.value = a;
533
+ }, de = (a) => {
534
+ a || (T.value = [], I.value = "");
535
+ }, R = (a, i) => {
536
+ a ? C.multiple ? L([...C.modelValue, i]) : (L([i]), v.value = !1) : L(C.modelValue.filter((k) => k.id !== i.id));
537
+ }, se = (a, i) => {
538
+ const { trigger: k, index: O } = i;
539
+ if ((k === "tag-remove" || k === "backspace") && (v.value = !1), k === "clear")
512
540
  z.value = [], L([]);
513
- else if (["tag-remove", "backspace"].includes(m)) {
514
- const A = t.map((n) => n.value || n);
515
- z.value = A;
516
- const B = [...b.modelValue];
517
- B.splice(_, 1), L(B);
541
+ else if (["tag-remove", "backspace"].includes(k)) {
542
+ const w = a.map((o) => o.value || o);
543
+ z.value = w;
544
+ const P = [...C.modelValue];
545
+ P.splice(O, 1), L(P);
518
546
  }
519
- }, ce = (t) => {
520
- t.stopPropagation(), t.preventDefault(), r.value = !1, I.value = !0;
521
- }, te = (t) => {
522
- const i = t.map(ie), m = new Set(b.modelValue.map((B) => B.id)), _ = i.filter((B) => !m.has(B.id)), A = b.multiple ? [...b.modelValue, ..._] : i.slice(0, 1);
523
- L(A), I.value = !1;
524
- }, E = (t) => {
525
- c("load-users", t);
526
- }, ae = (t) => {
527
- c("search", { keyword: t.keyword, callback: t.callback });
547
+ }, ue = (a) => {
548
+ a.stopPropagation(), a.preventDefault(), v.value = !1, U.value = !0;
549
+ }, Y = (a) => {
550
+ const i = a.map(ce), k = new Set(C.modelValue.map((P) => P.id)), O = i.filter((P) => !k.has(P.id)), w = C.multiple ? [...C.modelValue, ...O] : i.slice(0, 1);
551
+ L(w), U.value = !1;
552
+ }, J = (a) => {
553
+ r("load-users", a);
554
+ }, le = (a) => {
555
+ r("search", { keyword: a.keyword, callback: a.callback });
528
556
  };
529
- return F(() => b.modelValue, (t) => {
530
- z.value = t.map((i) => i.id), P.value = t;
531
- }, { immediate: !0, deep: !0 }), F(x, (t) => {
532
- if (!(t != null && t.trim())) {
533
- T.value = [], U.value = !1;
557
+ return H(() => C.modelValue, (a) => {
558
+ z.value = a.map((i) => i.id), W.value = a;
559
+ }, { immediate: !0, deep: !0 }), H(I, (a) => {
560
+ if (!(a != null && a.trim())) {
561
+ T.value = [], V.value = !1;
534
562
  return;
535
563
  }
536
- U.value = !0, c("search", {
537
- keyword: t,
564
+ V.value = !0, r("search", {
565
+ keyword: a,
538
566
  callback: (i) => {
539
- T.value = i, U.value = !1, i.length > 0 && (r.value = !0);
567
+ T.value = i, V.value = !1, i.length > 0 && (v.value = !0);
540
568
  }
541
569
  });
542
- }), (t, i) => {
543
- var B;
544
- const m = N("t-checkbox"), _ = N("t-tag"), A = N("t-select-input");
545
- return l(), d("div", ht, [
546
- g(A, {
547
- value: G.value,
548
- inputValue: x.value,
549
- "onUpdate:inputValue": i[0] || (i[0] = (n) => x.value = n),
550
- "popup-visible": r.value,
551
- "onUpdate:popupVisible": i[1] || (i[1] = (n) => r.value = n),
570
+ }), (a, i) => {
571
+ var P;
572
+ const k = x("t-checkbox"), O = x("t-tag"), w = x("t-select-input");
573
+ return l(), c("div", ft, [
574
+ S(w, {
575
+ value: X.value,
576
+ inputValue: I.value,
577
+ "onUpdate:inputValue": i[0] || (i[0] = (o) => I.value = o),
578
+ "popup-visible": v.value,
579
+ "onUpdate:popupVisible": i[1] || (i[1] = (o) => v.value = o),
552
580
  "input-props": {
553
581
  readonly: !1,
554
582
  disabled: !1
@@ -560,98 +588,99 @@ const Te = { class: "cd-ps-container" }, ze = {
560
588
  overlayInnerStyle: { padding: "6px" },
561
589
  closeBtn: !0
562
590
  },
563
- placeholder: y.placeholder,
564
- loading: U.value,
591
+ placeholder: b.placeholder,
592
+ loading: V.value,
565
593
  "allow-input": "",
566
594
  clearable: "",
567
- multiple: y.multiple,
595
+ multiple: b.multiple,
568
596
  class: "cd-input-select__select",
569
597
  onPopupVisibleChange: de,
570
- onTagChange: ee
598
+ onTagChange: se
571
599
  }, {
572
- panel: S(() => [
573
- T.value.length > 0 ? (l(), d("div", mt, [
574
- (l(!0), d(X, null, Y(T.value, (n) => (l(), W(m, {
575
- key: n.id,
576
- value: n.id,
577
- checked: K(n.id),
600
+ panel: N(() => [
601
+ T.value.length > 0 ? (l(), c("div", ht, [
602
+ (l(!0), c(G, null, te(T.value, (o) => (l(), E(k, {
603
+ key: o.id,
604
+ value: o.id,
605
+ checked: ae(o.id),
578
606
  class: "cd-input-select__option",
579
- onChange: (ue) => O(ue, n)
607
+ onChange: (ne) => R(ne, o)
580
608
  }, {
581
- default: S(() => [
582
- u("div", ft, [
583
- n.avatar ? (l(), d("div", _t, [
584
- u("img", {
585
- src: n.avatar,
586
- alt: n.name
609
+ default: N(() => [
610
+ p("div", mt, [
611
+ o.avatar ? (l(), c("div", _t, [
612
+ p("img", {
613
+ src: o.avatar,
614
+ alt: o.name
587
615
  }, null, 8, gt)
588
- ])) : (l(), d("div", {
616
+ ])) : (l(), c("div", {
589
617
  key: 1,
590
618
  class: "cd-input-select__option-avatar cd-input-select__option-avatar--placeholder",
591
- style: Ne({
592
- backgroundColor: D(n.id) ? "#e6f4ff" : J(n.name),
593
- color: D(n.id) ? "#0052d9" : "#fff"
619
+ style: Te({
620
+ backgroundColor: D(o.id) ? "#e6f4ff" : F(o.name),
621
+ color: D(o.id) ? "#0052d9" : "#fff"
594
622
  })
595
- }, v(H(n.name)), 5)),
596
- u("div", kt, [
597
- u("div", yt, v(n.name), 1),
598
- n.department || n.position ? (l(), d("div", bt, v(n.department) + v(n.department && n.position ? " · " : "") + v(n.position), 1)) : k("", !0)
623
+ }, h(j(o.name)), 5)),
624
+ p("div", yt, [
625
+ p("div", kt, h(o.name), 1),
626
+ o.department || o.position ? (l(), c("div", bt, h(o.department) + h(o.department && o.position ? " · " : "") + h(o.position), 1)) : _("", !0)
599
627
  ]),
600
- D(n.id) ? (l(), d("i", Ct)) : k("", !0)
628
+ D(o.id) ? (l(), c("i", Ct)) : _("", !0)
601
629
  ])
602
630
  ]),
603
631
  _: 2
604
632
  }, 1032, ["value", "checked", "onChange"]))), 128))
605
- ])) : U.value ? (l(), d("div", Vt, " 搜索中... ")) : (l(), d("div", St, " 暂无搜索结果 "))
633
+ ])) : V.value ? (l(), c("div", Vt, " 搜索中... ")) : (l(), c("div", Ut, " 暂无搜索结果 "))
606
634
  ]),
607
- tag: S(({ tag: n }) => [
608
- g(_, {
609
- theme: oe(n.value),
635
+ tag: N((o) => [
636
+ o && o.tag ? (l(), E(O, {
637
+ key: 0,
638
+ theme: ie(typeof o.tag == "object" ? o.tag.value : o.tag),
610
639
  variant: "light",
611
640
  closable: !0,
612
641
  size: "medium"
613
642
  }, {
614
- default: S(() => [
615
- Z(v(n.label), 1)
643
+ default: N(() => [
644
+ oe(h(typeof o.tag == "object" ? o.tag.label : o.tag), 1)
616
645
  ]),
617
646
  _: 2
618
- }, 1032, ["theme"])
647
+ }, 1032, ["theme"])) : _("", !0)
619
648
  ]),
620
- suffixIcon: S(() => [
621
- u("i", {
649
+ suffixIcon: N(() => [
650
+ p("i", {
622
651
  class: "ri-add-circle-line cd-input-select__add-icon",
623
- onClick: ce
652
+ onClick: ue
624
653
  })
625
654
  ]),
626
655
  _: 1
627
656
  }, 8, ["value", "inputValue", "popup-visible", "placeholder", "loading", "multiple"]),
628
- (B = y.tabs) != null && B.length && I.value ? (l(), W(be, {
657
+ (P = b.tabs) != null && P.length && U.value ? (l(), E(ke, {
629
658
  key: 0,
630
- visible: I.value,
631
- "onUpdate:visible": i[2] || (i[2] = (n) => I.value = n),
659
+ visible: U.value,
660
+ "onUpdate:visible": i[2] || (i[2] = (o) => U.value = o),
632
661
  modelValue: z.value,
633
- "onUpdate:modelValue": i[3] || (i[3] = (n) => z.value = n),
634
- tabs: y.tabs,
635
- organizations: y.organizations || [],
662
+ "onUpdate:modelValue": i[3] || (i[3] = (o) => z.value = o),
663
+ tabs: b.tabs,
664
+ organizations: b.organizations || [],
636
665
  "show-org": !1,
637
666
  "show-search": !0,
638
- multiple: y.multiple,
639
- onConfirm: te,
640
- onLoadUsers: E,
641
- onSearch: ae,
642
- onClose: i[4] || (i[4] = (n) => I.value = !1)
643
- }, null, 8, ["visible", "modelValue", "tabs", "organizations", "multiple"])) : k("", !0)
667
+ multiple: b.multiple,
668
+ onConfirm: Y,
669
+ onLoadUsers: J,
670
+ onSearch: le,
671
+ onClose: i[4] || (i[4] = (o) => U.value = !1)
672
+ }, null, 8, ["visible", "modelValue", "tabs", "organizations", "multiple"])) : _("", !0)
644
673
  ]);
645
674
  };
646
675
  }
647
- }), It = /* @__PURE__ */ ye(Ut, [["__scopeId", "data-v-697aa614"]]), Tt = {
648
- install(y) {
649
- y.component("PersonSelector", be), y.component("CdInputPersonSelector", It);
676
+ }), It = /* @__PURE__ */ ye(St, [["__scopeId", "data-v-681cee2f"]]), Nt = {
677
+ install(b) {
678
+ b.component("PersonSelector", ke), b.component("CdInputPersonSelector", It);
650
679
  }
651
680
  };
652
681
  export {
653
682
  It as CdInputPersonSelector,
654
683
  It as InputSelect,
655
- be as PersonSelector,
656
- Tt as default
684
+ ke as PersonSelector,
685
+ Nt as default
657
686
  };