@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
@@ -1,166 +1,8 @@
1
- import { jsx as t, jsxs as g, Fragment as q } from "react/jsx-runtime";
2
- import { O as M } from "../../../OrganizationPanel-ByWU1PWX.js";
3
- import { useRequest as j } from "ahooks";
4
- import { d as R } from "../../../../vendors/services/data/member.service.js";
5
- import { c as C } from "../../../../vendors/clsx.js";
6
- import { Radio as f, Spin as E } from "antd";
7
- import { u as y } from "../../../useDeptsMemberSelector-D3rvDuVf.js";
8
- import { E as k } from "../../../TabGroup-DZC7i-Yr.js";
9
- import { Checkbox as v } from "@baishuyun/ui-base";
10
- import { S as I } from "../../../../vendors/simplebar-react.js";
11
- import { u as b } from "../../../../vendors/useLocale.js";
12
- import { g as O } from "../../../../vendors/services/corp/outsider.service.js";
13
- import { useState as N, useMemo as A } from "react";
14
- const r = {
15
- "group-list__list": "_group-list__list_1ncb5_1",
16
- "group-list__option": "_group-list__option_1ncb5_4",
17
- "group-list__option--checkbox": "_group-list__option--checkbox_1ncb5_13",
18
- "group-list__radio": "_group-list__radio_1ncb5_16",
19
- "group-list__row": "_group-list__row_1ncb5_19",
20
- "group-list__name": "_group-list__name_1ncb5_24",
21
- "group-list__checkbox-row": "_group-list__checkbox-row_1ncb5_28",
22
- "group-list__checkbox": "_group-list__checkbox_1ncb5_28",
23
- "group-list__group": "_group-list__group_1ncb5_38",
24
- "group-list": "_group-list_1ncb5_1"
25
- }, w = (a) => {
26
- const { list: n } = a, { value: i, type: l, dispatch: c } = y(), h = l === k.DEPARMENT, m = l === k.DEPARMENT_GROUP, d = i?.[0]?._id, _ = (e) => {
27
- const u = n?.find((x) => x._id === e.target.value);
28
- u && c({
29
- type: "insertOnly",
30
- payload: Object.assign({}, u, {
31
- type: a.type || u.type
32
- })
33
- });
34
- }, o = (e) => {
35
- c({
36
- type: "deleteOne",
37
- payload: e
38
- });
39
- }, D = i?.map((e) => e._id) || [], S = (e) => {
40
- const u = n.filter((s) => !e.includes(s._id)), x = n.filter((s) => e.includes(s._id));
41
- c({
42
- type: "deleteAndInsert",
43
- payload: {
44
- oldIds: u.map((s) => s._id),
45
- newItems: x.map((s) => Object.assign({}, s, {
46
- type: a.type || s.type
47
- }))
48
- }
49
- });
50
- };
51
- return /* @__PURE__ */ t("div", { className: r["group-list"], children: /* @__PURE__ */ g("ul", { className: r["group-list__list"], children: [
52
- h && /* @__PURE__ */ t(
53
- f.Group,
54
- {
55
- value: d,
56
- onChange: _,
57
- className: r["group-list__group"],
58
- children: n.map((e) => /* @__PURE__ */ t("li", { className: r["group-list__option"], children: /* @__PURE__ */ t(
59
- f,
60
- {
61
- value: e._id,
62
- className: r["group-list__radio"],
63
- onClick: () => {
64
- o(e._id);
65
- },
66
- children: /* @__PURE__ */ t("div", { className: r["group-list__row"], children: /* @__PURE__ */ t("span", { className: r["group-list__name"], children: e.name }) })
67
- }
68
- ) }, e._id))
69
- }
70
- ),
71
- m && /* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(
72
- v.Group,
73
- {
74
- value: D,
75
- onChange: S,
76
- className: r["group-list__group"],
77
- children: n.map((e) => /* @__PURE__ */ t(
78
- "li",
79
- {
80
- className: C(
81
- r["group-list__option"],
82
- r["group-list__option--checkbox"]
83
- ),
84
- children: /* @__PURE__ */ t(
85
- v,
86
- {
87
- labelPosition: "left",
88
- value: e._id,
89
- className: r["group-list__checkbox"],
90
- children: /* @__PURE__ */ t("div", { className: r["group-list__checkbox-row"], children: /* @__PURE__ */ t("span", { className: r["group-list__name"], children: e.name }) })
91
- }
92
- )
93
- },
94
- e._id
95
- ))
96
- }
97
- ) })
98
- ] }) });
99
- }, G = {
100
- "current-user-depts-panel": "_current-user-depts-panel_cjkm1_1",
101
- "current-user-depts-panel__empty": "_current-user-depts-panel__empty_cjkm1_5"
102
- }, L = () => {
103
- const { containerHeight: a } = y(), { t: n } = b(), { data: i, loading: l } = j(
104
- () => R({
105
- departmentLimit: []
106
- })
107
- ), c = i?.departmentList || [];
108
- return /* @__PURE__ */ t("div", { className: G["current-user-depts-panel"], children: /* @__PURE__ */ t(E, { spinning: l, tip: n("common.loading"), children: /* @__PURE__ */ g(I, { style: { height: a - 8 }, children: [
109
- /* @__PURE__ */ t(w, { list: c }),
110
- c.length === 0 && !l && /* @__PURE__ */ t("div", { className: G["current-user-depts-panel__empty"], children: /* @__PURE__ */ t("span", { children: n("department.noAvailable") }) })
111
- ] }) }) });
112
- }, p = {
113
- "extra-contact-group-panel": "_extra-contact-group-panel_jf0qd_1",
114
- "extra-contact-group-panel__menu": "_extra-contact-group-panel__menu_jf0qd_6",
115
- "extra-contact-group-panel__menu-list": "_extra-contact-group-panel__menu-list_jf0qd_10",
116
- "extra-contact-group-panel__menu-item": "_extra-contact-group-panel__menu-item_jf0qd_14",
117
- "extra-contact-group-panel__menu-item--active": "_extra-contact-group-panel__menu-item--active_jf0qd_25",
118
- "extra-contact-group-panel__content": "_extra-contact-group-panel__content_jf0qd_32",
119
- "extra-contact-group-panel__empty": "_extra-contact-group-panel__empty_jf0qd_37"
120
- }, P = () => {
121
- const { containerHeight: a } = y(), { t: n } = b(), [i] = N([
122
- { key: "default", label: n("externalContact.defaultGroup") },
123
- { key: "custom", label: n("externalContact.customGroup") }
124
- ]), [l, c] = N("default"), { data: h, loading: m } = j(() => O()), d = h?.list || [], _ = l === "default" ? d.filter((o) => o.type === "1") : d.filter((o) => o.type !== "1");
125
- return /* @__PURE__ */ g("div", { className: p["extra-contact-group-panel"], children: [
126
- /* @__PURE__ */ t("aside", { className: p["extra-contact-group-panel__menu"], children: /* @__PURE__ */ t("ul", { className: p["extra-contact-group-panel__menu-list"], children: i.map((o) => /* @__PURE__ */ t(
127
- "li",
128
- {
129
- onClick: () => {
130
- c(o.key);
131
- },
132
- className: C(p["extra-contact-group-panel__menu-item"], {
133
- [p["extra-contact-group-panel__menu-item--active"]]: l === o.key
134
- }),
135
- children: o.label
136
- },
137
- o.key
138
- )) }) }),
139
- /* @__PURE__ */ t("div", { className: p["extra-contact-group-panel__content"], children: /* @__PURE__ */ t(E, { spinning: m, tip: n("common.loading"), children: /* @__PURE__ */ g(I, { style: { height: a - 8, padding: "4px" }, children: [
140
- _.length > 0 && /* @__PURE__ */ t(w, { list: _, type: "group" }),
141
- _.length === 0 && !m && /* @__PURE__ */ t("div", { className: p["extra-contact-group-panel__empty"], children: /* @__PURE__ */ t("span", { children: n("externalContact.noAvailableGroup") }) })
142
- ] }) }) })
143
- ] });
144
- }, Y = () => {
145
- const { t: a } = b();
146
- return A(() => [
147
- {
148
- label: a("department.organizationalStructure"),
149
- key: "organizational",
150
- view: /* @__PURE__ */ t(M, {})
151
- },
152
- {
153
- label: a("externalContact.group"),
154
- key: "externalContactGroup",
155
- view: /* @__PURE__ */ t(P, {})
156
- },
157
- {
158
- label: a("department.currentUserDepartment"),
159
- key: "currentDepartment",
160
- view: /* @__PURE__ */ t(L, {})
161
- }
162
- ], [a]);
163
- };
164
- export {
165
- Y as useDepartmentTabItems
166
- };
1
+ import "../../../../vendors/simplebar-react.js";
2
+ import "../../../useDeptsMemberSelector-DP5L8bhi.js";
3
+ import "../../../TabGroup-B_VIf1lS.js";
4
+ import "../../../../vendors/useLocale.js";
5
+ import "../../../../ConfigProvider/configContext-B0kvcW4s.js";
6
+ import "../../../OrganizationPanel-BLIXOm6z.js";
7
+ import { t as e } from "../../../Department-BYVAaPYd.js";
8
+ export { e as useDepartmentTabItems };
@@ -1,267 +1,11 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
- import { O as I } from "../../../OrganizationPanel-ByWU1PWX.js";
3
- import { a as E, b as S, R as C, E as P } from "../../../ExtraConcactPanel-BoSCI3s5.js";
4
- import { useState as y, useMemo as F } from "react";
5
- import { c as d } from "../../../../vendors/clsx.js";
6
- import { u as v } from "../../../../vendors/useLocale.js";
7
- import w from "../../Panels/MemberRelationShipPanel/RelationShipList/index.js";
8
- import { r as k, R } from "../../../index-BRIA1uOQ.js";
9
- import { g as j } from "../../../../vendors/services/ncorp/department.service.js";
10
- import { useRequest as D } from "ahooks";
11
- import { Spin as M, Avatar as g } from "antd";
12
- import { S as A } from "../../../../vendors/simplebar-react.js";
13
- import { getColorByName as z } from "../../../utils/index.js";
14
- import { u as f } from "../../../useDeptsMemberSelector-D3rvDuVf.js";
15
- import { Checkbox as N } from "@baishuyun/ui-base";
16
- const l = {
17
- "member-relation-ship": "_member-relation-ship_1fjcv_1",
18
- "member-relation-ship__menu": "_member-relation-ship__menu_1fjcv_6",
19
- "member-relation-ship__menu-list": "_member-relation-ship__menu-list_1fjcv_11",
20
- "member-relation-ship__menu-item": "_member-relation-ship__menu-item_1fjcv_15",
21
- "member-relation-ship__menu-item--active": "_member-relation-ship__menu-item--active_1fjcv_26",
22
- "member-relation-ship__column": "_member-relation-ship__column_1fjcv_33"
23
- }, _ = {
24
- "relation-ship-member": "_relation-ship-member_h6xr2_1",
25
- "relation-ship-member__list": "_relation-ship-member__list_h6xr2_4",
26
- "relation-ship-member__item": "_relation-ship-member__item_h6xr2_9",
27
- "relation-ship-member__item--active": "_relation-ship-member__item--active_h6xr2_22",
28
- "relation-ship-member__avatar": "_relation-ship-member__avatar_h6xr2_28",
29
- "relation-ship-member__nickname": "_relation-ship-member__nickname_h6xr2_31",
30
- "relation-ship-member__deptnames": "_relation-ship-member__deptnames_h6xr2_40",
31
- "relation-ship-member__empty": "_relation-ship-member__empty_h6xr2_47"
32
- }, L = (t) => {
33
- const { t: r } = v(), { containerHeight: c } = f(), { data: o, loading: p } = D(
34
- () => j({
35
- deptId: t.deptId,
36
- hasDock: !0,
37
- hasAdmin: !1,
38
- hasGuest: !1,
39
- limit: 100
40
- }),
41
- {
42
- refreshDeps: [t.deptId],
43
- ready: !!t.deptId,
44
- onSuccess: (i) => {
45
- i?.users && i.users.length > 0 && (t.onChange?.(i.users[0]._id), k(i.users[0]._id, i.users));
46
- }
47
- }
48
- ), n = o?.users || [], m = (i) => {
49
- t.onChange?.(i._id), k(i._id, n);
50
- };
51
- return /* @__PURE__ */ e(M, { spinning: p, children: /* @__PURE__ */ e(
52
- A,
53
- {
54
- className: _["relation-ship-member"],
55
- style: { height: c - 8 },
56
- children: n.length > 0 ? /* @__PURE__ */ e("ul", { className: _["relation-ship-member__list"], children: n.map((i) => /* @__PURE__ */ u(
57
- "li",
58
- {
59
- onClick: () => m(i),
60
- className: d(_["relation-ship-member__item"], {
61
- [_["relation-ship-member__item--active"]]: t.value === i._id
62
- }),
63
- children: [
64
- /* @__PURE__ */ e("div", { className: _["relation-ship-member__avatar"], children: i.avatarurl ? /* @__PURE__ */ e(g, { src: i.avatarurl, size: 20 }) : /* @__PURE__ */ e(
65
- g,
66
- {
67
- size: 20,
68
- style: {
69
- backgroundColor: z(i.nickname),
70
- fontSize: "12px",
71
- lineHeight: "13px"
72
- },
73
- children: i.nickname?.charAt(0) || "?"
74
- }
75
- ) }),
76
- /* @__PURE__ */ e("div", { className: _["relation-ship-member__nickname"], children: i.nickname }),
77
- /* @__PURE__ */ e("div", { className: _["relation-ship-member__deptnames"], children: i.deptnames })
78
- ]
79
- },
80
- i._id
81
- )) }) : !p && /* @__PURE__ */ e(
82
- "div",
83
- {
84
- className: _["relation-ship-member__empty"],
85
- style: { height: c - 8 + "px" },
86
- children: /* @__PURE__ */ e("span", { children: r("member.noAvailable") })
87
- }
88
- )
89
- }
90
- ) });
91
- }, O = () => {
92
- const { t } = v(), [r, c] = y(
93
- 0
94
- /* DEPARTMENT */
95
- ), o = [
96
- {
97
- key: 0,
98
- label: t("department.title")
99
- },
100
- {
101
- key: 1,
102
- label: t("member.title")
103
- }
104
- ], p = [
105
- {
106
- key: "relation",
107
- label: "当前部门的所有关系"
108
- },
109
- {
110
- key: "relationSub",
111
- label: "当前部门及子部门的所有关系"
112
- }
113
- ], [n, m] = y({
114
- deptFrom: "relation",
115
- memberFrom: "relationUser"
116
- }), i = r === 0 ? n.deptFrom : n.memberFrom, b = r === 0 ? n.deptFromId : n.memberFromId;
117
- return /* @__PURE__ */ u("div", { className: l["member-relation-ship"], children: [
118
- /* @__PURE__ */ e("aside", { className: l["member-relation-ship__menu"], children: /* @__PURE__ */ e("ul", { className: l["member-relation-ship__menu-list"], children: o.map((a) => /* @__PURE__ */ e(
119
- "li",
120
- {
121
- onClick: () => c(a.key),
122
- className: d(l["member-relation-ship__menu-item"], {
123
- [l["member-relation-ship__menu-item--active"]]: r === a.key
124
- }),
125
- children: a.label
126
- },
127
- a.key
128
- )) }) }),
129
- /* @__PURE__ */ e("section", { className: l["member-relation-ship__column"], children: /* @__PURE__ */ e(
130
- R,
131
- {
132
- value: n.deptFromId,
133
- onSelect: (a, s) => {
134
- m((x) => ({
135
- ...x,
136
- deptFromId: a,
137
- deptId: s.departmentId
138
- }));
139
- }
140
- }
141
- ) }),
142
- /* @__PURE__ */ u("section", { className: l["member-relation-ship__column"], children: [
143
- r === 0 && /* @__PURE__ */ e("ul", { className: l["member-relation-ship__menu-list"], children: p.map((a) => /* @__PURE__ */ e(
144
- "li",
145
- {
146
- onClick: () => {
147
- m((s) => ({
148
- ...s,
149
- deptFrom: a.key
150
- }));
151
- },
152
- className: d(l["member-relation-ship__menu-item"], {
153
- [l["member-relation-ship__menu-item--active"]]: n.deptFrom === a.key
154
- }),
155
- children: a.label
156
- },
157
- a.key
158
- )) }),
159
- r === 1 && /* @__PURE__ */ e(
160
- L,
161
- {
162
- deptId: n.deptId,
163
- value: n.memberFromId,
164
- onChange: (a) => m((s) => ({ ...s, memberFromId: a }))
165
- }
166
- )
167
- ] }),
168
- /* @__PURE__ */ e("section", { className: l["member-relation-ship__column"], children: /* @__PURE__ */ e(w, { from: i, fromId: b }) })
169
- ] });
170
- }, h = {
171
- "other-panel": "_other-panel_1fapn_1",
172
- "other-panel__list": "_other-panel__list_1fapn_4",
173
- "other-panel__item": "_other-panel__item_1fapn_10",
174
- "other-panel__checkbox-row": "_other-panel__checkbox-row_1fapn_23",
175
- "other-panel__name": "_other-panel__name_1fapn_28"
176
- }, U = (t) => {
177
- const r = [], { dispatch: c, value: o } = f();
178
- t.publicPermissionEnable && r.push({ _id: "111000000000000000000001", name: "公开权限", type: "public" }), t.managerPermissionEnable && r.push({ _id: "111000000000000000000002", name: "系统管理员组", type: "public" });
179
- const p = o?.map((m) => m._id) || [], n = (m) => {
180
- const i = [], b = [];
181
- for (let a = 0; a < r.length; a++) {
182
- const s = r[a];
183
- m.includes(s._id) ? i.push(s) : b.push(s);
184
- }
185
- c({
186
- type: "deleteAndInsert",
187
- payload: {
188
- oldIds: b.map((a) => a._id),
189
- newItems: i
190
- }
191
- });
192
- };
193
- return /* @__PURE__ */ e("div", { className: h["other-panel"], children: /* @__PURE__ */ e(
194
- N.Group,
195
- {
196
- value: p,
197
- onChange: n,
198
- className: h["other-panel__list"],
199
- children: r.map((m) => /* @__PURE__ */ e(
200
- "li",
201
- {
202
- className: d(h["other-panel__item"], h["other-panel__item--checkbox"]),
203
- children: /* @__PURE__ */ e(
204
- N,
205
- {
206
- labelPosition: "left",
207
- value: m._id,
208
- className: h["other-panel__checkbox"],
209
- children: /* @__PURE__ */ e("div", { className: h["other-panel__checkbox-row"], children: /* @__PURE__ */ e("span", { className: h["other-panel__name"], children: m.name }) })
210
- }
211
- )
212
- },
213
- m._id
214
- ))
215
- }
216
- ) });
217
- }, ie = () => {
218
- const { t } = v(), { auth: r } = f();
219
- return F(() => {
220
- const o = [
221
- {
222
- label: t("department.organizationalStructure"),
223
- key: "organizational",
224
- view: /* @__PURE__ */ e(I, {})
225
- },
226
- {
227
- label: t("member.title"),
228
- key: "member",
229
- view: /* @__PURE__ */ e(E, {})
230
- },
231
- {
232
- label: t("position.title"),
233
- key: "position",
234
- view: /* @__PURE__ */ e(S, {})
235
- },
236
- {
237
- label: t("member.relation"),
238
- key: "relation",
239
- view: /* @__PURE__ */ e(O, {})
240
- },
241
- {
242
- label: t("role.title"),
243
- key: "role",
244
- view: /* @__PURE__ */ e(C, {})
245
- },
246
- {
247
- label: t("externalContact.title"),
248
- key: "extraContact",
249
- view: /* @__PURE__ */ e(P, {})
250
- }
251
- ];
252
- return (r.managerPermissionEnable || r.publicPermissionEnable) && o.push({
253
- label: t("common.other"),
254
- key: "other",
255
- view: /* @__PURE__ */ e(
256
- U,
257
- {
258
- managerPermissionEnable: r.managerPermissionEnable,
259
- publicPermissionEnable: r.publicPermissionEnable
260
- }
261
- )
262
- }), o;
263
- }, [t, r.managerPermissionEnable, r.publicPermissionEnable]);
264
- };
265
- export {
266
- ie as useDeptUserTabItems
267
- };
1
+ import "../../../../vendors/simplebar-react.js";
2
+ import "../../../useDeptsMemberSelector-DP5L8bhi.js";
3
+ import "../../../TabGroup-B_VIf1lS.js";
4
+ import "../../../../vendors/useLocale.js";
5
+ import "../../../../ConfigProvider/configContext-B0kvcW4s.js";
6
+ import "../../../RelationShipDepts-wcYjFbhx.js";
7
+ import "../../../OrganizationPanel-BLIXOm6z.js";
8
+ import "../../../ExtraConcactPanel-Cioew3V3.js";
9
+ import { t as e } from "../../../DeptsUser-CQrRRJxk.js";
10
+ import "../../../RelationShipList-CRdCr4NL.js";
11
+ export { e as useDeptUserTabItems };
@@ -1,46 +1,8 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { M as r, a as s, R as l, b as n, E as o } from "../../../ExtraConcactPanel-BoSCI3s5.js";
3
- import { u as a } from "../../../useDeptsMemberSelector-D3rvDuVf.js";
4
- import { u as i } from "../../../../vendors/useLocale.js";
5
- import { useMemo as m } from "react";
6
- const c = {
7
- "current-user-panel": "_current-user-panel_184e6_1"
8
- }, u = () => {
9
- const { currentUser: e } = a();
10
- return /* @__PURE__ */ t("div", { className: c["current-user-panel"], children: /* @__PURE__ */ t(r, { list: e ? [e] : [], showCheckAll: !1 }) });
11
- }, k = () => {
12
- const { t: e } = i();
13
- return m(
14
- () => [
15
- {
16
- label: e("member.title"),
17
- key: "member",
18
- view: /* @__PURE__ */ t(s, {})
19
- },
20
- {
21
- label: e("role.title"),
22
- key: "role",
23
- view: /* @__PURE__ */ t(l, {})
24
- },
25
- {
26
- label: e("position.title"),
27
- key: "job",
28
- view: /* @__PURE__ */ t(n, {})
29
- },
30
- {
31
- label: e("externalContact.title"),
32
- key: "externalContact",
33
- view: /* @__PURE__ */ t(o, {})
34
- },
35
- {
36
- label: e("currentUser.title"),
37
- key: "currentUser",
38
- view: /* @__PURE__ */ t(u, {})
39
- }
40
- ],
41
- [e]
42
- );
43
- };
44
- export {
45
- k as useMemberTabItems
46
- };
1
+ import "../../../../vendors/simplebar-react.js";
2
+ import "../../../useDeptsMemberSelector-DP5L8bhi.js";
3
+ import "../../../TabGroup-B_VIf1lS.js";
4
+ import "../../../../vendors/useLocale.js";
5
+ import "../../../../ConfigProvider/configContext-B0kvcW4s.js";
6
+ import "../../../ExtraConcactPanel-Cioew3V3.js";
7
+ import { t as e } from "../../../Member-BIBX5jKD.js";
8
+ export { e as useMemberTabItems };
@@ -1,15 +1,6 @@
1
- import "react/jsx-runtime";
2
1
  import "../../../../../vendors/simplebar-react.js";
