@baishuyun/ui-business 2.0.4 → 3.0.2
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/README.md +188 -1
- package/dist/DeptsMember/{DeptsMember-Ct8CJLvk.js → DeptsMember-pFjdAocd.js} +62 -62
- package/dist/DeptsMember/{TabGroup-LsBzSRvu.js → TabGroup-CznMwTOD.js} +35 -35
- package/dist/DeptsMember/index.js +2 -2
- package/dist/DeptsMember/subcomponents/Entity/Department/index.js +73 -61
- package/dist/DeptsMember/subcomponents/Entity/Member/index.js +205 -187
- package/dist/components/DeptsMember/subcomponents/TagIcon/TagIcon.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -7
- package/dist/services/apiService.d.ts +16 -11
- package/dist/vendors/services/apiService.js +11 -86
- package/dist/vendors/services/corp/outsider.service.js +4 -4
- package/dist/vendors/services/data/department.service.js +2 -2
- package/dist/vendors/services/data/member.service.js +6 -6
- package/dist/vendors/services/data/member_limit.service.js +3 -3
- package/dist/vendors/services/data/outsider.service.js +4 -4
- package/dist/vendors/services/team/team.services.js +3 -3
- package/package.json +2 -2
- package/dist/vendors/axios.js +0 -1720
|
@@ -2,7 +2,7 @@ import { createContext as v, useContext as f, useMemo as p, useCallback as E, us
|
|
|
2
2
|
import { n as d } from "../vendors/lodash-es.js";
|
|
3
3
|
import { C as G } from "../ConfigProvider/configContext-lDqg07Z3.js";
|
|
4
4
|
import { jsx as o, jsxs as N } from "react/jsx-runtime";
|
|
5
|
-
import { Icon as
|
|
5
|
+
import { Icon as l } from "bsy-react-ui";
|
|
6
6
|
import { c as S } from "../vendors/clsx.js";
|
|
7
7
|
const I = v({
|
|
8
8
|
type: "user",
|
|
@@ -26,7 +26,7 @@ const I = v({
|
|
|
26
26
|
* @description 表示多个部门组
|
|
27
27
|
*/
|
|
28
28
|
DEPARMENT_GROUP: "deptgroup"
|
|
29
|
-
}, nt = 110, at = 68, rt = 30, ot = 8,
|
|
29
|
+
}, nt = 110, at = 68, rt = 30, ot = 8, ct = 90, M = { loading: "加载中...", cancel: "取消", confirm: "确认", clearAll: "清空所选项", viewAll: "查看全部{count}个", selected: "已选 {selected}/{total}", collapseAll: "收起全部", noAvailable: "没有可选成员" }, y = { title: "部门", search: "搜索部门", noAvailable: "没有可选部门", contact: "对接部门", organizationalStructure: "组织架构", currentUserDepartment: "当前用户所处部门", internal: "内部组织", external: "外部组织", externalContactGroup: "对接人小组", externalContactDepartment: "对接部门" }, R = { title: "成员", search: "搜索成员", contact: "对接人", all: "全部成员", allContact: "全部对接人", internal: "内部成员", external: "外部成员", noAvailable: "没有可选成员" }, U = { title: "角色", internal: "内部角色", external: "互联角色" }, T = { title: "职位" }, P = { title: "当前用户" }, $ = { title: "外部联系人", defaultGroup: "默认分组", customGroup: "自定义分组", group: "外部联系人分组", noAvailableGroup: "没有可选分组" }, H = { searchMember: "搜索成员", searchDepartment: "搜索部门" }, b = {
|
|
30
30
|
common: M,
|
|
31
31
|
department: y,
|
|
32
32
|
member: R,
|
|
@@ -44,61 +44,61 @@ const I = v({
|
|
|
44
44
|
currentUser: B,
|
|
45
45
|
externalContact: W,
|
|
46
46
|
tabs: j
|
|
47
|
-
}, X = (
|
|
48
|
-
const s =
|
|
49
|
-
let
|
|
47
|
+
}, X = (a, t, e) => {
|
|
48
|
+
const s = t.split(".");
|
|
49
|
+
let n = a;
|
|
50
50
|
try {
|
|
51
51
|
for (const r of s)
|
|
52
|
-
|
|
53
|
-
return typeof
|
|
52
|
+
n = n[r];
|
|
53
|
+
return typeof n == "string" ? e ? n.replace(/\{(\w+)\}/g, (r, i) => e[i] !== void 0 ? String(e[i]) : r) : n : t;
|
|
54
54
|
} catch {
|
|
55
|
-
return
|
|
55
|
+
return t;
|
|
56
56
|
}
|
|
57
|
-
},
|
|
58
|
-
const
|
|
57
|
+
}, lt = () => {
|
|
58
|
+
const a = f(G), t = p(() => ({ "zh-CN": b, "en-US": V }), []), e = p(() => t[a.locale] || b, [a.locale, t]);
|
|
59
59
|
return {
|
|
60
60
|
t: E(
|
|
61
|
-
(
|
|
62
|
-
[
|
|
61
|
+
(n, r) => X(e, n, r),
|
|
62
|
+
[e]
|
|
63
63
|
)
|
|
64
64
|
};
|
|
65
|
-
}, st = ({ type:
|
|
66
|
-
switch (
|
|
65
|
+
}, st = ({ type: a, size: t }) => {
|
|
66
|
+
switch (a) {
|
|
67
67
|
case "label":
|
|
68
|
-
return /* @__PURE__ */ o(
|
|
68
|
+
return /* @__PURE__ */ o(l, { name: "Enterpriselabel", className: "text-[#0265ff]", size: t });
|
|
69
69
|
case "dockcorp":
|
|
70
70
|
case "dockcorpdept":
|
|
71
|
-
return /* @__PURE__ */ o(
|
|
71
|
+
return /* @__PURE__ */ o(l, { name: "company", className: "text-[#0265ff]", size: t });
|
|
72
72
|
case "dockdept":
|
|
73
73
|
case "member":
|
|
74
|
-
return /* @__PURE__ */ o(
|
|
74
|
+
return /* @__PURE__ */ o(l, { name: "dept-one", className: "text-[#0265ff]", size: t });
|
|
75
75
|
case "group":
|
|
76
|
-
return /* @__PURE__ */ o(
|
|
76
|
+
return /* @__PURE__ */ o(l, { name: "Outreach", className: "text-[#70c911]", size: t });
|
|
77
77
|
default:
|
|
78
|
-
return /* @__PURE__ */ o(
|
|
78
|
+
return /* @__PURE__ */ o(l, { name: "dept-one", className: "text-[#0265ff]", size: t });
|
|
79
79
|
}
|
|
80
80
|
}, q = "_active_1vd3c_15", u = {
|
|
81
81
|
"tabgroup-container": "_tabgroup-container_1vd3c_1",
|
|
82
82
|
"tabgroup-container__tab-item": "_tabgroup-container__tab-item_1vd3c_7",
|
|
83
83
|
active: q,
|
|
84
84
|
"tabgroup-container__indicator": "_tabgroup-container__indicator_1vd3c_18"
|
|
85
|
-
}, it = (
|
|
86
|
-
const { tabs:
|
|
85
|
+
}, it = (a) => {
|
|
86
|
+
const { tabs: t, value: e, onChange: s } = a, n = h(null), [r, i] = A({
|
|
87
87
|
width: 0,
|
|
88
88
|
transform: "translateX(0)"
|
|
89
|
-
}),
|
|
90
|
-
const m =
|
|
89
|
+
}), C = (c) => {
|
|
90
|
+
const m = n.current?.querySelector(`[data-key="${c}"]`);
|
|
91
91
|
if (m) {
|
|
92
|
-
const { width:
|
|
92
|
+
const { width: g, left: x } = m.getBoundingClientRect(), _ = m.parentElement?.parentElement?.getBoundingClientRect().left || 0;
|
|
93
93
|
i({
|
|
94
|
-
width:
|
|
95
|
-
transform: `translateX(${
|
|
94
|
+
width: g,
|
|
95
|
+
transform: `translateX(${x - _}px)`
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
return D(() => {
|
|
100
|
-
|
|
101
|
-
}, [
|
|
100
|
+
C(e);
|
|
101
|
+
}, [e]), /* @__PURE__ */ N("div", { className: u["tabgroup-container"], ref: n, children: [
|
|
102
102
|
/* @__PURE__ */ o(
|
|
103
103
|
"div",
|
|
104
104
|
{
|
|
@@ -109,16 +109,16 @@ const I = v({
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
|
-
|
|
112
|
+
t.map((c) => /* @__PURE__ */ o(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: S(u["tabgroup-container__tab-item"], {
|
|
116
|
-
[u.active]:
|
|
116
|
+
[u.active]: e === c.value
|
|
117
117
|
}),
|
|
118
|
-
onClick: () => s(
|
|
119
|
-
children: /* @__PURE__ */ o("span", { "data-key":
|
|
118
|
+
onClick: () => s(c.value),
|
|
119
|
+
children: /* @__PURE__ */ o("span", { "data-key": c.value, children: c.label })
|
|
120
120
|
},
|
|
121
|
-
|
|
121
|
+
c.value
|
|
122
122
|
))
|
|
123
123
|
] });
|
|
124
124
|
};
|
|
@@ -127,11 +127,11 @@ export {
|
|
|
127
127
|
et as E,
|
|
128
128
|
ot as G,
|
|
129
129
|
rt as M,
|
|
130
|
-
|
|
130
|
+
ct as P,
|
|
131
131
|
at as T,
|
|
132
132
|
tt as a,
|
|
133
133
|
st as b,
|
|
134
134
|
nt as c,
|
|
135
135
|
it as d,
|
|
136
|
-
|
|
136
|
+
lt as u
|
|
137
137
|
};
|
|
@@ -4,18 +4,21 @@ import { useRequest as T } from "ahooks";
|
|
|
4
4
|
import { Spin as A, Radio as R } from "antd";
|
|
5
5
|
import { c as v } from "../../../../vendors/clsx.js";
|
|
6
6
|
import { useState as D, useMemo as G, useCallback as M } from "react";
|
|
7
|
-
import { a as N, u as k, E, d as L, b as H } from "../../../TabGroup-
|
|
7
|
+
import { a as N, u as k, E, d as L, b as H } from "../../../TabGroup-CznMwTOD.js";
|
|
8
8
|
import { buildDeptTree as B, buildTree as U, findNodeInTree as q } from "../../../utils/index.js";
|
|
9
9
|
import { S } from "../../../../vendors/simplebar-react.js";
|
|
10
10
|
import { Tree as w, Icon as C, Checkbox as O } from "bsy-react-ui";
|
|
11
11
|
import { g as J } from "../../../../vendors/services/corp/outsider.service.js";
|
|
12
12
|
const Q = (t) => {
|
|
13
|
-
const { type: r, containerHeight: p, value: o } = N(), { t: a } = k(), f = o?.map((d) => d._id) || [],
|
|
13
|
+
const { type: r, containerHeight: p, value: o } = N(), { t: a } = k(), f = o?.map((d) => d._id) || [], s = t.data?.map((d) => d._id);
|
|
14
14
|
return /* @__PURE__ */ g(
|
|
15
15
|
S,
|
|
16
16
|
{
|
|
17
17
|
style: { height: p - 8, padding: "4px" },
|
|
18
18
|
className: "internal-container",
|
|
19
|
+
classNames: {
|
|
20
|
+
contentEl: "internal-container-content-el"
|
|
21
|
+
},
|
|
19
22
|
children: [
|
|
20
23
|
t.data.length > 0 && /* @__PURE__ */ e(
|
|
21
24
|
w,
|
|
@@ -31,7 +34,7 @@ const Q = (t) => {
|
|
|
31
34
|
selectedKeys: f,
|
|
32
35
|
onSelect: t.onSelect,
|
|
33
36
|
onDeSelect: t.onDeselect,
|
|
34
|
-
defaultExpandedKeys:
|
|
37
|
+
defaultExpandedKeys: s,
|
|
35
38
|
icon: () => /* @__PURE__ */ e(C, { name: "dept-one", className: "internal-container__icon" }),
|
|
36
39
|
switcherIcon: (d) => /* @__PURE__ */ e(
|
|
37
40
|
C,
|
|
@@ -49,7 +52,7 @@ const Q = (t) => {
|
|
|
49
52
|
}
|
|
50
53
|
);
|
|
51
54
|
}, V = (t) => {
|
|
52
|
-
const { type: r, containerHeight: p, value: o } = N(), { t: a } = k(), [f,
|
|
55
|
+
const { type: r, containerHeight: p, value: o } = N(), { t: a } = k(), [f, s] = D(
|
|
53
56
|
"dockcorp"
|
|
54
57
|
/* DOCK_PERSON_GROUP */
|
|
55
58
|
), d = o?.map((n) => n._id) || [], b = [
|
|
@@ -63,7 +66,7 @@ const Q = (t) => {
|
|
|
63
66
|
value: "dockcorpdept"
|
|
64
67
|
/* DOCK_DEPARTMENT */
|
|
65
68
|
}
|
|
66
|
-
],
|
|
69
|
+
], i = (n, u) => {
|
|
67
70
|
const m = [];
|
|
68
71
|
for (const c of n)
|
|
69
72
|
if (c.type === u)
|
|
@@ -73,56 +76,65 @@ const Q = (t) => {
|
|
|
73
76
|
children: c.children
|
|
74
77
|
});
|
|
75
78
|
else {
|
|
76
|
-
const l = c.children ?
|
|
79
|
+
const l = c.children ? i(c.children, u) : [];
|
|
77
80
|
m.push({
|
|
78
81
|
...c,
|
|
79
82
|
children: l.length > 0 ? l : void 0
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
else {
|
|
83
|
-
const l = c.children ?
|
|
86
|
+
const l = c.children ? i(c.children, u) : [];
|
|
84
87
|
l.length > 0 && m.push({
|
|
85
88
|
...c,
|
|
86
89
|
children: l
|
|
87
90
|
});
|
|
88
91
|
}
|
|
89
92
|
return m;
|
|
90
|
-
}, x =
|
|
93
|
+
}, x = i(t.data, f), _ = x?.map((n) => n._id);
|
|
91
94
|
return /* @__PURE__ */ g("div", { className: "external-container", children: [
|
|
92
|
-
/* @__PURE__ */ e(L, { tabs: b, value: f, onChange:
|
|
93
|
-
/* @__PURE__ */ e("div", { className: "external-container__content", children: /* @__PURE__ */ g(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
children: "children"
|
|
104
|
-
},
|
|
105
|
-
selectedKeys: d,
|
|
106
|
-
onSelect: t.onSelect,
|
|
107
|
-
onDeSelect: t.onDeselect,
|
|
108
|
-
defaultExpandedKeys: _,
|
|
109
|
-
icon: () => /* @__PURE__ */ e(C, { name: "dept-one", className: "text-[#0265ff]", size: 16 }),
|
|
110
|
-
switcherIcon: (n) => /* @__PURE__ */ e(
|
|
111
|
-
C,
|
|
95
|
+
/* @__PURE__ */ e(L, { tabs: b, value: f, onChange: s }),
|
|
96
|
+
/* @__PURE__ */ e("div", { className: "external-container__content", children: /* @__PURE__ */ g(
|
|
97
|
+
S,
|
|
98
|
+
{
|
|
99
|
+
style: { height: p - 42, padding: "4px" },
|
|
100
|
+
classNames: {
|
|
101
|
+
contentEl: "external-container-content-el"
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
104
|
+
x.length > 0 && /* @__PURE__ */ e(
|
|
105
|
+
w,
|
|
112
106
|
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
parentCheckable: !0,
|
|
108
|
+
checkType: r === E.DEPARMENT ? "radio" : "checkbox",
|
|
109
|
+
data: x,
|
|
110
|
+
fieldNames: {
|
|
111
|
+
title: "name",
|
|
112
|
+
value: "_id",
|
|
113
|
+
children: "children"
|
|
114
|
+
},
|
|
115
|
+
selectedKeys: d,
|
|
116
|
+
onSelect: t.onSelect,
|
|
117
|
+
onDeSelect: t.onDeselect,
|
|
118
|
+
defaultExpandedKeys: _,
|
|
119
|
+
icon: () => /* @__PURE__ */ e(C, { name: "dept-one", className: "text-[#0265ff]", size: 16 }),
|
|
120
|
+
switcherIcon: (n) => /* @__PURE__ */ e(
|
|
121
|
+
C,
|
|
116
122
|
{
|
|
117
|
-
"
|
|
123
|
+
name: "xiangxiazhankai-11",
|
|
124
|
+
className: v(
|
|
125
|
+
"transition-transform text-base duration-300 ease-in-out text-[#666]",
|
|
126
|
+
{
|
|
127
|
+
"rotate-90": n
|
|
128
|
+
}
|
|
129
|
+
)
|
|
118
130
|
}
|
|
119
131
|
)
|
|
120
132
|
}
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
133
|
+
),
|
|
134
|
+
x.length === 0 && !t.loading && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: a("department.noAvailable") }) })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
) })
|
|
126
138
|
] });
|
|
127
139
|
}, W = () => {
|
|
128
140
|
const { type: t, dispatch: r } = N(), { t: p } = k(), [o] = D([
|
|
@@ -131,7 +143,7 @@ const Q = (t) => {
|
|
|
131
143
|
]), [a, f] = D(
|
|
132
144
|
0
|
|
133
145
|
/* INTERNAL */
|
|
134
|
-
), { data:
|
|
146
|
+
), { data: s, loading: d } = T(
|
|
135
147
|
() => j({
|
|
136
148
|
departmentLimit: [],
|
|
137
149
|
hasDeptDock: a === 1
|
|
@@ -141,16 +153,16 @@ const Q = (t) => {
|
|
|
141
153
|
refreshDeps: [a]
|
|
142
154
|
}
|
|
143
155
|
), b = G(() => {
|
|
144
|
-
const l =
|
|
156
|
+
const l = s?.departments || [];
|
|
145
157
|
return l.length > 0 ? B(l) : [];
|
|
146
|
-
}, [
|
|
147
|
-
const l =
|
|
158
|
+
}, [s]), i = G(() => {
|
|
159
|
+
const l = s?.label_corp_list || [];
|
|
148
160
|
if (!l.length)
|
|
149
161
|
return [];
|
|
150
162
|
const y = l.filter((h) => h.type === "dockcorp" || h.type === "dockdept" ? !0 : h.parentId === 0 ? !1 : l.some((z) => z.parentId === h.departmentId)), I = y.map((h) => ({
|
|
151
163
|
...h,
|
|
152
164
|
checkable: h.type !== "dockcorpdept" && h.type !== "label",
|
|
153
|
-
icon: /* @__PURE__ */ e(H, { type: h.type })
|
|
165
|
+
icon: /* @__PURE__ */ e(H, { type: h.type, size: 16 })
|
|
154
166
|
}));
|
|
155
167
|
return y.length > 0 ? U(I, {
|
|
156
168
|
parentId: "parentId",
|
|
@@ -158,12 +170,12 @@ const Q = (t) => {
|
|
|
158
170
|
value: "_id",
|
|
159
171
|
title: "name"
|
|
160
172
|
}) : [];
|
|
161
|
-
}, [
|
|
173
|
+
}, [s]), x = {
|
|
162
174
|
0: b,
|
|
163
|
-
1:
|
|
175
|
+
1: i
|
|
164
176
|
}, _ = M(
|
|
165
177
|
(l) => {
|
|
166
|
-
const y = a === 1 ?
|
|
178
|
+
const y = a === 1 ? s?.label_corp_list : s?.departments;
|
|
167
179
|
if (!y)
|
|
168
180
|
return;
|
|
169
181
|
const I = y.find((h) => h._id === l);
|
|
@@ -174,7 +186,7 @@ const Q = (t) => {
|
|
|
174
186
|
}
|
|
175
187
|
});
|
|
176
188
|
},
|
|
177
|
-
[r,
|
|
189
|
+
[r, s, a]
|
|
178
190
|
), n = M(
|
|
179
191
|
(l, y) => {
|
|
180
192
|
r({
|
|
@@ -194,7 +206,7 @@ const Q = (t) => {
|
|
|
194
206
|
type: "deleteOne",
|
|
195
207
|
payload: y._id
|
|
196
208
|
});
|
|
197
|
-
}, m = E.DEPARMENT === t ? _ : n, c =
|
|
209
|
+
}, m = E.DEPARMENT === t ? _ : n, c = s?.label_corp_count || 0;
|
|
198
210
|
return /* @__PURE__ */ g("div", { className: "flex line-height-normal h-full", children: [
|
|
199
211
|
c > 0 && /* @__PURE__ */ e("aside", { className: "basis-[200px] p-1 shrink-0", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children: o.filter((l) => l.visible).map((l) => /* @__PURE__ */ e(
|
|
200
212
|
"li",
|
|
@@ -238,7 +250,7 @@ const Q = (t) => {
|
|
|
238
250
|
)
|
|
239
251
|
] });
|
|
240
252
|
}, F = (t) => {
|
|
241
|
-
const { list: r } = t, { value: p, type: o, dispatch: a } = N(), f = o === E.DEPARMENT,
|
|
253
|
+
const { list: r } = t, { value: p, type: o, dispatch: a } = N(), f = o === E.DEPARMENT, s = o === E.DEPARMENT_GROUP, d = p?.[0]?._id, b = (n) => {
|
|
242
254
|
const u = r?.find((m) => m._id === n.target.value);
|
|
243
255
|
u && a({
|
|
244
256
|
type: "insertOnly",
|
|
@@ -246,7 +258,7 @@ const Q = (t) => {
|
|
|
246
258
|
type: t.type || u.type
|
|
247
259
|
})
|
|
248
260
|
});
|
|
249
|
-
},
|
|
261
|
+
}, i = (n) => {
|
|
250
262
|
a({
|
|
251
263
|
type: "deleteOne",
|
|
252
264
|
payload: n
|
|
@@ -276,7 +288,7 @@ const Q = (t) => {
|
|
|
276
288
|
value: n._id,
|
|
277
289
|
className: "px-[10px] py-[6px]",
|
|
278
290
|
onClick: () => {
|
|
279
|
-
|
|
291
|
+
i(n._id);
|
|
280
292
|
},
|
|
281
293
|
children: /* @__PURE__ */ e("div", { className: "flex gap-[6px] items-center", children: /* @__PURE__ */ e("span", { className: "text-sm select-none", children: n.name }) })
|
|
282
294
|
}
|
|
@@ -284,13 +296,13 @@ const Q = (t) => {
|
|
|
284
296
|
},
|
|
285
297
|
n._id
|
|
286
298
|
)) }),
|
|
287
|
-
|
|
299
|
+
s && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(O.Group, { value: x, onChange: _, children: r.map((n) => /* @__PURE__ */ e(
|
|
288
300
|
"li",
|
|
289
301
|
{
|
|
290
302
|
className: v("rounded-[4px] cursor-pointer font-0 px-[10px]", {
|
|
291
303
|
"hover:bg-[#f3f3f3]": !0
|
|
292
304
|
}),
|
|
293
|
-
children: /* @__PURE__ */ e(O, { labelPosition: "left", value: n._id, children: /* @__PURE__ */ e("div", { className: "flex flex-1 gap-[6px] items-center py-[
|
|
305
|
+
children: /* @__PURE__ */ e(O, { labelPosition: "left", value: n._id, children: /* @__PURE__ */ e("div", { className: "flex flex-1 gap-[6px] items-center py-[7px]", children: /* @__PURE__ */ e("span", { className: "text-sm select-none", children: n.name }) }) })
|
|
294
306
|
},
|
|
295
307
|
n._id
|
|
296
308
|
)) }) })
|
|
@@ -309,25 +321,25 @@ const Q = (t) => {
|
|
|
309
321
|
const { containerHeight: t } = N(), { t: r } = k(), [p] = D([
|
|
310
322
|
{ key: "default", label: r("externalContact.defaultGroup") },
|
|
311
323
|
{ key: "custom", label: r("externalContact.customGroup") }
|
|
312
|
-
]), [o, a] = D("default"), { data: f, loading:
|
|
324
|
+
]), [o, a] = D("default"), { data: f, loading: s } = T(() => J()), d = f?.list || [], b = o === "default" ? d.filter((i) => i.type === "1") : d.filter((i) => i.type !== "1");
|
|
313
325
|
return /* @__PURE__ */ g("div", { className: "external-contact-entity relative flex", children: [
|
|
314
|
-
/* @__PURE__ */ e("aside", { className: "basis-[192px] p-1", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children: p.map((
|
|
326
|
+
/* @__PURE__ */ e("aside", { className: "basis-[192px] p-1", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children: p.map((i) => /* @__PURE__ */ e(
|
|
315
327
|
"li",
|
|
316
328
|
{
|
|
317
329
|
onClick: () => {
|
|
318
|
-
a(
|
|
330
|
+
a(i.key);
|
|
319
331
|
},
|
|
320
332
|
className: v("px-[10px] py-[7px] rounded cursor-pointer text-sm", {
|
|
321
|
-
"bg-[#F0F6FF] text-[#0265ff]": o ===
|
|
322
|
-
"text-black hover:bg-[#f3f3f3]": o !==
|
|
333
|
+
"bg-[#F0F6FF] text-[#0265ff]": o === i.key,
|
|
334
|
+
"text-black hover:bg-[#f3f3f3]": o !== i.key
|
|
323
335
|
}),
|
|
324
|
-
children:
|
|
336
|
+
children: i.label
|
|
325
337
|
},
|
|
326
|
-
|
|
338
|
+
i.key
|
|
327
339
|
)) }) }),
|
|
328
|
-
/* @__PURE__ */ e("div", { className: "flex-1 border-l border-[#E0E0E0]", children: /* @__PURE__ */ e(A, { spinning:
|
|
340
|
+
/* @__PURE__ */ e("div", { className: "flex-1 border-l border-[#E0E0E0]", children: /* @__PURE__ */ e(A, { spinning: s, tip: r("common.loading"), children: /* @__PURE__ */ g(S, { style: { height: t - 8, padding: "4px" }, children: [
|
|
329
341
|
b.length > 0 && /* @__PURE__ */ e(F, { list: b, type: "group" }),
|
|
330
|
-
b.length === 0 && !
|
|
342
|
+
b.length === 0 && !s && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: r("externalContact.noAvailableGroup") }) })
|
|
331
343
|
] }) }) })
|
|
332
344
|
] });
|
|
333
345
|
}, oe = () => {
|