@baishuyun/ui-business 5.0.3 → 5.0.4

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 (53) hide show
  1. package/dist/BubbleChart/AutoGridEChart-uinZMdOR.js +185 -0
  2. package/dist/BubbleChart/BubbleChart-CPhXmstL.js +174 -0
  3. package/dist/BubbleChart/index.js +7 -4
  4. package/dist/ConfigProvider/ConfigProvider-CISBH3A8.js +22 -0
  5. package/dist/ConfigProvider/configContext-B0kvcW4s.js +9 -0
  6. package/dist/ConfigProvider/index.js +6 -4
  7. package/dist/DeptsMember/Department-BYVAaPYd.js +186 -0
  8. package/dist/DeptsMember/DeptsMember-D_xv-Zy7.js +801 -0
  9. package/dist/DeptsMember/DeptsUser-CQrRRJxk.js +277 -0
  10. package/dist/DeptsMember/ExtraConcactPanel-Cioew3V3.js +736 -0
  11. package/dist/DeptsMember/Member-BIBX5jKD.js +47 -0
  12. package/dist/DeptsMember/OrganizationPanel-BLIXOm6z.js +235 -0
  13. package/dist/DeptsMember/RelationShipDepts-wcYjFbhx.js +78 -0
  14. package/dist/DeptsMember/RelationShipList-CRdCr4NL.js +73 -0
  15. package/dist/DeptsMember/TabGroup-B_VIf1lS.js +98 -0
  16. package/dist/DeptsMember/index.js +18 -8
  17. package/dist/DeptsMember/subcomponents/Entity/Department/index.js +8 -166
  18. package/dist/DeptsMember/subcomponents/Entity/DeptsUser/index.js +11 -267
  19. package/dist/DeptsMember/subcomponents/Entity/Member/index.js +8 -46
  20. package/dist/DeptsMember/subcomponents/Panels/MemberRelationShipPanel/RelationShipDepts/index.js +4 -13
  21. package/dist/DeptsMember/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +4 -67
  22. package/dist/DeptsMember/useDeptsMemberSelector-DP5L8bhi.js +15 -0
  23. package/dist/DeptsMember/utils/index.js +65 -77
  24. package/dist/Scatterplot/Scatterplot-DTKhmdTE.js +150 -0
  25. package/dist/Scatterplot/index.js +7 -4
  26. package/dist/index.css +2 -1
  27. package/dist/index.js +164 -200
  28. package/dist/vendors/clsx.js +14 -14
  29. package/dist/vendors/echarts.js +41454 -44148
  30. package/dist/vendors/lodash-es.js +127 -117
  31. package/dist/vendors/rolldown-runtime.js +11 -0
  32. package/dist/vendors/services/apiService.js +15 -19
  33. package/dist/vendors/services/corp/outsider.service.js +5 -6
  34. package/dist/vendors/services/data/department.service.js +5 -6
  35. package/dist/vendors/services/data/member.service.js +5 -9
  36. package/dist/vendors/services/data/member_limit.service.js +5 -5
  37. package/dist/vendors/services/data/outsider.service.js +5 -6
  38. package/dist/vendors/services/ncorp/department.service.js +5 -6
  39. package/dist/vendors/services/ncorp/relation.service.js +5 -5
  40. package/dist/vendors/simplebar-react.js +358 -396
  41. package/dist/vendors/useLocale.js +132 -41
  42. package/package.json +5 -5
  43. package/dist/BubbleChart/AutoGridEChart-BlLcIZ_T.js +0 -209
  44. package/dist/BubbleChart/BubbleChart-BPGhlxCM.js +0 -237
  45. package/dist/ConfigProvider/ConfigProvider-CAq3dN6-.js +0 -15
  46. package/dist/ConfigProvider/configContext-_BAslzM-.js +0 -9
  47. package/dist/DeptsMember/DeptsMember-BNuoQ8y4.js +0 -865
  48. package/dist/DeptsMember/ExtraConcactPanel-BoSCI3s5.js +0 -738
  49. package/dist/DeptsMember/OrganizationPanel-ByWU1PWX.js +0 -275
  50. package/dist/DeptsMember/TabGroup-DZC7i-Yr.js +0 -104
  51. package/dist/DeptsMember/index-BRIA1uOQ.js +0 -88
  52. package/dist/DeptsMember/useDeptsMemberSelector-D3rvDuVf.js +0 -13
  53. package/dist/Scatterplot/Scatterplot-BL66B_Zm.js +0 -202