3
- import "@baishuyun/ui-base";
4
- import "../../../../useDeptsMemberSelector-D3rvDuVf.js";
5
- import "../../../../../vendors/clsx.js";
2
+ import "../../../../useDeptsMemberSelector-DP5L8bhi.js";
6
3
  import "../../../../../vendors/useLocale.js";
7
- import "../../../../../vendors/services/ncorp/department.service.js";
8
- import "ahooks";
9
- import "react";
10
- import "../../../../utils/index.js";
11
- import { R as x } from "../../../../index-BRIA1uOQ.js";
12
- import "antd";
13
- export {
14
- x as default
15
- };
4
+ import "../../../../../ConfigProvider/configContext-B0kvcW4s.js";
5
+ import { t as e } from "../../../../RelationShipDepts-wcYjFbhx.js";
6
+ export { e as default };
@@ -1,67 +1,4 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { c as f } from "../../../../../vendors/clsx.js";
3
- import { u as g } from "../../../../useDeptsMemberSelector-D3rvDuVf.js";
4
- import { g as k } from "../../../../../vendors/services/ncorp/relation.service.js";
5
- import { Checkbox as c } from "@baishuyun/ui-base";
6
- import { useRequest as N } from "ahooks";
7
- import { Spin as z } from "antd";
8
- import { S } from "../../../../../vendors/simplebar-react.js";
9
- const t = {
10
- "relation-ship-list__option": "_relation-ship-list__option_zlr78_1",
11
- "relation-ship-list__option--checkbox": "_relation-ship-list__option--checkbox_zlr78_9",
12
- "relation-ship-list__name": "_relation-ship-list__name_zlr78_12",
13
- "relation-ship-list__checkbox-row": "_relation-ship-list__checkbox-row_zlr78_19",
14
- "relation-ship-list__checkbox": "_relation-ship-list__checkbox_zlr78_19",
15
- "relation-ship-list__group": "_relation-ship-list__group_zlr78_30"
16
- }, $ = ({ from: l, fromId: a }) => {
17
- const { data: p, loading: h } = N(() => k({}), {
18
- ready: !!(l && a),
19
- refreshDeps: [l]
20
- }), o = (p?.list || []).map((i) => ({
21
- _id: `${a}-${l}-${i._id}`,
22
- name: i.name
23
- })), { value: d, dispatch: m, containerHeight: u } = g(), x = d?.map((i) => i._id) || [], b = (i) => {
24
- const r = [], _ = [];
25
- for (let s = 0; s < o.length; s++) {
26
- const n = o[s];
27
- i.includes(n._id) ? r.push(n) : _.push(n);
28
- }
29
- m({
30
- type: "deleteAndInsert",
31
- payload: {
32
- oldIds: _.map((s) => s._id),
33
- newItems: r
34
- }
35
- });
36
- };
37
- return /* @__PURE__ */ e(z, { spinning: h, children: /* @__PURE__ */ e(S, { style: { height: u - 8 }, children: /* @__PURE__ */ e("div", { className: t["relation-ship-list"], children: /* @__PURE__ */ e("ul", { className: t["relation-ship-list__list"], children: /* @__PURE__ */ e(
38
- c.Group,
39
- {
40
- value: x,
41
- onChange: b,
42
- className: t["relation-ship-list__group"],
43
- children: o.map((i) => /* @__PURE__ */ e(
44
- "li",
45
- {
46
- className: f(
47
- t["relation-ship-list__option"],
48
- t["relation-ship-list__option--checkbox"]
49
- ),
50
- children: /* @__PURE__ */ e(
51
- c,
52
- {
53
- labelPosition: "left",
54
- value: i._id,
55
- className: t["relation-ship-list__checkbox"],
56
- children: /* @__PURE__ */ e("div", { className: t["relation-ship-list__checkbox-row"], title: i.name, children: /* @__PURE__ */ e("span", { className: t["relation-ship-list__name"], children: i.name }) })
57
- }
58
- )
59
- },
60
- i._id
61
- ))
62
- }
63
- ) }) }) }) });
64
- };
65
- export {
66
- $ as default
67
- };
1
+ import "../../../../../vendors/simplebar-react.js";
2
+ import "../../../../useDeptsMemberSelector-DP5L8bhi.js";
3
+ import { t as e } from "../../../../RelationShipList-CRdCr4NL.js";
4
+ export { e as default };
@@ -0,0 +1,15 @@
1
+ import { i as e } from "../vendors/lodash-es.js";
2
+ import { createContext as t, useContext as n } from "react";
3
+ //#region src/components/DeptsMember/context/DeptsMemberContext.ts
4
+ var r = t({
5
+ type: "user",
6
+ setValue: e,
7
+ dispatch: e,
8
+ containerHeight: 0,
9
+ auth: {
10
+ publicPermissionEnable: !1,
11
+ managerPermissionEnable: !1
12
+ }
13
+ }), i = () => n(r);
14
+ //#endregion
15
+ export { r as n, i as t };