@baishuyun/ui-business 2.0.0 → 2.0.3
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 +8 -5
- package/dist/DeptsMember/DeptsMember-BSh1OsSC.js +692 -0
- package/dist/DeptsMember/TabGroup-LsBzSRvu.js +137 -0
- package/dist/DeptsMember/index.js +2 -2
- package/dist/DeptsMember/subcomponents/Entity/Department/index.js +25 -33
- package/dist/DeptsMember/subcomponents/Entity/Member/index.js +201 -184
- package/dist/DeptsMember/utils/index.js +37 -35
- package/dist/components/DeptsMember/DeptsMember.type.d.ts +9 -3
- package/dist/components/DeptsMember/hooks/useDeptsMemberSelector.d.ts +1 -1
- package/dist/components/DeptsMember/index.d.ts +1 -1
- package/dist/components/DeptsMember/subcomponents/Entity/Member/MemberEntity/AllMemeberCheck/AllMemeberCheck.d.ts +2 -0
- package/dist/components/DeptsMember/subcomponents/SelectionArea/PreviewSelectedItems/PreviewSelectedItems.d.ts +13 -0
- package/dist/components/DeptsMember/utils/constants.d.ts +6 -6
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/lang/en-US.json.d.ts +56 -55
- package/dist/lang/zh-CN.json.d.ts +56 -55
- package/dist/vendors/lodash-es.js +89 -84
- package/dist/vite-env.d.ts +1 -6
- package/package.json +6 -2
- package/dist/DeptsMember/DeptsMember-C54jKU8C.js +0 -685
- package/dist/DeptsMember/TabGroup-B_2npRbC.js +0 -121
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { createContext as h, useContext as x, useMemo as p, useCallback as E, forwardRef as v, useRef as A, useState as D, useEffect as N } from "react";
|
|
2
|
-
import { n as b } from "../vendors/lodash-es.js";
|
|
3
|
-
import { jsx as r, jsxs as G } from "react/jsx-runtime";
|
|
4
|
-
import { Icon as s } from "bsy-react-ui";
|
|
5
|
-
import { C as R } from "../ConfigProvider/configContext-lDqg07Z3.js";
|
|
6
|
-
import { c as S } from "../vendors/clsx.js";
|
|
7
|
-
var f = /* @__PURE__ */ ((e) => (e[e.USER = 0] = "USER", e[e.USER_GROUP = 1] = "USER_GROUP", e[e.DEPARMENT = 2] = "DEPARMENT", e[e.DEPARMENT_GROUP = 3] = "DEPARMENT_GROUP", e))(f || {});
|
|
8
|
-
const te = 110, ae = 68, ne = 30, re = 8, oe = 90, M = h({
|
|
9
|
-
dispatch: b,
|
|
10
|
-
setValue: b,
|
|
11
|
-
type: f.DEPARMENT,
|
|
12
|
-
containerHeight: 0
|
|
13
|
-
}), le = () => x(M), ce = ({ type: e }) => {
|
|
14
|
-
switch (e) {
|
|
15
|
-
case "label":
|
|
16
|
-
return /* @__PURE__ */ r(s, { name: "Enterpriselabel", className: "text-[#0265ff] text-lg" });
|
|
17
|
-
case "dockcorp":
|
|
18
|
-
case "dockcorpdept":
|
|
19
|
-
return /* @__PURE__ */ r(s, { name: "company", className: "text-[#0265ff] text-lg" });
|
|
20
|
-
case "dockdept":
|
|
21
|
-
case "member":
|
|
22
|
-
return /* @__PURE__ */ r(s, { name: "dept-one", className: "text-[#0265ff] text-lg" });
|
|
23
|
-
case "group":
|
|
24
|
-
return /* @__PURE__ */ r(s, { name: "Outreach", className: "text-[#70c911] text-lg" });
|
|
25
|
-
default:
|
|
26
|
-
return /* @__PURE__ */ r(s, { name: "dept-one", className: "text-[#0265ff] text-lg" });
|
|
27
|
-
}
|
|
28
|
-
}, I = { loading: "加载中...", cancel: "取消", confirm: "确认", clearAll: "清空所选项", viewAll: "查看全部{count}个", selected: "已选 {selected}/{total}", collapseAll: "收起全部", noAvailable: "没有可选成员" }, U = { title: "部门", search: "搜索部门", noAvailable: "没有可选部门", contact: "对接部门", organizationalStructure: "组织架构", currentUserDepartment: "当前用户所处部门", internal: "内部组织", external: "外部组织", externalContactGroup: "对接人小组", externalContactDepartment: "对接部门" }, P = { title: "成员", search: "搜索成员", contact: "对接人", all: "全部成员", internal: "内部成员", external: "外部成员", noAvailable: "没有可选成员" }, T = { title: "角色", internal: "内部角色", external: "互联角色" }, k = { title: "职位" }, O = { title: "当前用户" }, $ = { title: "外部联系人", defaultGroup: "默认分组", customGroup: "自定义分组", group: "外部联系人分组", noAvailableGroup: "没有可选分组" }, w = { searchMember: "搜索成员", searchDepartment: "搜索部门" }, d = {
|
|
29
|
-
common: I,
|
|
30
|
-
department: U,
|
|
31
|
-
member: P,
|
|
32
|
-
role: T,
|
|
33
|
-
position: k,
|
|
34
|
-
currentUser: O,
|
|
35
|
-
externalContact: $,
|
|
36
|
-
tabs: w
|
|
37
|
-
}, H = { loading: "Loading...", cancel: "Cancel", confirm: "Confirm", clearAll: "Clear All", viewAll: "View All {count}", selected: "Selected {selected}/{total}", collapseAll: "Collapse All", noAvailable: "No available members" }, L = { title: "Department", search: "Search Department", noAvailable: "No available departments", contact: "Contact Department", organizationalStructure: "Organizational Structure", currentUserDepartment: "Current User Department", internal: "Internal Organization", external: "External Organization", externalContactGroup: "External Contact Group", externalContactDepartment: "External Contact Department" }, z = { title: "Member", search: "Search Member", contact: "Contact Person", all: "All Members", internal: "Internal Members", external: "External Members", noAvailable: "No available members" }, y = { title: "Role", internal: "Internal Role", external: "Interconnected Role" }, B = { title: "Position" }, W = { title: "Current User" }, j = { title: "External Contact", defaultGroup: "Default Group", customGroup: "Custom Group", group: "External Contact Group", noAvailableGroup: "No available groups" }, V = { searchMember: "Search Member", searchDepartment: "Search Department" }, X = {
|
|
38
|
-
common: H,
|
|
39
|
-
department: L,
|
|
40
|
-
member: z,
|
|
41
|
-
role: y,
|
|
42
|
-
position: B,
|
|
43
|
-
currentUser: W,
|
|
44
|
-
externalContact: j,
|
|
45
|
-
tabs: V
|
|
46
|
-
}, q = (e, t, n) => {
|
|
47
|
-
const c = t.split(".");
|
|
48
|
-
let a = e;
|
|
49
|
-
try {
|
|
50
|
-
for (const o of c)
|
|
51
|
-
a = a[o];
|
|
52
|
-
return typeof a == "string" ? n ? a.replace(/\{(\w+)\}/g, (o, i) => n[i] !== void 0 ? String(n[i]) : o) : a : t;
|
|
53
|
-
} catch {
|
|
54
|
-
return t;
|
|
55
|
-
}
|
|
56
|
-
}, se = () => {
|
|
57
|
-
const e = x(R), t = p(() => ({ "zh-CN": d, "en-US": X }), []), n = p(() => t[e.locale] || d, [e.locale, t]);
|
|
58
|
-
return {
|
|
59
|
-
t: E(
|
|
60
|
-
(a, o) => q(n, a, o),
|
|
61
|
-
[n]
|
|
62
|
-
)
|
|
63
|
-
};
|
|
64
|
-
}, F = "_active_nkgxh_15", u = {
|
|
65
|
-
"tabgroup-container": "_tabgroup-container_nkgxh_1",
|
|
66
|
-
"tabgroup-container__tab-item": "_tabgroup-container__tab-item_nkgxh_7",
|
|
67
|
-
active: F,
|
|
68
|
-
"tabgroup-container__indicator": "_tabgroup-container__indicator_nkgxh_18"
|
|
69
|
-
}, ie = v(({ tabs: e, value: t, onChange: n }) => {
|
|
70
|
-
const c = A(null), [a, o] = D({
|
|
71
|
-
width: 0,
|
|
72
|
-
transform: "translateX(0)"
|
|
73
|
-
}), i = (l) => {
|
|
74
|
-
const m = c.current?.querySelector(`[data-key="${l}"]`);
|
|
75
|
-
if (m) {
|
|
76
|
-
const { width: g, left: _ } = m.getBoundingClientRect(), C = m.parentElement?.parentElement?.getBoundingClientRect().left || 0;
|
|
77
|
-
o({
|
|
78
|
-
width: g,
|
|
79
|
-
transform: `translateX(${_ - C}px)`
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
return N(() => {
|
|
84
|
-
i(t);
|
|
85
|
-
}, [t]), /* @__PURE__ */ G("div", { className: u["tabgroup-container"], ref: c, children: [
|
|
86
|
-
/* @__PURE__ */ r(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
className: u["tabgroup-container__indicator"],
|
|
90
|
-
style: {
|
|
91
|
-
width: `${a.width}px`,
|
|
92
|
-
transform: a.transform
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
e.map((l) => /* @__PURE__ */ r(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
className: S(u["tabgroup-container__tab-item"], {
|
|
100
|
-
[u.active]: t === l.value
|
|
101
|
-
}),
|
|
102
|
-
onClick: () => n(l.value),
|
|
103
|
-
children: /* @__PURE__ */ r("span", { "data-key": l.value, children: l.label })
|
|
104
|
-
},
|
|
105
|
-
l.value
|
|
106
|
-
))
|
|
107
|
-
] });
|
|
108
|
-
});
|
|
109
|
-
export {
|
|
110
|
-
M as D,
|
|
111
|
-
f as E,
|
|
112
|
-
re as G,
|
|
113
|
-
ne as M,
|
|
114
|
-
oe as P,
|
|
115
|
-
ae as T,
|
|
116
|
-
se as a,
|
|
117
|
-
te as b,
|
|
118
|
-
ce as c,
|
|
119
|
-
ie as d,
|
|
120
|
-
le as u
|
|
121
|
-
};
|