@baishuyun/ui-business 5.1.6 → 5.2.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 (28) hide show
  1. package/dist/DeptsMemberSelector/{Department-12ftZfXD.js → Department-H6zGUr4c.js} +5 -5
  2. package/dist/DeptsMemberSelector/{DeptsMemberSelector-BXWGwgUq.js → DeptsMemberSelector-DD3yoWYQ.js} +236 -236
  3. package/dist/DeptsMemberSelector/DeptsUser-41XeJOIY.js +981 -0
  4. package/dist/DeptsMemberSelector/Member-Bit-zWOE.js +517 -0
  5. package/dist/DeptsMemberSelector/MemberPanel-BhuVgJdO.js +510 -0
  6. package/dist/DeptsMemberSelector/OrganizationPanel-CT3v_KVr.js +374 -0
  7. package/dist/DeptsMemberSelector/{TabGroup-Ds7bTbKL.js → TabGroup-Dht9ylk4.js} +13 -13
  8. package/dist/DeptsMemberSelector/index.js +7 -7
  9. package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +3 -3
  10. package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +4 -4
  11. package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +3 -3
  12. package/dist/DeptsMemberSelector/utils/index.js +11 -2
  13. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +1 -1
  14. package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersExtraContactPanel/DeptUsersExtraContactPanel.d.ts +2 -0
  15. package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersExtraContactPanel/useDeptUsersExtraContactPanelData.d.ts +40 -0
  16. package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/useDeptUsersRolePanelData.d.ts +1 -1
  17. package/dist/components/DeptsMemberSelector/utils/departmentStatus.d.ts +3 -0
  18. package/dist/index.css +1 -1
  19. package/dist/index.js +7 -7
  20. package/dist/lang/en-US.json.d.ts +2 -0
  21. package/dist/lang/zh-CN.json.d.ts +2 -0
  22. package/dist/lang/zh-TW.json.d.ts +71 -0
  23. package/dist/vendors/useLocale.js +75 -7
  24. package/package.json +3 -3
  25. package/dist/DeptsMemberSelector/DeptsUser-C8hYQ6z-.js +0 -790
  26. package/dist/DeptsMemberSelector/ExtraConcactPanel-BDNrz5rV.js +0 -647
  27. package/dist/DeptsMemberSelector/Member-B4tEHksu.js +0 -375
  28. package/dist/DeptsMemberSelector/OrganizationPanel-DoM4UNxv.js +0 -374
