@baishuyun/ui-business 6.1.1 → 6.2.1
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/BubbleChart/{AutoGridEChart-VA8BTIj4.js → AutoGridEChart-C8txdGdG.js} +17 -17
- package/dist/BubbleChart/{BubbleChart-CGLJJHYy.js → BubbleChart-rOdQW7mB.js} +54 -16
- package/dist/BubbleChart/index.js +2 -2
- package/dist/DeptsMemberSelector/{CorpDeptTree-Bd9vQiyE.js → CorpDeptTree-B4EEUTqQ.js} +1 -1
- package/dist/DeptsMemberSelector/{CorpFlatList-AoU46OJa.js → CorpFlatList-Cn8-KRFi.js} +2 -2
- package/dist/DeptsMemberSelector/CorpLabelTree-iQ_7Ux_J.js +212 -0
- package/dist/DeptsMemberSelector/{Department-Buo6RYwS.js → Department-DXD3xoiS.js} +4 -4
- package/dist/DeptsMemberSelector/DeptsMemberSelector-DXpd9aCn.js +1935 -0
- package/dist/DeptsMemberSelector/{DeptsUser-0XtIImLw.js → DeptsUser-DO-SQexg.js} +146 -126
- package/dist/DeptsMemberSelector/{EnterpriseLabelList-Dik3GxJY.js → EnterpriseLabelList-BtB8AjXO.js} +2 -2
- package/dist/DeptsMemberSelector/{Member-B0yVNXTb.js → Member-BrNFIHZy.js} +22 -22
- package/dist/DeptsMemberSelector/OrganizationPanel-hray3UWA.js +671 -0
- package/dist/DeptsMemberSelector/{RelationShipList-CpNKR298.js → RelationShipList-DcgaMOyr.js} +1 -1
- package/dist/DeptsMemberSelector/{TagIcon-CgEG5XAx.js → TagIcon-CYklI9Ar.js} +40 -40
- package/dist/DeptsMemberSelector/{filterLabelCorpFlatNodes-COzZgZE5.js → filterLabelCorpFlatNodes-BrRZqDkm.js} +1 -1
- package/dist/DeptsMemberSelector/index.js +15 -15
- package/dist/DeptsMemberSelector/services/contact/{selector.service-dmS_qeZo.js → selector.service-CQopqiTw.js} +3 -1
- package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +6 -6
- package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +12 -12
- package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +5 -5
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptTree/index.js +2 -2
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpFlatList/index.js +3 -3
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpLabelTree/index.js +5 -5
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/EnterpriseLabelList/index.js +3 -3
- package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +2 -2
- package/dist/DeptsMemberSelector/{useDeptsMemberSelector-CiImbq5E.js → useDeptsMemberSelector-B6XZHqd5.js} +2 -3
- package/dist/DeptsMemberSelector/useFilteredMemberList-BE7jRCME.js +807 -0
- package/dist/DeptsMemberSelector/{useTreeExpandedKeys-BlOuNYZ2.js → useTreeExpandedKeys-oLUTUYkP.js} +13 -13
- package/dist/Scatterplot/{Scatterplot-R66_f3TZ.js → Scatterplot-NVg5vMAZ.js} +57 -15
- package/dist/Scatterplot/index.js +2 -2
- package/dist/components/BubbleChart/AutoGridEChart.d.ts +1 -0
- package/dist/components/BubbleChart/BubbleChart.type.d.ts +1 -0
- package/dist/components/DeptsMemberSelector/context/DeptsMemberContext.d.ts +3 -5
- package/dist/components/DeptsMemberSelector/hooks/useDeptsMemberSelector.d.ts +1 -2
- package/dist/components/DeptsMemberSelector/hooks/useFilteredMemberList.d.ts +2 -2
- package/dist/components/DeptsMemberSelector/subcomponents/Entity/DeptsUser/DeptUsersSearch/DeptUsersSearch.d.ts +5 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Entity/DeptsUser/DeptUsersSearch/useDeptUsersSearchData.d.ts +19 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/alignDockCorpSelectedKeys.d.ts +27 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/buildCorpLabelTreeData.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/useCorpLabelTreePanelData.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/useDeptUsersRolePanelData.d.ts +1 -15
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberPanel/useMemberPagedList.d.ts +40 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberPanel/useMemberPanelData.d.ts +88 -3
- package/dist/components/DeptsMemberSelector/types/selector.d.ts +5 -6
- package/dist/components/DeptsMemberSelector/utils/deptUsersCorpDeptSearchGroup.d.ts +3 -16
- package/dist/components/DeptsMemberSelector/utils/deptUsersCorpSearchGroup.d.ts +9 -18
- package/dist/components/DeptsMemberSelector/utils/deptUsersDockCacheKeys.d.ts +13 -1
- package/dist/components/DeptsMemberSelector/utils/deptUsersEnterpriseLabelSearchGroup.d.ts +3 -15
- package/dist/components/DeptsMemberSelector/utils/deptUsersOrgDepartmentsData.d.ts +30 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersOrganizationSearchGroup.d.ts +25 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersRelationSearchGroup.d.ts +4 -16
- package/dist/components/DeptsMemberSelector/utils/deptUsersRoleModel.d.ts +43 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersRoleSearchGroup.d.ts +24 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersSearchDimensions.d.ts +30 -0
- package/dist/components/DeptsMemberSelector/utils/entityItemType.d.ts +5 -2
- package/dist/components/DeptsMemberSelector/utils/flattenDockUserList.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/utils/flowCreator.d.ts +12 -3
- package/dist/components/DeptsMemberSelector/utils/resolveDeptUsersExternalMembers.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/utils/resolveDeptUsersOrganizationEntryVisibility.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/utils/resolveDockCorpId.d.ts +15 -0
- package/dist/components/DeptsMemberSelector/utils/useDeptUsersOrgDepartmentsPrefetch.d.ts +16 -0
- package/dist/components/Scatterplot/Scatterplot.type.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +18 -18
- package/dist/lang/en-US.json.d.ts +2 -1
- package/dist/lang/zh-CN.json.d.ts +2 -1
- package/dist/lang/zh-TW.json.d.ts +2 -1
- package/dist/vendors/useLocale.js +12 -3
- package/package.json +3 -3
- package/dist/DeptsMemberSelector/CorpLabelTree-CNPD4B-g.js +0 -105
- package/dist/DeptsMemberSelector/DeptsMemberSelector-DxrheJ9Y.js +0 -1757
- package/dist/DeptsMemberSelector/OrganizationPanel-Bcgs46Oo.js +0 -604
- package/dist/DeptsMemberSelector/memberStatus-C9tTnu8V.js +0 -717
- package/dist/components/DeptsMemberSelector/utils/deptUsersSearchVisibility.d.ts +0 -36
package/dist/DeptsMemberSelector/{useTreeExpandedKeys-BlOuNYZ2.js → useTreeExpandedKeys-oLUTUYkP.js}
RENAMED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { n as e } from "../vendors/lodash-es.js";
|
|
2
2
|
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
-
//#region src/components/DeptsMemberSelector/utils/
|
|
4
|
-
var i = (e, t) => {
|
|
3
|
+
//#region src/components/DeptsMemberSelector/utils/deptUsersDockCacheKeys.ts
|
|
4
|
+
var i = "deptUsersCorps", a = "deptUsersCorpLabelTree", o = "deptUsersCorpDeptTree", s = "deptUsersRelations", c = "deptUsersRoleLeaves", l = "deptUsersOrgInternal", u = "deptUsersOrgExternal", d = (e, t, n = !0) => `${e}:${t?.appId ?? ""}:${t?.entryId ?? ""}:${!!n}`, f = (e, t) => {
|
|
5
5
|
if (t === "none" || e.length === 0) return [];
|
|
6
6
|
if (t === "single-root-only") {
|
|
7
7
|
let t = e[0]._id;
|
|
8
8
|
return e.length === 1 && t != null ? [t] : [];
|
|
9
9
|
}
|
|
10
10
|
return e.map((e) => e._id).filter((e) => e != null);
|
|
11
|
-
},
|
|
11
|
+
}, p = (e, t, n = []) => {
|
|
12
12
|
for (let r of e) {
|
|
13
13
|
if (r._id === void 0 || r._id === null) continue;
|
|
14
14
|
let e = [...n, r._id];
|
|
15
15
|
if (r._id === t) return e;
|
|
16
16
|
if (r.children?.length) {
|
|
17
|
-
let n =
|
|
17
|
+
let n = p(r.children, t, e);
|
|
18
18
|
if (n) return n;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
|
-
},
|
|
22
|
+
}, m = (t, n = []) => {
|
|
23
23
|
let r = [];
|
|
24
24
|
return n.forEach((e) => {
|
|
25
|
-
let n =
|
|
25
|
+
let n = p(t, e);
|
|
26
26
|
n && r.push(...n.slice(0, -1));
|
|
27
27
|
}), e(r);
|
|
28
|
-
},
|
|
29
|
-
let r =
|
|
30
|
-
return e([...r, ...
|
|
31
|
-
},
|
|
28
|
+
}, h = (t, n) => {
|
|
29
|
+
let r = f(t, n.baselineMode), i = n.selectionExpandKeys ?? [];
|
|
30
|
+
return e([...r, ...i]);
|
|
31
|
+
}, g = (e, t) => {
|
|
32
32
|
if (e.length !== t.length) return !1;
|
|
33
33
|
let n = new Set(t.map(String));
|
|
34
34
|
return e.every((e) => n.has(String(e)));
|
|
35
|
-
},
|
|
35
|
+
}, _ = (e) => {
|
|
36
36
|
let [i, a] = r(null), o = n(e);
|
|
37
37
|
return t(() => {
|
|
38
|
-
|
|
38
|
+
g(e, o.current) || (o.current = e, a(null));
|
|
39
39
|
}, [e]), {
|
|
40
40
|
expandedKeys: i ?? e,
|
|
41
41
|
onExpand: a
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
//#endregion
|
|
45
|
-
export {
|
|
45
|
+
export { i as a, u as c, c as d, d as f, h as i, l, p as n, o, m as r, a as s, _ as t, s as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../BubbleChart/AutoGridEChart-
|
|
1
|
+
import { t as e } from "../BubbleChart/AutoGridEChart-C8txdGdG.js";
|
|
2
2
|
import { forwardRef as t, useImperativeHandle as n, useRef as r } from "react";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
var a = t((t, a) => {
|
|
@@ -17,11 +17,19 @@ var a = t((t, a) => {
|
|
|
17
17
|
min: n,
|
|
18
18
|
avg: Number(r)
|
|
19
19
|
};
|
|
20
|
-
}, l = s(t.dataList), u = c(l.index0), d = c(l.index1), f = t.options.titleColor || "#121111", p = {
|
|
20
|
+
}, l = s(t.dataList), u = c(l.index0), d = c(l.index1), f = t.options.titleColor || "#121111", p = (() => {
|
|
21
|
+
let e = [], n = [];
|
|
22
|
+
return t.options.guideline?.forEach((r) => {
|
|
23
|
+
r.type === "fixed" ? (r.field === t.options.xFields[0].tag && e.push(r.value || 0), (r.field === t.options.yFields[0].tag || r.field === "") && n.push(r.value || 0)) : r.type === "dynamic" && (r.field === t.options.xFields[0].tag && (r.aggregate === "max" ? e.push(u.max) : r.aggregate === "min" ? e.push(u.min) : r.aggregate === "avg" && e.push(u.avg)), r.field === t.options.yFields[0].tag && (r.aggregate === "max" ? n.push(d.max) : r.aggregate === "min" ? n.push(d.min) : r.aggregate === "avg" && n.push(d.avg)));
|
|
24
|
+
}), {
|
|
25
|
+
xValues: e,
|
|
26
|
+
yValues: n
|
|
27
|
+
};
|
|
28
|
+
})(), m = {};
|
|
21
29
|
t.dataList.forEach((e) => {
|
|
22
|
-
|
|
30
|
+
m[e.name] = !0;
|
|
23
31
|
});
|
|
24
|
-
let
|
|
32
|
+
let h = {
|
|
25
33
|
xAxis: {
|
|
26
34
|
axisLabel: {
|
|
27
35
|
color: f,
|
|
@@ -30,8 +38,8 @@ var a = t((t, a) => {
|
|
|
30
38
|
hideOverlap: !t.options.xAxis?.label?.step,
|
|
31
39
|
rotate: t.options.xAxis?.label?.rotation?.toString() || "45"
|
|
32
40
|
},
|
|
33
|
-
min: t.options.xAxis?.min
|
|
34
|
-
max: t.options.xAxis?.max
|
|
41
|
+
min: t.options.xAxis?.min === void 0 ? p.xValues.length > 0 ? Math.min(u.min, ...p.xValues) : void 0 : t.options.xAxis.min,
|
|
42
|
+
max: t.options.xAxis?.max === void 0 ? p.xValues.length > 0 ? Math.max(u.max, ...p.xValues) : void 0 : t.options.xAxis.max,
|
|
35
43
|
title: t.options.xAxis?.title?.text || "",
|
|
36
44
|
position: t.options.xAxis?.position,
|
|
37
45
|
axisLine: {
|
|
@@ -55,8 +63,8 @@ var a = t((t, a) => {
|
|
|
55
63
|
hideOverlap: !t.options.yAxis?.label?.step,
|
|
56
64
|
rotate: t.options.yAxis?.label?.rotation?.toString() || "45"
|
|
57
65
|
},
|
|
58
|
-
min: t.options.yAxis?.min
|
|
59
|
-
max: t.options.yAxis?.max
|
|
66
|
+
min: t.options.yAxis?.min === void 0 ? p.yValues.length > 0 ? Math.min(d.min, ...p.yValues) : void 0 : t.options.yAxis.min,
|
|
67
|
+
max: t.options.yAxis?.max === void 0 ? p.yValues.length > 0 ? Math.max(d.max, ...p.yValues) : void 0 : t.options.yAxis.max,
|
|
60
68
|
title: t.options.yAxis?.title?.text,
|
|
61
69
|
position: t.options.yAxis?.position,
|
|
62
70
|
axisLine: {
|
|
@@ -74,6 +82,7 @@ var a = t((t, a) => {
|
|
|
74
82
|
},
|
|
75
83
|
tooltip: {
|
|
76
84
|
trigger: "item",
|
|
85
|
+
width: 240,
|
|
77
86
|
axisPointer: { type: "shadow" },
|
|
78
87
|
textStyle: {
|
|
79
88
|
fontSize: 14,
|
|
@@ -85,9 +94,19 @@ var a = t((t, a) => {
|
|
|
85
94
|
padding: 10,
|
|
86
95
|
borderRadius: 4,
|
|
87
96
|
formatter: (e) => {
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
console.info(3434, e);
|
|
98
|
+
let n = `<div style="max-width: 240px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${e.seriesName}</div>`;
|
|
99
|
+
return n += `<div style="display: flex;align-items: center;margin-top:10px;">
|
|
100
|
+
<span style="background-color: ${e.color};width: 6px;height: 6px;display: inline-block;border-radius: 50%;margin-right: 6px;"></span>
|
|
101
|
+
<span style="max-width: 200px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${t.options.xFields[0].title}</span>
|
|
102
|
+
<span style='margin-left: 8px;'>${e.value[0]}</span>
|
|
103
|
+
</div>`, n += `<div style="display: flex;align-items: center;">
|
|
104
|
+
<span style="background-color: ${e.color};width: 6px;height: 6px;display: inline-block;border-radius: 50%;margin-right: 6px;"></span>
|
|
105
|
+
<span style="max-width: 200px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${t.options.yFields[0].title}</span>
|
|
106
|
+
<span style='margin-left: 8px;>${e.value[1]}</span></div>`, e.componentType === "series" ? n : "";
|
|
90
107
|
},
|
|
108
|
+
shadowBlur: 20,
|
|
109
|
+
shadowColor: "#00000014",
|
|
91
110
|
triggerOn: "mousemove",
|
|
92
111
|
showDelay: 0,
|
|
93
112
|
hideDelay: 100,
|
|
@@ -95,7 +114,7 @@ var a = t((t, a) => {
|
|
|
95
114
|
},
|
|
96
115
|
legend: {
|
|
97
116
|
show: !1,
|
|
98
|
-
selected:
|
|
117
|
+
selected: m
|
|
99
118
|
},
|
|
100
119
|
graphic: t.options.guideline?.map((e) => ({
|
|
101
120
|
type: "line",
|
|
@@ -139,14 +158,36 @@ var a = t((t, a) => {
|
|
|
139
158
|
color: e.color
|
|
140
159
|
}
|
|
141
160
|
};
|
|
142
|
-
|
|
143
|
-
|
|
161
|
+
if (e.type === "fixed") {
|
|
162
|
+
if (e.field === t.options.xFields[0].tag) {
|
|
163
|
+
let r = e.value || 0, i = t.options.xAxis?.min, a = t.options.xAxis?.max;
|
|
164
|
+
i !== void 0 && r < i ? n.xAxis = i : a !== void 0 && r > a ? n.xAxis = a : n.xAxis = r;
|
|
165
|
+
}
|
|
166
|
+
if (e.field === t.options.yFields[0].tag || e.field === "") {
|
|
167
|
+
let r = e.value || 0, i = t.options.yAxis?.min, a = t.options.yAxis?.max;
|
|
168
|
+
i !== void 0 && r < i ? n.yAxis = i : a !== void 0 && r > a ? n.yAxis = a : n.yAxis = r;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (e.type === "dynamic") {
|
|
172
|
+
if (e.field === t.options.xFields[0].tag) {
|
|
173
|
+
let r = t.options.xAxis?.min, i = t.options.xAxis?.max, a = u.avg;
|
|
174
|
+
e.aggregate === "max" ? a = u.max : e.aggregate === "min" && (a = u.min), r !== void 0 && a < r ? n.xAxis = r : i !== void 0 && a > i ? n.xAxis = i : n.xAxis = a;
|
|
175
|
+
}
|
|
176
|
+
if (e.field === t.options.yFields[0].tag) {
|
|
177
|
+
let r = t.options.yAxis?.min, i = t.options.yAxis?.max, a = d.avg;
|
|
178
|
+
e.aggregate === "max" ? a = d.max : e.aggregate === "min" && (a = d.min), r !== void 0 && a < r ? n.yAxis = r : i !== void 0 && a > i ? n.yAxis = i : n.yAxis = a;
|
|
179
|
+
}
|
|
180
|
+
n.type = e.aggregate;
|
|
181
|
+
}
|
|
182
|
+
return console.info(2323, n), n;
|
|
183
|
+
}),
|
|
184
|
+
emphasis: { disabled: !0 }
|
|
144
185
|
},
|
|
145
186
|
color: t.options.xFields[0]?.colors?.[n]?.color || "#666",
|
|
146
187
|
label: {
|
|
147
188
|
show: t.options.chart_label.enable,
|
|
148
189
|
position: "top",
|
|
149
|
-
distance:
|
|
190
|
+
distance: 0,
|
|
150
191
|
formatter: () => `${t.options.chart_label.dimension?.enable ? e.name : ""} ${t.options.chart_label.value?.enable ? "(" + e.data[0] + "," + e.data[1] + ")" : ""}`,
|
|
151
192
|
textStyle: {
|
|
152
193
|
fontSize: 11,
|
|
@@ -163,8 +204,9 @@ var a = t((t, a) => {
|
|
|
163
204
|
o.current.resizeEchart();
|
|
164
205
|
} })), /* @__PURE__ */ i(e, {
|
|
165
206
|
ref: o,
|
|
166
|
-
option:
|
|
207
|
+
option: h,
|
|
167
208
|
options: t.options,
|
|
209
|
+
legendList: t.legendList,
|
|
168
210
|
dataList: t.dataList,
|
|
169
211
|
onChartReady: t.onChartReady,
|
|
170
212
|
onChartClick: t.onChartClick
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../vendors/echarts.js";
|
|
2
|
-
import "../BubbleChart/AutoGridEChart-
|
|
3
|
-
import { t as e } from "./Scatterplot-
|
|
2
|
+
import "../BubbleChart/AutoGridEChart-C8txdGdG.js";
|
|
3
|
+
import { t as e } from "./Scatterplot-NVg5vMAZ.js";
|
|
4
4
|
//#region src/components/Scatterplot/index.ts
|
|
5
5
|
var t = e;
|
|
6
6
|
//#endregion
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SetStateAction } from 'react';
|
|
2
1
|
import { Action } from '../types/context';
|
|
3
2
|
import { CurrentContext, DepartmentSelectableRange, DepartmentPanelRequestGuard, DeptUsersPanelConfig, FlowCreator, MemberPanelRequestGuard, MemberPanelVisibility, RequestContext, SelectorLimits, SelectorType } from '../types/selector';
|
|
4
3
|
declare const DeptsMemberContext: import('react').Context<{
|
|
@@ -8,7 +7,6 @@ declare const DeptsMemberContext: import('react').Context<{
|
|
|
8
7
|
* @description 无论单选还是多选,value 都统一按数组存储,避免面板层再分叉处理状态结构
|
|
9
8
|
*/
|
|
10
9
|
value?: any[];
|
|
11
|
-
setValue: (v: SetStateAction<any[]>, ...args: any[]) => void;
|
|
12
10
|
dispatch: (action: Action) => void;
|
|
13
11
|
containerHeight: number;
|
|
14
12
|
currentUsers?: Record<string, unknown>[];
|
|
@@ -40,9 +38,9 @@ declare const DeptsMemberContext: import('react').Context<{
|
|
|
40
38
|
*/
|
|
41
39
|
isSingleSelect?: boolean;
|
|
42
40
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* 成员黑名单 id Set。仅 type === 'deptusers' 时由主组件从 props.excludedMemberIds 派生;
|
|
42
|
+
* 其它 type 或未传时为空 Set。命中 `_id` / `id` / `dock_userid` 的成员不展示。
|
|
45
43
|
*/
|
|
46
|
-
|
|
44
|
+
excludedMemberIdSet?: ReadonlySet<string>;
|
|
47
45
|
}>;
|
|
48
46
|
export default DeptsMemberContext;
|
|
@@ -3,7 +3,6 @@ export declare const useDeptsMemberSelector: () => {
|
|
|
3
3
|
departmentPanelRequestGuard: import('../types/selector').DepartmentPanelRequestGuard;
|
|
4
4
|
type: import('..').SelectorType;
|
|
5
5
|
value?: any[];
|
|
6
|
-
setValue: (v: import('react').SetStateAction<any[]>, ...args: any[]) => void;
|
|
7
6
|
dispatch: (action: import('../types/context').Action) => void;
|
|
8
7
|
containerHeight: number;
|
|
9
8
|
currentUsers?: Record<string, unknown>[];
|
|
@@ -21,5 +20,5 @@ export declare const useDeptsMemberSelector: () => {
|
|
|
21
20
|
hasDock?: boolean;
|
|
22
21
|
hasDeptDock?: boolean;
|
|
23
22
|
isSingleSelect?: boolean;
|
|
24
|
-
|
|
23
|
+
excludedMemberIdSet?: ReadonlySet<string>;
|
|
25
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* 从 Context 读取 type / currentUsers /
|
|
2
|
+
* 成员列表出口统一过滤:transfer 剔除当前登录用户;excludedMemberIdSet 非空时剔除黑名单成员。
|
|
3
|
+
* 从 Context 读取 type / currentUsers / excludedMemberIdSet 并 memo 化结果。仅用于渲染期调用点;
|
|
4
4
|
* useRequest 异步回调内请直接使用 filterMemberListCandidates。
|
|
5
5
|
*/
|
|
6
6
|
export declare const useFilteredMemberList: <T extends Record<string, unknown>>(list: T[]) => T[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TreeNodeDefine } from '@baishuyun/ui-base/components/Tree';
|
|
2
|
+
/** deptusers 全局搜索唯一宿主数据层:按维度注册表并集挂载 remote/local 搜索。 */
|
|
3
|
+
declare const useDeptUsersSearchData: ({ wd }: {
|
|
4
|
+
wd?: string;
|
|
5
|
+
}) => {
|
|
6
|
+
containerHeight: number;
|
|
7
|
+
treeData: {
|
|
8
|
+
title: string;
|
|
9
|
+
value: string;
|
|
10
|
+
children: any[];
|
|
11
|
+
}[];
|
|
12
|
+
defaultExpandedKeys: string[];
|
|
13
|
+
selectedKeys: any[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
checkType: "radio" | "checkbox";
|
|
16
|
+
handleSelect: (_id: any, node?: TreeNodeDefine) => void;
|
|
17
|
+
handleDeSelect: (targetValue: any) => void;
|
|
18
|
+
};
|
|
19
|
+
export { useDeptUsersSearchData };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CorpLabelTreeNode } from './buildCorpLabelTreeData';
|
|
2
|
+
export declare const resolveDockCorpBareId: (corpId: string | number | null | undefined) => string;
|
|
3
|
+
/** 裸 id → label_corp 树中的 dockcorp 节点(用于勾选对齐与预览补名)。 */
|
|
4
|
+
export declare const indexDockCorpTreeNodesByBare: (treeData?: CorpLabelTreeNode[]) => Map<string, CorpLabelTreeNode>;
|
|
5
|
+
/**
|
|
6
|
+
* 按裸 id 把已选 dockcorp _id 对齐到 label_corp 树节点真实 _id。
|
|
7
|
+
* 解决 corp_id_list 与树节点 _host/_guest 形态不一致导致的不勾选。
|
|
8
|
+
*/
|
|
9
|
+
export declare const alignDockCorpSelectedKeys: (selectedIds: Array<string | number>, treeData?: CorpLabelTreeNode[]) => Array<string | number>;
|
|
10
|
+
type SelectorLikeItem = {
|
|
11
|
+
_id?: string | number;
|
|
12
|
+
id?: string | number;
|
|
13
|
+
type?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
nickname?: string;
|
|
16
|
+
dock_corpname?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 用 label_corp 树回填已选 dockcorp:补 name、对齐 _id;不在树中的项视为已删除/不可用并剔除。
|
|
21
|
+
* 对齐旧版 memberSelect:预览名来自树/corpMap,失效企业不展示(或标 deleted)。
|
|
22
|
+
*/
|
|
23
|
+
export declare const reconcileDockCorpSelectionWithTree: <T extends SelectorLikeItem>(items?: T[], treeData?: CorpLabelTreeNode[]) => {
|
|
24
|
+
nextItems: T[];
|
|
25
|
+
changed: boolean;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { CorpLabelTreeNode } from './buildCorpLabelTreeData';
|
|
|
2
2
|
export declare const useCorpLabelTreePanelData: () => {
|
|
3
3
|
treeData: CorpLabelTreeNode[];
|
|
4
4
|
loading: boolean;
|
|
5
|
-
selectedCorpIds:
|
|
5
|
+
selectedCorpIds: (string | number)[];
|
|
6
6
|
selectionExpandKeys: (string | number)[];
|
|
7
7
|
containerHeight: number;
|
|
8
8
|
isSingleSelect: boolean | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InternalRolePickNode, RoleSourceItem } from '../../../utils/deptUsersRoleModel';
|
|
1
2
|
import { TreeNodeDefine } from '@baishuyun/ui-base/components/Tree';
|
|
2
3
|
type RoleEntryKey = 'internal' | 'external';
|
|
3
4
|
type MenuItem = {
|
|
@@ -15,21 +16,6 @@ type DeptUsersRoleSelectionItem = {
|
|
|
15
16
|
type DeptUsersRoleOptionItem = DeptUsersRoleSelectionItem & {
|
|
16
17
|
label: string;
|
|
17
18
|
};
|
|
18
|
-
type RoleSourceItem = {
|
|
19
|
-
_id: string;
|
|
20
|
-
role_id: string | number;
|
|
21
|
-
name: string;
|
|
22
|
-
type?: string | number;
|
|
23
|
-
parent?: string | number;
|
|
24
|
-
children?: RoleSourceItem[];
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* roleChildEnable:true 用的可勾选树节点:分组 checkable:false(点击仅展开),叶子 checkable:true。
|
|
28
|
-
*/
|
|
29
|
-
type InternalRolePickNode = RoleSourceItem & {
|
|
30
|
-
checkable: boolean;
|
|
31
|
-
children?: InternalRolePickNode[];
|
|
32
|
-
};
|
|
33
19
|
declare const useDeptUsersRolePanelData: () => {
|
|
34
20
|
containerHeight: number;
|
|
35
21
|
menuItems: MenuItem[];
|
package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberPanel/useMemberPagedList.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MemberPanelRequestGuard, SelectorType } from '../../../types/selector';
|
|
2
|
+
export type MemberPagedListParams = {
|
|
3
|
+
/** 与父组件 key 对齐;同实例内变化时走 ahooks reload(测试 harness) */
|
|
4
|
+
memberQueryKey: string;
|
|
5
|
+
type: SelectorType;
|
|
6
|
+
activeKey: string;
|
|
7
|
+
selectKey: string | symbol;
|
|
8
|
+
uniqueAllKey: symbol;
|
|
9
|
+
externalActiveTab: string;
|
|
10
|
+
currentCorpId?: string;
|
|
11
|
+
requestContext: any;
|
|
12
|
+
limits: any;
|
|
13
|
+
memberSearchLimit: any;
|
|
14
|
+
isMemberLimitMode: boolean;
|
|
15
|
+
shouldUsePagedMembers: boolean;
|
|
16
|
+
isInternalDisabled: boolean;
|
|
17
|
+
isDockDisabled: boolean;
|
|
18
|
+
memberPanelRequestGuard: MemberPanelRequestGuard;
|
|
19
|
+
excludedMemberIdSet?: ReadonlySet<string>;
|
|
20
|
+
currentUsers?: any;
|
|
21
|
+
onUsersFirstPage?: (usersLen: number) => void;
|
|
22
|
+
onMemberLimitResult?: (result: {
|
|
23
|
+
users?: any[];
|
|
24
|
+
dock_user_list?: any[];
|
|
25
|
+
mappedRoles?: any[];
|
|
26
|
+
mappedDockRoles?: any[];
|
|
27
|
+
}) => void;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 成员第三栏分页列表。须由父组件用 key={memberQueryKey} 挂载,
|
|
31
|
+
* 以便 Tab/筛选切换时卸载重建,避免 ahooks useInfiniteScroll 跨 query 复用 finalData。
|
|
32
|
+
*/
|
|
33
|
+
declare const useMemberPagedList: (params: MemberPagedListParams) => {
|
|
34
|
+
userList: any[];
|
|
35
|
+
scrollRef: import('react').RefObject<HTMLDivElement>;
|
|
36
|
+
memberLoading: boolean;
|
|
37
|
+
memberLoadingMore: boolean;
|
|
38
|
+
memberData: any;
|
|
39
|
+
};
|
|
40
|
+
export { useMemberPagedList };
|
package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberPanel/useMemberPanelData.d.ts
CHANGED
|
@@ -3,7 +3,11 @@ type MenuItem = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
visible: boolean;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 成员面板壳层:侧栏、部门树、activeKey。
|
|
8
|
+
* 第三栏分页列表由 useMemberPagedList 承担,UI 侧须用 key={memberQueryKey} 挂载以重置 ahooks 状态。
|
|
9
|
+
*/
|
|
10
|
+
declare const useMemberPanelShell: () => {
|
|
7
11
|
containerHeight: number;
|
|
8
12
|
menuItems: MenuItem[];
|
|
9
13
|
activeKey: string;
|
|
@@ -18,12 +22,93 @@ declare const useMemberPanelData: () => {
|
|
|
18
22
|
external: any[];
|
|
19
23
|
};
|
|
20
24
|
currentTreeData: any[];
|
|
25
|
+
loading: boolean;
|
|
26
|
+
showUnavailableOverlay: boolean;
|
|
27
|
+
showTree: boolean;
|
|
28
|
+
memberQueryKey: string;
|
|
29
|
+
pagedListParams: {
|
|
30
|
+
memberQueryKey: string;
|
|
31
|
+
type: import('../../../types/selector').SelectorType;
|
|
32
|
+
activeKey: string;
|
|
33
|
+
selectKey: string | symbol;
|
|
34
|
+
uniqueAllKey: symbol;
|
|
35
|
+
externalActiveTab: string;
|
|
36
|
+
currentCorpId: string | undefined;
|
|
37
|
+
requestContext: import('../../../types/selector').RequestContext;
|
|
38
|
+
limits: import('../../../types/selector').SelectorLimits;
|
|
39
|
+
memberSearchLimit: import('../../../types/selector').MemberSearchLimit | undefined;
|
|
40
|
+
isMemberLimitMode: boolean;
|
|
41
|
+
shouldUsePagedMembers: boolean;
|
|
42
|
+
isInternalDisabled: boolean;
|
|
43
|
+
isDockDisabled: boolean;
|
|
44
|
+
memberPanelRequestGuard: import('../../../types/selector').MemberPanelRequestGuard;
|
|
45
|
+
excludedMemberIdSet: ReadonlySet<string> | undefined;
|
|
46
|
+
currentUsers: Record<string, unknown>[] | undefined;
|
|
47
|
+
onUsersFirstPage: (usersLen: number) => void;
|
|
48
|
+
onMemberLimitResult: (result: {
|
|
49
|
+
users?: any[];
|
|
50
|
+
dock_user_list?: any[];
|
|
51
|
+
mappedRoles?: any[];
|
|
52
|
+
mappedDockRoles?: any[];
|
|
53
|
+
}) => void;
|
|
54
|
+
};
|
|
55
|
+
shouldUsePagedMembers: boolean;
|
|
56
|
+
isMemberLimitMode: boolean;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 测试 / 兼容入口:壳层 + 分页列表同实例组合。
|
|
60
|
+
* 生产 UI 请用 useMemberPanelShell + key={memberQueryKey} 的列表子组件,避免跨 Tab 复用 ahooks finalData。
|
|
61
|
+
*/
|
|
62
|
+
declare const useMemberPanelData: () => {
|
|
21
63
|
userList: any[];
|
|
22
64
|
scrollRef: import('react').RefObject<HTMLDivElement>;
|
|
23
|
-
loading: boolean;
|
|
24
65
|
memberLoading: boolean;
|
|
25
66
|
memberLoadingMore: boolean;
|
|
67
|
+
containerHeight: number;
|
|
68
|
+
menuItems: MenuItem[];
|
|
69
|
+
activeKey: string;
|
|
70
|
+
setActiveKey: (nextKey: string) => void;
|
|
71
|
+
selectKey: string | symbol;
|
|
72
|
+
setSelectKey: import('react').Dispatch<import('react').SetStateAction<string | symbol>>;
|
|
73
|
+
uniqueAllKey: symbol;
|
|
74
|
+
externalActiveTab: string;
|
|
75
|
+
handleExternalActiveTabChange: (tab: string) => void;
|
|
76
|
+
treeData: {
|
|
77
|
+
internal: any[];
|
|
78
|
+
external: any[];
|
|
79
|
+
};
|
|
80
|
+
currentTreeData: any[];
|
|
81
|
+
loading: boolean;
|
|
26
82
|
showUnavailableOverlay: boolean;
|
|
27
83
|
showTree: boolean;
|
|
84
|
+
memberQueryKey: string;
|
|
85
|
+
pagedListParams: {
|
|
86
|
+
memberQueryKey: string;
|
|
87
|
+
type: import('../../../types/selector').SelectorType;
|
|
88
|
+
activeKey: string;
|
|
89
|
+
selectKey: string | symbol;
|
|
90
|
+
uniqueAllKey: symbol;
|
|
91
|
+
externalActiveTab: string;
|
|
92
|
+
currentCorpId: string | undefined;
|
|
93
|
+
requestContext: import('../../../types/selector').RequestContext;
|
|
94
|
+
limits: import('../../../types/selector').SelectorLimits;
|
|
95
|
+
memberSearchLimit: import('../../../types/selector').MemberSearchLimit | undefined;
|
|
96
|
+
isMemberLimitMode: boolean;
|
|
97
|
+
shouldUsePagedMembers: boolean;
|
|
98
|
+
isInternalDisabled: boolean;
|
|
99
|
+
isDockDisabled: boolean;
|
|
100
|
+
memberPanelRequestGuard: import('../../../types/selector').MemberPanelRequestGuard;
|
|
101
|
+
excludedMemberIdSet: ReadonlySet<string> | undefined;
|
|
102
|
+
currentUsers: Record<string, unknown>[] | undefined;
|
|
103
|
+
onUsersFirstPage: (usersLen: number) => void;
|
|
104
|
+
onMemberLimitResult: (result: {
|
|
105
|
+
users?: any[];
|
|
106
|
+
dock_user_list?: any[];
|
|
107
|
+
mappedRoles?: any[];
|
|
108
|
+
mappedDockRoles?: any[];
|
|
109
|
+
}) => void;
|
|
110
|
+
};
|
|
111
|
+
shouldUsePagedMembers: boolean;
|
|
112
|
+
isMemberLimitMode: boolean;
|
|
28
113
|
};
|
|
29
|
-
export { useMemberPanelData };
|
|
114
|
+
export { useMemberPanelData, useMemberPanelShell };
|
|
@@ -212,13 +212,12 @@ type EntitySelectorProps = {
|
|
|
212
212
|
*/
|
|
213
213
|
flowCreator?: FlowCreator;
|
|
214
214
|
/**
|
|
215
|
-
* @description
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* @default false
|
|
215
|
+
* @description 成员黑名单 id 列表。仅 type === 'deptusers' 生效。
|
|
216
|
+
* 列表项的 `_id` / `id` / `dock_userid` 任一命中则不展示。
|
|
217
|
+
* 只过滤成员浏览/搜索列表,不隐藏 Tab,不影响已选回显与部门/职位/角色/企业等非成员实体。
|
|
218
|
+
* @default []
|
|
220
219
|
*/
|
|
221
|
-
|
|
220
|
+
excludedMemberIds?: string[];
|
|
222
221
|
};
|
|
223
222
|
/**
|
|
224
223
|
* @description transfer 模式流程发起人,由调用方传入的固定结构。
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ENTITY_ITEM_TYPE } from './entityItemType';
|
|
3
3
|
import { RequestContext } from '../types/selector';
|
|
4
|
-
type
|
|
5
|
-
type DepartmentCorpDeptSearchGroup = {
|
|
6
|
-
title: string;
|
|
7
|
-
_id: string;
|
|
8
|
-
children: Array<{
|
|
9
|
-
_id: string | number;
|
|
10
|
-
name: string;
|
|
11
|
-
type: typeof ENTITY_ITEM_TYPE.USER;
|
|
12
|
-
owner_corpid: string;
|
|
13
|
-
title: ReactNode;
|
|
14
|
-
}>;
|
|
15
|
-
};
|
|
16
|
-
type MemberCorpDeptSearchGroup = {
|
|
4
|
+
type CorpDeptSearchGroup = {
|
|
17
5
|
title: string;
|
|
18
6
|
value: string;
|
|
19
7
|
children: Array<{
|
|
@@ -30,15 +18,14 @@ type MemberCorpDeptSearchGroup = {
|
|
|
30
18
|
* 忽略 users,将 dock_user_list 各分组 userList 合并为对接人结果。
|
|
31
19
|
* owner_corpid 取值:API 返回优先,否则回退分组 dockCorpid。
|
|
32
20
|
*/
|
|
33
|
-
declare function useDeptUsersCorpDeptSearchGroup
|
|
21
|
+
declare function useDeptUsersCorpDeptSearchGroup({ enabled, requestContext, hasDock, wd, groupTitle, }: {
|
|
34
22
|
enabled: boolean;
|
|
35
|
-
variant: V;
|
|
36
23
|
requestContext: RequestContext;
|
|
37
24
|
hasDock?: boolean;
|
|
38
25
|
wd?: string;
|
|
39
26
|
groupTitle: string;
|
|
40
27
|
}): {
|
|
41
|
-
searchGroup:
|
|
28
|
+
searchGroup: CorpDeptSearchGroup | null;
|
|
42
29
|
loading: boolean;
|
|
43
30
|
};
|
|
44
31
|
export { useDeptUsersCorpDeptSearchGroup };
|
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ENTITY_ITEM_TYPE } from './entityItemType';
|
|
3
|
-
type
|
|
4
|
-
type CorpSearchTreeChild = {
|
|
5
|
-
_id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type: typeof ENTITY_ITEM_TYPE.DOCKCORP;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
title: ReactNode;
|
|
10
|
-
};
|
|
11
|
-
type DepartmentCorpSearchGroup = {
|
|
12
|
-
title: string;
|
|
13
|
-
_id: string;
|
|
14
|
-
children: CorpSearchTreeChild[];
|
|
15
|
-
};
|
|
16
|
-
type MemberCorpSearchGroup = {
|
|
3
|
+
type CorpSearchGroup = {
|
|
17
4
|
title: string;
|
|
18
5
|
value: string;
|
|
19
|
-
children: Array<
|
|
6
|
+
children: Array<{
|
|
7
|
+
_id: string;
|
|
20
8
|
value: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: typeof ENTITY_ITEM_TYPE.DOCKCORP;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
title: ReactNode;
|
|
21
13
|
}>;
|
|
22
14
|
};
|
|
23
|
-
declare function useDeptUsersCorpSearchGroup
|
|
15
|
+
declare function useDeptUsersCorpSearchGroup({ enabled, wd, groupTitle, }: {
|
|
24
16
|
enabled: boolean;
|
|
25
|
-
variant: V;
|
|
26
17
|
wd?: string;
|
|
27
18
|
groupTitle: string;
|
|
28
19
|
}): {
|
|
29
|
-
searchGroup:
|
|
20
|
+
searchGroup: CorpSearchGroup | null;
|
|
30
21
|
loading: boolean;
|
|
31
22
|
};
|
|
32
23
|
export { useDeptUsersCorpSearchGroup };
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
declare const DEPT_USERS_CORPS_CACHE_KEY = "deptUsersCorps";
|
|
2
2
|
declare const DEPT_USERS_CORP_LABEL_TREE_CACHE_KEY = "deptUsersCorpLabelTree";
|
|
3
3
|
declare const DEPT_USERS_CORP_DEPT_TREE_CACHE_KEY = "deptUsersCorpDeptTree";
|
|
4
|
-
|
|
4
|
+
/** 关系列表本地搜索与面板共用,避免反复全量拉取 */
|
|
5
|
+
declare const DEPT_USERS_RELATIONS_CACHE_KEY = "deptUsersRelations";
|
|
6
|
+
/** 角色叶子列表本地搜索缓存 */
|
|
7
|
+
declare const DEPT_USERS_ROLE_LEAVES_CACHE_KEY = "deptUsersRoleLeaves";
|
|
8
|
+
/** 组织架构内部组织:面板预拉与本地搜索共用 */
|
|
9
|
+
declare const DEPT_USERS_ORG_INTERNAL_CACHE_KEY = "deptUsersOrgInternal";
|
|
10
|
+
/** 组织架构外部组织:面板预拉与本地搜索共用 */
|
|
11
|
+
declare const DEPT_USERS_ORG_EXTERNAL_CACHE_KEY = "deptUsersOrgExternal";
|
|
12
|
+
declare const buildDeptUsersOrgCacheKey: (baseKey: string, requestContext?: {
|
|
13
|
+
appId?: string;
|
|
14
|
+
entryId?: string;
|
|
15
|
+
}, dockEnabled?: boolean) => string;
|
|
16
|
+
export { DEPT_USERS_CORPS_CACHE_KEY, DEPT_USERS_CORP_LABEL_TREE_CACHE_KEY, DEPT_USERS_CORP_DEPT_TREE_CACHE_KEY, DEPT_USERS_RELATIONS_CACHE_KEY, DEPT_USERS_ROLE_LEAVES_CACHE_KEY, DEPT_USERS_ORG_INTERNAL_CACHE_KEY, DEPT_USERS_ORG_EXTERNAL_CACHE_KEY, buildDeptUsersOrgCacheKey, };
|