@@ -0,0 +1,47 @@
1
+ import { t as e } from "./useDeptsMemberSelector-DP5L8bhi.js";
2
+ import { t } from "../vendors/useLocale.js";
3
+ import { a as n, i as r, n as i, r as a, t as o } from "./ExtraConcactPanel-Cioew3V3.js";
4
+ import { useMemo as s } from "react";
5
+ import { jsx as c } from "react/jsx-runtime";
6
+ //#region src/components/DeptsMember/subcomponents/Panels/CurrentUserPanel/CurrentUserPanel.module.scss
7
+ var l = { "current-user-panel": "_current-user-panel_184e6_1" }, u = () => {
8
+ let { currentUser: t } = e();
9
+ return /* @__PURE__ */ c("div", {
10
+ className: l["current-user-panel"],
11
+ children: /* @__PURE__ */ c(n, {
12
+ list: t ? [t] : [],
13
+ showCheckAll: !1
14
+ })
15
+ });
16
+ }, d = () => {
17
+ let { t: e } = t();
18
+ return s(() => [
19
+ {
20
+ label: e("member.title"),
21
+ key: "member",
22
+ view: /* @__PURE__ */ c(r, {})
23
+ },
24
+ {
25
+ label: e("role.title"),
26
+ key: "role",
27
+ view: /* @__PURE__ */ c(i, {})
28
+ },
29
+ {
30
+ label: e("position.title"),
31
+ key: "job",
32
+ view: /* @__PURE__ */ c(a, {})
33
+ },
34
+ {
35
+ label: e("externalContact.title"),
36
+ key: "externalContact",
37
+ view: /* @__PURE__ */ c(o, {})
38
+ },
39
+ {
40
+ label: e("currentUser.title"),
41
+ key: "currentUser",
42
+ view: /* @__PURE__ */ c(u, {})
43
+ }
44
+ ], [e]);
45
+ };
46
+ //#endregion
47
+ export { d as t };
@@ -0,0 +1,235 @@
1
+ import { t as e } from "../vendors/simplebar-react.js";
2
+ import { t } from "../vendors/clsx.js";
3
+ import { t as n } from "./useDeptsMemberSelector-DP5L8bhi.js";
4
+ import { n as r, r as i, t as a } from "./TabGroup-B_VIf1lS.js";
5
+ import { t as o } from "../vendors/useLocale.js";
6
+ import { buildDeptTree as s, buildTree as c, findNodeInTree as l } from "./utils/index.js";
7
+ import { t as u } from "../vendors/services/data/member.service.js";
8
+ import { useCallback as d, useMemo as f, useState as p } from "react";
9
+ import { Spin as m } from "antd";
10
+ import { Icon as h, Tree as g } from "@baishuyun/ui-base";
11
+ import { useRequest as _ } from "ahooks";
12
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
+ //#region src/components/DeptsMember/subcomponents/Panels/OrganizationPanel/InternalOrganization/InternalOrganization.tsx
14
+ var b = (r) => {
15
+ let { type: a, containerHeight: s, value: c } = n(), { t: l } = o(), u = c?.map((e) => e._id) || [], d = r.data?.map((e) => e._id);
16
+ return /* @__PURE__ */ y(e, {
17
+ style: {
18
+ height: s - 8,
19
+ padding: "4px"
20
+ },
21
+ className: "internal-container",
22
+ classNames: { contentEl: "internal-container-content-el" },
23
+ children: [r.data.length > 0 && /* @__PURE__ */ v(g, {
24
+ parentCheckable: !0,
25
+ checkType: a === i.DEPARMENT ? "radio" : "checkbox",
26
+ data: r.data,
27
+ fieldNames: {
28
+ title: "name",
29
+ value: "_id",
30
+ children: "children"
31
+ },
32
+ selectedKeys: u,
33
+ onSelect: r.onSelect,
34
+ onDeSelect: r.onDeselect,
35
+ defaultExpandedKeys: d,
36
+ icon: () => /* @__PURE__ */ v(h, {
37
+ name: "dept-one",
38
+ className: "internal-container__icon"
39
+ }),
40
+ switcherIcon: (e) => /* @__PURE__ */ v(h, {
41
+ name: "xiangxiazhankai-11",
42
+ className: t("internal-container__arrow-icon", { "rotate-90": e })
43
+ })
44
+ }), r.data.length === 0 && !r.loading && /* @__PURE__ */ v("div", {
45
+ className: "internal-container__empty",
46
+ children: /* @__PURE__ */ v("span", { children: l("department.noAvailable") })
47
+ })]
48
+ });
49
+ }, x = {
50
+ "external-organization": "_external-organization_cz9md_1",
51
+ "external-organization__content": "_external-organization__content_cz9md_5",
52
+ "external-organization__scroll-content": "_external-organization__scroll-content_cz9md_8",
53
+ "external-organization__tree-icon": "_external-organization__tree-icon_cz9md_11",
54
+ "external-organization__switcher-icon": "_external-organization__switcher-icon_cz9md_14",
55
+ "external-organization__switcher-icon--expanded": "_external-organization__switcher-icon--expanded_cz9md_19",
56
+ "external-organization__empty": "_external-organization__empty_cz9md_22"
57
+ }, S = /* @__PURE__ */ function(e) {
58
+ return e.DOCK_PERSON_GROUP = "dockcorp", e.DOCK_DEPARTMENT = "dockcorpdept", e;
59
+ }(S || {}), C = (r) => {
60
+ let { type: s, containerHeight: c, value: l } = n(), { t: u } = o(), [d, f] = p(S.DOCK_PERSON_GROUP), m = l?.map((e) => e._id) || [], _ = [{
61
+ label: u("department.externalContactGroup"),
62
+ value: S.DOCK_PERSON_GROUP
63
+ }, {
64
+ label: u("department.externalContactDepartment"),
65
+ value: S.DOCK_DEPARTMENT
66
+ }], b = (e, t) => {
67
+ let n = [];
68
+ for (let r of e) if (r.type === t) if (t === "dockcorpdept") n.push({
69
+ ...r,
70
+ children: r.children
71
+ });
72
+ else {
73
+ let e = r.children ? b(r.children, t) : [];
74
+ n.push({
75
+ ...r,
76
+ children: e.length > 0 ? e : void 0
77
+ });
78
+ }
79
+ else {
80
+ let e = r.children ? b(r.children, t) : [];
81
+ e.length > 0 && n.push({
82
+ ...r,
83
+ children: e
84
+ });
85
+ }
86
+ return n;
87
+ }, C = b(r.data, d), w = C?.map((e) => e._id);
88
+ return /* @__PURE__ */ y("div", {
89
+ className: x["external-organization"],
90
+ children: [/* @__PURE__ */ v(a, {
91
+ tabs: _,
92
+ value: d,
93
+ onChange: f
94
+ }), /* @__PURE__ */ v("div", {
95
+ className: x["external-organization__content"],
96
+ children: /* @__PURE__ */ y(e, {
97
+ style: {
98
+ height: c - 42,
99
+ padding: "4px"
100
+ },
101
+ classNames: { contentEl: x["external-organization__scroll-content"] },
102
+ children: [C.length > 0 && /* @__PURE__ */ v(g, {
103
+ parentCheckable: !0,
104
+ checkType: s === i.DEPARMENT ? "radio" : "checkbox",
105
+ data: C,
106
+ fieldNames: {
107
+ title: "name",
108
+ value: "_id",
109
+ children: "children"
110
+ },
111
+ selectedKeys: m,
112
+ onSelect: r.onSelect,
113
+ onDeSelect: r.onDeselect,
114
+ defaultExpandedKeys: w,
115
+ icon: () => /* @__PURE__ */ v(h, {
116
+ name: "dept-one",
117
+ className: x["external-organization__tree-icon"],
118
+ size: 16
119
+ }),
120
+ switcherIcon: (e) => /* @__PURE__ */ v(h, {
121
+ name: "xiangxiazhankai-11",
122
+ className: t(x["external-organization__switcher-icon"], { [x["external-organization__switcher-icon--expanded"]]: e })
123
+ })
124
+ }), C.length === 0 && !r.loading && /* @__PURE__ */ v("div", {
125
+ className: x["external-organization__empty"],
126
+ children: /* @__PURE__ */ v("span", { children: u("department.noAvailable") })
127
+ })]
128
+ })
129
+ })]
130
+ });
131
+ }, w = {
132
+ "organization-panel": "_organization-panel_1dfed_1",
133
+ "organization-panel__menu": "_organization-panel__menu_1dfed_6",
134
+ "organization-panel__menu-list": "_organization-panel__menu-list_1dfed_10",
135
+ "organization-panel__menu-item": "_organization-panel__menu-item_1dfed_14",
136
+ "organization-panel__menu-item--active": "_organization-panel__menu-item--active_1dfed_25",
137
+ "organization-panel__content": "_organization-panel__content_1dfed_32",
138
+ "organization-panel__content--borderless": "_organization-panel__content--borderless_1dfed_37"
139
+ }, T = /* @__PURE__ */ function(e) {
140
+ return e[e.INTERNAL = 0] = "INTERNAL", e[e.EXTERNAL = 1] = "EXTERNAL", e;
141
+ }(T || {}), E = () => {
142
+ let { type: e, dispatch: a } = n(), { t: h } = o(), [g] = p([{
143
+ key: T.INTERNAL,
144
+ label: h("department.internal"),
145
+ visible: !0
146
+ }, {
147
+ key: T.EXTERNAL,
148
+ label: h("department.external"),
149
+ visible: !0
150
+ }]), [x, S] = p(T.INTERNAL), { data: E, loading: D } = _(() => u({
151
+ departmentLimit: [],
152
+ hasDeptDock: x === T.EXTERNAL
153
+ }), { refreshDeps: [x] }), O = f(() => {
154
+ let e = E?.departments || [];
155
+ return e.length > 0 ? s(e) : [];
156
+ }, [E]), k = f(() => {
157
+ let e = E?.label_corp_list || [];
158
+ if (!e.length) return [];
159
+ let t = e.filter((t) => t.type === "dockcorp" || t.type === "dockdept" ? !0 : t.parentId === 0 ? !1 : e.some((e) => e.parentId === t.departmentId)), n = t.map((e) => ({
160
+ ...e,
161
+ checkable: e.type !== "dockcorpdept" && e.type !== "label",
162
+ icon: /* @__PURE__ */ v(r, {
163
+ type: e.type,
164
+ size: 16
165
+ })
166
+ }));
167
+ return t.length > 0 ? c(n, {
168
+ parentId: "parentId",
169
+ children: "children",
170
+ value: "_id",
171
+ title: "name"
172
+ }) : [];
173
+ }, [E]), A = {
174
+ [T.INTERNAL]: O,
175
+ [T.EXTERNAL]: k
176
+ }, j = d((e) => {
177
+ let t = x === T.EXTERNAL ? E?.label_corp_list : E?.departments;
178
+ if (!t) return;
179
+ let n = t.find((t) => t._id === e);
180
+ n && a({
181
+ type: "insertOnly",
182
+ payload: { ...n }
183
+ });
184
+ }, [
185
+ a,
186
+ E,
187
+ x
188
+ ]), M = d((e, t) => {
189
+ a({
190
+ type: "addOne",
191
+ payload: { ...t }
192
+ });
193
+ }, [a]), N = (e) => {
194
+ let t = l(e, A[x], {
195
+ children: "children",
196
+ value: "_id"
197
+ });
198
+ t && a({
199
+ type: "deleteOne",
200
+ payload: t._id
201
+ });
202
+ }, P = i.DEPARMENT === e ? j : M, F = E?.label_corp_count || 0;
203
+ return /* @__PURE__ */ y("div", {
204
+ className: w["organization-panel"],
205
+ children: [F > 0 && /* @__PURE__ */ v("aside", {
206
+ className: w["organization-panel__menu"],
207
+ children: /* @__PURE__ */ v("ul", {
208
+ className: w["organization-panel__menu-list"],
209
+ children: g.filter((e) => e.visible).map((e) => /* @__PURE__ */ v("li", {
210
+ onClick: () => S(e.key),
211
+ className: t(w["organization-panel__menu-item"], { [w["organization-panel__menu-item--active"]]: x === e.key }),
212
+ children: e.label
213
+ }, e.key))
214
+ })
215
+ }), /* @__PURE__ */ v("section", {
216
+ className: t(w["organization-panel__content"], { [w["organization-panel__content--borderless"]]: F === 0 }),
217
+ children: /* @__PURE__ */ y(m, {
218
+ spinning: D,
219
+ children: [T.INTERNAL === x && /* @__PURE__ */ v(b, {
220
+ onSelect: P,
221
+ onDeselect: N,
222
+ loading: !0,
223
+ data: A[x]
224
+ }), T.EXTERNAL === x && /* @__PURE__ */ v(C, {
225
+ data: A[x],
226
+ onSelect: P,
227
+ onDeselect: N,
228
+ loading: !0
229
+ })]
230
+ })
231
+ })]
232
+ });
233
+ };
234
+ //#endregion
235
+ export { E as t };
@@ -0,0 +1,78 @@
1
+ import { t as e } from "../vendors/simplebar-react.js";
2
+ import { t } from "../vendors/clsx.js";
3
+ import { t as n } from "./useDeptsMemberSelector-DP5L8bhi.js";
4
+ import { t as r } from "../vendors/useLocale.js";
5
+ import { buildDeptTree as i } from "./utils/index.js";
6
+ import { t as a } from "../vendors/services/ncorp/department.service.js";
7
+ import { useMemo as o } from "react";
8
+ import { Spin as s } from "antd";
9
+ import { Icon as c, Tree as l } from "@baishuyun/ui-base";
10
+ import { useRequest as u } from "ahooks";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
+ //#region src/utils/recordSelectedNode.ts
13
+ function p(e, t) {
14
+ let n = "bsy_dept_member";
15
+ try {
16
+ let r = sessionStorage.getItem(n), i = r ? JSON.parse(r) : [];
17
+ if (i.some((t) => t._id === e)) return;
18
+ let a = t.find((t) => t._id === e);
19
+ if (!a) {
20
+ console.warn(`未找到 id 为 ${e} 的节点信息`);
21
+ return;
22
+ }
23
+ i.push(a), sessionStorage.setItem(n, JSON.stringify(i));
24
+ } catch (e) {
25
+ console.error("记录选中节点时发生错误:", e);
26
+ }
27
+ }
28
+ //#endregion
29
+ //#region src/components/DeptsMember/subcomponents/Panels/MemberRelationShipPanel/RelationShipDepts/RelationShipDepts.module.scss
30
+ var m = {
31
+ "relation-ship-depts__icon": "_relation-ship-depts__icon_b3fo8_1",
32
+ "relation-ship-depts__arrow-icon": "_relation-ship-depts__arrow-icon_b3fo8_5",
33
+ "rotate-90": "_rotate-90_b3fo8_10",
34
+ "relation-ship-depts__empty": "_relation-ship-depts__empty_b3fo8_13"
35
+ }, h = (h) => {
36
+ let { containerHeight: g } = n(), { t: _ } = r(), { data: v, loading: y } = u(() => a({ hasDock: !0 }), { onSuccess: (e) => {
37
+ e.departments && h.onSelect(e.departments[0]._id, e.departments[0]);
38
+ } }), b = v?.departments || [], x = o(() => v?.departments?.length ? i(v.departments) : [], [v?.departments]), S = x?.map((e) => e._id);
39
+ return /* @__PURE__ */ d(s, {
40
+ spinning: y,
41
+ children: /* @__PURE__ */ f(e, {
42
+ className: m["relation-ship-depts"],
43
+ style: { height: g - 8 },
44
+ scrollableNodeProps: { style: {
45
+ overflowX: "auto",
46
+ overflowY: "auto"
47
+ } },
48
+ children: [x.length > 0 && /* @__PURE__ */ d(l, {
49
+ parentCheckable: !0,
50
+ data: x,
51
+ fieldNames: {
52
+ title: "name",
53
+ value: "_id",
54
+ children: "children"
55
+ },
56
+ selectedKeys: h.value ? [h.value] : [],
57
+ onSelect: (e, t) => {
58
+ p(e, b), h.onSelect(e, t);
59
+ },
60
+ defaultExpandedKeys: S,
61
+ icon: () => /* @__PURE__ */ d(c, {
62
+ name: "dept-one",
63
+ className: m["relation-ship-depts__icon"]
64
+ }),
65
+ switcherIcon: (e) => /* @__PURE__ */ d(c, {
66
+ name: "xiangxiazhankai-11",
67
+ className: t(m["relation-ship-depts__arrow-icon"], { [m["rotate-90"]]: e })
68
+ })
69
+ }), b.length === 0 && !y && /* @__PURE__ */ d("div", {
70
+ className: m["relation-ship-depts__empty"],
71
+ style: { height: g - 8 + "px" },
72
+ children: /* @__PURE__ */ d("span", { children: _("department.noAvailable") })
73
+ })]
74
+ })
75
+ });
76
+ };
77
+ //#endregion
78
+ export { p as n, h as t };
@@ -0,0 +1,73 @@
1
+ import { t as e } from "../vendors/simplebar-react.js";
2
+ import { t } from "../vendors/clsx.js";
3
+ import { t as n } from "./useDeptsMemberSelector-DP5L8bhi.js";
4
+ import { t as r } from "../vendors/services/ncorp/relation.service.js";
5
+ import { Spin as i } from "antd";
6
+ import { Checkbox as a } from "@baishuyun/ui-base";
7
+ import { useRequest as o } from "ahooks";
8
+ import { jsx as s } from "react/jsx-runtime";
9
+ //#region src/components/DeptsMember/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/RelationShipList.module.scss
10
+ var c = {
11
+ "relation-ship-list__option": "_relation-ship-list__option_zlr78_1",
12
+ "relation-ship-list__option--checkbox": "_relation-ship-list__option--checkbox_zlr78_9",
13
+ "relation-ship-list__name": "_relation-ship-list__name_zlr78_12",
14
+ "relation-ship-list__checkbox-row": "_relation-ship-list__checkbox-row_zlr78_19",
15
+ "relation-ship-list__checkbox": "_relation-ship-list__checkbox_zlr78_19",
16
+ "relation-ship-list__group": "_relation-ship-list__group_zlr78_30"
17
+ }, l = ({ from: l, fromId: u }) => {
18
+ let { data: d, loading: f } = o(() => r({}), {
19
+ ready: !!(l && u),
20
+ refreshDeps: [l]
21
+ }), p = (d?.list || []).map((e) => ({
22
+ _id: `${u}-${l}-${e._id}`,
23
+ name: e.name
24
+ })), { value: m, dispatch: h, containerHeight: g } = n(), _ = m?.map((e) => e._id) || [];
25
+ return /* @__PURE__ */ s(i, {
26
+ spinning: f,
27
+ children: /* @__PURE__ */ s(e, {
28
+ style: { height: g - 8 },
29
+ children: /* @__PURE__ */ s("div", {
30
+ className: c["relation-ship-list"],
31
+ children: /* @__PURE__ */ s("ul", {
32
+ className: c["relation-ship-list__list"],
33
+ children: /* @__PURE__ */ s(a.Group, {
34
+ value: _,
35
+ onChange: (e) => {
36
+ let t = [], n = [];
37
+ for (let r = 0; r < p.length; r++) {
38
+ let i = p[r];
39
+ e.includes(i._id) ? t.push(i) : n.push(i);
40
+ }
41
+ h({
42
+ type: "deleteAndInsert",
43
+ payload: {
44
+ oldIds: n.map((e) => e._id),
45
+ newItems: t
46
+ }
47
+ });
48
+ },
49
+ className: c["relation-ship-list__group"],
50
+ children: p.map((e) => /* @__PURE__ */ s("li", {
51
+ className: t(c["relation-ship-list__option"], c["relation-ship-list__option--checkbox"]),
52
+ children: /* @__PURE__ */ s(a, {
53
+ labelPosition: "left",
54
+ value: e._id,
55
+ className: c["relation-ship-list__checkbox"],
56
+ children: /* @__PURE__ */ s("div", {
57
+ className: c["relation-ship-list__checkbox-row"],
58
+ title: e.name,
59
+ children: /* @__PURE__ */ s("span", {
60
+ className: c["relation-ship-list__name"],
61
+ children: e.name
62
+ })
63
+ })
64
+ })
65
+ }, e._id))
66
+ })
67
+ })
68
+ })
69
+ })
70
+ });
71
+ };
72
+ //#endregion
73
+ export { l as t };
@@ -0,0 +1,98 @@
1
+ import { t as e } from "../vendors/clsx.js";
2
+ import { useEffect as t, useRef as n, useState as r } from "react";
3
+ import { Icon as i } from "@baishuyun/ui-base";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ //#region src/components/DeptsMember/utils/constants.ts
6
+ var s = {
7
+ USER: "user",
8
+ USER_GROUP: "usergroup",
9
+ DEPARMENT: "dept",
10
+ DEPARMENT_GROUP: "deptgroup",
11
+ DEPT_USERS: "deptusers"
12
+ }, c = {
13
+ "tag-icon--primary": "_tag-icon--primary_1jzei_1",
14
+ "tag-icon--success": "_tag-icon--success_1jzei_4",
15
+ "tag-icon--relation": "_tag-icon--relation_1jzei_7",
16
+ "tag-icon--public": "_tag-icon--public_1jzei_10"
17
+ }, l = ({ type: e, size: t }) => {
18
+ switch (e) {
19
+ case "label": return /* @__PURE__ */ a(i, {
20
+ name: "Enterpriselabel",
21
+ className: c["tag-icon--primary"],
22
+ size: t
23
+ });
24
+ case "dockcorp":
25
+ case "dockcorpdept": return /* @__PURE__ */ a(i, {
26
+ name: "company",
27
+ className: c["tag-icon--primary"],
28
+ size: t
29
+ });
30
+ case "dockdept":
31
+ case "member": return /* @__PURE__ */ a(i, {
32
+ name: "dept-one",
33
+ className: c["tag-icon--primary"],
34
+ size: t
35
+ });
36
+ case "group": return /* @__PURE__ */ a(i, {
37
+ name: "Outreach",
38
+ className: c["tag-icon--success"],
39
+ size: t
40
+ });
41
+ case "public": return /* @__PURE__ */ a(i, {
42
+ name: "publicaccess",
43
+ className: c["tag-icon--public"],
44
+ size: t
45
+ });
46
+ case "relation": return /* @__PURE__ */ a(i, {
47
+ name: "membership",
48
+ className: c["tag-icon--relation"],
49
+ size: t
50
+ });
51
+ default: return /* @__PURE__ */ a(i, {
52
+ name: "dept-one",
53
+ className: c["tag-icon--primary"],
54
+ size: t
55
+ });
56
+ }
57
+ }, u = "_active_1vd3c_15", d = {
58
+ "tabgroup-container": "_tabgroup-container_1vd3c_1",
59
+ "tabgroup-container__tab-item": "_tabgroup-container__tab-item_1vd3c_7",
60
+ active: u,
61
+ "tabgroup-container__indicator": "_tabgroup-container__indicator_1vd3c_18"
62
+ }, f = (i) => {
63
+ let { tabs: s, value: c, onChange: l } = i, u = n(null), [f, p] = r({
64
+ width: 0,
65
+ transform: "translateX(0)"
66
+ }), m = (e) => {
67
+ let t = u.current?.querySelector(`[data-key="${e}"]`);
68
+ if (t) {
69
+ let { width: e, left: n } = t.getBoundingClientRect();
70
+ p({
71
+ width: e,
72
+ transform: `translateX(${n - (t.parentElement?.parentElement?.getBoundingClientRect().left || 0)}px)`
73
+ });
74
+ }
75
+ };
76
+ return t(() => {
77
+ m(c);
78
+ }, [c]), /* @__PURE__ */ o("div", {
79
+ className: d["tabgroup-container"],
80
+ ref: u,
81
+ children: [/* @__PURE__ */ a("div", {
82
+ className: d["tabgroup-container__indicator"],
83
+ style: {
84
+ width: `${f.width}px`,
85
+ transform: f.transform
86
+ }
87
+ }), s.map((t) => /* @__PURE__ */ a("div", {
88
+ className: e(d["tabgroup-container__tab-item"], { [d.active]: c === t.value }),
89
+ onClick: () => l(t.value),
90
+ children: /* @__PURE__ */ a("span", {
91
+ "data-key": t.value,
92
+ children: t.label
93
+ })
94
+ }, t.value))]
95
+ });
96
+ };
97
+ //#endregion
98
+ export { l as n, s as r, f as t };
@@ -1,8 +1,18 @@
1
- import { D as o } from "./DeptsMember-BNuoQ8y4.js";
2
- import { E as m } from "./TabGroup-DZC7i-Yr.js";
3
- import { getColorByName as p } from "./utils/index.js";
4
- export {
5
- m as Entity,
6
- o as default,
7
- p as getColorByName
8
- };
1
+ import "../vendors/simplebar-react.js";
2
+ import "./useDeptsMemberSelector-DP5L8bhi.js";
3
+ import { r as e } from "./TabGroup-B_VIf1lS.js";
4
+ import { t } from "./DeptsMember-D_xv-Zy7.js";
5
+ import "../vendors/useLocale.js";
6
+ import "../ConfigProvider/configContext-B0kvcW4s.js";
7
+ import { getColorByName as n } from "./utils/index.js";
8
+ import "./RelationShipDepts-wcYjFbhx.js";
9
+ import "./OrganizationPanel-BLIXOm6z.js";
10
+ import "./ExtraConcactPanel-Cioew3V3.js";
11
+ import "./DeptsUser-CQrRRJxk.js";
12
+ import "./RelationShipList-CRdCr4NL.js";
13
+ import "./Member-BIBX5jKD.js";
14
+ import "./Department-BYVAaPYd.js";
15
+ //#region src/components/DeptsMember/index.ts
16
+ var r = t;
17
+ //#endregion
18
+ export { e as Entity, r as default, n as getColorByName };