@@ -0,0 +1,374 @@
1
+ import { t as e } from "../vendors/simplebar-react.js";
2
+ import { t } from "../vendors/clsx.js";
3
+ import { r as n, t as r } from "../vendors/lodash-es.js";
4
+ import { i, t as a } from "./useDeptsMemberSelector-t7b8yu-A.js";
5
+ import { n as o, p as s } from "./services/contact/selector.service-CY5vQea8.js";
6
+ import { a as c, i as l, n as u, r as d, t as f } from "./TabGroup-Dht9ylk4.js";
7
+ import { t as p } from "../vendors/useLocale.js";
8
+ import { buildDeptTree as m, buildTree as h, findNodeInTree as g } from "./utils/index.js";
9
+ import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
10
+ import { Spin as x } from "antd";
11
+ import { Icon as S, Tree as C } from "@baishuyun/ui-base";
12
+ import { useRequest as w } from "ahooks";
13
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
14
+ //#region src/components/DeptsMemberSelector/subcomponents/Panels/OrganizationPanel/utils/departmentExpandState.ts
15
+ var D = {
16
+ INTERNAL: "internal",
17
+ EXTERNAL_DOCK_CORP: "external:dockcorp",
18
+ EXTERNAL_DOCK_DEPARTMENT: "external:dockcorpdept"
19
+ }, O = {
20
+ DOCK_PERSON_GROUP: "dockcorp",
21
+ DOCK_DEPARTMENT: "dockcorpdept"
22
+ }, k = {
23
+ [D.EXTERNAL_DOCK_CORP]: O.DOCK_PERSON_GROUP,
24
+ [D.EXTERNAL_DOCK_DEPARTMENT]: O.DOCK_DEPARTMENT
25
+ }, A = {
26
+ dockcorp: D.EXTERNAL_DOCK_CORP,
27
+ dockdept: D.EXTERNAL_DOCK_DEPARTMENT,
28
+ dockcorpdept: D.EXTERNAL_DOCK_DEPARTMENT
29
+ }, j = (e) => e ? k[e] : void 0, M = (e, t, n = []) => {
30
+ for (let r of e) {
31
+ let e = [...n, r._id];
32
+ if (r._id === t) return e;
33
+ if (r.children?.length) {
34
+ let n = M(r.children, t, e);
35
+ if (n) return n;
36
+ }
37
+ }
38
+ return null;
39
+ }, N = (e) => [A[e.type] ?? D.INTERNAL], P = (e) => r(e.flatMap((e) => e?._id ? N(e) : [])), F = (e) => {
40
+ let t = P(e);
41
+ return t.length === 1 ? t[0] : void 0;
42
+ }, I = ({ selectedDepartments: e, treesByView: t }) => {
43
+ let n = {}, i = /* @__PURE__ */ new Set(), a = P(e);
44
+ Object.keys(t).forEach((e) => {
45
+ n[e] = [];
46
+ }), e.forEach((e) => {
47
+ if (!e?._id) return;
48
+ let a = N(e);
49
+ for (let o of a) {
50
+ let a = t[o];
51
+ if (!a?.length) continue;
52
+ let s = M(a, e._id);
53
+ if (s) {
54
+ i.add(o), n[o] = r([...n[o], ...s.slice(0, -1)]);
55
+ break;
56
+ }
57
+ }
58
+ });
59
+ let o = [...i];
60
+ return {
61
+ preferredViewKey: a.length > 1 ? void 0 : o.length === 1 ? o[0] : void 0,
62
+ matchedViewKeys: o,
63
+ expandedKeysByView: n
64
+ };
65
+ }, L = ({ internalTreeData: e, externalDockCorpTreeData: t, externalDockDeptTreeData: n, selectedDepartments: r }) => y(() => {
66
+ let i = F(r), a = I({
67
+ selectedDepartments: r,
68
+ treesByView: {
69
+ [D.INTERNAL]: e,
70
+ [D.EXTERNAL_DOCK_CORP]: t,
71
+ [D.EXTERNAL_DOCK_DEPARTMENT]: n
72
+ }
73
+ });
74
+ return {
75
+ ...a,
76
+ preferredViewKeyFromSelection: i,
77
+ preferredExternalTab: j(a.preferredViewKey || i)
78
+ };
79
+ }, [
80
+ t,
81
+ n,
82
+ e,
83
+ r
84
+ ]), R = (e, t) => {
85
+ let n = [];
86
+ for (let r of e) {
87
+ if (r.type === t) {
88
+ n.push({
89
+ ...r,
90
+ children: t === "dockcorpdept" ? r.children : r.children?.length ? R(r.children, t) : void 0
91
+ });
92
+ continue;
93
+ }
94
+ let e = r.children?.length ? R(r.children, t) : [];
95
+ e.length > 0 && n.push({
96
+ ...r,
97
+ children: e
98
+ });
99
+ }
100
+ return n;
101
+ }, z = {
102
+ INTERNAL: 0,
103
+ EXTERNAL: 1
104
+ }, B = {
105
+ preferredViewKey: void 0,
106
+ preferredExternalTab: void 0,
107
+ matchedViewKeys: [],
108
+ expandedKeysByView: {
109
+ [D.INTERNAL]: [],
110
+ [D.EXTERNAL_DOCK_CORP]: [],
111
+ [D.EXTERNAL_DOCK_DEPARTMENT]: []
112
+ }
113
+ }, V = () => {
114
+ let { type: e, value: t = [], dispatch: r, requestContext: f, limits: v, departmentSelectableRange: x, departmentPanelRequestGuard: S } = a(), { t: C } = p(), E = [c.DEPARMENT, c.DEPARMENT_GROUP].includes(e), D = y(() => [{
115
+ key: z.INTERNAL,
116
+ label: C("department.internal"),
117
+ visible: !0
118
+ }, {
119
+ key: z.EXTERNAL,
120
+ label: C("department.external"),
121
+ visible: !0
122
+ }], [C]), [k, A] = b(z.INTERNAL), j = k === z.EXTERNAL, { data: M, loading: N } = w(() => i(S, () => e === c.DEPT_USERS ? o({
123
+ requestContext: f,
124
+ hasDeptDock: j
125
+ }) : s({
126
+ requestContext: f,
127
+ limits: v,
128
+ departmentSelectableRange: x,
129
+ hasDeptDock: j
130
+ })), { refreshDeps: [
131
+ j,
132
+ e,
133
+ f,
134
+ v,
135
+ x,
136
+ S
137
+ ] }), P = y(() => {
138
+ let e = u(M?.departments || []);
139
+ return n(e) ? [] : m(e);
140
+ }, [M]), F = y(() => {
141
+ let e = u(M?.label_corp_list || []);
142
+ if (n(e)) return [];
143
+ let t = e.filter((t) => d(t) ? t.type === "dockcorp" || t.type === "dockdept" ? !0 : t.parentId === 0 ? !1 : e.some((e) => e.parentId === t.departmentId) : !1).map((e) => ({
144
+ ...e,
145
+ checkable: e.type !== "dockcorpdept" && e.type !== "label",
146
+ icon: /* @__PURE__ */ T(l, {
147
+ type: e.type,
148
+ size: 16
149
+ })
150
+ }));
151
+ return t.length > 0 ? h(t, {
152
+ parentId: "parentId",
153
+ children: "children",
154
+ value: "departmentId",
155
+ title: "name"
156
+ }) : [];
157
+ }, [M]), I = y(() => R(F, O.DOCK_PERSON_GROUP), [F]), V = y(() => R(F, O.DOCK_DEPARTMENT), [F]), H = y(() => ({
158
+ internal: P,
159
+ external: F
160
+ }), [F, P]), U = L({
161
+ internalTreeData: P,
162
+ externalDockCorpTreeData: I,
163
+ externalDockDeptTreeData: V,
164
+ selectedDepartments: E ? t : []
165
+ }), W = _((t, n) => {
166
+ if (c.DEPARMENT === e) {
167
+ let e = j ? M?.label_corp_list : M?.departments;
168
+ if (!e) return;
169
+ let n = e.find((e) => e._id === t && d(e));
170
+ n && r({
171
+ type: "insertOnly",
172
+ payload: { ...n }
173
+ });
174
+ return;
175
+ }
176
+ r({
177
+ type: "addOne",
178
+ payload: { ...n }
179
+ });
180
+ }, [
181
+ M,
182
+ r,
183
+ j,
184
+ e
185
+ ]), G = _((e) => {
186
+ let t = g(e, k === z.INTERNAL ? H.internal : H.external, {
187
+ children: "children",
188
+ value: "_id"
189
+ });
190
+ t && r({
191
+ type: "deleteOne",
192
+ payload: t._id
193
+ });
194
+ }, [
195
+ k,
196
+ r,
197
+ H
198
+ ]);
199
+ return {
200
+ activeKey: k,
201
+ setActiveKey: A,
202
+ menuItems: D,
203
+ treeData: H,
204
+ currentTreeData: j ? H.external : H.internal,
205
+ loading: N,
206
+ showMenu: (M?.label_corp_count || 0) > 0,
207
+ handleSelect: W,
208
+ handleDeselect: G,
209
+ isBorderless: (M?.label_corp_count || 0) === 0,
210
+ menuType: z,
211
+ expandState: E ? U : B,
212
+ preferredExternalTab: E ? U.preferredExternalTab : void 0
213
+ };
214
+ }, H = (n) => {
215
+ let { type: r, containerHeight: i, value: o } = a(), { t: s } = p(), l = o?.map((e) => e._id) || [], u = y(() => n.data?.map((e) => e._id), [n.data]), [d, f] = b(n.autoExpandKeys ?? u);
216
+ return v(() => {
217
+ f(n.autoExpandKeys ?? u);
218
+ }, [
219
+ u,
220
+ y(() => (n.autoExpandKeys ?? u).join("|"), [u, n.autoExpandKeys]),
221
+ n.autoExpandKeys
222
+ ]), /* @__PURE__ */ E(e, {
223
+ style: {
224
+ height: i - 8,
225
+ padding: "4px"
226
+ },
227
+ className: "internal-container",
228
+ classNames: { contentEl: "internal-container-content-el" },
229
+ children: [n.data.length > 0 && /* @__PURE__ */ T(C, {
230
+ parentCheckable: !0,
231
+ checkType: r === c.DEPARMENT ? "radio" : "checkbox",
232
+ data: n.data,
233
+ fieldNames: {
234
+ title: "name",
235
+ value: "_id",
236
+ children: "children"
237
+ },
238
+ selectedKeys: l,
239
+ onSelect: n.onSelect,
240
+ onDeSelect: n.onDeselect,
241
+ expandedKeys: d,
242
+ onExpand: f,
243
+ icon: () => /* @__PURE__ */ T(S, {
244
+ name: "dept-one",
245
+ className: "internal-container__icon"
246
+ }),
247
+ switcherIcon: (e) => /* @__PURE__ */ T(S, {
248
+ name: "xiangxiazhankai-11",
249
+ className: t("internal-container__arrow-icon", { "rotate-90": e })
250
+ })
251
+ }), n.data.length === 0 && !n.loading && /* @__PURE__ */ T("div", {
252
+ className: "internal-container__empty",
253
+ children: /* @__PURE__ */ T("span", { children: s("department.noAvailable") })
254
+ })]
255
+ });
256
+ }, U = {
257
+ "external-organization": "_external-organization_kf3pt_1",
258
+ "external-organization__content": "_external-organization__content_kf3pt_5",
259
+ "external-organization__scroll-content": "_external-organization__scroll-content_kf3pt_8",
260
+ "external-organization__tree-icon": "_external-organization__tree-icon_kf3pt_12",
261
+ "external-organization__switcher-icon": "_external-organization__switcher-icon_kf3pt_15",
262
+ "external-organization__switcher-icon--expanded": "_external-organization__switcher-icon--expanded_kf3pt_20",
263
+ "external-organization__empty": "_external-organization__empty_kf3pt_23"
264
+ }, W = (n) => {
265
+ let { type: r, containerHeight: i, value: o } = a(), { t: s } = p(), [l, u] = b(n.preferredTab || O.DOCK_PERSON_GROUP), d = o?.map((e) => e._id) || [], m = [{
266
+ label: s("department.externalContactGroup"),
267
+ value: O.DOCK_PERSON_GROUP
268
+ }, {
269
+ label: s("department.externalContactDepartment"),
270
+ value: O.DOCK_DEPARTMENT
271
+ }];
272
+ v(() => {
273
+ n.preferredTab && u(n.preferredTab);
274
+ }, [n.preferredTab]);
275
+ let h = y(() => R(n.data, l), [l, n.data]), g = y(() => h?.map((e) => e._id), [h]), _ = n.autoExpandKeysByTab?.[l], [x, w] = b(_ ?? g);
276
+ return v(() => {
277
+ w(_ ?? g);
278
+ }, [
279
+ g,
280
+ y(() => (_ ?? g).join("|"), [g, _]),
281
+ _
282
+ ]), /* @__PURE__ */ E("div", {
283
+ className: U["external-organization"],
284
+ children: [/* @__PURE__ */ T(f, {
285
+ tabs: m,
286
+ value: l,
287
+ onChange: u
288
+ }), /* @__PURE__ */ T("div", {
289
+ className: U["external-organization__content"],
290
+ children: /* @__PURE__ */ E(e, {
291
+ style: {
292
+ height: i - 42,
293
+ padding: "4px"
294
+ },
295
+ classNames: { contentEl: U["external-organization__scroll-content"] },
296
+ children: [h.length > 0 && /* @__PURE__ */ T(C, {
297
+ parentCheckable: !0,
298
+ checkType: r === c.DEPARMENT ? "radio" : "checkbox",
299
+ data: h,
300
+ fieldNames: {
301
+ title: "name",
302
+ value: "_id",
303
+ children: "children"
304
+ },
305
+ selectedKeys: d,
306
+ onSelect: n.onSelect,
307
+ onDeSelect: n.onDeselect,
308
+ expandedKeys: x,
309
+ onExpand: w,
310
+ icon: () => /* @__PURE__ */ T(S, {
311
+ name: "dept-one",
312
+ className: U["external-organization__tree-icon"],
313
+ size: 16
314
+ }),
315
+ switcherIcon: (e) => /* @__PURE__ */ T(S, {
316
+ name: "xiangxiazhankai-11",
317
+ className: t(U["external-organization__switcher-icon"], { [U["external-organization__switcher-icon--expanded"]]: e })
318
+ })
319
+ }), h.length === 0 && !n.loading && /* @__PURE__ */ T("div", {
320
+ className: U["external-organization__empty"],
321
+ children: /* @__PURE__ */ T("span", { children: s("department.noAvailable") })
322
+ })]
323
+ })
324
+ })]
325
+ });
326
+ }, G = {
327
+ "organization-panel": "_organization-panel_1dfed_1",
328
+ "organization-panel__menu": "_organization-panel__menu_1dfed_6",
329
+ "organization-panel__menu-list": "_organization-panel__menu-list_1dfed_10",
330
+ "organization-panel__menu-item": "_organization-panel__menu-item_1dfed_14",
331
+ "organization-panel__menu-item--active": "_organization-panel__menu-item--active_1dfed_25",
332
+ "organization-panel__content": "_organization-panel__content_1dfed_32",
333
+ "organization-panel__content--borderless": "_organization-panel__content--borderless_1dfed_37"
334
+ }, K = () => {
335
+ let e = V();
336
+ return /* @__PURE__ */ E("div", {
337
+ className: G["organization-panel"],
338
+ children: [e.showMenu && /* @__PURE__ */ T("aside", {
339
+ className: G["organization-panel__menu"],
340
+ children: /* @__PURE__ */ T("ul", {
341
+ className: G["organization-panel__menu-list"],
342
+ children: e.menuItems.filter((e) => e.visible).map((n) => /* @__PURE__ */ T("li", {
343
+ onClick: () => e.setActiveKey(n.key),
344
+ className: t(G["organization-panel__menu-item"], { [G["organization-panel__menu-item--active"]]: e.activeKey === n.key }),
345
+ children: n.label
346
+ }, n.key))
347
+ })
348
+ }), /* @__PURE__ */ T("section", {
349
+ className: t(G["organization-panel__content"], { [G["organization-panel__content--borderless"]]: e.isBorderless }),
350
+ children: /* @__PURE__ */ E(x, {
351
+ spinning: e.loading,
352
+ children: [e.menuType.INTERNAL === e.activeKey && /* @__PURE__ */ T(H, {
353
+ onSelect: e.handleSelect,
354
+ onDeselect: e.handleDeselect,
355
+ loading: e.loading,
356
+ data: e.currentTreeData,
357
+ autoExpandKeys: e.expandState.matchedViewKeys.includes("internal") ? e.expandState.expandedKeysByView.internal : void 0
358
+ }), e.menuType.EXTERNAL === e.activeKey && /* @__PURE__ */ T(W, {
359
+ data: e.currentTreeData,
360
+ onSelect: e.handleSelect,
361
+ onDeselect: e.handleDeselect,
362
+ loading: e.loading,
363
+ preferredTab: e.preferredExternalTab,
364
+ autoExpandKeysByTab: {
365
+ dockcorp: e.expandState.matchedViewKeys.includes("external:dockcorp") ? e.expandState.expandedKeysByView["external:dockcorp"] : void 0,
366
+ dockcorpdept: e.expandState.matchedViewKeys.includes("external:dockcorpdept") ? e.expandState.expandedKeysByView["external:dockcorpdept"] : void 0
367
+ }
368
+ })]
369
+ })
370
+ })]
371
+ });
372
+ };
373
+ //#endregion
374
+ export { K as t };
@@ -70,38 +70,38 @@ var s = {
70
70
  size: t
71
71
  });
