@baishuyun/ui-business 5.1.5 → 5.1.7

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 (26) hide show
  1. package/dist/BubbleChart/{AutoGridEChart-B2a7zGgi.js → AutoGridEChart-nA3DwlqB.js} +27 -25
  2. package/dist/BubbleChart/{BubbleChart-BPIsaE-C.js → BubbleChart-Bq-qzSTk.js} +3 -2
  3. package/dist/BubbleChart/index.js +2 -2
  4. package/dist/DeptsMemberSelector/{Department-12ftZfXD.js → Department-H6zGUr4c.js} +5 -5
  5. package/dist/DeptsMemberSelector/{DeptsMemberSelector-BXWGwgUq.js → DeptsMemberSelector-DjDAPVIj.js} +236 -236
  6. package/dist/DeptsMemberSelector/{DeptsUser-C8hYQ6z-.js → DeptsUser-Coh1rKPm.js} +3 -3
  7. package/dist/DeptsMemberSelector/{ExtraConcactPanel-BDNrz5rV.js → ExtraConcactPanel-CWKwVmbx.js} +216 -216
  8. package/dist/DeptsMemberSelector/{Member-B4tEHksu.js → Member-Ds_Qzw0L.js} +25 -22
  9. package/dist/DeptsMemberSelector/OrganizationPanel-CT3v_KVr.js +374 -0
  10. package/dist/DeptsMemberSelector/{TabGroup-Ds7bTbKL.js → TabGroup-Dht9ylk4.js} +13 -13
  11. package/dist/DeptsMemberSelector/index.js +7 -7
  12. package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +3 -3
  13. package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +4 -4
  14. package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +3 -3
  15. package/dist/Scatterplot/{Scatterplot-C1XSsAKR.js → Scatterplot-COVrzURp.js} +3 -2
  16. package/dist/Scatterplot/index.js +2 -2
  17. package/dist/components/BubbleChart/BubbleChart.type.d.ts +1 -0
  18. package/dist/components/DeptsMemberSelector/utils/departmentStatus.d.ts +3 -0
  19. package/dist/components/Scatterplot/Scatterplot.type.d.ts +1 -0
  20. package/dist/index.css +1 -1
  21. package/dist/index.js +10 -10
  22. package/dist/lang/en-US.json.d.ts +1 -0
  23. package/dist/lang/zh-CN.json.d.ts +1 -0
  24. package/dist/vendors/useLocale.js +2 -0
  25. package/package.json +3 -3
  26. package/dist/DeptsMemberSelector/OrganizationPanel-DoM4UNxv.js +0 -374
@@ -3,22 +3,22 @@ import { t } from "../vendors/clsx.js";
3
3
  import { a as n, o as r } from "../vendors/lodash-es.js";
4
4
  import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./useDeptsMemberSelector-t7b8yu-A.js";
5
5
  import { b as m, d as h, f as g, h as _, p as v, t as y } from "./services/contact/selector.service-CY5vQea8.js";
6
- import { n as b, r as x } from "./TabGroup-Ds7bTbKL.js";
7
- import { t as S } from "../vendors/useLocale.js";
8
- import { findNodeInTree as C, getColorByName as w, getMemberDisplayName as T } from "./utils/index.js";
9
- import { t as E } from "./DeptsUser-C8hYQ6z-.js";
10
- import { t as D } from "./Member-B4tEHksu.js";
11
- import { n as O, t as k } from "./Department-12ftZfXD.js";
12
- import { forwardRef as A, useCallback as ee, useEffect as j, useImperativeHandle as te, useMemo as M, useRef as N, useState as P } from "react";
13
- import { Avatar as F, Button as I, Spin as L } from "antd";
14
- import { Icon as R, Tree as ne } from "@baishuyun/ui-base";
6
+ import { a as b, i as x, n as S, r as C } from "./TabGroup-Dht9ylk4.js";
7
+ import { t as w } from "../vendors/useLocale.js";
8
+ import { findNodeInTree as T, getColorByName as E, getMemberDisplayName as D } from "./utils/index.js";
9
+ import { t as O } from "./DeptsUser-Coh1rKPm.js";
10
+ import { t as k } from "./Member-Ds_Qzw0L.js";
11
+ import { n as A, t as ee } from "./Department-H6zGUr4c.js";
12
+ import { forwardRef as j, useCallback as te, useEffect as M, useImperativeHandle as ne, useMemo as N, useRef as P, useState as F } from "react";
13
+ import { Avatar as I, Button as L, Spin as R } from "antd";
14
+ import { Icon as z, Tree as B } from "@baishuyun/ui-base";
15
15
  import { createPortal as re } from "react-dom";
16
- import { AnimatePresence as ie, motion as z } from "motion/react";
17
- import { useControllableValue as B, useRequest as V, useToggle as ae } from "ahooks";
18
- import { jsx as H, jsxs as U } from "react/jsx-runtime";
19
- import { produce as oe } from "immer";
16
+ import { AnimatePresence as ie, motion as ae } from "motion/react";
17
+ import { useControllableValue as V, useRequest as H, useToggle as oe } from "ahooks";
18
+ import { jsx as U, jsxs as W } from "react/jsx-runtime";
19
+ import { produce as se } from "immer";
20
20
  //#region src/components/DeptsMemberSelector/subcomponents/SelectionArea/SelectionArea.module.scss
