@baishuyun/ui-business 5.1.2 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DeptsMemberSelector/{Department-CkzkA99U.js → Department-12ftZfXD.js} +4 -4
- package/dist/DeptsMemberSelector/{DeptsMemberSelector-pLcrkrr2.js → DeptsMemberSelector-BXWGwgUq.js} +160 -154
- package/dist/DeptsMemberSelector/DeptsUser-C8hYQ6z-.js +790 -0
- package/dist/DeptsMemberSelector/ExtraConcactPanel-BDNrz5rV.js +647 -0
- package/dist/DeptsMemberSelector/Member-B4tEHksu.js +375 -0
- package/dist/DeptsMemberSelector/{OrganizationPanel-BAhvhgOL.js → OrganizationPanel-DoM4UNxv.js} +3 -3
- package/dist/DeptsMemberSelector/{RelationShipDepts-DadyalUU.js → RelationShipDepts-kpemRPz1.js} +1 -1
- package/dist/DeptsMemberSelector/{RelationShipList-BVTUyw1-.js → RelationShipList-BhiAdVjm.js} +1 -1
- package/dist/DeptsMemberSelector/{TabGroup-DjfuvblW.js → TabGroup-Ds7bTbKL.js} +20 -4
- package/dist/DeptsMemberSelector/index.js +10 -10
- package/dist/DeptsMemberSelector/services/contact/{selector.service-cz8fZZaA.js → selector.service-CY5vQea8.js} +5 -3
- package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +4 -4
- package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +7 -7
- package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +4 -4
- package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipDepts/index.js +2 -2
- package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +2 -2
- package/dist/DeptsMemberSelector/{useDeptsMemberSelector-xc9GWJaL.js → useDeptsMemberSelector-t7b8yu-A.js} +1 -1
- package/dist/DeptsMemberSelector/utils/index.js +7 -4
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersPositionPanel/DeptUsersPositionPanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersPositionPanel/useDeptUsersPositionPanelData.d.ts +50 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/DeptUsersRolePanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/useDeptUsersRolePanelData.d.ts +40 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipMember/RelationShipMember.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/useMemberRelationShipPanelData.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/utils/index.d.ts +2 -1
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/lang/en-US.json.d.ts +4 -1
- package/dist/lang/zh-CN.json.d.ts +4 -1
- package/dist/services/contact/selector.service.d.ts +6 -1
- package/dist/vendors/services/contact/path.js +3 -6
- package/dist/vendors/useLocale.js +8 -2
- package/package.json +1 -1
- package/dist/DeptsMemberSelector/DeptsUser-C7_gkn3k.js +0 -366
- package/dist/DeptsMemberSelector/ExtraConcactPanel-BRkvxzbe.js +0 -934
- package/dist/DeptsMemberSelector/Member-CXVybdp_.js +0 -64
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { t as e } from "../vendors/simplebar-react.js";
|
|
2
|
+
import { t } from "../vendors/clsx.js";
|
|
3
|
+
import { l as n, t as r } from "./useDeptsMemberSelector-t7b8yu-A.js";
|
|
4
|
+
import { _ as i, l as a, p as o, t as s, u as c, v as l } from "./services/contact/selector.service-CY5vQea8.js";
|
|
5
|
+
import { t as u } from "../vendors/useLocale.js";
|
|
6
|
+
import { buildTree as d } from "./utils/index.js";
|
|
7
|
+
import { n as f, r as p, t as m } from "./ExtraConcactPanel-BDNrz5rV.js";
|
|
8
|
+
import { useMemo as h, useRef as g, useState as _ } from "react";
|
|
9
|
+
import { Spin as v } from "antd";
|
|
10
|
+
import { Icon as y, Tree as b } from "@baishuyun/ui-base";
|
|
11
|
+
import { useRequest as x } from "ahooks";
|
|
12
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
13
|
+
import { produce as w } from "immer";
|
|
14
|
+
//#region src/components/DeptsMemberSelector/subcomponents/Panels/RolePanel/RolePanel.module.scss
|
|
15
|
+
var T = {
|
|
16
|
+
"role-panel": "_role-panel_1efoc_1",
|
|
17
|
+
"role-panel__menu": "_role-panel__menu_1efoc_6",
|
|
18
|
+
"role-panel__menu-list": "_role-panel__menu-list_1efoc_10",
|
|
19
|
+
"role-panel__menu-item": "_role-panel__menu-item_1efoc_14",
|
|
20
|
+
"role-panel__menu-item--active": "_role-panel__menu-item--active_1efoc_25",
|
|
21
|
+
"role-panel__tree-section": "_role-panel__tree-section_1efoc_32",
|
|
22
|
+
"role-panel__tree-empty": "_role-panel__tree-empty_1efoc_38",
|
|
23
|
+
"role-panel__tree-empty-text": "_role-panel__tree-empty-text_1efoc_45",
|
|
24
|
+
"role-panel__tree-icon": "_role-panel__tree-icon_1efoc_48",
|
|
25
|
+
"role-panel__switcher-icon": "_role-panel__switcher-icon_1efoc_51",
|
|
26
|
+
"role-panel__switcher-icon--expanded": "_role-panel__switcher-icon--expanded_1efoc_56",
|
|
27
|
+
"role-panel__list-section": "_role-panel__list-section_1efoc_59",
|
|
28
|
+
"role-panel__badge": "_role-panel__badge_1efoc_64",
|
|
29
|
+
"role-panel__empty": "_role-panel__empty_1efoc_72",
|
|
30
|
+
"role-panel__empty-text": "_role-panel__empty-text_1efoc_79"
|
|
31
|
+
}, E = () => {
|
|
32
|
+
let { containerHeight: e, type: t, requestContext: n, limits: i } = r(), { t: a } = u(), [f, p] = _([{
|
|
33
|
+
key: "internal",
|
|
34
|
+
label: a("role.internal"),
|
|
35
|
+
visible: !1
|
|
36
|
+
}, {
|
|
37
|
+
key: "external",
|
|
38
|
+
label: a("role.external"),
|
|
39
|
+
visible: !1
|
|
40
|
+
}]), [m, h] = _(), [v, y] = _(), b = g(), S = g({
|
|
41
|
+
internal: [],
|
|
42
|
+
external: []
|
|
43
|
+
});
|
|
44
|
+
x(() => o({
|
|
45
|
+
requestContext: n,
|
|
46
|
+
limits: i,
|
|
47
|
+
hasDeptDock: !1
|
|
48
|
+
}), {
|
|
49
|
+
onSuccess: (e) => {
|
|
50
|
+
if (!e) return;
|
|
51
|
+
let t = e.departments_count > 0, n = e.label_corp_count > 0;
|
|
52
|
+
p(w((e) => {
|
|
53
|
+
e[0].visible = t, e[1].visible = n;
|
|
54
|
+
})), t ? (b.current = "internal", h("internal")) : n ? (b.current = "external", h("external")) : b.current = void 0;
|
|
55
|
+
},
|
|
56
|
+
refreshDeps: [
|
|
57
|
+
t,
|
|
58
|
+
n,
|
|
59
|
+
i
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
let { loading: C } = x(() => m ? l({
|
|
63
|
+
requestContext: n,
|
|
64
|
+
limits: i
|
|
65
|
+
}) : Promise.resolve({
|
|
66
|
+
roles: [],
|
|
67
|
+
dock_role: []
|
|
68
|
+
}), {
|
|
69
|
+
onSuccess: (e) => {
|
|
70
|
+
if (!e) {
|
|
71
|
+
S.current.internal = [], S.current.external = [];
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let t = Array.isArray(e.roles) ? e.roles : [], n = Array.isArray(e.dock_role) ? e.dock_role : [];
|
|
75
|
+
S.current.internal = d(t, {
|
|
76
|
+
children: "children",
|
|
77
|
+
title: "name",
|
|
78
|
+
value: "role_id",
|
|
79
|
+
parentId: "parent"
|
|
80
|
+
}), S.current.external = n.map((e) => ({
|
|
81
|
+
...e,
|
|
82
|
+
children: []
|
|
83
|
+
}));
|
|
84
|
+
let r = m || b.current;
|
|
85
|
+
if (r === "internal") {
|
|
86
|
+
y(S.current.internal[0]?.role_id);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (r === "external") {
|
|
90
|
+
y(S.current.external[0]?.role_id);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
y(void 0);
|
|
94
|
+
},
|
|
95
|
+
refreshDeps: [
|
|
96
|
+
t,
|
|
97
|
+
n,
|
|
98
|
+
i,
|
|
99
|
+
m
|
|
100
|
+
]
|
|
101
|
+
}), { data: T, loading: E } = x(async () => {
|
|
102
|
+
if (!v) return [];
|
|
103
|
+
let e = await c({
|
|
104
|
+
requestContext: n,
|
|
105
|
+
roleId: v,
|
|
106
|
+
roleLimit: i?.roleLimit || [],
|
|
107
|
+
limit: s
|
|
108
|
+
});
|
|
109
|
+
return m === "external" ? e.dock_user_list || [] : e.users || [];
|
|
110
|
+
}, { refreshDeps: [
|
|
111
|
+
t,
|
|
112
|
+
m,
|
|
113
|
+
v,
|
|
114
|
+
n,
|
|
115
|
+
i
|
|
116
|
+
] });
|
|
117
|
+
return {
|
|
118
|
+
containerHeight: e,
|
|
119
|
+
menuItems: f,
|
|
120
|
+
activeKey: m,
|
|
121
|
+
setActiveKey: h,
|
|
122
|
+
roleId: v,
|
|
123
|
+
setRoleId: y,
|
|
124
|
+
roleTreeList: m ? S.current[m] : [],
|
|
125
|
+
userList: T || [],
|
|
126
|
+
loading: C,
|
|
127
|
+
memberLoading: E
|
|
128
|
+
};
|
|
129
|
+
}, D = () => /* @__PURE__ */ C("svg", {
|
|
130
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
131
|
+
width: "16",
|
|
132
|
+
height: "16",
|
|
133
|
+
viewBox: "0 0 16 16",
|
|
134
|
+
fill: "none",
|
|
135
|
+
children: [/* @__PURE__ */ S("path", {
|
|
136
|
+
d: "M6.91689 1.17578C8.59289 1.17578 10.0489 2.29878 10.4369 3.88878C10.8249 5.47878 10.0419 7.11978 8.54589 7.85578C8.49878 7.86731 8.4554 7.89073 8.41989 7.92378C8.40916 7.92486 8.3992 7.92984 8.39189 7.93778C8.3375 8.00344 8.30773 8.08602 8.30773 8.17128C8.30773 8.25654 8.3375 8.33913 8.39189 8.40478C8.40589 8.40478 8.40589 8.40478 8.40589 8.41978C8.51089 8.43478 8.61389 8.45778 8.71589 8.48878C9.67047 8.74298 10.5595 9.19889 11.3229 9.82578C10.634 9.60133 9.89434 9.58375 9.19553 9.77522C8.49671 9.96669 7.86935 10.3588 7.39105 10.9031C6.91274 11.4474 6.60448 12.1199 6.50439 12.8375C6.4043 13.5552 6.51677 14.2864 6.82789 14.9408H0.941894C0.824535 14.9397 0.708692 14.9141 0.601765 14.8658C0.494839 14.8174 0.399178 14.7472 0.320894 14.6598C0.243944 14.5736 0.186578 14.4717 0.152743 14.3613C0.118908 14.2508 0.109407 14.1343 0.124894 14.0198C0.507894 11.3728 2.46389 9.19978 5.10489 8.48878C5.20689 8.46078 5.30989 8.43778 5.41489 8.41878L5.42889 8.40478C5.46029 8.37464 5.48527 8.33846 5.50234 8.29842C5.5194 8.25838 5.5282 8.21531 5.5282 8.17178C5.5282 8.12826 5.5194 8.08518 5.50234 8.04514C5.48527 8.0051 5.46029 7.96892 5.42889 7.93878C5.41605 7.93306 5.40549 7.9232 5.39889 7.91078C5.36507 7.88725 5.32802 7.86872 5.28889 7.85578C3.79089 7.11978 3.00789 5.47978 3.39589 3.88978C3.78389 2.29978 5.23989 1.17678 6.91589 1.17678L6.91689 1.17578Z",
|
|
137
|
+
fill: "#6F81BD"
|
|
138
|
+
}), /* @__PURE__ */ S("path", {
|
|
139
|
+
d: "M13.7918 11.8018C14.2438 11.8068 14.6598 12.0028 14.9758 12.3078C15.2878 12.6258 15.4588 13.0558 15.4528 13.5008L15.4488 13.5398C15.4463 13.9749 15.2741 14.3918 14.9688 14.7018C14.8161 14.8609 14.6329 14.9876 14.4302 15.0745C14.2275 15.1614 14.0094 15.2068 13.7888 15.2078L12.7458 15.1898C12.626 15.1876 12.5119 15.1378 12.4287 15.0514C12.3455 14.965 12.3001 14.8492 12.3023 14.7293C12.3046 14.6094 12.3544 14.4954 12.4407 14.4122C12.5271 14.329 12.643 14.2836 12.7628 14.2858L13.7988 14.3028C13.8967 14.3014 13.9933 14.2804 14.083 14.2411C14.1726 14.2017 14.2535 14.1449 14.3208 14.0738C14.4694 13.9206 14.552 13.7152 14.5508 13.5018C14.5541 13.3989 14.5367 13.2963 14.4998 13.2001C14.4629 13.104 14.4071 13.0161 14.3358 12.9418C14.2665 12.8663 14.1823 12.806 14.0885 12.7647C13.9947 12.7233 13.8933 12.7019 13.7908 12.7018L12.1528 12.7048C12.0534 12.7057 11.9552 12.7265 11.864 12.766C11.7728 12.8055 11.6905 12.8629 11.6218 12.9348C11.4735 13.0878 11.3909 13.2927 11.3918 13.5058C11.3922 13.5652 11.3808 13.6241 11.3584 13.6792C11.3359 13.7342 11.3029 13.7843 11.2611 13.8265C11.2193 13.8688 11.1696 13.9024 11.1148 13.9254C11.06 13.9485 11.0013 13.9605 10.9418 13.9608C10.8824 13.9611 10.8235 13.9498 10.7685 13.9273C10.7135 13.9049 10.6634 13.8718 10.6211 13.83C10.5789 13.7883 10.5453 13.7386 10.5222 13.6838C10.4992 13.629 10.4872 13.5702 10.4868 13.5108C10.4845 13.063 10.6579 12.6321 10.9698 12.3108C11.1226 12.1511 11.306 12.0239 11.5091 11.9368C11.7122 11.8496 11.9308 11.8044 12.1518 11.8038L13.7918 11.8018ZM10.2688 11.7648C10.3885 11.7616 10.5044 11.8061 10.5913 11.8884C10.6781 11.9707 10.7287 12.0842 10.7318 12.2038C10.735 12.3234 10.6906 12.4394 10.6082 12.5262C10.5259 12.6131 10.4125 12.6636 10.2928 12.6668L9.19984 12.6968C8.99213 12.7035 8.79511 12.7905 8.6503 12.9396C8.50549 13.0886 8.4242 13.2881 8.42355 13.4959C8.4229 13.7037 8.50295 13.9037 8.64682 14.0536C8.7907 14.2036 8.98717 14.2919 9.19484 14.2998L10.8308 14.2968C10.9303 14.2961 11.0285 14.2754 11.1198 14.2359C11.211 14.1963 11.2933 14.1389 11.3618 14.0668C11.5102 13.9134 11.5927 13.7082 11.5918 13.4948C11.593 13.4352 11.6059 13.3764 11.6298 13.3217C11.6537 13.2671 11.6882 13.2177 11.7312 13.1764C11.7741 13.1351 11.8249 13.1026 11.8804 13.0809C11.9359 13.0592 11.9952 13.0486 12.0548 13.0498C12.2948 13.0568 12.4868 13.2478 12.4948 13.4878C12.4988 13.9378 12.3248 14.3698 12.0118 14.6928C11.7028 15.0148 11.2768 15.1978 10.8318 15.1998L9.18884 15.2008C8.9745 15.2015 8.76215 15.1598 8.56407 15.0779C8.36598 14.996 8.18611 14.8757 8.03484 14.7238C7.87424 14.563 7.74689 14.3722 7.66007 14.1621C7.57325 13.9521 7.52866 13.7271 7.52884 13.4998C7.52611 13.0548 7.6984 12.6265 8.00857 12.3074C8.31873 11.9882 8.74192 11.8038 9.18684 11.7938L10.2688 11.7648Z",
|
|
140
|
+
fill: "#6F81BD"
|
|
141
|
+
})]
|
|
142
|
+
}), O = () => {
|
|
143
|
+
let { t: n } = u(), r = E(), i = r.userList, a = r.roleTreeList;
|
|
144
|
+
return /* @__PURE__ */ C("div", {
|
|
145
|
+
className: T["role-panel"],
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ S("aside", {
|
|
148
|
+
className: T["role-panel__menu"],
|
|
149
|
+
children: /* @__PURE__ */ S("ul", {
|
|
150
|
+
className: T["role-panel__menu-list"],
|
|
151
|
+
children: r.menuItems.filter((e) => e.visible).map((e) => /* @__PURE__ */ S("li", {
|
|
152
|
+
onClick: () => r.setActiveKey(e.key),
|
|
153
|
+
className: t(T["role-panel__menu-item"], { [T["role-panel__menu-item--active"]]: r.activeKey === e.key }),
|
|
154
|
+
children: e.label
|
|
155
|
+
}, e.key))
|
|
156
|
+
})
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ S("section", {
|
|
159
|
+
className: T["role-panel__tree-section"],
|
|
160
|
+
children: /* @__PURE__ */ S(v, {
|
|
161
|
+
spinning: r.loading,
|
|
162
|
+
tip: n("common.loading"),
|
|
163
|
+
children: /* @__PURE__ */ C(e, {
|
|
164
|
+
style: {
|
|
165
|
+
height: r.containerHeight - 8,
|
|
166
|
+
padding: "4px"
|
|
167
|
+
},
|
|
168
|
+
children: [a.length > 0 && /* @__PURE__ */ S(b, {
|
|
169
|
+
showSwitcher: !1,
|
|
170
|
+
data: a,
|
|
171
|
+
fieldNames: {
|
|
172
|
+
title: "name",
|
|
173
|
+
value: "role_id",
|
|
174
|
+
children: "children"
|
|
175
|
+
},
|
|
176
|
+
selectedKeys: r.roleId ? [r.roleId] : [],
|
|
177
|
+
onSelect: (e) => r.setRoleId(e),
|
|
178
|
+
parentCheckable: !0,
|
|
179
|
+
icon: (e) => e.children && e.children.length > 0 ? /* @__PURE__ */ S(y, {
|
|
180
|
+
name: "dept-one",
|
|
181
|
+
className: T["role-panel__tree-icon"],
|
|
182
|
+
size: 16
|
|
183
|
+
}) : /* @__PURE__ */ S(D, {}),
|
|
184
|
+
switcherIcon: (e) => /* @__PURE__ */ S(y, {
|
|
185
|
+
name: "xiangxiazhankai-11",
|
|
186
|
+
className: t(T["role-panel__switcher-icon"], { [T["role-panel__switcher-icon--expanded"]]: e })
|
|
187
|
+
})
|
|
188
|
+
}), a.length === 0 && !r.loading && /* @__PURE__ */ S("div", {
|
|
189
|
+
className: T["role-panel__tree-empty"],
|
|
190
|
+
children: /* @__PURE__ */ S("span", {
|
|
191
|
+
className: T["role-panel__tree-empty-text"],
|
|
192
|
+
children: n("role.noAvailable")
|
|
193
|
+
})
|
|
194
|
+
})]
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ C("section", {
|
|
199
|
+
className: T["role-panel__list-section"],
|
|
200
|
+
children: [/* @__PURE__ */ S(v, {
|
|
201
|
+
spinning: r.memberLoading,
|
|
202
|
+
tip: n("common.loading"),
|
|
203
|
+
children: /* @__PURE__ */ S(e, {
|
|
204
|
+
style: {
|
|
205
|
+
height: r.containerHeight - 8,
|
|
206
|
+
padding: "4px"
|
|
207
|
+
},
|
|
208
|
+
children: i.length > 0 && /* @__PURE__ */ S(p, {
|
|
209
|
+
list: i,
|
|
210
|
+
badge: (e) => /* @__PURE__ */ S("span", {
|
|
211
|
+
className: T["role-panel__badge"],
|
|
212
|
+
title: e.deptnames,
|
|
213
|
+
children: e.deptnames
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
}), i.length === 0 && !r.memberLoading && /* @__PURE__ */ S("div", {
|
|
218
|
+
className: T["role-panel__empty"],
|
|
219
|
+
children: /* @__PURE__ */ S("span", {
|
|
220
|
+
className: T["role-panel__empty-text"],
|
|
221
|
+
children: n("member.noAvailable")
|
|
222
|
+
})
|
|
223
|
+
})]
|
|
224
|
+
})
|
|
225
|
+
]
|
|
226
|
+
});
|
|
227
|
+
}, k = {
|
|
228
|
+
"position-panel": "_position-panel_14wpw_1",
|
|
229
|
+
"position-panel__menu": "_position-panel__menu_14wpw_6",
|
|
230
|
+
"position-panel__menu-list": "_position-panel__menu-list_14wpw_9",
|
|
231
|
+
"position-panel__menu-item": "_position-panel__menu-item_14wpw_15",
|
|
232
|
+
"position-panel__menu-item--active": "_position-panel__menu-item--active_14wpw_25",
|
|
233
|
+
"position-panel__list": "_position-panel__list_14wpw_32",
|
|
234
|
+
"position-panel__badge": "_position-panel__badge_14wpw_38",
|
|
235
|
+
"position-panel__empty": "_position-panel__empty_14wpw_48"
|
|
236
|
+
}, A = () => {
|
|
237
|
+
let { containerHeight: e, type: t, requestContext: n, limits: o } = r(), [s, c] = _(), { data: l, loading: u } = x(() => i({
|
|
238
|
+
requestContext: n,
|
|
239
|
+
limits: o
|
|
240
|
+
}), {
|
|
241
|
+
onSuccess: (e) => {
|
|
242
|
+
e.items?.length && c(0);
|
|
243
|
+
},
|
|
244
|
+
refreshDeps: [
|
|
245
|
+
t,
|
|
246
|
+
n,
|
|
247
|
+
o
|
|
248
|
+
]
|
|
249
|
+
}), d = l?.items || [], f = s === void 0 ? void 0 : d[s], p = typeof f == "string" ? f : f?.job_title || f?.name || "", m = typeof f == "string" ? void 0 : f?._id || f?.id, { data: h, loading: g } = x(async () => p && (await a({
|
|
250
|
+
requestContext: n,
|
|
251
|
+
jobTitle: p,
|
|
252
|
+
jobTitleId: m,
|
|
253
|
+
limit: 1e4
|
|
254
|
+
})).list || [], { refreshDeps: [
|
|
255
|
+
t,
|
|
256
|
+
s,
|
|
257
|
+
p,
|
|
258
|
+
m,
|
|
259
|
+
n?.appId,
|
|
260
|
+
n?.entryId
|
|
261
|
+
] });
|
|
262
|
+
return {
|
|
263
|
+
containerHeight: e,
|
|
264
|
+
positionList: d,
|
|
265
|
+
activePositionIndex: s,
|
|
266
|
+
setActivePositionIndex: c,
|
|
267
|
+
memberList: h || [],
|
|
268
|
+
jobLoading: u,
|
|
269
|
+
memberLoading: g
|
|
270
|
+
};
|
|
271
|
+
}, j = () => {
|
|
272
|
+
let { t: n } = u(), r = A(), i = r.memberList;
|
|
273
|
+
return /* @__PURE__ */ C("div", {
|
|
274
|
+
className: k["position-panel"],
|
|
275
|
+
children: [/* @__PURE__ */ S("div", {
|
|
276
|
+
className: k["position-panel__menu"],
|
|
277
|
+
children: /* @__PURE__ */ S(v, {
|
|
278
|
+
spinning: r.jobLoading,
|
|
279
|
+
tip: n("common.loading"),
|
|
280
|
+
children: /* @__PURE__ */ S(e, {
|
|
281
|
+
style: { height: r.containerHeight - 8 },
|
|
282
|
+
children: /* @__PURE__ */ S("ul", {
|
|
283
|
+
className: k["position-panel__menu-list"],
|
|
284
|
+
children: r.positionList.map((e, n) => /* @__PURE__ */ S("li", {
|
|
285
|
+
onClick: () => {
|
|
286
|
+
r.setActivePositionIndex(n);
|
|
287
|
+
},
|
|
288
|
+
className: t(k["position-panel__menu-item"], { [k["position-panel__menu-item--active"]]: r.activePositionIndex === n }),
|
|
289
|
+
children: typeof e == "string" ? e : e.job_title || e.name || ""
|
|
290
|
+
}, n))
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
})
|
|
294
|
+
}), /* @__PURE__ */ C("div", {
|
|
295
|
+
className: k["position-panel__list"],
|
|
296
|
+
children: [/* @__PURE__ */ S(v, {
|
|
297
|
+
spinning: r.memberLoading,
|
|
298
|
+
tip: n("common.loading"),
|
|
299
|
+
children: /* @__PURE__ */ S(e, {
|
|
300
|
+
style: { height: r.containerHeight - 8 },
|
|
301
|
+
children: i.length > 0 && /* @__PURE__ */ S(p, {
|
|
302
|
+
list: i,
|
|
303
|
+
badge: (e) => /* @__PURE__ */ S("div", {
|
|
304
|
+
className: k["position-panel__badge"],
|
|
305
|
+
children: /* @__PURE__ */ S("span", {
|
|
306
|
+
title: e.deptnames,
|
|
307
|
+
children: e.deptnames
|
|
308
|
+
})
|
|
309
|
+
})
|
|
310
|
+
})
|
|
311
|
+
})
|
|
312
|
+
}), i.length === 0 && !r.memberLoading && /* @__PURE__ */ S("div", {
|
|
313
|
+
className: k["position-panel__empty"],
|
|
314
|
+
children: /* @__PURE__ */ S("span", { children: n("member.noAvailable") })
|
|
315
|
+
})]
|
|
316
|
+
})]
|
|
317
|
+
});
|
|
318
|
+
}, M = { "current-user-panel": "_current-user-panel_184e6_1" }, N = () => {
|
|
319
|
+
let { currentUsers: e } = r();
|
|
320
|
+
return /* @__PURE__ */ S("div", {
|
|
321
|
+
className: M["current-user-panel"],
|
|
322
|
+
children: /* @__PURE__ */ S(p, {
|
|
323
|
+
list: e || [],
|
|
324
|
+
showCheckAll: !1
|
|
325
|
+
})
|
|
326
|
+
});
|
|
327
|
+
}, P = () => {
|
|
328
|
+
let { t: e } = u(), { memberPanelVisibility: t = n } = r(), { source: i, member: a, role: o, job: s, externalContact: c, currentUser: l } = t, d = h(() => [
|
|
329
|
+
{
|
|
330
|
+
label: e("member.title"),
|
|
331
|
+
key: "member",
|
|
332
|
+
view: /* @__PURE__ */ S(f, {})
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
label: e("role.title"),
|
|
336
|
+
key: "role",
|
|
337
|
+
view: /* @__PURE__ */ S(O, {})
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
label: e("position.title"),
|
|
341
|
+
key: "job",
|
|
342
|
+
view: /* @__PURE__ */ S(j, {})
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
label: e("externalContact.title"),
|
|
346
|
+
key: "externalContact",
|
|
347
|
+
view: /* @__PURE__ */ S(m, {})
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
label: e("currentUser.title"),
|
|
351
|
+
key: "currentUser",
|
|
352
|
+
view: /* @__PURE__ */ S(N, {})
|
|
353
|
+
}
|
|
354
|
+
], [e]);
|
|
355
|
+
return h(() => i === "widget" ? d.filter((e) => {
|
|
356
|
+
switch (e.key) {
|
|
357
|
+
case "member": return a;
|
|
358
|
+
case "role": return o;
|
|
359
|
+
case "job": return s;
|
|
360
|
+
case "externalContact": return c;
|
|
361
|
+
case "currentUser": return l;
|
|
362
|
+
default: return !0;
|
|
363
|
+
}
|
|
364
|
+
}) : d, [
|
|
365
|
+
d,
|
|
366
|
+
i,
|
|
367
|
+
a,
|
|
368
|
+
o,
|
|
369
|
+
s,
|
|
370
|
+
c,
|
|
371
|
+
l
|
|
372
|
+
]);
|
|
373
|
+
};
|
|
374
|
+
//#endregion
|
|
375
|
+
export { P as t };
|
package/dist/DeptsMemberSelector/{OrganizationPanel-BAhvhgOL.js → OrganizationPanel-DoM4UNxv.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "../vendors/simplebar-react.js";
|
|
2
2
|
import { t } from "../vendors/clsx.js";
|
|
3
3
|
import { r as n, t as r } from "../vendors/lodash-es.js";
|
|
4
|
-
import { i, t as a } from "./useDeptsMemberSelector-
|
|
5
|
-
import { n as o, p as s } from "./services/contact/selector.service-
|
|
6
|
-
import { n as c, r as l, t as u } from "./TabGroup-
|
|
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 { n as c, r as l, t as u } from "./TabGroup-Ds7bTbKL.js";
|
|
7
7
|
import { t as d } from "../vendors/useLocale.js";
|
|
8
8
|
import { buildDeptTree as f, buildTree as p, findNodeInTree as m } from "./utils/index.js";
|
|
9
9
|
import { useCallback as h, useEffect as g, useMemo as _, useState as v } from "react";
|
package/dist/DeptsMemberSelector/{RelationShipDepts-DadyalUU.js → RelationShipDepts-kpemRPz1.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../vendors/simplebar-react.js";
|
|
2
2
|
import { t } from "../vendors/clsx.js";
|
|
3
|
-
import { t as n } from "./useDeptsMemberSelector-
|
|
3
|
+
import { t as n } from "./useDeptsMemberSelector-t7b8yu-A.js";
|
|
4
4
|
import { t as r } from "../vendors/useLocale.js";
|
|
5
5
|
import { Spin as i } from "antd";
|
|
6
6
|
import { Icon as a, Tree as o } from "@baishuyun/ui-base";
|
package/dist/DeptsMemberSelector/{RelationShipList-BVTUyw1-.js → RelationShipList-BhiAdVjm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../vendors/simplebar-react.js";
|
|
2
2
|
import { t } from "../vendors/clsx.js";
|
|
3
|
-
import { t as n } from "./useDeptsMemberSelector-
|
|
3
|
+
import { t as n } from "./useDeptsMemberSelector-t7b8yu-A.js";
|
|
4
4
|
import { Spin as r } from "antd";
|
|
5
5
|
import { Checkbox as i } from "@baishuyun/ui-base";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
@@ -10,10 +10,11 @@ var s = {
|
|
|
10
10
|
DEPARMENT_GROUP: "deptgroup",
|
|
11
11
|
DEPT_USERS: "deptusers"
|
|
12
12
|
}, c = {
|
|
13
|
-
"tag-icon--primary": "_tag-icon--
|
|
14
|
-
"tag-icon--success": "_tag-icon--
|
|
15
|
-
"tag-icon--relation": "_tag-icon--
|
|
16
|
-
"tag-icon--public": "_tag-icon--
|
|
13
|
+
"tag-icon--primary": "_tag-icon--primary_16yrk_1",
|
|
14
|
+
"tag-icon--success": "_tag-icon--success_16yrk_4",
|
|
15
|
+
"tag-icon--relation": "_tag-icon--relation_16yrk_7",
|
|
16
|
+
"tag-icon--public": "_tag-icon--public_16yrk_10",
|
|
17
|
+
"tag-icon--role": "_tag-icon--role_16yrk_13"
|
|
17
18
|
}, l = ({ type: e, size: t }) => {
|
|
18
19
|
switch (e) {
|
|
19
20
|
case "label": return /* @__PURE__ */ a(i, {
|
|
@@ -48,6 +49,21 @@ var s = {
|
|
|
48
49
|
className: c["tag-icon--relation"],
|
|
49
50
|
size: t
|
|
50
51
|
});
|
|
52
|
+
case "role": return /* @__PURE__ */ a(i, {
|
|
53
|
+
name: "role",
|
|
54
|
+
className: c["tag-icon--role"],
|
|
55
|
+
size: t
|
|
56
|
+
});
|
|
57
|
+
case "rolegroup": return /* @__PURE__ */ a(i, {
|
|
58
|
+
name: "rolegroup",
|
|
59
|
+
className: c["tag-icon--role"],
|
|
60
|
+
size: t
|
|
61
|
+
});
|
|
62
|
+
case "dockrole": return /* @__PURE__ */ a(i, {
|
|
63
|
+
name: "role",
|
|
64
|
+
className: c["tag-icon--role"],
|
|
65
|
+
size: t
|
|
66
|
+
});
|
|
51
67
|
default: return /* @__PURE__ */ a(i, {
|
|
52
68
|
name: "dept-one",
|
|
53
69
|
className: c["tag-icon--primary"],
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "../vendors/simplebar-react.js";
|
|
2
|
-
import "./useDeptsMemberSelector-
|
|
3
|
-
import { r as e } from "./TabGroup-
|
|
4
|
-
import { t } from "./DeptsMemberSelector-
|
|
2
|
+
import "./useDeptsMemberSelector-t7b8yu-A.js";
|
|
3
|
+
import { r as e } from "./TabGroup-Ds7bTbKL.js";
|
|
4
|
+
import { t } from "./DeptsMemberSelector-BXWGwgUq.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-
|
|
9
|
-
import "./OrganizationPanel-
|
|
10
|
-
import "./ExtraConcactPanel-
|
|
11
|
-
import "./RelationShipList-
|
|
12
|
-
import "./RelationShipDepts-
|
|
13
|
-
import "./Member-
|
|
14
|
-
import "./Department-
|
|
8
|
+
import "./DeptsUser-C8hYQ6z-.js";
|
|
9
|
+
import "./OrganizationPanel-DoM4UNxv.js";
|
|
10
|
+
import "./ExtraConcactPanel-BDNrz5rV.js";
|
|
11
|
+
import "./RelationShipList-BhiAdVjm.js";
|
|
12
|
+
import "./RelationShipDepts-kpemRPz1.js";
|
|
13
|
+
import "./Member-B4tEHksu.js";
|
|
14
|
+
import "./Department-12ftZfXD.js";
|
|
15
15
|
//#region src/components/DeptsMemberSelector/index.ts
|
|
16
16
|
var r = t;
|
|
17
17
|
//#endregion
|
|
@@ -135,7 +135,7 @@ var n = {
|
|
|
135
135
|
};
|
|
136
136
|
}, k = async ({ requestContext: n, hasDeptDock: r = !1 }) => v(await e.post(t("/v1/contact/department/list"), {
|
|
137
137
|
hasDock: !0,
|
|
138
|
-
hasDeptDock:
|
|
138
|
+
...r ? { hasDeptDock: !0 } : {},
|
|
139
139
|
appId: n?.appId,
|
|
140
140
|
entryId: n?.entryId
|
|
141
141
|
}), {
|
|
@@ -144,7 +144,7 @@ var n = {
|
|
|
144
144
|
label_corp_count: 0
|
|
145
145
|
}), A = async ({ requestContext: n, deptId: r = "", limit: i = 100, skip: a = 0 }) => {
|
|
146
146
|
let o = v(await e.post(t("/v1/contact/department/member/list"), {
|
|
147
|
-
deptId: r,
|
|
147
|
+
deptId: String(r),
|
|
148
148
|
current_corpid: "",
|
|
149
149
|
dock_corpid: "",
|
|
150
150
|
msgType: "",
|
|
@@ -176,7 +176,9 @@ var n = {
|
|
|
176
176
|
entryId: n?.entryId,
|
|
177
177
|
departmentLimit: r?.jobTitleDepartmentLimit || r?.departmentLimit || [],
|
|
178
178
|
mode: "current"
|
|
179
|
-
}), { items: [] }), M = async ({ requestContext: n }) => v(await e.post(t("/v1/contact/department/jobtitle"), {
|
|
179
|
+
}), { items: [] }), M = async ({ requestContext: n, departmentId: r = "", mode: i = "current" }) => v(await e.post(t("/v1/contact/department/jobtitle"), {
|
|
180
|
+
_id: r,
|
|
181
|
+
mode: i,
|
|
180
182
|
appId: n?.appId,
|
|
181
183
|
entryId: n?.entryId
|
|
182
184
|
}), { items: [] }), N = async ({ requestContext: n, jobTitleId: r, jobTitle: i, limit: a = 100, skip: o = 0 }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../../../vendors/simplebar-react.js";
|
|
2
|
-
import "../../../useDeptsMemberSelector-
|
|
3
|
-
import "../../../TabGroup-
|
|
2
|
+
import "../../../useDeptsMemberSelector-t7b8yu-A.js";
|
|
3
|
+
import "../../../TabGroup-Ds7bTbKL.js";
|
|
4
4
|
import "../../../../vendors/useLocale.js";
|
|
5
5
|
import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
|
|
6
|
-
import "../../../OrganizationPanel-
|
|
7
|
-
import { t as e } from "../../../Department-
|
|
6
|
+
import "../../../OrganizationPanel-DoM4UNxv.js";
|
|
7
|
+
import { t as e } from "../../../Department-12ftZfXD.js";
|
|
8
8
|
export { e as useDepartmentTabItems };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../../../vendors/simplebar-react.js";
|
|
2
|
-
import "../../../useDeptsMemberSelector-
|
|
3
|
-
import "../../../TabGroup-
|
|
2
|
+
import "../../../useDeptsMemberSelector-t7b8yu-A.js";
|
|
3
|
+
import "../../../TabGroup-Ds7bTbKL.js";
|
|
4
4
|
import "../../../../vendors/useLocale.js";
|
|
5
5
|
import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
|
|
6
|
-
import { t as e } from "../../../DeptsUser-
|
|
7
|
-
import "../../../OrganizationPanel-
|
|
8
|
-
import "../../../ExtraConcactPanel-
|
|
9
|
-
import "../../../RelationShipList-
|
|
10
|
-
import "../../../RelationShipDepts-
|
|
6
|
+
import { t as e } from "../../../DeptsUser-C8hYQ6z-.js";
|
|
7
|
+
import "../../../OrganizationPanel-DoM4UNxv.js";
|
|
8
|
+
import "../../../ExtraConcactPanel-BDNrz5rV.js";
|
|
9
|
+
import "../../../RelationShipList-BhiAdVjm.js";
|
|
10
|
+
import "../../../RelationShipDepts-kpemRPz1.js";
|
|
11
11
|
export { e as useDeptUserTabItems };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../../../vendors/simplebar-react.js";
|
|
2
|
-
import "../../../useDeptsMemberSelector-
|
|
3
|
-
import "../../../TabGroup-
|
|
2
|
+
import "../../../useDeptsMemberSelector-t7b8yu-A.js";
|
|
3
|
+
import "../../../TabGroup-Ds7bTbKL.js";
|
|
4
4
|
import "../../../../vendors/useLocale.js";
|
|
5
5
|
import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
|
|
6
|
-
import "../../../ExtraConcactPanel-
|
|
7
|
-
import { t as e } from "../../../Member-
|
|
6
|
+
import "../../../ExtraConcactPanel-BDNrz5rV.js";
|
|
7
|
+
import { t as e } from "../../../Member-B4tEHksu.js";
|
|
8
8
|
export { e as useMemberTabItems };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../../../vendors/simplebar-react.js";
|
|
2
|
-
import "../../../../useDeptsMemberSelector-
|
|
2
|
+
import "../../../../useDeptsMemberSelector-t7b8yu-A.js";
|
|
3
3
|
import "../../../../../vendors/useLocale.js";
|
|
4
4
|
import "../../../../../ConfigProvider/configContext-kYu9qTM2.js";
|
|
5
|
-
import { t as e } from "../../../../RelationShipDepts-
|
|
5
|
+
import { t as e } from "../../../../RelationShipDepts-kpemRPz1.js";
|
|
6
6
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../../../../vendors/simplebar-react.js";
|
|
2
|
-
import "../../../../useDeptsMemberSelector-
|
|
3
|
-
import { t as e } from "../../../../RelationShipList-
|
|
2
|
+
import "../../../../useDeptsMemberSelector-t7b8yu-A.js";
|
|
3
|
+
import { t as e } from "../../../../RelationShipList-BhiAdVjm.js";
|
|
4
4
|
export { e as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as e, r as t } from "../vendors/lodash-es.js";
|
|
2
|
-
import { y as n } from "./services/contact/selector.service-
|
|
2
|
+
import { y as n } from "./services/contact/selector.service-CY5vQea8.js";
|
|
3
3
|
import { createContext as r, useContext as i } from "react";
|
|
4
4
|
//#region src/components/DeptsMemberSelector/utils/widgetPanelVisibility.ts
|
|
5
5
|
var a = {
|
|
@@ -7,7 +7,10 @@ var t = [
|
|
|
7
7
|
"#61db8c",
|
|
8
8
|
"#ff8383",
|
|
9
9
|
"#444"
|
|
10
|
-
], n = (n) => (e(n) || (n = "?"), t[n.charCodeAt(0) % t.length]), r = (
|
|
10
|
+
], n = (n) => (e(n) || (n = "?"), t[n.charCodeAt(0) % t.length]), r = (t = {}) => {
|
|
11
|
+
let n = t.nickname || t.name || t.dock_corpname || t._id;
|
|
12
|
+
return e(n) && n.trim() ? n : "?";
|
|
13
|
+
}, i = (e, t) => {
|
|
11
14
|
let { value: n, children: r, parentId: i } = {
|
|
12
15
|
title: "title",
|
|
13
16
|
value: "value",
|
|
@@ -29,7 +32,7 @@ var t = [
|
|
|
29
32
|
let t = e[i], n = a.get(t);
|
|
30
33
|
n ? n[r].push(e) : o.push(e);
|
|
31
34
|
}), o;
|
|
32
|
-
},
|
|
35
|
+
}, a = (e, t, n) => {
|
|
33
36
|
let { value: r, children: i } = {
|
|
34
37
|
value: "value",
|
|
35
38
|
children: "children",
|
|
@@ -46,7 +49,7 @@ var t = [
|
|
|
46
49
|
}
|
|
47
50
|
return null;
|
|
48
51
|
};
|
|
49
|
-
function
|
|
52
|
+
function o(e) {
|
|
50
53
|
let t = {}, n = [], r = (e) => e == null ? "" : String(e);
|
|
51
54
|
return e.forEach((e) => {
|
|
52
55
|
let n = r(e.departmentId);
|
|
@@ -72,4 +75,4 @@ function a(e) {
|
|
|
72
75
|
}), n;
|
|
73
76
|
}
|
|
74
77
|
//#endregion
|
|
75
|
-
export { t as ENTITY_COLORS,
|
|
78
|
+
export { t as ENTITY_COLORS, o as buildDeptTree, i as buildTree, a as findNodeInTree, n as getColorByName, r as getMemberDisplayName };
|