72
72
  }
73
- }, u = "_active_1vd3c_15", d = {
73
+ }, u = "-99", d = (e = {}) => String(e.status) !== u, f = (e = []) => e.filter(d), p = "_active_1vd3c_15", m = {
74
74
  "tabgroup-container": "_tabgroup-container_1vd3c_1",
75
75
  "tabgroup-container__tab-item": "_tabgroup-container__tab-item_1vd3c_7",
76
- active: u,
76
+ active: p,
77
77
  "tabgroup-container__indicator": "_tabgroup-container__indicator_1vd3c_18"
78
- }, f = (i) => {
79
- let { tabs: s, value: c, onChange: l } = i, u = n(null), [f, p] = r({
78
+ }, h = (i) => {
79
+ let { tabs: s, value: c, onChange: l } = i, u = n(null), [d, f] = r({
80
80
  width: 0,
81
81
  transform: "translateX(0)"
82
- }), m = (e) => {
82
+ }), p = (e) => {
83
83
  let t = u.current?.querySelector(`[data-key="${e}"]`);
84
84
  if (t) {
85
85
  let { width: e, left: n } = t.getBoundingClientRect();
86
- p({
86
+ f({
87
87
  width: e,
88
88
  transform: `translateX(${n - (t.parentElement?.parentElement?.getBoundingClientRect().left || 0)}px)`
89
89
  });
90
90
  }
91
91
  };
92
92
  return t(() => {
93
- m(c);
93
+ p(c);
94
94
  }, [c]), /* @__PURE__ */ o("div", {
95
- className: d["tabgroup-container"],
95
+ className: m["tabgroup-container"],
96
96
  ref: u,
97
97
  children: [/* @__PURE__ */ a("div", {
98
- className: d["tabgroup-container__indicator"],
98
+ className: m["tabgroup-container__indicator"],
99
99
  style: {
100
- width: `${f.width}px`,
101
- transform: f.transform
100
+ width: `${d.width}px`,
101
+ transform: d.transform
102
102
  }
103
103
  }), s.map((t) => /* @__PURE__ */ a("div", {
104
- className: e(d["tabgroup-container__tab-item"], { [d.active]: c === t.value }),
104
+ className: e(m["tabgroup-container__tab-item"], { [m.active]: c === t.value }),
105
105
  onClick: () => l(t.value),
106
106
  children: /* @__PURE__ */ a("span", {
107
107
  "data-key": t.value,
@@ -111,4 +111,4 @@ var s = {
111
111
  });
112
112
  };
113
113
  //#endregion
114
- export { l as n, s as r, f as t };
114
+ export { s as a, l as i, f as n, d as r, h as t };
@@ -1,17 +1,17 @@
1
1
  import "../vendors/simplebar-react.js";
2
2
  import "./useDeptsMemberSelector-t7b8yu-A.js";
3
- import { r as e } from "./TabGroup-Ds7bTbKL.js";
4
- import { t } from "./DeptsMemberSelector-BXWGwgUq.js";
3
+ import { a as e } from "./TabGroup-Dht9ylk4.js";
4
+ import { t } from "./DeptsMemberSelector-DD3yoWYQ.js";
5
5
  import "../vendors/useLocale.js";
6
6
  import "../ConfigProvider/configContext-kYu9qTM2.js";
7
7
  import { getColorByName as n } from "./utils/index.js";
8
- import "./DeptsUser-C8hYQ6z-.js";
9
- import "./OrganizationPanel-DoM4UNxv.js";
10
- import "./ExtraConcactPanel-BDNrz5rV.js";
8
+ import "./DeptsUser-41XeJOIY.js";
9
+ import "./OrganizationPanel-CT3v_KVr.js";
10
+ import "./MemberPanel-BhuVgJdO.js";
11
11
  import "./RelationShipList-BhiAdVjm.js";
12
12
  import "./RelationShipDepts-kpemRPz1.js";
13
- import "./Member-B4tEHksu.js";
14
- import "./Department-12ftZfXD.js";
13
+ import "./Member-Bit-zWOE.js";
14
+ import "./Department-H6zGUr4c.js";
15
15
  //#region src/components/DeptsMemberSelector/index.ts
16
16
  var r = t;
17
17
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import "../../../../vendors/simplebar-react.js";
2
2
  import "../../../useDeptsMemberSelector-t7b8yu-A.js";
3
- import "../../../TabGroup-Ds7bTbKL.js";
3
+ import "../../../TabGroup-Dht9ylk4.js";
4
4
  import "../../../../vendors/useLocale.js";
5
5
  import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
6
- import "../../../OrganizationPanel-DoM4UNxv.js";
7
- import { t as e } from "../../../Department-12ftZfXD.js";
6
+ import "../../../OrganizationPanel-CT3v_KVr.js";
7
+ import { t as e } from "../../../Department-H6zGUr4c.js";
8
8
  export { e as useDepartmentTabItems };
@@ -1,11 +1,11 @@
1
1
  import "../../../../vendors/simplebar-react.js";
2
2
  import "../../../useDeptsMemberSelector-t7b8yu-A.js";
3
- import "../../../TabGroup-Ds7bTbKL.js";
3
+ import "../../../TabGroup-Dht9ylk4.js";
4
4
  import "../../../../vendors/useLocale.js";
5
5
  import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
6
- import { t as e } from "../../../DeptsUser-C8hYQ6z-.js";
7
- import "../../../OrganizationPanel-DoM4UNxv.js";
8
- import "../../../ExtraConcactPanel-BDNrz5rV.js";
6
+ import { t as e } from "../../../DeptsUser-41XeJOIY.js";
7
+ import "../../../OrganizationPanel-CT3v_KVr.js";
8
+ import "../../../MemberPanel-BhuVgJdO.js";
9
9
  import "../../../RelationShipList-BhiAdVjm.js";
10
10
  import "../../../RelationShipDepts-kpemRPz1.js";
11
11
  export { e as useDeptUserTabItems };
@@ -1,8 +1,8 @@
1
1
  import "../../../../vendors/simplebar-react.js";
2
2
  import "../../../useDeptsMemberSelector-t7b8yu-A.js";
3
- import "../../../TabGroup-Ds7bTbKL.js";
3
+ import "../../../TabGroup-Dht9ylk4.js";
4
4
  import "../../../../vendors/useLocale.js";
5
5
  import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
6
- import "../../../ExtraConcactPanel-BDNrz5rV.js";
7
- import { t as e } from "../../../Member-B4tEHksu.js";
6
+ import "../../../MemberPanel-BhuVgJdO.js";
7
+ import { t as e } from "../../../Member-Bit-zWOE.js";
8
8
  export { e as useMemberTabItems };
@@ -50,7 +50,14 @@ var t = [
50
50
  return null;
51
51
  };
52
52
  function o(e) {
53
- let t = {}, n = [], r = (e) => e == null ? "" : String(e);
53
+ let t = {}, n = [], r = (e) => e == null ? "" : String(e), i = (e) => {
54
+ if (e === "" || e == null) return Infinity;
55
+ let t = Number(e);
56
+ return Number.isFinite(t) ? t : Infinity;
57
+ }, a = (e) => e.sort((e, t) => {
58
+ let n = i(e.order), r = i(t.order);
59
+ return n === r ? 0 : n - r;
60
+ });
54
61
  return e.forEach((e) => {
55
62
  let n = r(e.departmentId);
56
63
  n && (t[n] = {
@@ -72,7 +79,9 @@ function o(e) {
72
79
  return;
73
80
  }
74
81
  n.push(e);
75
- }), n;
82
+ }), Object.values(t).forEach((e) => {
83
+ a(e.children);
84
+ }), a(n), n;
76
85
  }
77
86
  //#endregion
78
87
  export { t as ENTITY_COLORS, o as buildDeptTree, i as buildTree, a as findNodeInTree, n as getColorByName, r as getMemberDisplayName };
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from '../../services/apiService';
2
- type Locale = 'zh-CN' | 'en-US';
2
+ type Locale = 'zh-CN' | 'zh-TW' | 'en-US';
3
3
  interface PreFetchedNode {
4
4
  _id: string | number;
5
5
  name: string;
@@ -0,0 +1,2 @@
1
+ declare const DeptUsersExtraContactPanel: () => import("react/jsx-runtime").JSX.Element;
2
+ export default DeptUsersExtraContactPanel;
@@ -0,0 +1,40 @@
1
+ type EntryKey = 'group' | 'member';
2
+ type GroupTypeKey = 'default' | 'custom';
3
+ type MenuItem<T extends string> = {
4
+ key: T;
5
+ label: string;
6
+ };
7
+ type DeptUsersOutsiderGroup = {
8
+ _id: string;
9
+ name: string;
10
+ type?: string | number;
11
+ order?: string | number;
12
+ sort?: string | number;
13
+ [key: string]: any;
14
+ };
15
+ type DeptUsersOutsiderMember = {
16
+ _id: string;
17
+ name?: string;
18
+ nickname?: string;
19
+ type?: string;
20
+ [key: string]: any;
21
+ };
22
+ declare const useDeptUsersExtraContactPanelData: () => {
23
+ containerHeight: number;
24
+ menuItems: MenuItem<EntryKey>[];
25
+ groupTypeItems: MenuItem<GroupTypeKey>[];
26
+ activeEntry: EntryKey;
27
+ activeGroupType: GroupTypeKey;
28
+ setActiveEntry: import('react').Dispatch<import('react').SetStateAction<EntryKey>>;
29
+ setActiveGroupType: (nextKey: GroupTypeKey) => void;
30
+ groupId: string | undefined;
31
+ setGroupId: import('react').Dispatch<import('react').SetStateAction<string | undefined>>;
32
+ currentGroups: DeptUsersOutsiderGroup[];
33
+ memberList: DeptUsersOutsiderMember[];
34
+ selectedIdSet: Set<any>;
35
+ groupListLoading: boolean;
36
+ memberLoading: boolean;
37
+ handleGroupToggle: (group: DeptUsersOutsiderGroup, checked: boolean) => void;
38
+ };
39
+ export { useDeptUsersExtraContactPanelData };
40
+ export type { DeptUsersOutsiderGroup, DeptUsersOutsiderMember, EntryKey, GroupTypeKey };
@@ -34,7 +34,7 @@ declare const useDeptUsersRolePanelData: () => {
34
34
  handleSelectInternalRole: (roleId: string | number) => void;
35
35
  handleRoleToggle: (item: DeptUsersRoleSelectionItem, checked: boolean) => void;
36
36
  isRoleGroupNode: (role?: RoleSourceItem | null) => boolean;
37
- defaultExpandedKeys: string[];
37
+ defaultExpandedKeys: never[];
38
38
  };
39
39
  export { useDeptUsersRolePanelData };
40
40
  export type { DeptUsersRoleSelectionItem, DeptUsersRoleOptionItem, RoleSourceItem };
@@ -0,0 +1,3 @@
1
+ declare const isAvailableDepartment: (department?: Record<string, any>) => boolean;
2
+ declare const filterUnavailableDepartments: <T extends Record<string, any>>(departments?: T[]) => T[];
3
+ export { filterUnavailableDepartments, isAvailableDepartment };