21
- var W = {
21
+ var G = {
22
22
  "selection-area": "_selection-area_7ti3u_1",
23
23
  "selection-area__container": "_selection-area__container_7ti3u_4",
24
24
  "selection-area__container--expanded": "_selection-area__container--expanded_7ti3u_11",
@@ -31,14 +31,14 @@ var W = {
31
31
  "selection-area__measure-group": "_selection-area__measure-group_7ti3u_53",
32
32
  "selection-area__mask": "_selection-area__mask_7ti3u_61",
33
33
  "selection-area__measure-wrapper": "_selection-area__measure-wrapper_7ti3u_67"
34
- }, se = "bsy_dept_member", ce = "preset_bsy_dept_member";
35
- function G(e, t) {
34
+ }, ce = "bsy_dept_member", le = "preset_bsy_dept_member";
35
+ function ue(e, t) {
36
36
  try {
37
37
  let n = e.includes("-relationSub-") ? "relationSub" : e.includes("-relationUser-") ? "relationUser" : e.includes("-relation-") ? "relation" : null;
38
38
  if (!n) return t;
39
- let r = e.split("-")[0], i, a = sessionStorage.getItem(ce);
39
+ let r = e.split("-")[0], i, a = sessionStorage.getItem(le);
40
40
  if (a && (i = JSON.parse(a).find((e) => String(e._id) === r)), !i) {
41
- let e = sessionStorage.getItem(se);
41
+ let e = sessionStorage.getItem(ce);
42
42
  e && (i = JSON.parse(e).find((e) => String(e._id) === r));
43
43
  }
44
44
  if (!i) return t;
@@ -54,7 +54,7 @@ function G(e, t) {
54
54
  }
55
55
  //#endregion
56
56
  //#region src/components/DeptsMemberSelector/subcomponents/SelectionArea/PreviewSelectedItems/PreviewSelectedItems.module.scss
57
- var le = "_anticon_184kl_76", K = {
57
+ var de = "_anticon_184kl_76", K = {
58
58
  "preview-selected-items": "_preview-selected-items_184kl_1",
59
59
  "preview-selected-items--measure": "_preview-selected-items--measure_184kl_4",
60
60
  "preview-selected-items__wrapper": "_preview-selected-items__wrapper_184kl_13",
@@ -69,61 +69,61 @@ var le = "_anticon_184kl_76", K = {
69
69
  "preview-selected-items__name": "_preview-selected-items__name_184kl_57",
70
70
  "preview-selected-items__badge": "_preview-selected-items__badge_184kl_64",
71
71
  "preview-selected-items__close": "_preview-selected-items__close_184kl_69",
72
- anticon: le,
72
+ anticon: de,
73
73
  "preview-selected-items__more": "_preview-selected-items__more_184kl_83",
74
74
  "preview-selected-items__more-button": "_preview-selected-items__more-button_184kl_89"
75
- }, q = A((e, n) => {
76
- let { isMeasure: i = !1, showEllipsisButton: a = !1, onToggle: o, hiddenCount: s = 0, previewCount: c = 0 } = e, { t: l } = S(), { value: u = [], setValue: d, type: p } = f(), m = N(null), h = N(null), g = {
75
+ }, q = j((e, n) => {
76
+ let { isMeasure: i = !1, showEllipsisButton: a = !1, onToggle: o, hiddenCount: s = 0, previewCount: c = 0 } = e, { t: l } = w(), { value: u = [], setValue: d, type: p } = f(), m = P(null), h = P(null), g = {
77
77
  dockcorp: l("department.externalContactGroup"),
78
78
  dockcorpdept: l("department.contact")
79
79
  }, _ = (e) => d?.(u.filter((t) => t._id !== e));
80
- return te(n, () => ({
80
+ return ne(n, () => ({
81
81
  measureRef: m.current,
82
82
  ellipsisButtonRef: h.current
83
- })), /* @__PURE__ */ H("div", {
83
+ })), /* @__PURE__ */ U("div", {
84
84
  className: t(K["preview-selected-items"], { [K["preview-selected-items--measure"]]: i }),
85
- children: /* @__PURE__ */ U("ul", {
85
+ children: /* @__PURE__ */ W("ul", {
86
86
  className: K["preview-selected-items__list"],
87
87
  ref: i ? m : void 0,
88
88
  "data-role": i ? "measure-list" : "preview-list",
89
89
  children: [u.slice(0, c)?.map((e, n) => {
90
- let a = T(e), o = e.type ? e.type : Object.prototype.hasOwnProperty.call(e, "departmentId") ? null : "group", s = [
90
+ let a = D(e), o = e.type ? e.type : Object.prototype.hasOwnProperty.call(e, "departmentId") ? null : "group", s = [
91
91
  "relation",
92
92
  "relationSub",
93
93
  "relationUser"
94
- ].some((t) => e._id.includes(t)), c = s ? G(e._id, a) : a, l = s ? "relation" : o, u = !!e.nickname;
95
- return /* @__PURE__ */ U("li", {
94
+ ].some((t) => e._id.includes(t)), c = s ? ue(e._id, a) : a, l = s ? "relation" : o, u = !!e.nickname;
95
+ return /* @__PURE__ */ W("li", {
96
96
  className: t(K["preview-selected-items__item"], {
97
- [K["preview-selected-items__item--user"]]: [x.USER, x.USER_GROUP].includes(p),
98
- [K["preview-selected-items__item--department"]]: [x.DEPARMENT, x.DEPARMENT_GROUP].includes(p),
97
+ [K["preview-selected-items__item--user"]]: [b.USER, b.USER_GROUP].includes(p),
98
+ [K["preview-selected-items__item--department"]]: [b.DEPARMENT, b.DEPARMENT_GROUP].includes(p),
99
99
  [K["preview-selected-items__item--relation"]]: s,
100
100
  [K["preview-selected-items__item--public"]]: e.type === "public"
101
101
  }),
102
102
  children: [
103
- /* @__PURE__ */ H("div", {
103
+ /* @__PURE__ */ U("div", {
104
104
  className: K["preview-selected-items__content"],
105
- children: u ? e.avatarurl ? /* @__PURE__ */ H(F, {
105
+ children: u ? e.avatarurl ? /* @__PURE__ */ U(I, {
106
106
  src: e.avatarurl,
107
107
  size: 20
108
- }) : /* @__PURE__ */ H(F, {
108
+ }) : /* @__PURE__ */ U(I, {
109
109
  style: {
110
- backgroundColor: w(c),
110
+ backgroundColor: E(c),
111
111
  fontSize: "12px",
112
112
  lineHeight: "13px",
113
113
  width: "20px",
114
114
  height: "20px"
115
115
  },
116
116
  children: c?.charAt(0) || "?"
117
- }) : /* @__PURE__ */ H(b, { type: l })
117
+ }) : /* @__PURE__ */ U(x, { type: l })
118
118
  }),
119
- /* @__PURE__ */ U("div", {
119
+ /* @__PURE__ */ W("div", {
120
120
  className: K["preview-selected-items__text"],
121
121
  "data-type": e.type,
122
- children: [/* @__PURE__ */ H("span", {
122
+ children: [/* @__PURE__ */ U("span", {
123
123
  className: K["preview-selected-items__name"],
124
124
  title: c,
125
125
  children: c
126
- }), e.type === "dockcorpdept" || e.type === "dockcorp" ? /* @__PURE__ */ U("span", {
126
+ }), e.type === "dockcorpdept" || e.type === "dockcorp" ? /* @__PURE__ */ W("span", {
127
127
  className: K["preview-selected-items__badge"],
128
128
  children: [
129
129
  "(",
@@ -132,41 +132,41 @@ var le = "_anticon_184kl_76", K = {
132
132
  ]
133
133
  }) : null]
134
134
  }),
135
- /* @__PURE__ */ H("div", {
135
+ /* @__PURE__ */ U("div", {
136
136
  role: "button",
137
137
  className: K["preview-selected-items__close"],
138
138
  onClick: i ? r : () => _(e._id),
139
- children: /* @__PURE__ */ H(R, {
139
+ children: /* @__PURE__ */ U(z, {
140
140
  name: "close",
141
141
  color: "#666"
142
142
  })
143
143
  })
144
144
  ]
145
145
  }, n);
146
- }), a && !i && /* @__PURE__ */ H("li", {
146
+ }), a && !i && /* @__PURE__ */ U("li", {
147
147
  ref: h,
148
148
  className: K["preview-selected-items__more"],
149
149
  "data-button": "ellipsis-button",
150
- children: /* @__PURE__ */ U("div", {
150
+ children: /* @__PURE__ */ W("div", {
151
151
  role: "button",
152
152
  className: K["preview-selected-items__more-button"],
153
153
  onClick: () => {
154
154
  o?.();
155
155
  },
156
- children: [/* @__PURE__ */ H("span", { children: l("common.viewAll", { count: s }) }), /* @__PURE__ */ H(R, { name: "arrow-down" })]
156
+ children: [/* @__PURE__ */ U("span", { children: l("common.viewAll", { count: s }) }), /* @__PURE__ */ U(z, { name: "arrow-down" })]
157
157
  })
158
158
  })]
159
159
  })
160
160
  });
161
- }), ue = () => {
162
- let { value: n = [], type: r } = f(), { t: i } = S(), [a, o] = P(0), [s, { toggle: c }] = ae(!1), [l, u] = P(!1), [d, p] = P(null), m = N(null), h = N(null), g = [x.DEPARMENT, x.USER].includes(r) ? 30 : 68;
163
- j(() => {
161
+ }), fe = () => {
162
+ let { value: n = [], type: r } = f(), { t: i } = w(), [a, o] = F(0), [s, { toggle: c }] = oe(!1), [l, u] = F(!1), [d, p] = F(null), m = P(null), h = P(null), g = [b.DEPARMENT, b.USER].includes(r) ? 30 : 68;
163
+ M(() => {
164
164
  s && u(!0);
165
165
  }, [s]);
166
166
  let _ = () => {
167
167
  s || u(!1);
168
- }, [v, y] = P(!1);
169
- j(() => {
168
+ }, [v, y] = F(!1);
169
+ M(() => {
170
170
  if (!m.current || !h.current) return;
171
171
  let e = () => {
172
172
  requestAnimationFrame(() => {
@@ -201,34 +201,34 @@ var le = "_anticon_184kl_76", K = {
201
201
  };
202
202
  e();
203
203
  }, [a, n]);
204
- let b = n.length - a, C = v && !s, w = M(() => s && h?.current?.querySelector("[data-role=\"measure-list\"]")?.clientHeight || g, [g, s]);
205
- return /* @__PURE__ */ H("div", {
206
- className: W["selection-area"],
204
+ let x = n.length - a, S = v && !s, C = N(() => s && h?.current?.querySelector("[data-role=\"measure-list\"]")?.clientHeight || g, [g, s]);
205
+ return /* @__PURE__ */ U("div", {
206
+ className: G["selection-area"],
207
207
  style: { height: l ? "90px" : "auto" },
208
- children: /* @__PURE__ */ U("div", {
209
- className: t(W["selection-area__container"], {
210
- [W["selection-area__container--expanded"]]: s,
211
- [W["selection-area__container--animating"]]: l
208
+ children: /* @__PURE__ */ W("div", {
209
+ className: t(G["selection-area__container"], {
210
+ [G["selection-area__container--expanded"]]: s,
211
+ [G["selection-area__container--animating"]]: l
212
212
  }),
213
213
  children: [
214
- /* @__PURE__ */ U("div", {
215
- className: t(W["selection-area__body"], { [W["selection-area__body--expanded"]]: s }),
214
+ /* @__PURE__ */ W("div", {
215
+ className: t(G["selection-area__body"], { [G["selection-area__body--expanded"]]: s }),
216
216
  ref: h,
217
- children: [/* @__PURE__ */ H(q, {
217
+ children: [/* @__PURE__ */ U(q, {
218
218
  isMeasure: !0,
219
219
  previewCount: n.length
220
- }), /* @__PURE__ */ H(e, {
220
+ }), /* @__PURE__ */ U(e, {
221
221
  style: { maxHeight: "400px" },
222
- children: /* @__PURE__ */ H("div", {
223
- className: W["selection-area__scroll-gutter"],
224
- children: /* @__PURE__ */ H("div", {
225
- className: W["selection-area__scroll"],
222
+ children: /* @__PURE__ */ U("div", {
223
+ className: G["selection-area__scroll-gutter"],
224
+ children: /* @__PURE__ */ U("div", {
225
+ className: G["selection-area__scroll"],
226
226
  ref: m,
227
- style: { height: w + "px" },
228
- children: /* @__PURE__ */ H(q, {
227
+ style: { height: C + "px" },
228
+ children: /* @__PURE__ */ U(q, {
229
229
  previewCount: s ? n.length : a,
230
- showEllipsisButton: C,
231
- hiddenCount: b,
230
+ showEllipsisButton: S,
231
+ hiddenCount: x,
232
232
  onToggle: () => {
233
233
  p(document.querySelector("[data-teleport=\"DeptsMemberSelector\"]")), c();
234
234
  }
@@ -237,8 +237,8 @@ var le = "_anticon_184kl_76", K = {
237
237
  })
238
238
  })]
239
239
  }),
240
- d && re(/* @__PURE__ */ H(ie, { children: s && /* @__PURE__ */ H(z.div, {
241
- className: W["selection-area__mask"],
240
+ d && re(/* @__PURE__ */ U(ie, { children: s && /* @__PURE__ */ U(ae.div, {
241
+ className: G["selection-area__mask"],
242
242
  initial: {
243
243
  opacity: 0,
244
244
  backdropFilter: "blur(0px)"
@@ -257,18 +257,18 @@ var le = "_anticon_184kl_76", K = {
257
257
  },
258
258
  onAnimationComplete: _
259
259
  }) }), d),
260
- /* @__PURE__ */ H(ie, {
260
+ /* @__PURE__ */ U(ie, {
261
261
  mode: "wait",
262
- children: s && /* @__PURE__ */ H(z.div, {
263
- className: W["selection-area__button"],
262
+ children: s && /* @__PURE__ */ U(ae.div, {
263
+ className: G["selection-area__button"],
264
264
  initial: { opacity: 1 },
265
265
  exit: { opacity: 0 },
266
266
  transition: { duration: .3 },
267
267
  onAnimationComplete: _,
268
- children: /* @__PURE__ */ U(I, {
268
+ children: /* @__PURE__ */ W(L, {
269
269
  type: "link",
270
270
  onClick: () => c(),
271
- children: [i("common.collapseAll"), /* @__PURE__ */ H(R, { name: "arrow-up" })]
271
+ children: [i("common.collapseAll"), /* @__PURE__ */ U(z, { name: "arrow-up" })]
272
272
  })
273
273
  })
274
274
  })
@@ -286,12 +286,12 @@ var le = "_anticon_184kl_76", K = {
286
286
  "selection-tab-list__search-field": "_selection-tab-list__search-field_ujxba_43",
287
287
  "selection-tab-list__input": "_selection-tab-list__input_ujxba_47",
288
288
  "selection-tab-list__search-icon": "_selection-tab-list__search-icon_ujxba_64"
289
- }, de = (e) => {
290
- let [r, i] = B(e, { defaultValue: e.tabs.length ? e.tabs[0].key : void 0 }), [a, o] = P(""), s = N(/* @__PURE__ */ new Map()), [c, l] = P({
289
+ }, pe = (e) => {
290
+ let [r, i] = V(e, { defaultValue: e.tabs.length ? e.tabs[0].key : void 0 }), [a, o] = F(""), s = P(/* @__PURE__ */ new Map()), [c, l] = F({
291
291
  width: 0,
292
292
  transform: "translateX(0)"
293
- }), u = N(n((t) => e.onSearch?.(t), 250)).current;
294
- j(() => () => {
293
+ }), u = P(n((t) => e.onSearch?.(t), 250)).current;
294
+ M(() => () => {
295
295
  u.cancel();
296
296
  }, [u]);
297
297
  let d = (e) => {
@@ -304,22 +304,22 @@ var le = "_anticon_184kl_76", K = {
304
304
  });
305
305
  }
306
306
  };
307
- return j(() => {
307
+ return M(() => {
308
308
  let t = r && e.tabs.some((e) => e.key === r) ? r : e.tabs.length ? e.tabs[0].key : void 0;
309
309
  t && d(t);
310
- }, [e.tabs, r]), /* @__PURE__ */ U("div", {
310
+ }, [e.tabs, r]), /* @__PURE__ */ W("div", {
311
311
  className: J["selection-tab-list"],
312
- children: [/* @__PURE__ */ U("div", {
312
+ children: [/* @__PURE__ */ W("div", {
313
313
  className: J["selection-tab-list__tabs-wrapper"],
314
- children: [/* @__PURE__ */ H("div", {
314
+ children: [/* @__PURE__ */ U("div", {
315
315
  className: J["selection-tab-list__indicator"],
316
316
  style: {
317
317
  width: `${c.width}px`,
318
318
  transform: c.transform
319
319
  }
320
- }), /* @__PURE__ */ H("ul", {
320
+ }), /* @__PURE__ */ U("ul", {
321
321
  className: J["selection-tab-list__tabs"],
322
- children: e.tabs.map((e) => /* @__PURE__ */ H("li", {
322
+ children: e.tabs.map((e) => /* @__PURE__ */ U("li", {
323
323
  ref: (t) => {
324
324
  t && s.current.set(e.key, t);
325
325
  },
@@ -328,11 +328,11 @@ var le = "_anticon_184kl_76", K = {
328
328
  children: e.label
329
329
  }, e.key))
330
330
  })]
331
- }), /* @__PURE__ */ H("div", {
331
+ }), /* @__PURE__ */ U("div", {
332
332
  className: J["selection-tab-list__search"],
333
- children: /* @__PURE__ */ U("div", {
333
+ children: /* @__PURE__ */ W("div", {
334
334
  className: J["selection-tab-list__search-field"],
335
- children: [/* @__PURE__ */ H("input", {
335
+ children: [/* @__PURE__ */ U("input", {
336
336
  type: "text",
337
337
  value: a,
338
338
  onChange: (e) => {
@@ -340,21 +340,21 @@ var le = "_anticon_184kl_76", K = {
340
340
  },
341
341
  placeholder: e.searchPlaceholder,
342
342
  className: J["selection-tab-list__input"]
343
- }), /* @__PURE__ */ H(R, {
343
+ }), /* @__PURE__ */ U(z, {
344
344
  name: "search",
345
345
  className: J["selection-tab-list__search-icon"]
346
346
  })]
347
347
  })
348
348
  })]
349
349
  });
350
- }, fe = { "selection-tab-panel": "_selection-tab-panel_f6iav_1" }, pe = (e) => {
350
+ }, me = { "selection-tab-panel": "_selection-tab-panel_f6iav_1" }, he = (e) => {
351
351
  let { containerHeight: n } = f();
352
- return /* @__PURE__ */ H("div", {
353
- className: t(fe["selection-tab-panel"]),
352
+ return /* @__PURE__ */ U("div", {
353
+ className: t(me["selection-tab-panel"]),
354
354
  style: { height: n + "px" },
355
355
  children: e.children
356
356
  });
357
- }, me = { "selection-tabs": "_selection-tabs_88491_1" }, Y = {
357
+ }, ge = { "selection-tabs": "_selection-tabs_88491_1" }, Y = {
358
358
  "member-search": "_member-search_162pf_1",
359
359
  "member-search__tree-wrapper": "_member-search__tree-wrapper_162pf_6",
360
360
  "member-search__tree-content": "_member-search__tree-content_162pf_9",
@@ -365,14 +365,14 @@ var le = "_anticon_184kl_76", K = {
365
365
  "member-search__switch-icon--expanded": "_member-search__switch-icon--expanded_162pf_41",
366
366
  "member-search__empty": "_member-search__empty_162pf_44",
367
367
  "member-search__empty-text": "_member-search__empty-text_162pf_51"
368
- }, X = ({ avatarurl: e, randomColor: t, name: n, extra: r }) => /* @__PURE__ */ U("div", {
368
+ }, X = ({ avatarurl: e, randomColor: t, name: n, extra: r }) => /* @__PURE__ */ W("div", {
369
369
  className: Y["member-search__tree-title"],
370
370
  children: [
371
- e ? /* @__PURE__ */ H(F, {
371
+ e ? /* @__PURE__ */ U(I, {
372
372
  src: e,
373
373
  size: 20,
374
374
  style: { flexShrink: 0 }
375
- }) : /* @__PURE__ */ H(F, {
375
+ }) : /* @__PURE__ */ U(I, {
376
376
  style: {
377
377
  backgroundColor: t,
378
378
  fontSize: "12px",
@@ -383,14 +383,14 @@ var le = "_anticon_184kl_76", K = {
383
383
  },
384
384
  children: n.charAt(0)
385
385
  }),
386
- /* @__PURE__ */ H("span", {
386
+ /* @__PURE__ */ U("span", {
387
387
  className: Y["member-search__tree-name"],
388
388
  children: n
389
389
  }),
390
390
  r
391
391
  ]
392
- }), he = ({ wd: e }) => {
393
- let t = f(), { type: n, dispatch: r, value: i, containerHeight: a, requestContext: o, limits: c } = t, u = t.memberPanelRequestGuard ?? l, d = t.memberPanelVisibility ?? s, { t: p } = S(), m = d.member, _ = d.externalContact, { data: v, loading: b } = V(async () => !u.enabled || !_ ? [] : (await g({
392
+ }), _e = ({ wd: e }) => {
393
+ let t = f(), { type: n, dispatch: r, value: i, containerHeight: a, requestContext: o, limits: c } = t, u = t.memberPanelRequestGuard ?? l, d = t.memberPanelVisibility ?? s, { t: p } = w(), m = d.member, _ = d.externalContact, { data: v, loading: x } = H(async () => !u.enabled || !_ ? [] : (await g({
394
394
  requestContext: o,
395
395
  keyword: e,
396
396
  groupLimit: c?.groupLimit || [],
@@ -402,7 +402,7 @@ var le = "_anticon_184kl_76", K = {
402
402
  o?.entryId,
403
403
  u.enabled,
404
404
  _
405
- ] }), { data: E, loading: D } = V(async () => {
405
+ ] }), { data: S, loading: C } = H(async () => {
406
406
  if (!u.enabled || !m) return [];
407
407
  let t = await h({
408
408
  requestContext: o,
@@ -417,19 +417,19 @@ var le = "_anticon_184kl_76", K = {
417
417
  o?.entryId,
418
418
  u.enabled,
419
419
  m
420
- ] }), O = v || [], k = E || [], A = [_ ? {
420
+ ] }), O = v || [], k = S || [], A = [_ ? {
421
421
  title: p("externalContact.title"),
422
422
  value: "waibulianxiren",
423
423
  children: O.map((e) => {
424
- let t = T(e), n = w(t);
424
+ let t = D(e), n = E(t);
425
425
  return {
426
426
  ...e,
427
427
  name: t,
428
- title: /* @__PURE__ */ H(X, {
428
+ title: /* @__PURE__ */ U(X, {
429
429
  avatarurl: e.avatarurl,
430
430
  randomColor: n,
431
431
  name: t,
432
- extra: /* @__PURE__ */ U("span", {
432
+ extra: /* @__PURE__ */ W("span", {
433
433
  className: Y["member-search__tree-extra"],
434
434
  children: [
435
435
  "(",
@@ -447,15 +447,15 @@ var le = "_anticon_184kl_76", K = {
447
447
  title: p("member.title"),
448
448
  value: "chengyuan",
449
449
  children: k.map((e) => {
450
- let t = T(e), n = w(t);
450
+ let t = D(e), n = E(t);
451
451
  return {
452
452
  ...e,
453
453
  name: t,
454
- title: /* @__PURE__ */ H(X, {
454
+ title: /* @__PURE__ */ U(X, {
455
455
  avatarurl: e.avatarurl,
456
456
  randomColor: n,
457
457
  name: t,
458
- extra: /* @__PURE__ */ H("span", {
458
+ extra: /* @__PURE__ */ U("span", {
459
459
  className: Y["member-search__tree-extra"],
460
460
  children: e.user_type === "dock_user" ? `(${p("department.external")}:${e.dock_corpname})` : e.deptnames
461
461
  })
@@ -469,18 +469,18 @@ var le = "_anticon_184kl_76", K = {
469
469
  treeData: A,
470
470
  defaultExpandedKeys: A.map((e) => e.value),
471
471
  defaultSelectedKeys: i?.map((e) => e._id),
472
- isLoading: D || b,
473
- checkType: n === x.USER ? "radio" : "checkbox",
472
+ isLoading: C || x,
473
+ checkType: n === b.USER ? "radio" : "checkbox",
474
474
  handleSelectMember: (e) => {
475
- if (x.USER === n) {
476
- let t = C(e, A);
475
+ if (b.USER === n) {
476
+ let t = T(e, A);
477
477
  t && r({
478
478
  type: "insertOnly",
479
479
  payload: { ...t }
480
480
  });
481
481
  }
482
- if (x.USER_GROUP === n) {
483
- let t = C(e, A);
482
+ if (b.USER_GROUP === n) {
483
+ let t = T(e, A);
484
484
  if (!t) return;
485
485
  r({
486
486
  type: "addOne",
@@ -489,29 +489,29 @@ var le = "_anticon_184kl_76", K = {
489
489
  }
490
490
  },
491
491
  handleDeSelectMember: (e) => {
492
- x.USER !== n && r({
492
+ b.USER !== n && r({
493
493
  type: "deleteOne",
494
494
  payload: e
495
495
  });
496
496
  }
497
497
  };
498
- }, ge = (n) => {
499
- let { t: r } = S(), i = he({ wd: n.wd });
500
- return /* @__PURE__ */ U("div", {
498
+ }, ve = (n) => {
499
+ let { t: r } = w(), i = _e({ wd: n.wd });
500
+ return /* @__PURE__ */ W("div", {
501
501
  className: Y["member-search"],
502
- children: [/* @__PURE__ */ H(L, {
502
+ children: [/* @__PURE__ */ U(R, {
503
503
  spinning: i.isLoading,
504
- children: /* @__PURE__ */ H(e, {
504
+ children: /* @__PURE__ */ U(e, {
505
505
  style: { height: i.containerHeight - 8 },
506
506
  className: Y["member-search__tree-wrapper"],
507
- children: i.treeData.length && !i.isLoading ? /* @__PURE__ */ H("div", {
507
+ children: i.treeData.length && !i.isLoading ? /* @__PURE__ */ U("div", {
508
508
  className: Y["member-search__tree-content"],
509
- children: /* @__PURE__ */ H(ne, {
509
+ children: /* @__PURE__ */ U(B, {
510
510
  data: i.treeData,
511
511
  checkType: i.checkType,
512
512
  defaultSelectedKeys: i.defaultSelectedKeys,
513
513
  defaultExpandedKeys: i.defaultExpandedKeys,
514
- switcherIcon: (e) => /* @__PURE__ */ H(R, {
514
+ switcherIcon: (e) => /* @__PURE__ */ U(z, {
515
515
  name: "xiangxiazhankai-11",
516
516
  className: t(Y["member-search__switch-icon"], { [Y["member-search__switch-icon--expanded"]]: e })
517
517
  }),
@@ -520,9 +520,9 @@ var le = "_anticon_184kl_76", K = {
520
520
  })
521
521
  }) : null
522
522
  })
523
- }), !i.treeData.length && !i.isLoading && /* @__PURE__ */ H("div", {
523
+ }), !i.treeData.length && !i.isLoading && /* @__PURE__ */ U("div", {
524
524
  className: Y["member-search__empty"],
525
- children: /* @__PURE__ */ H("span", {
525
+ children: /* @__PURE__ */ U("span", {
526
526
  className: Y["member-search__empty-text"],
527
527
  children: r("member.noAvailable")
528
528
  })
@@ -540,8 +540,8 @@ var le = "_anticon_184kl_76", K = {
540
540
  "department-search__switch-icon--expanded": "_department-search__switch-icon--expanded_i1rya_39",
541
541
  "department-search__empty": "_department-search__empty_i1rya_42",
542
542
  "department-search__empty-text": "_department-search__empty-text_i1rya_49"
543
- }, _e = ({ wd: e }) => {
544
- let { type: t, dispatch: n, value: r, containerHeight: i, requestContext: a, limits: s, departmentSelectableRange: c, departmentPanelRequestGuard: l } = f(), { t: d } = S(), p = M(() => O(c), [c]), { data: m, loading: h } = V(() => o(l, () => v({
543
+ }, ye = ({ wd: e }) => {
544
+ let { type: t, dispatch: n, value: r, containerHeight: i, requestContext: a, limits: s, departmentSelectableRange: c, departmentPanelRequestGuard: l } = f(), { t: d } = w(), p = N(() => A(c), [c]), { data: m, loading: h } = H(() => o(l, () => v({
545
545
  requestContext: a,
546
546
  limits: s,
547
547
  departmentSelectableRange: c,
@@ -552,7 +552,7 @@ var le = "_anticon_184kl_76", K = {
552
552
  s,
553
553
  c,
554
554
  l
555
- ] }), { data: g, loading: y } = V(() => u(l, () => p.externalContactGroup ? _({
555
+ ] }), { data: g, loading: y } = H(() => u(l, () => p.externalContactGroup ? _({
556
556
  requestContext: a,
557
557
  limits: s,
558
558
  departmentSelectableRange: c
@@ -562,17 +562,17 @@ var le = "_anticon_184kl_76", K = {
562
562
  c,
563
563
  p.externalContactGroup,
564
564
  l
565
- ] }), C = g?.list || [], w = m?.departments || [], T = (m?.label_corp_list || []).filter((e) => e.type !== "dockcorpdept"), E = [...w, ...T].filter((e) => e.type !== "label"), D = [p.externalContactGroup ? {
565
+ ] }), T = g?.list || [], E = S(m?.departments || []), D = (m?.label_corp_list || []).filter((e) => e.type !== "dockcorpdept" && C(e)), O = [...E, ...D].filter((e) => e.type !== "label"), k = [p.externalContactGroup ? {
566
566
  title: d("externalContact.group"),
567
567
  _id: "waibulianxiren",
568
- children: C.filter((t) => t.status === 1 && t.name?.includes(e)).map((e) => ({
568
+ children: T.filter((t) => t.status === 1 && t.name?.includes(e)).map((e) => ({
569
569
  ...e,
570
- title: /* @__PURE__ */ U("span", {
570
+ title: /* @__PURE__ */ W("span", {
571
571
  className: Z["department-search__title"],
572
- children: [/* @__PURE__ */ H(b, {
572
+ children: [/* @__PURE__ */ U(x, {
573
573
  type: "group",
574
574
  size: 16
575
- }), /* @__PURE__ */ H("span", {
575
+ }), /* @__PURE__ */ U("span", {
576
576
  className: Z["department-search__name"],
577
577
  children: e.name
578
578
  })]
@@ -581,17 +581,17 @@ var le = "_anticon_184kl_76", K = {
581
581
  } : null, p.organizational ? {
582
582
  title: d("department.title"),
583
583
  _id: "bumen",
584
- children: E.map((e) => ({
584
+ children: O.map((e) => ({
585
585
  ...e,
586
- title: /* @__PURE__ */ U("span", {
586
+ title: /* @__PURE__ */ W("span", {
587
587
  className: Z["department-search__title"],
588
588
  children: [
589
- /* @__PURE__ */ H(R, {
589
+ /* @__PURE__ */ U(z, {
590
590
  name: "dept-one",
591
591
  className: Z["department-search__icon"],
592
592
  size: 16
593
593
  }),
594
- /* @__PURE__ */ H("span", {
594
+ /* @__PURE__ */ U("span", {
595
595
  className: Z["department-search__name"],
596
596
  children: e.name
597
597
  }),
@@ -599,7 +599,7 @@ var le = "_anticon_184kl_76", K = {
599
599
  "dockdept",
600
600
  "dockcorp",
601
601
  "dockcorpdept"
602
- ].includes(e.type) && /* @__PURE__ */ U("span", {
602
+ ].includes(e.type) && /* @__PURE__ */ W("span", {
603
603
  className: Z["department-search__extra"],
604
604
  children: [
605
605
  "(",
@@ -613,14 +613,14 @@ var le = "_anticon_184kl_76", K = {
613
613
  } : null].filter((e) => !!e?.children.length);
614
614
  return {
615
615
  containerHeight: i,
616
- treeData: D,
617
- defaultExpandedKeys: D.map((e) => e._id),
616
+ treeData: k,
617
+ defaultExpandedKeys: k.map((e) => e._id),
618
618
  selectedKeys: r?.map((e) => e._id),
619
619
  isLoading: h || y,
620
- checkType: t === x.DEPARMENT ? "radio" : "checkbox",
620
+ checkType: t === b.DEPARMENT ? "radio" : "checkbox",
621
621
  handleSelectDepartment: (e, r) => {
622
622
  if (!r) return;
623
- if (t === x.DEPARMENT) {
623
+ if (t === b.DEPARMENT) {
624
624
  n({
625
625
  type: "insertOnly",
626
626
  payload: {
@@ -630,7 +630,7 @@ var le = "_anticon_184kl_76", K = {
630
630
  });
631
631
  return;
632
632
  }
633
- let i = C.some((e) => e._id === r._id);
633
+ let i = T.some((e) => e._id === r._id);
634
634
  n({
635
635
  type: "addOne",
636
636
  payload: {
@@ -645,18 +645,18 @@ var le = "_anticon_184kl_76", K = {
645
645
  payload: e
646
646
  })
647
647
  };
648
- }, ve = (n) => {
649
- let { t: r } = S(), i = _e({ wd: n.wd });
650
- return /* @__PURE__ */ U("div", {
648
+ }, be = (n) => {
649
+ let { t: r } = w(), i = ye({ wd: n.wd });
650
+ return /* @__PURE__ */ W("div", {
651
651
  className: Z["department-search"],
652
- children: [/* @__PURE__ */ H(L, {
652
+ children: [/* @__PURE__ */ U(R, {
653
653
  spinning: i.isLoading,
654
- children: /* @__PURE__ */ H(e, {
654
+ children: /* @__PURE__ */ U(e, {
655
655
  style: { height: i.containerHeight - 8 },
656
656
  className: Z["department-search__scroll"],
657
- children: i.treeData.length && !i.isLoading ? /* @__PURE__ */ H("div", {
657
+ children: i.treeData.length && !i.isLoading ? /* @__PURE__ */ U("div", {
658
658
  className: Z["department-search__tree-content"],
659
- children: /* @__PURE__ */ H(ne, {
659
+ children: /* @__PURE__ */ U(B, {
660
660
  data: i.treeData,
661
661
  checkType: i.checkType,
662
662
  selectedKeys: i.selectedKeys,
@@ -666,7 +666,7 @@ var le = "_anticon_184kl_76", K = {
666
666
  value: "_id"
667
667
  },
668
668
  defaultExpandedKeys: i.defaultExpandedKeys,
669
- switcherIcon: (e) => /* @__PURE__ */ H(R, {
669
+ switcherIcon: (e) => /* @__PURE__ */ U(z, {
670
670
  name: "xiangxiazhankai-11",
671
671
  className: t(Z["department-search__switch-icon"], { [Z["department-search__switch-icon--expanded"]]: e })
672
672
  }),
@@ -675,34 +675,34 @@ var le = "_anticon_184kl_76", K = {
675
675
  })
676
676
  }) : null
677
677
  })
678
- }), !i.treeData.length && !i.isLoading && /* @__PURE__ */ H("div", {
678
+ }), !i.treeData.length && !i.isLoading && /* @__PURE__ */ U("div", {
679
679
  className: Z["department-search__empty"],
680
- children: /* @__PURE__ */ H("span", {
680
+ children: /* @__PURE__ */ U("span", {
681
681
  className: Z["department-search__empty-text"],
682
682
  children: r("department.noAvailable")
683
683
  })
684
684
  })]
685
685
  });
686
- }, ye = ({ wd: e, t, memberTabItems: n }) => ({
687
- raw: /* @__PURE__ */ H(ge, { wd: e }),
686
+ }, xe = ({ wd: e, t, memberTabItems: n }) => ({
687
+ raw: /* @__PURE__ */ U(ve, { wd: e }),
688
688
  placeholder: t("tabs.searchMember"),
689
689
  tabItems: n
690
- }), be = ({ wd: e, t, departmentTabItems: n }) => ({
691
- raw: /* @__PURE__ */ H(ve, { wd: e }),
690
+ }), Se = ({ wd: e, t, departmentTabItems: n }) => ({
691
+ raw: /* @__PURE__ */ U(be, { wd: e }),
692
692
  placeholder: t("tabs.searchDepartment"),
693
693
  tabItems: n
694
- }), xe = {
695
- user: ye,
696
- usergroup: ye,
697
- dept: be,
698
- deptgroup: be,
694
+ }), Ce = {
695
+ user: xe,
696
+ usergroup: xe,
697
+ dept: Se,
698
+ deptgroup: Se,
699
699
  deptusers: ({ wd: e, t, deptUserTabItems: n }) => ({
700
- raw: /* @__PURE__ */ H(ve, { wd: e }),
700
+ raw: /* @__PURE__ */ U(be, { wd: e }),
701
701
  placeholder: t("common.searchPlaceholder"),
702
702
  tabItems: n
703
703
  })
704
- }, Se = (e, t) => {
705
- let n = D(), r = k(), i = E(), { t: a } = S(), o = xe[e];
704
+ }, we = (e, t) => {
705
+ let n = k(), r = ee(), i = O(), { t: a } = w(), o = Ce[e];
706
706
  if (!o) throw Error(`No search strategy found for type: ${e}`);
707
707
  return { config: o({
708
708
  wd: t,
@@ -711,9 +711,9 @@ var le = "_anticon_184kl_76", K = {
711
711
  departmentTabItems: r,
712
712
  deptUserTabItems: i
713
713
  }) };
714
- }, Ce = () => {
715
- let { type: e } = f(), [n, r] = P(), { config: i } = Se(e, n), { tabItems: a } = i, [o, s] = P(a[0].key);
716
- j(() => {
714
+ }, Te = () => {
715
+ let { type: e } = f(), [n, r] = F(), { config: i } = we(e, n), { tabItems: a } = i, [o, s] = F(a[0].key);
716
+ M(() => {
717
717
  a.length && (a.some((e) => e.key === o) || (s(a[0].key), r(void 0)));
718
718
  }, [a, o]);
719
719
  let c = (e) => {
@@ -725,17 +725,17 @@ var le = "_anticon_184kl_76", K = {
725
725
  }
726
726
  r(e);
727
727
  }, d = n ? i.raw : l, p = i.placeholder;
728
- return /* @__PURE__ */ U("div", {
729
- className: t(me["selection-tabs"]),
730
- children: [/* @__PURE__ */ H(de, {
728
+ return /* @__PURE__ */ W("div", {
729
+ className: t(ge["selection-tabs"]),
730
+ children: [/* @__PURE__ */ U(pe, {
731
731
  value: o,
732
732
  onChange: c,
733
733
  onSearch: u,
734
734
  tabs: a,
735
735
  searchPlaceholder: p
736
- }), /* @__PURE__ */ H(pe, { children: d })]
736
+ }), /* @__PURE__ */ U(he, { children: d })]
737
737
  });
738
- }, we = (e, t) => oe(e, (e) => {
738
+ }, Ee = (e, t) => se(e, (e) => {
739
739
  switch (t.type) {
740
740
  case "addOne": {
741
741
  let n = t.payload;
@@ -789,39 +789,39 @@ var le = "_anticon_184kl_76", K = {
789
789
  "depts-member__actions": "_depts-member__actions_s7xsa_43",
790
790
  "depts-member__cancel-button": "_depts-member__cancel-button_s7xsa_50",
791
791
  "depts-member__confirm-button": "_depts-member__confirm-button_s7xsa_53"
792
- }, Te = () => {
792
+ }, De = () => {
793
793
  if (!(typeof window > "u")) return window.FX?.STATIC?.user;
794
- }, Ee = (e) => {
794
+ }, Oe = (e) => {
795
795
  let t = e?._id ?? e?.id;
796
796
  return t == null || t === "" ? "" : String(t);
797
- }, De = (e) => {
797
+ }, ke = (e) => {
798
798
  let t = /* @__PURE__ */ new Set();
799
799
  return e.filter((e) => {
800
- let n = Ee(e);
800
+ let n = Oe(e);
801
801
  return !n || t.has(n) ? !1 : (t.add(n), !0);
802
802
  });
803
- }, Oe = (e) => ({
803
+ }, Ae = (e) => ({
804
804
  current_departments: e?.current_departments || [],
805
805
  current_sub_departments: e?.current_sub_departments || [],
806
806
  dock_current_departments: e?.dock_current_departments || [],
807
807
  dock_current_sub_departments: e?.dock_current_sub_departments || []
808
- }), ke = (e) => {
808
+ }), je = (e) => {
809
809
  if (!e) return [];
810
810
  let t = e.name ?? e.nickname ?? e.username ?? "";
811
- return De([Ee(e), e.dock_userid === void 0 || e.dock_userid === null || e.dock_userid === "" ? "" : String(e.dock_userid)].filter(Boolean).map((n) => ({
811
+ return ke([Oe(e), e.dock_userid === void 0 || e.dock_userid === null || e.dock_userid === "" ? "" : String(e.dock_userid)].filter(Boolean).map((n) => ({
812
812
  ...e,
813
813
  _id: n,
814
814
  id: n,
815
815
  name: t
816
816
  })));
817
- }, Ae = (e) => typeof e == "string" ? e.trim().length > 0 : !e || Array.isArray(e) ? !1 : Object.keys(e).length > 0, je = (e, t) => !["user", "usergroup"].includes(e) || !t ? l : Ae(t.limitWidget) && Array.isArray(t.limit) ? t.limit.length === 0 ? {
817
+ }, Me = (e) => typeof e == "string" ? e.trim().length > 0 : !e || Array.isArray(e) ? !1 : Object.keys(e).length > 0, Ne = (e, t) => !["user", "usergroup"].includes(e) || !t ? l : Me(t.limitWidget) && Array.isArray(t.limit) ? t.limit.length === 0 ? {
818
818
  enabled: !1,
819
819
  reason: a.LIMIT_WIDGET_EMPTY_ARRAY
820
820
  } : {
821
821
  enabled: !0,
822
822
  reason: a.ALLOWED
823
- } : l, Me = (e) => {
824
- let t = Te(), n = Oe(t), r = e.type || "user";
823
+ } : l, Pe = (e) => {
824
+ let t = De(), n = Ae(t), r = e.type || "user";
825
825
  return {
826
826
  type: r,
827
827
  auth: {
@@ -841,20 +841,20 @@ var le = "_anticon_184kl_76", K = {
841
841
  widgetAttr: e.widgetAttr
842
842
  }),
843
843
  currentContext: n,
844
- currentUsers: ke(t),
844
+ currentUsers: je(t),
845
845
  memberPanelVisibility: p(r, e.widgetAttr),
846
- memberPanelRequestGuard: je(r, e.widgetAttr)
846
+ memberPanelRequestGuard: Ne(r, e.widgetAttr)
847
847
  };
848
- }, Ne = [
848
+ }, Fe = [
849
849
  "departs",
850
850
  "dockcorpValue",
851
851
  "dockdeptValue",
852
852
  "outsiderGroup"
853
- ], Pe = (e) => Array.isArray(e) && e.some((e) => e != null && e !== ""), Fe = (e) => e == null ? !0 : Array.isArray(e) ? !Pe(e) : typeof e == "object" ? !Ne.some((t) => Pe(e[t])) : !0, Ie = (e) => e === "dept" || e === "deptgroup", Le = ({ type: e, widgetAttr: t, status: n, hasRequestHandler: r }) => {
854
- if (!Ie(e) || !t || !r || n !== "idle" || t.valueOption !== 0 || !Fe(t.limit)) return !1;
853
+ ], Ie = (e) => Array.isArray(e) && e.some((e) => e != null && e !== ""), Le = (e) => e == null ? !0 : Array.isArray(e) ? !Ie(e) : typeof e == "object" ? !Fe.some((t) => Ie(e[t])) : !0, Re = (e) => e === "dept" || e === "deptgroup", ze = ({ type: e, widgetAttr: t, status: n, hasRequestHandler: r }) => {
854
+ if (!Re(e) || !t || !r || n !== "idle" || t.valueOption !== 0 || !Le(t.limit)) return !1;
855
855
  let i = t.rely;
856
856
  return !i || typeof i != "object" ? !1 : i.data != null;
857
- }, Re = ({ type: e, widgetAttr: t, requestContext: n }) => ({
857
+ }, Be = ({ type: e, widgetAttr: t, requestContext: n }) => ({
858
858
  type: e,
859
859
  widgetName: t?.widgetName,
860
860
  rely: t?.rely,
@@ -866,7 +866,7 @@ var le = "_anticon_184kl_76", K = {
866
866
  items: t?.items,
867
867
  requestContext: n,
868
868
  widgetAttr: t
869
- }), $ = (e) => Array.isArray(e) ? e.map($) : e && typeof e == "object" ? Object.keys(e).sort().reduce((t, n) => (t[n] = $(e[n]), t), {}) : e ?? null, ze = (e) => JSON.stringify($(e)), Be = (e) => {
869
+ }), $ = (e) => Array.isArray(e) ? e.map($) : e && typeof e == "object" ? Object.keys(e).sort().reduce((t, n) => (t[n] = $(e[n]), t), {}) : e ?? null, Ve = (e) => JSON.stringify($(e)), He = (e) => {
870
870
  if (e) return {
871
871
  type: e.type,
872
872
  widgetName: e.widgetName,
@@ -882,46 +882,46 @@ var le = "_anticon_184kl_76", K = {
882
882
  entryId: e.entryId,
883
883
  __departmentRelyLimit: e.__departmentRelyLimit
884
884
  };
885
- }, Ve = ({ type: e, requestContext: t, widgetAttr: n }) => ze({
885
+ }, Ue = ({ type: e, requestContext: t, widgetAttr: n }) => Ve({
886
886
  type: e,
887
887
  requestContext: {
888
888
  appId: t?.appId,
889
889
  entryId: t?.entryId
890
890
  },
891
- widgetAttr: Be(n)
892
- }), He = ({ type: e, requestContext: t, widgetAttr: n }) => ({
891
+ widgetAttr: He(n)
892
+ }), We = ({ type: e, requestContext: t, widgetAttr: n }) => ({
893
893
  type: e,
894
894
  requestContext: {
895
895
  appId: t?.appId,
896
896
  entryId: t?.entryId
897
897
  },
898
- widgetAttr: Be(n)
899
- }), Ue = (e) => ({
898
+ widgetAttr: He(n)
899
+ }), Ge = (e) => ({
900
900
  publicPermissionEnable: e?.publicPermissionEnable || !1,
901
901
  managerPermissionEnable: e?.managerPermissionEnable || !1
902
- }), We = (e) => {
903
- let { onRequestRelyLimit: t } = e, [n, r] = P(), [i, a] = P(!1), [o, s] = P("idle"), c = N(!0), l = e.type || e.widgetAttr?.type || "user", u = N(), f = Le({
902
+ }), Ke = (e) => {
903
+ let { onRequestRelyLimit: t } = e, [n, r] = F(), [i, a] = F(!1), [o, s] = F("idle"), c = P(!0), l = e.type || e.widgetAttr?.type || "user", u = P(), f = ze({
904
904
  type: l,
905
905
  widgetAttr: e.widgetAttr,
906
906
  status: o,
907
907
  hasRequestHandler: !!t
908
- }), p = Ve({
908
+ }), p = Ue({
909
909
  type: l,
910
910
  requestContext: e.requestContext,
911
911
  widgetAttr: e.widgetAttr
912
912
  });
913
913
  u.current?.key !== p && (u.current = {
914
914
  key: p,
915
- value: Ie(l) ? Re({
915
+ value: Re(l) ? Be({
916
916
  type: l,
917
917
  widgetAttr: e.widgetAttr,
918
918
  requestContext: e.requestContext
919
919
  }) : void 0
920
920
  });
921
921
  let m = u.current.value;
922
- j(() => (c.current = !0, () => {
922
+ M(() => (c.current = !0, () => {
923
923
  c.current = !1;
924
- }), []), j(() => {
924
+ }), []), M(() => {
925
925
  !f || !t || !m || (s("loading"), Promise.resolve(t(m)).then((e) => {
926
926
  if (!c.current) return;
927
927
  let t = Array.isArray(e) && e.length > 0 && e.every((e) => typeof e == "string");
@@ -934,11 +934,11 @@ var le = "_anticon_184kl_76", K = {
934
934
  t,
935
935
  f
936
936
  ]);
937
- let h = M(() => n === void 0 ? e.widgetAttr : {
937
+ let h = N(() => n === void 0 ? e.widgetAttr : {
938
938
  ...e.widgetAttr,
939
939
  limit: n,
940
940
  __departmentRelyLimit: !0
941
- }, [e.widgetAttr, n]), g = M(() => o === "resolved" && !i ? {
941
+ }, [e.widgetAttr, n]), g = N(() => o === "resolved" && !i ? {
942
942
  enabled: !1,
943
943
  reason: d.RELY_EMPTY_LIMIT
944
944
  } : {
@@ -953,36 +953,36 @@ var le = "_anticon_184kl_76", K = {
953
953
  shouldBlockContent: f || o === "loading" || o === "failed",
954
954
  departmentPanelRequestGuard: g
955
955
  };
956
- }, Ge = (e) => {
957
- let { onCancel: t, onConfirm: n, onChange: r, defaultValue: i } = e, a = e.auth?.publicPermissionEnable, o = e.auth?.managerPermissionEnable, { t: s } = S(), [l, u] = B(e, { defaultValue: i || [] }), d = ee((e) => {
958
- let t = we(l, e);
956
+ }, qe = (e) => {
957
+ let { onCancel: t, onConfirm: n, onChange: r, defaultValue: i } = e, a = e.auth?.publicPermissionEnable, o = e.auth?.managerPermissionEnable, { t: s } = w(), [l, u] = V(e, { defaultValue: i || [] }), d = te((e) => {
958
+ let t = Ee(l, e);
959
959
  u(t), r?.(t);
960
960
  }, [
961
961
  u,
962
962
  l,
963
963
  r
964
- ]), { effectiveWidgetAttr: f, isLoading: p, isFailed: m, departmentPanelRequestGuard: h } = We(e), g = N(), _ = Ve({
964
+ ]), { effectiveWidgetAttr: f, isLoading: p, isFailed: m, departmentPanelRequestGuard: h } = Ke(e), g = P(), _ = Ue({
965
965
  type: e.type,
966
966
  requestContext: e.requestContext,
967
967
  widgetAttr: f
968
968
  });
969
969
  g.current?.key !== _ && (g.current = {
970
970
  key: _,
971
- value: He({
971
+ value: We({
972
972
  type: e.type,
973
973
  requestContext: e.requestContext,
974
974
  widgetAttr: f
975
975
  })
976
976
  });
977
- let v = g.current.value, y = M(() => Me(v), [v]), b = M(() => Ue({
977
+ let v = g.current.value, y = N(() => Pe(v), [v]), x = N(() => Ge({
978
978
  publicPermissionEnable: a,
979
979
  managerPermissionEnable: o
980
- }), [o, a]), { type: C, currentUsers: w, requestContext: T, limits: E, departmentSelectableRange: D, currentContext: O, memberPanelVisibility: k, memberPanelRequestGuard: A } = y, j = M(() => ({
981
- type: C,
980
+ }), [o, a]), { type: S, currentUsers: C, requestContext: T, limits: E, departmentSelectableRange: D, currentContext: O, memberPanelVisibility: k, memberPanelRequestGuard: A } = y, ee = N(() => ({
981
+ type: S,
982
982
  value: l,
983
983
  setValue: u,
984
984
  dispatch: d,
985
- currentUsers: w,
985
+ currentUsers: C,
986
986
  requestContext: T,
987
987
  limits: E,
988
988
  departmentSelectableRange: D,
@@ -990,14 +990,14 @@ var le = "_anticon_184kl_76", K = {
990
990
  memberPanelVisibility: k,
991
991
  memberPanelRequestGuard: A,
992
992
  departmentPanelRequestGuard: h,
993
- auth: b,
994
- containerHeight: [x.USER_GROUP, x.DEPARMENT_GROUP].includes(C) ? 355 : 395
993
+ auth: x,
994
+ containerHeight: [b.USER_GROUP, b.DEPARMENT_GROUP].includes(S) ? 355 : 395
995
995
  }), [
996
- C,
996
+ S,
997
997
  l,
998
998
  u,
999
999
  d,
1000
- w,
1000
+ C,
1001
1001
  T,
1002
1002
  E,
1003
1003
  D,
@@ -1005,52 +1005,52 @@ var le = "_anticon_184kl_76", K = {
1005
1005
  k,
1006
1006
  A,
1007
1007
  h,
1008
- b
1009
- ]), te = () => p ? /* @__PURE__ */ H("div", {
1008
+ x
1009
+ ]), j = () => p ? /* @__PURE__ */ U("div", {
1010
1010
  className: Q["depts-member__state"],
1011
1011
  children: "加载中"
1012
- }) : m ? /* @__PURE__ */ H("div", {
1012
+ }) : m ? /* @__PURE__ */ U("div", {
1013
1013
  className: Q["depts-member__state"],
1014
1014
  children: "可选范围加载失败"
1015
- }) : /* @__PURE__ */ U(c.Provider, {
1016
- value: j,
1017
- children: [/* @__PURE__ */ H(ue, {}), /* @__PURE__ */ H(Ce, {})]
1015
+ }) : /* @__PURE__ */ W(c.Provider, {
1016
+ value: ee,
1017
+ children: [/* @__PURE__ */ U(fe, {}), /* @__PURE__ */ U(Te, {})]
1018
1018
  });
1019
- return /* @__PURE__ */ U("div", {
1019
+ return /* @__PURE__ */ W("div", {
1020
1020
  className: Q["depts-member"],
1021
- children: [/* @__PURE__ */ H("div", {
1021
+ children: [/* @__PURE__ */ U("div", {
1022
1022
  className: Q["depts-member__body"],
1023
- children: /* @__PURE__ */ H("div", {
1023
+ children: /* @__PURE__ */ U("div", {
1024
1024
  className: Q["depts-member__content"],
1025
1025
  "data-teleport": "DeptsMemberSelector",
1026
- children: te()
1026
+ children: j()
1027
1027
  })
1028
- }), /* @__PURE__ */ U("div", {
1028
+ }), /* @__PURE__ */ W("div", {
1029
1029
  className: Q["depts-member__footer"],
1030
1030
  children: [[
1031
- x.DEPARMENT_GROUP,
1032
- x.USER_GROUP,
1033
- x.DEPT_USERS
1034
- ].includes(C) && /* @__PURE__ */ H("div", {
1031
+ b.DEPARMENT_GROUP,
1032
+ b.USER_GROUP,
1033
+ b.DEPT_USERS
1034
+ ].includes(S) && /* @__PURE__ */ U("div", {
1035
1035
  className: Q["depts-member__clear-area"],
1036
- children: /* @__PURE__ */ U("div", {
1036
+ children: /* @__PURE__ */ W("div", {
1037
1037
  className: Q["depts-member__clear-button"],
1038
1038
  onClick: () => {
1039
1039
  u([]);
1040
1040
  },
1041
- children: [/* @__PURE__ */ H(R, {
1041
+ children: [/* @__PURE__ */ U(z, {
1042
1042
  name: "clearTree",
1043
1043
  size: 20,
1044
1044
  style: { verticalAlign: "sub" }
1045
- }), /* @__PURE__ */ H("span", { children: s("common.clearAll") })]
1045
+ }), /* @__PURE__ */ U("span", { children: s("common.clearAll") })]
1046
1046
  })
1047
- }), /* @__PURE__ */ U("div", {
1047
+ }), /* @__PURE__ */ W("div", {
1048
1048
  className: Q["depts-member__actions"],
1049
- children: [/* @__PURE__ */ H(I, {
1049
+ children: [/* @__PURE__ */ U(L, {
1050
1050
  onClick: t,
1051
1051
  className: Q["depts-member__cancel-button"],
1052
1052
  children: s("common.cancel")
1053
- }), /* @__PURE__ */ H(I, {
1053
+ }), /* @__PURE__ */ U(L, {
1054
1054
  type: "primary",
1055
1055
  className: Q["depts-member__confirm-button"],
1056
1056
  onClick: () => n?.(l),
@@ -1061,4 +1061,4 @@ var le = "_anticon_184kl_76", K = {
1061
1061
  });
1062
1062
  };
1063
1063
  //#endregion
1064
- export { G as n, Ge as t };
1064
+ export { ue as n, qe as t };