@baishuyun/ui-business 5.2.2 → 5.2.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.
Files changed (25) hide show
  1. package/README.md +12 -1
  2. package/dist/ConfigProvider/{ConfigProvider-C0c1mKeR.js → ConfigProvider-Cwc-Gz9h.js} +10 -6
  3. package/dist/ConfigProvider/index.js +1 -1
  4. package/dist/DeptsMemberSelector/{Department-D7xrfl-D.js → Department-6R-BZNZ4.js} +3 -3
  5. package/dist/DeptsMemberSelector/{DeptsMemberSelector-u-2aq3Yq.js → DeptsMemberSelector-CC32KXc8.js} +5 -5
  6. package/dist/DeptsMemberSelector/{DeptsUser-Du342aN-.js → DeptsUser-9Lf7ytTr.js} +6 -6
  7. package/dist/DeptsMemberSelector/{Member-Bit-zWOE.js → Member-BY8mtQb0.js} +3 -3
  8. package/dist/DeptsMemberSelector/{MemberPanel-BhuVgJdO.js → MemberPanel-Dw1b2J3V.js} +2 -2
  9. package/dist/DeptsMemberSelector/{OrganizationPanel-BPEqHxNb.js → OrganizationPanel-Di4dqUlZ.js} +2 -2
  10. package/dist/DeptsMemberSelector/{RelationShipDepts-kpemRPz1.js → RelationShipDepts-__eb4oDP.js} +1 -1
  11. package/dist/DeptsMemberSelector/{RelationShipList-BhiAdVjm.js → RelationShipList-CS5uhLos.js} +1 -1
  12. package/dist/DeptsMemberSelector/index.js +9 -9
  13. package/dist/DeptsMemberSelector/services/contact/selector.service-BFwBe9fo.js +346 -0
  14. package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +3 -3
  15. package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +6 -6
  16. package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +3 -3
  17. package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipDepts/index.js +2 -2
  18. package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +2 -2
  19. package/dist/DeptsMemberSelector/{useDeptsMemberSelector-t7b8yu-A.js → useDeptsMemberSelector-B2Un1d5r.js} +1 -1
  20. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +2 -1
  21. package/dist/index.js +10 -10
  22. package/dist/services/apiService.d.ts +1 -0
  23. package/dist/vendors/lodash-es.js +1 -1
  24. package/package.json +2 -2
  25. package/dist/DeptsMemberSelector/services/contact/selector.service-CY5vQea8.js +0 -342
package/README.md CHANGED
@@ -138,6 +138,17 @@ setApiServiceProvider({
138
138
  });
139
139
  ```
140
140
 
141
+ 如果历史项目传入的仍是完整 Axios 响应,可以额外传入 `responseAdapter`:
142
+
143
+ ```typescript
144
+ setApiServiceProvider({
145
+ axiosInstance: request,
146
+ responseAdapter: response => (response as { data?: unknown }).data,
147
+ });
148
+ ```
149
+
150
+ `responseAdapter` 只负责拆公共响应外壳,不负责读取 `departments`、`users` 等具体业务字段。
151
+
141
152
  ## 高级配置
142
153
 
143
154
  ### 多环境配置
@@ -254,4 +265,4 @@ const switchToTestEnv = () => {
254
265
  Error: API 服务提供者未设置。请先调用 setApiServiceProvider() 设置 Axios 实例。
255
266
  ```
256
267
 
257
- 确保在使用任何组件库功能之前完成配置。
268
+ 确保在使用任何组件库功能之前完成配置。
@@ -4,16 +4,20 @@ import { useEffect as n } from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/ConfigProvider/ConfigProvider.tsx
6
6
  var i = (i) => {
7
- let { locale: a, axiosInstance: o, preFetchedNodes: s } = i;
7
+ let { locale: a, axiosInstance: o, responseAdapter: s, preFetchedNodes: c } = i;
8
8
  return n(() => {
9
- o && t({ axiosInstance: o });
10
- }, [o]), n(() => {
11
- s && s.length > 0 && sessionStorage.setItem("preset_bsy_dept_member", JSON.stringify(s));
12
- }, [s]), /* @__PURE__ */ r(e.Provider, {
9
+ o && t({
10
+ axiosInstance: o,
11
+ responseAdapter: s
12
+ });
13
+ }, [o, s]), n(() => {
14
+ c && c.length > 0 && sessionStorage.setItem("preset_bsy_dept_member", JSON.stringify(c));
15
+ }, [c]), /* @__PURE__ */ r(e.Provider, {
13
16
  value: {
14
17
  locale: a,
15
18
  axiosInstance: o,
16
- preFetchedNodes: s
19
+ responseAdapter: s,
20
+ preFetchedNodes: c
17
21
  },
18
22
  children: i.children
19
23
  });
@@ -1,5 +1,5 @@
1
1
  import "./configContext-kYu9qTM2.js";
2
- import { t as e } from "./ConfigProvider-C0c1mKeR.js";
2
+ import { t as e } from "./ConfigProvider-Cwc-Gz9h.js";
3
3
  //#region src/components/ConfigProvider/index.ts
4
4
  var t = e;
5
5
  //#endregion
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "../vendors/simplebar-react.js";
2
2
  import { t } from "../vendors/clsx.js";
3
- import { r as n, t as r } from "./useDeptsMemberSelector-t7b8yu-A.js";
4
- import { h as i } from "./services/contact/selector.service-CY5vQea8.js";
3
+ import { r as n, t as r } from "./useDeptsMemberSelector-B2Un1d5r.js";
4
+ import { h as i } from "./services/contact/selector.service-BFwBe9fo.js";
5
5
  import { a, i as o } from "./TabGroup-Dht9ylk4.js";
6
6
  import { t as s } from "../vendors/useLocale.js";
7
- import { t as c } from "./OrganizationPanel-BPEqHxNb.js";
7
+ import { t as c } from "./OrganizationPanel-Di4dqUlZ.js";
8
8
  import { useMemo as l, useState as u } from "react";
9
9
  import { Radio as d, Spin as f } from "antd";
10
10
  import { Checkbox as p } from "@baishuyun/ui-base";
@@ -1,14 +1,14 @@
1
1
  import { t as e } from "../vendors/simplebar-react.js";
2
2
  import { t } from "../vendors/clsx.js";
3
3
  import { a as n, o as r } from "../vendors/lodash-es.js";
4
- import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./useDeptsMemberSelector-t7b8yu-A.js";
5
- import { b as m, d as h, f as g, h as _, p as v, t as y } from "./services/contact/selector.service-CY5vQea8.js";
4
+ import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./useDeptsMemberSelector-B2Un1d5r.js";
5
+ import { b as m, d as h, f as g, h as _, p as v, t as y } from "./services/contact/selector.service-BFwBe9fo.js";
6
6
  import { a as b, i as x, n as S, r as C } from "./TabGroup-Dht9ylk4.js";
7
7
  import { t as w } from "../vendors/useLocale.js";
8
8
  import { findNodeInTree as T, getColorByName as E, getMemberDisplayName as D } from "./utils/index.js";
9
- import { t as O } from "./DeptsUser-Du342aN-.js";
10
- import { t as k } from "./Member-Bit-zWOE.js";
11
- import { n as A, t as ee } from "./Department-D7xrfl-D.js";
9
+ import { t as O } from "./DeptsUser-9Lf7ytTr.js";
10
+ import { t as k } from "./Member-BY8mtQb0.js";
11
+ import { n as A, t as ee } from "./Department-6R-BZNZ4.js";
12
12
  import { forwardRef as j, useCallback as te, useEffect as M, useImperativeHandle as ne, useMemo as N, useRef as P, useState as F } from "react";
13
13
  import { Avatar as I, Button as L, Spin as R } from "antd";
14
14
  import { Icon as z, Tree as B } from "@baishuyun/ui-base";
@@ -1,14 +1,14 @@
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-t7b8yu-A.js";
4
- import { a as r, c as i, i as a, n as o, o as s, r as c, s as l } from "./services/contact/selector.service-CY5vQea8.js";
3
+ import { t as n } from "./useDeptsMemberSelector-B2Un1d5r.js";
4
+ import { a as r, c as i, i as a, n as o, o as s, r as c, s as l } from "./services/contact/selector.service-BFwBe9fo.js";
5
5
  import { i as u } from "./TabGroup-Dht9ylk4.js";
6
6
  import { t as d } from "../vendors/useLocale.js";
7
7
  import { buildDeptTree as f, buildTree as p, getColorByName as m } from "./utils/index.js";
8
- import { t as h } from "./OrganizationPanel-BPEqHxNb.js";
9
- import { n as g, t as _ } from "./MemberPanel-BhuVgJdO.js";
10
- import { t as v } from "./RelationShipList-BhiAdVjm.js";
11
- import { t as y } from "./RelationShipDepts-kpemRPz1.js";
8
+ import { t as h } from "./OrganizationPanel-Di4dqUlZ.js";
9
+ import { n as g, t as _ } from "./MemberPanel-Dw1b2J3V.js";
10
+ import { t as v } from "./RelationShipList-CS5uhLos.js";
11
+ import { t as y } from "./RelationShipDepts-__eb4oDP.js";
12
12
  import { useMemo as b, useState as x } from "react";
13
13
  import { Avatar as S, Spin as C } from "antd";
14
14
  import { Checkbox as w, Icon as T, Tree as E } from "@baishuyun/ui-base";
@@ -1,11 +1,11 @@
1
1
  import { t as e } from "../vendors/simplebar-react.js";
2
2
  import { t } from "../vendors/clsx.js";
3
- import { l as n, t as r } from "./useDeptsMemberSelector-t7b8yu-A.js";
4
- import { _ as i, a, g as o, h as s, i as c, l, p as u, t as d, u as f, v as p } from "./services/contact/selector.service-CY5vQea8.js";
3
+ import { l as n, t as r } from "./useDeptsMemberSelector-B2Un1d5r.js";
4
+ import { _ as i, a, g as o, h as s, i as c, l, p as u, t as d, u as f, v as p } from "./services/contact/selector.service-BFwBe9fo.js";
5
5
  import { a as m } from "./TabGroup-Dht9ylk4.js";
6
6
  import { t as h } from "../vendors/useLocale.js";
7
7
  import { buildTree as g } from "./utils/index.js";
8
- import { n as _, t as v } from "./MemberPanel-BhuVgJdO.js";
8
+ import { n as _, t as v } from "./MemberPanel-Dw1b2J3V.js";
9
9
  import { useMemo as y, useRef as b, useState as x } from "react";
10
10
  import { Spin as S } from "antd";
11
11
  import { Icon as C, Tree as w } from "@baishuyun/ui-base";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../vendors/simplebar-react.js";
2
2
  import { t } from "../vendors/clsx.js";
3
- import { c as n, o as r, t as i } from "./useDeptsMemberSelector-t7b8yu-A.js";
4
- import { m as a, n as o, p as s, r as c, t as l } from "./services/contact/selector.service-CY5vQea8.js";
3
+ import { c as n, o as r, t as i } from "./useDeptsMemberSelector-B2Un1d5r.js";
4
+ import { m as a, n as o, p as s, r as c, t as l } from "./services/contact/selector.service-BFwBe9fo.js";
5
5
  import { a as u, i as d, n as f, t as p } from "./TabGroup-Dht9ylk4.js";
6
6
  import { t as m } from "../vendors/useLocale.js";
7
7
  import { buildDeptTree as h, buildTree as g, findNodeInTree as _, getColorByName as v, getMemberDisplayName as y } from "./utils/index.js";
@@ -1,8 +1,8 @@
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-t7b8yu-A.js";
5
- import { n as o, p as s } from "./services/contact/selector.service-CY5vQea8.js";
4
+ import { i, t as a } from "./useDeptsMemberSelector-B2Un1d5r.js";
5
+ import { n as o, p as s } from "./services/contact/selector.service-BFwBe9fo.js";
6
6
  import { a as c, i as l, n as u, r as d, t as f } from "./TabGroup-Dht9ylk4.js";
7
7
  import { t as p } from "../vendors/useLocale.js";
8
8
  import { buildDeptTree as m, buildTree as h, findNodeInTree as g } from "./utils/index.js";
@@ -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-t7b8yu-A.js";
3
+ import { t as n } from "./useDeptsMemberSelector-B2Un1d5r.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";
@@ -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-t7b8yu-A.js";
3
+ import { t as n } from "./useDeptsMemberSelector-B2Un1d5r.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";
@@ -1,17 +1,17 @@
1
1
  import "../vendors/simplebar-react.js";
2
- import "./useDeptsMemberSelector-t7b8yu-A.js";
2
+ import "./useDeptsMemberSelector-B2Un1d5r.js";
3
3
  import { a as e } from "./TabGroup-Dht9ylk4.js";
4
- import { t } from "./DeptsMemberSelector-u-2aq3Yq.js";
4
+ import { t } from "./DeptsMemberSelector-CC32KXc8.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-Du342aN-.js";
9
- import "./OrganizationPanel-BPEqHxNb.js";
10
- import "./MemberPanel-BhuVgJdO.js";
11
- import "./RelationShipList-BhiAdVjm.js";
12
- import "./RelationShipDepts-kpemRPz1.js";
13
- import "./Member-Bit-zWOE.js";
14
- import "./Department-D7xrfl-D.js";
8
+ import "./DeptsUser-9Lf7ytTr.js";
9
+ import "./OrganizationPanel-Di4dqUlZ.js";
10
+ import "./MemberPanel-Dw1b2J3V.js";
11
+ import "./RelationShipList-CS5uhLos.js";
12
+ import "./RelationShipDepts-__eb4oDP.js";
13
+ import "./Member-BY8mtQb0.js";
14
+ import "./Department-6R-BZNZ4.js";
15
15
  //#region src/components/DeptsMemberSelector/index.ts
16
16
  var r = t;
17
17
  //#endregion
@@ -0,0 +1,346 @@
1
+ import { s as e } from "../../../vendors/lodash-es.js";
2
+ import { n as t, t as n } from "../../../vendors/services/apiService.js";
3
+ import { t as r } from "../../../vendors/services/contact/path.js";
4
+ //#region src/components/DeptsMemberSelector/utils/widgetRequestLimits.ts
5
+ var i = {
6
+ hasLimit: !1,
7
+ creator: 0,
8
+ users: [],
9
+ dockcorpValue: [],
10
+ dockdeptValue: [],
11
+ dockuserValue: [],
12
+ dockroleValue: [],
13
+ departs: [],
14
+ roles: [],
15
+ jobtitle: []
16
+ }, a = {
17
+ departmentLimit: [],
18
+ groupLimit: [],
19
+ roleLimit: [],
20
+ memberLimit: [],
21
+ memberSearchLimit: void 0
22
+ }, o = "100000000000000000000000", s = "110000000000000000000002", c = (e) => ["user", "usergroup"].includes(e), l = (e) => !e || Array.isArray(e) ? {} : e, u = (e) => Array.isArray(e) && e.length > 0 && e.every((e) => typeof e == "string"), d = (e) => Array.isArray(e) ? e.filter((e) => e != null && e !== "") : [], f = (...e) => {
23
+ let t = /* @__PURE__ */ new Set(), n = [];
24
+ return e.flat().forEach((e) => {
25
+ let r = String(e);
26
+ t.has(r) || (t.add(r), n.push(e));
27
+ }), n;
28
+ }, p = (e) => e === 1 || e === "1" || e === !0, m = (e, t) => {
29
+ e.some((e) => String(e) === String(t)) || e.push(t);
30
+ }, h = (e) => d(e.departs).length > 0 || d(e.users).length > 0 || d(e.roles).length > 0 || d(e.dockcorpValue).length > 0 || d(e.dockdeptValue).length > 0 || d(e.dockroleValue).length > 0 || d(e.dockuserValue).length > 0 || d(e.outsiderGroup).length > 0 || d(e.outsiderMember).length > 0 || d(e.jobtitle).length > 0 || d(e.corpValue).length > 0 || d(e.relation).length > 0 || p(e.creator) || p(e.deptcurrentsubdept), g = (e) => {
31
+ let t = f(d(e.departs), d(e.dockroleValue), d(e.dockuserValue), d(e.dockcorpValue), d(e.dockdeptValue), d(e.users), d(e.roles), d(e.corpValue), d(e.jobtitle), d(e.relation), d(e.outsiderGroup), d(e.outsiderMember));
32
+ return p(e.creator) && m(t, o), p(e.deptcurrentsubdept) && m(t, s), t;
33
+ }, _ = (e) => {
34
+ let t = d(e.users), n = d(e.departs), r = d(e.roles), i = d(e.dockcorpValue), a = d(e.dockdeptValue), o = d(e.dockuserValue), s = d(e.dockroleValue), c = d(e.outsiderGroup), l = d(e.outsiderMember), u = d(e.jobtitle), p = e.creator ?? 0;
35
+ return {
36
+ departmentLimit: f(n, t, i, a),
37
+ jobTitleDepartmentLimit: g(e),
38
+ groupLimit: f(c),
39
+ roleLimit: f(r, s),
40
+ memberLimit: f(l),
41
+ memberSearchLimit: {
42
+ hasLimit: !0,
43
+ creator: p,
44
+ users: t,
45
+ dockcorpValue: i,
46
+ dockdeptValue: a,
47
+ dockuserValue: o,
48
+ dockroleValue: s,
49
+ departs: n,
50
+ roles: r,
51
+ jobtitle: u
52
+ }
53
+ };
54
+ }, v = (e) => ({
55
+ ...a,
56
+ departmentLimit: [...e],
57
+ memberSearchLimit: {
58
+ hasLimit: !0,
59
+ creator: 0,
60
+ users: [],
61
+ dockcorpValue: [],
62
+ dockdeptValue: [],
63
+ dockuserValue: [],
64
+ dockroleValue: [],
65
+ departs: [...e],
66
+ roles: [],
67
+ jobtitle: []
68
+ }
69
+ }), y = ({ type: e, widgetAttr: t }) => {
70
+ if (!c(e)) return a;
71
+ if (u(t?.limit)) return v(t.limit);
72
+ let n = l(t?.limit);
73
+ return h(n) ? _(n) : a;
74
+ }, b = (n, r) => {
75
+ let i = t()?.responseAdapter, a = i ? i(n) : n;
76
+ return a == null ? r : e(a) && "data" in a ? a.data ?? r : a;
77
+ }, x = () => globalThis.window?.FX?.STATIC?.corpId || "", S = (e) => String(e), C = 1e4, w = ({ limits: e, departmentSelectableRange: t, rangeFlag: n, rangeIds: r, fallbackLimit: i }) => t && t.source !== "default" ? t[n] ? t[r] : [] : e?.[i] || [], T = ({ limits: e, departmentSelectableRange: t }) => t?.source === "rely-limit-array" ? t.departmentIds : w({
78
+ limits: e,
79
+ departmentSelectableRange: t,
80
+ rangeFlag: "hasOutsiderGroupRange",
81
+ rangeIds: "outsiderGroupIds",
82
+ fallbackLimit: "groupLimit"
83
+ }), E = ({ limits: e, departmentSelectableRange: t }) => w({
84
+ limits: e,
85
+ departmentSelectableRange: t,
86
+ rangeFlag: "hasDepartmentRange",
87
+ rangeIds: "departmentIds",
88
+ fallbackLimit: "departmentLimit"
89
+ }), D = (e, t) => {
90
+ for (let n of t) {
91
+ let t = e[n];
92
+ if (typeof t == "number") return t;
93
+ }
94
+ }, O = (e, t) => ({
95
+ items: e,
96
+ total: t.total,
97
+ hasMore: typeof t.total == "number" ? t.skip + e.length < t.total : e.length === t.limit
98
+ }), k = async ({ requestContext: e, limits: t, departmentSelectableRange: i, hasDeptDock: a = !1, keyword: o = "" }) => b(await n.post(r("/v1/contact/data/member/departments"), {
99
+ appId: e?.appId,
100
+ entryId: e?.entryId,
101
+ departmentLimit: E({
102
+ limits: t,
103
+ departmentSelectableRange: i
104
+ }),
105
+ hasDeptDock: a,
106
+ ...o ? { key: o } : {}
107
+ }), {
108
+ departments: [],
109
+ departments_count: 0,
110
+ label_corp_list: [],
111
+ label_corp_count: 0
112
+ }), A = async ({ requestContext: e, limits: t, departmentId: i = null, limit: a = 100, skip: o = 0, hasDeptDock: s = !1, currentCorpId: c }) => {
113
+ let l = b(await n.post(r("/v1/contact/data/member/users"), {
114
+ appId: e?.appId,
115
+ entryId: e?.entryId,
116
+ departmentLimit: t?.departmentLimit || [],
117
+ departmentId: i == null ? null : String(i),
118
+ skip: o,
119
+ limit: a,
120
+ ...s ? {
121
+ hasDeptDock: !0,
122
+ current_corpid: c || ""
123
+ } : {}
124
+ }), {
125
+ users: [],
126
+ dock_user_list: []
127
+ }), u = [...l.users || [], ...l.dock_user_list || []];
128
+ return {
129
+ ...l,
130
+ ...O(u, {
131
+ skip: o,
132
+ limit: a,
133
+ total: D(l, [
134
+ "total",
135
+ "count",
136
+ "users_count"
137
+ ])
138
+ })
139
+ };
140
+ }, j = async ({ requestContext: e, hasDeptDock: t = !1 }) => b(await n.post(r("/v1/contact/department/list"), {
141
+ hasDock: !0,
142
+ ...t ? { hasDeptDock: !0 } : {},
143
+ appId: e?.appId,
144
+ entryId: e?.entryId
145
+ }), {
146
+ departments: [],
147
+ departments_count: 0,
148
+ label_corp_count: 0
149
+ }), M = async ({ requestContext: e, deptId: t = "", limit: i = 100, skip: a = 0 }) => {
150
+ let o = b(await n.post(r("/v1/contact/department/member/list"), {
151
+ deptId: String(t),
152
+ current_corpid: "",
153
+ dock_corpid: "",
154
+ msgType: "",
155
+ hasDock: !0,
156
+ hasAdmin: !1,
157
+ hasGuest: !1,
158
+ skip: a,
159
+ limit: i,
160
+ appId: e?.appId,
161
+ entryId: e?.entryId
162
+ }), {
163
+ users: [],
164
+ relation_list: []
165
+ });
166
+ return {
167
+ ...o,
168
+ ...O(o.users || [], {
169
+ skip: a,
170
+ limit: i,
171
+ total: D(o, [
172
+ "total",
173
+ "count",
174
+ "users_count"
175
+ ])
176
+ })
177
+ };
178
+ }, N = async ({ requestContext: e, limits: t }) => b(await n.post(r("/v1/contact/data/department/job_title"), {
179
+ appId: e?.appId,
180
+ entryId: e?.entryId,
181
+ departmentLimit: t?.jobTitleDepartmentLimit || t?.departmentLimit || [],
182
+ mode: "current"
183
+ }), { items: [] }), P = async ({ requestContext: e, departmentId: t = "", mode: i = "current" }) => b(await n.post(r("/v1/contact/department/jobtitle"), {
184
+ _id: t,
185
+ mode: i,
186
+ appId: e?.appId,
187
+ entryId: e?.entryId
188
+ }), { items: [] }), F = async ({ requestContext: e, jobTitleId: t, jobTitle: i, limit: a = 100, skip: o = 0 }) => {
189
+ let s = b(await n.post(r("/v1/contact/data/department/job_title_member"), {
190
+ appId: e?.appId,
191
+ entryId: e?.entryId,
192
+ _id: t,
193
+ job_title: i,
194
+ limit: a,
195
+ skip: o
196
+ }), { list: [] });
197
+ return {
198
+ ...s,
199
+ ...O(s.list || [], {
200
+ skip: o,
201
+ limit: a,
202
+ total: D(s, ["total", "count"])
203
+ })
204
+ };
205
+ }, I = async ({ requestContext: e, limits: t }) => b(await n.post(r("/v1/contact/data/member/roles"), {
206
+ appId: e?.appId,
207
+ entryId: e?.entryId,
208
+ roleLimit: t?.roleLimit || []
209
+ }), {
210
+ roles: [],
211
+ dock_role: []
212
+ }), L = async ({ requestContext: e }) => b(await n.post(r("/v1/contact/role/list"), {
213
+ corpId: x(),
214
+ dock_corpid: "",
215
+ hasDock: !0,
216
+ appId: e?.appId,
217
+ entryId: e?.entryId
218
+ }), {
219
+ roles: [],
220
+ dock_role: []
221
+ }), R = async ({ requestContext: e, roleId: t, roleLimit: i = [], limit: a = 100, skip: o = 0 }) => {
222
+ let s = b(await n.post(r("/v1/contact/data/member/dept_role_users"), {
223
+ appId: e?.appId,
224
+ entryId: e?.entryId,
225
+ roleId: S(t),
226
+ roleLimit: i,
227
+ limit: a,
228
+ skip: o
229
+ }), {
230
+ users: [],
231
+ dock_user_list: []
232
+ }), c = [...s.users || [], ...s.dock_user_list || []];
233
+ return {
234
+ ...s,
235
+ ...O(c, {
236
+ skip: o,
237
+ limit: a,
238
+ total: D(s, [
239
+ "total",
240
+ "count",
241
+ "users_count"
242
+ ])
243
+ })
244
+ };
245
+ }, z = async ({ requestContext: e, limits: t, departmentSelectableRange: i }) => b(await n.post(r("/v1/contact/data/outsider/list"), {
246
+ appId: e?.appId,
247
+ entryId: e?.entryId,
248
+ groupLimit: T({
249
+ limits: t,
250
+ departmentSelectableRange: i
251
+ })
252
+ }), { list: [] }), B = async ({ requestContext: e }) => b(await n.post(r("/v1/contact/outsider/group/list"), {
253
+ corpId: x(),
254
+ appId: e?.appId,
255
+ entryId: e?.entryId
256
+ }), { list: [] }), V = async ({ requestContext: e, groupId: t = "", groupLimit: i = [], memberLimit: a = [], limit: o = 100, skip: s = 0 }) => {
257
+ let c = b(await n.post(r("/v1/contact/data/outsider/member/list"), {
258
+ appId: e?.appId,
259
+ entryId: e?.entryId,
260
+ group_id: t,
261
+ groupLimit: i,
262
+ memberLimit: a,
263
+ skip: s,
264
+ limit: o
265
+ }), { list: [] });
266
+ return {
267
+ ...c,
268
+ ...O(c.list || [], {
269
+ skip: s,
270
+ limit: o,
271
+ total: D(c, ["total", "count"])
272
+ })
273
+ };
274
+ }, H = async ({ requestContext: e, groupId: t = "", limit: i = 100, skip: a = 0 }) => {
275
+ let o = b(await n.post(r("/v1/contact/outsider/member/list"), {
276
+ appId: e?.appId,
277
+ entryId: e?.entryId,
278
+ group_id: t,
279
+ skip: a,
280
+ limit: i
281
+ }), { list: [] });
282
+ return {
283
+ ...o,
284
+ ...O(o.list || [], {
285
+ skip: a,
286
+ limit: i,
287
+ total: D(o, ["total", "count"])
288
+ })
289
+ };
290
+ }, U = async ({ requestContext: e } = {}) => b(await n.post(r("/v1/contact/relation/list"), {
291
+ appId: e?.appId,
292
+ entryId: e?.entryId
293
+ }), { list: [] }), W = async ({ requestContext: e, keyword: t = "", memberSearchLimit: a, limit: o = 100, skip: s = 0 }) => {
294
+ let c = a || i, l = b(await n.post(r("/v1/contact/data/member_limit"), {
295
+ appId: e?.appId,
296
+ entryId: e?.entryId,
297
+ key: t,
298
+ skip: s,
299
+ limit: o,
300
+ hasLimit: c.hasLimit,
301
+ creator: c.creator,
302
+ users: c.users,
303
+ dockcorpValue: c.dockcorpValue,
304
+ dockdeptValue: c.dockdeptValue,
305
+ dockuserValue: c.dockuserValue,
306
+ dockroleValue: c.dockroleValue,
307
+ departs: c.departs,
308
+ roles: c.roles,
309
+ jobtitle: c.jobtitle
310
+ }), {
311
+ users: [],
312
+ dock_user_list: []
313
+ }), u = [...l.users || [], ...l.dock_user_list || []];
314
+ return {
315
+ ...l,
316
+ ...O(u, {
317
+ skip: s,
318
+ limit: o,
319
+ total: D(l, [
320
+ "total",
321
+ "count",
322
+ "users_count"
323
+ ])
324
+ })
325
+ };
326
+ }, G = async ({ requestContext: e, keyword: t = "", groupLimit: i = [], memberLimit: a = [], limit: o = 100, skip: s = 0 }) => {
327
+ let c = b(await n.post(r("/v1/contact/data/outsider/member/list"), {
328
+ appId: e?.appId,
329
+ entryId: e?.entryId,
330
+ key: t,
331
+ groupLimit: i,
332
+ memberLimit: a,
333
+ skip: s,
334
+ limit: o
335
+ }), { list: [] });
336
+ return {
337
+ ...c,
338
+ ...O(c.list || [], {
339
+ skip: s,
340
+ limit: o,
341
+ total: D(c, ["total", "count"])
342
+ })
343
+ };
344
+ };
345
+ //#endregion
346
+ export { N as _, H as a, y as b, L as c, W as d, G as f, V as g, z as h, B as i, F as l, A as m, j as n, P as o, k as p, M as r, U as s, C as t, R as u, I as v, a as y };
@@ -1,8 +1,8 @@
1
1
  import "../../../../vendors/simplebar-react.js";
2
- import "../../../useDeptsMemberSelector-t7b8yu-A.js";
2
+ import "../../../useDeptsMemberSelector-B2Un1d5r.js";
3
3
  import "../../../TabGroup-Dht9ylk4.js";
4
4
  import "../../../../vendors/useLocale.js";
5
5
  import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
6
- import "../../../OrganizationPanel-BPEqHxNb.js";
7
- import { t as e } from "../../../Department-D7xrfl-D.js";
6
+ import "../../../OrganizationPanel-Di4dqUlZ.js";
7
+ import { t as e } from "../../../Department-6R-BZNZ4.js";
8
8
  export { e as useDepartmentTabItems };
@@ -1,11 +1,11 @@
1
1
  import "../../../../vendors/simplebar-react.js";
2
- import "../../../useDeptsMemberSelector-t7b8yu-A.js";
2
+ import "../../../useDeptsMemberSelector-B2Un1d5r.js";
3
3
  import "../../../TabGroup-Dht9ylk4.js";
4
4
  import "../../../../vendors/useLocale.js";
5
5
  import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
6
- import { t as e } from "../../../DeptsUser-Du342aN-.js";
7
- import "../../../OrganizationPanel-BPEqHxNb.js";
8
- import "../../../MemberPanel-BhuVgJdO.js";
9
- import "../../../RelationShipList-BhiAdVjm.js";
10
- import "../../../RelationShipDepts-kpemRPz1.js";
6
+ import { t as e } from "../../../DeptsUser-9Lf7ytTr.js";
7
+ import "../../../OrganizationPanel-Di4dqUlZ.js";
8
+ import "../../../MemberPanel-Dw1b2J3V.js";
9
+ import "../../../RelationShipList-CS5uhLos.js";
10
+ import "../../../RelationShipDepts-__eb4oDP.js";
11
11
  export { e as useDeptUserTabItems };
@@ -1,8 +1,8 @@
1
1
  import "../../../../vendors/simplebar-react.js";
2
- import "../../../useDeptsMemberSelector-t7b8yu-A.js";
2
+ import "../../../useDeptsMemberSelector-B2Un1d5r.js";
3
3
  import "../../../TabGroup-Dht9ylk4.js";
4
4
  import "../../../../vendors/useLocale.js";
5
5
  import "../../../../ConfigProvider/configContext-kYu9qTM2.js";
6
- import "../../../MemberPanel-BhuVgJdO.js";
7
- import { t as e } from "../../../Member-Bit-zWOE.js";
6
+ import "../../../MemberPanel-Dw1b2J3V.js";
7
+ import { t as e } from "../../../Member-BY8mtQb0.js";
8
8
  export { e as useMemberTabItems };
@@ -1,6 +1,6 @@
1
1
  import "../../../../../vendors/simplebar-react.js";
2
- import "../../../../useDeptsMemberSelector-t7b8yu-A.js";
2
+ import "../../../../useDeptsMemberSelector-B2Un1d5r.js";
3
3
  import "../../../../../vendors/useLocale.js";
4
4
  import "../../../../../ConfigProvider/configContext-kYu9qTM2.js";
5
- import { t as e } from "../../../../RelationShipDepts-kpemRPz1.js";
5
+ import { t as e } from "../../../../RelationShipDepts-__eb4oDP.js";
6
6
  export { e as default };
@@ -1,4 +1,4 @@
1
1
  import "../../../../../vendors/simplebar-react.js";
2
- import "../../../../useDeptsMemberSelector-t7b8yu-A.js";
3
- import { t as e } from "../../../../RelationShipList-BhiAdVjm.js";
2
+ import "../../../../useDeptsMemberSelector-B2Un1d5r.js";
3
+ import { t as e } from "../../../../RelationShipList-CS5uhLos.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-CY5vQea8.js";
2
+ import { y as n } from "./services/contact/selector.service-BFwBe9fo.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 = {
@@ -1,4 +1,4 @@
1
- import { AxiosInstance } from '../../services/apiService';
1
+ import { ApiServiceProvider, AxiosInstance } from '../../services/apiService';
2
2
  type Locale = 'zh-CN' | 'zh-TW' | 'en-US';
3
3
  interface PreFetchedNode {
4
4
  _id: string | number;
@@ -8,6 +8,7 @@ interface PreFetchedNode {
8
8
  type ConfigProps = {
9
9
  locale: Locale;
10
10
  axiosInstance?: AxiosInstance;
11
+ responseAdapter?: ApiServiceProvider['responseAdapter'];
11
12
  /**
12
13
  * @description 外部传入的前置数据,用于关联节点的名称解析
13
14
  * @description 扁平的数组结构,每一项必须包含 _id 和 name 属性
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import "./vendors/simplebar-react.js";
2
2
  import { t as e } from "./vendors/clsx.js";
3
- import "./DeptsMemberSelector/useDeptsMemberSelector-t7b8yu-A.js";
3
+ import "./DeptsMemberSelector/useDeptsMemberSelector-B2Un1d5r.js";
4
4
  import "./DeptsMemberSelector/TabGroup-Dht9ylk4.js";
5
- import { n as t, t as n } from "./DeptsMemberSelector/DeptsMemberSelector-u-2aq3Yq.js";
5
+ import { n as t, t as n } from "./DeptsMemberSelector/DeptsMemberSelector-CC32KXc8.js";
6
6
  import "./vendors/useLocale.js";
7
7
  import "./ConfigProvider/configContext-kYu9qTM2.js";
8
- import { n as r } from "./DeptsMemberSelector/DeptsUser-Du342aN-.js";
8
+ import { n as r } from "./DeptsMemberSelector/DeptsUser-9Lf7ytTr.js";
9
9
  import { n as i, r as a, t as o } from "./vendors/services/apiService.js";
10
- import "./DeptsMemberSelector/OrganizationPanel-BPEqHxNb.js";
11
- import "./DeptsMemberSelector/MemberPanel-BhuVgJdO.js";
12
- import "./DeptsMemberSelector/RelationShipList-BhiAdVjm.js";
13
- import "./DeptsMemberSelector/RelationShipDepts-kpemRPz1.js";
14
- import "./DeptsMemberSelector/Member-Bit-zWOE.js";
15
- import "./DeptsMemberSelector/Department-D7xrfl-D.js";
16
- import { t as s } from "./ConfigProvider/ConfigProvider-C0c1mKeR.js";
10
+ import "./DeptsMemberSelector/OrganizationPanel-Di4dqUlZ.js";
11
+ import "./DeptsMemberSelector/MemberPanel-Dw1b2J3V.js";
12
+ import "./DeptsMemberSelector/RelationShipList-CS5uhLos.js";
13
+ import "./DeptsMemberSelector/RelationShipDepts-__eb4oDP.js";
14
+ import "./DeptsMemberSelector/Member-BY8mtQb0.js";
15
+ import "./DeptsMemberSelector/Department-6R-BZNZ4.js";
16
+ import { t as s } from "./ConfigProvider/ConfigProvider-Cwc-Gz9h.js";
17
17
  import { t as c } from "./vendors/echarts.js";
18
18
  import "./BubbleChart/AutoGridEChart-BQsZw7nv.js";
19
19
  import { t as l } from "./BubbleChart/BubbleChart-BN3msB5e.js";
@@ -13,6 +13,7 @@ export interface AxiosInstance {
13
13
  }
14
14
  export interface ApiServiceProvider {
15
15
  axiosInstance: AxiosInstance;
16
+ responseAdapter?: (response: unknown) => unknown;
16
17
  }
17
18
  export declare const setApiServiceProvider: (provider: ApiServiceProvider) => void;
18
19
  export declare const getApiServiceProvider: () => ApiServiceProvider | null;
@@ -530,4 +530,4 @@ function _n(e) {
530
530
  return e && e.length ? gn(e) : [];
531
531
  }
532
532
  //#endregion
533
- export { rn as a, sn as i, pn as n, k as o, dn as r, _n as t };
533
+ export { rn as a, sn as i, pn as n, k as o, dn as r, x as s, _n as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-business",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "百数云业务组件库",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -67,7 +67,7 @@
67
67
  "sass": "^1.90.0",
68
68
  "vite": "^8.0.0",
69
69
  "vite-plugin-dts": "^4.5.4",
70
- "@baishuyun/ui-base": "2.4.1"
70
+ "@baishuyun/ui-base": "3.0.2"
71
71
  },
72
72
  "dependencies": {
73
73
  "autoprefixer": "^10.4.21",
@@ -1,342 +0,0 @@
1
- import { t as e } from "../../../vendors/services/apiService.js";
2
- import { t } from "../../../vendors/services/contact/path.js";
3
- //#region src/components/DeptsMemberSelector/utils/widgetRequestLimits.ts
4
- var n = {
5
- hasLimit: !1,
6
- creator: 0,
7
- users: [],
8
- dockcorpValue: [],
9
- dockdeptValue: [],
10
- dockuserValue: [],
11
- dockroleValue: [],
12
- departs: [],
13
- roles: [],
14
- jobtitle: []
15
- }, r = {
16
- departmentLimit: [],
17
- groupLimit: [],
18
- roleLimit: [],
19
- memberLimit: [],
20
- memberSearchLimit: void 0
21
- }, i = "100000000000000000000000", a = "110000000000000000000002", o = (e) => ["user", "usergroup"].includes(e), s = (e) => !e || Array.isArray(e) ? {} : e, c = (e) => Array.isArray(e) && e.length > 0 && e.every((e) => typeof e == "string"), l = (e) => Array.isArray(e) ? e.filter((e) => e != null && e !== "") : [], u = (...e) => {
22
- let t = /* @__PURE__ */ new Set(), n = [];
23
- return e.flat().forEach((e) => {
24
- let r = String(e);
25
- t.has(r) || (t.add(r), n.push(e));
26
- }), n;
27
- }, d = (e) => e === 1 || e === "1" || e === !0, f = (e, t) => {
28
- e.some((e) => String(e) === String(t)) || e.push(t);
29
- }, p = (e) => l(e.departs).length > 0 || l(e.users).length > 0 || l(e.roles).length > 0 || l(e.dockcorpValue).length > 0 || l(e.dockdeptValue).length > 0 || l(e.dockroleValue).length > 0 || l(e.dockuserValue).length > 0 || l(e.outsiderGroup).length > 0 || l(e.outsiderMember).length > 0 || l(e.jobtitle).length > 0 || l(e.corpValue).length > 0 || l(e.relation).length > 0 || d(e.creator) || d(e.deptcurrentsubdept), m = (e) => {
30
- let t = u(l(e.departs), l(e.dockroleValue), l(e.dockuserValue), l(e.dockcorpValue), l(e.dockdeptValue), l(e.users), l(e.roles), l(e.corpValue), l(e.jobtitle), l(e.relation), l(e.outsiderGroup), l(e.outsiderMember));
31
- return d(e.creator) && f(t, i), d(e.deptcurrentsubdept) && f(t, a), t;
32
- }, h = (e) => {
33
- let t = l(e.users), n = l(e.departs), r = l(e.roles), i = l(e.dockcorpValue), a = l(e.dockdeptValue), o = l(e.dockuserValue), s = l(e.dockroleValue), c = l(e.outsiderGroup), d = l(e.outsiderMember), f = l(e.jobtitle), p = e.creator ?? 0;
34
- return {
35
- departmentLimit: u(n, t, i, a),
36
- jobTitleDepartmentLimit: m(e),
37
- groupLimit: u(c),
38
- roleLimit: u(r, s),
39
- memberLimit: u(d),
40
- memberSearchLimit: {
41
- hasLimit: !0,
42
- creator: p,
43
- users: t,
44
- dockcorpValue: i,
45
- dockdeptValue: a,
46
- dockuserValue: o,
47
- dockroleValue: s,
48
- departs: n,
49
- roles: r,
50
- jobtitle: f
51
- }
52
- };
53
- }, g = (e) => ({
54
- ...r,
55
- departmentLimit: [...e],
56
- memberSearchLimit: {
57
- hasLimit: !0,
58
- creator: 0,
59
- users: [],
60
- dockcorpValue: [],
61
- dockdeptValue: [],
62
- dockuserValue: [],
63
- dockroleValue: [],
64
- departs: [...e],
65
- roles: [],
66
- jobtitle: []
67
- }
68
- }), _ = ({ type: e, widgetAttr: t }) => {
69
- if (!o(e)) return r;
70
- if (c(t?.limit)) return g(t.limit);
71
- let n = s(t?.limit);
72
- return p(n) ? h(n) : r;
73
- }, v = (e, t) => e == null ? t : typeof e == "object" && "data" in e ? e.data ?? t : e, y = () => globalThis.window?.FX?.STATIC?.corpId || "", b = (e) => String(e), x = 1e4, S = ({ limits: e, departmentSelectableRange: t, rangeFlag: n, rangeIds: r, fallbackLimit: i }) => t && t.source !== "default" ? t[n] ? t[r] : [] : e?.[i] || [], C = ({ limits: e, departmentSelectableRange: t }) => t?.source === "rely-limit-array" ? t.departmentIds : S({
74
- limits: e,
75
- departmentSelectableRange: t,
76
- rangeFlag: "hasOutsiderGroupRange",
77
- rangeIds: "outsiderGroupIds",
78
- fallbackLimit: "groupLimit"
79
- }), w = ({ limits: e, departmentSelectableRange: t }) => S({
80
- limits: e,
81
- departmentSelectableRange: t,
82
- rangeFlag: "hasDepartmentRange",
83
- rangeIds: "departmentIds",
84
- fallbackLimit: "departmentLimit"
85
- }), T = (e, t) => {
86
- for (let n of t) {
87
- let t = e[n];
88
- if (typeof t == "number") return t;
89
- }
90
- }, E = (e, t) => ({
91
- items: e,
92
- total: t.total,
93
- hasMore: typeof t.total == "number" ? t.skip + e.length < t.total : e.length === t.limit
94
- }), D = async ({ requestContext: n, limits: r, departmentSelectableRange: i, hasDeptDock: a = !1, keyword: o = "" }) => v(await e.post(t("/v1/contact/data/member/departments"), {
95
- appId: n?.appId,
96
- entryId: n?.entryId,
97
- departmentLimit: w({
98
- limits: r,
99
- departmentSelectableRange: i
100
- }),
101
- hasDeptDock: a,
102
- ...o ? { key: o } : {}
103
- }), {
104
- departments: [],
105
- departments_count: 0,
106
- label_corp_list: [],
107
- label_corp_count: 0
108
- }), O = async ({ requestContext: n, limits: r, departmentId: i = null, limit: a = 100, skip: o = 0, hasDeptDock: s = !1, currentCorpId: c }) => {
109
- let l = v(await e.post(t("/v1/contact/data/member/users"), {
110
- appId: n?.appId,
111
- entryId: n?.entryId,
112
- departmentLimit: r?.departmentLimit || [],
113
- departmentId: i == null ? null : String(i),
114
- skip: o,
115
- limit: a,
116
- ...s ? {
117
- hasDeptDock: !0,
118
- current_corpid: c || ""
119
- } : {}
120
- }), {
121
- users: [],
122
- dock_user_list: []
123
- }), u = [...l.users || [], ...l.dock_user_list || []];
124
- return {
125
- ...l,
126
- ...E(u, {
127
- skip: o,
128
- limit: a,
129
- total: T(l, [
130
- "total",
131
- "count",
132
- "users_count"
133
- ])
134
- })
135
- };
136
- }, k = async ({ requestContext: n, hasDeptDock: r = !1 }) => v(await e.post(t("/v1/contact/department/list"), {
137
- hasDock: !0,
138
- ...r ? { hasDeptDock: !0 } : {},
139
- appId: n?.appId,
140
- entryId: n?.entryId
141
- }), {
142
- departments: [],
143
- departments_count: 0,
144
- label_corp_count: 0
145
- }), A = async ({ requestContext: n, deptId: r = "", limit: i = 100, skip: a = 0 }) => {
146
- let o = v(await e.post(t("/v1/contact/department/member/list"), {
147
- deptId: String(r),
148
- current_corpid: "",
149
- dock_corpid: "",
150
- msgType: "",
151
- hasDock: !0,
152
- hasAdmin: !1,
153
- hasGuest: !1,
154
- skip: a,
155
- limit: i,
156
- appId: n?.appId,
157
- entryId: n?.entryId
158
- }), {
159
- users: [],
160
- relation_list: []
161
- });
162
- return {
163
- ...o,
164
- ...E(o.users || [], {
165
- skip: a,
166
- limit: i,
167
- total: T(o, [
168
- "total",
169
- "count",
170
- "users_count"
171
- ])
172
- })
173
- };
174
- }, j = async ({ requestContext: n, limits: r }) => v(await e.post(t("/v1/contact/data/department/job_title"), {
175
- appId: n?.appId,
176
- entryId: n?.entryId,
177
- departmentLimit: r?.jobTitleDepartmentLimit || r?.departmentLimit || [],
178
- mode: "current"
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,
182
- appId: n?.appId,
183
- entryId: n?.entryId
184
- }), { items: [] }), N = async ({ requestContext: n, jobTitleId: r, jobTitle: i, limit: a = 100, skip: o = 0 }) => {
185
- let s = v(await e.post(t("/v1/contact/data/department/job_title_member"), {
186
- appId: n?.appId,
187
- entryId: n?.entryId,
188
- _id: r,
189
- job_title: i,
190
- limit: a,
191
- skip: o
192
- }), { list: [] });
193
- return {
194
- ...s,
195
- ...E(s.list || [], {
196
- skip: o,
197
- limit: a,
198
- total: T(s, ["total", "count"])
199
- })
200
- };
201
- }, P = async ({ requestContext: n, limits: r }) => v(await e.post(t("/v1/contact/data/member/roles"), {
202
- appId: n?.appId,
203
- entryId: n?.entryId,
204
- roleLimit: r?.roleLimit || []
205
- }), {
206
- roles: [],
207
- dock_role: []
208
- }), F = async ({ requestContext: n }) => v(await e.post(t("/v1/contact/role/list"), {
209
- corpId: y(),
210
- dock_corpid: "",
211
- hasDock: !0,
212
- appId: n?.appId,
213
- entryId: n?.entryId
214
- }), {
215
- roles: [],
216
- dock_role: []
217
- }), I = async ({ requestContext: n, roleId: r, roleLimit: i = [], limit: a = 100, skip: o = 0 }) => {
218
- let s = v(await e.post(t("/v1/contact/data/member/dept_role_users"), {
219
- appId: n?.appId,
220
- entryId: n?.entryId,
221
- roleId: b(r),
222
- roleLimit: i,
223
- limit: a,
224
- skip: o
225
- }), {
226
- users: [],
227
- dock_user_list: []
228
- }), c = [...s.users || [], ...s.dock_user_list || []];
229
- return {
230
- ...s,
231
- ...E(c, {
232
- skip: o,
233
- limit: a,
234
- total: T(s, [
235
- "total",
236
- "count",
237
- "users_count"
238
- ])
239
- })
240
- };
241
- }, L = async ({ requestContext: n, limits: r, departmentSelectableRange: i }) => v(await e.post(t("/v1/contact/data/outsider/list"), {
242
- appId: n?.appId,
243
- entryId: n?.entryId,
244
- groupLimit: C({
245
- limits: r,
246
- departmentSelectableRange: i
247
- })
248
- }), { list: [] }), R = async ({ requestContext: n }) => v(await e.post(t("/v1/contact/outsider/group/list"), {
249
- corpId: y(),
250
- appId: n?.appId,
251
- entryId: n?.entryId
252
- }), { list: [] }), z = async ({ requestContext: n, groupId: r = "", groupLimit: i = [], memberLimit: a = [], limit: o = 100, skip: s = 0 }) => {
253
- let c = v(await e.post(t("/v1/contact/data/outsider/member/list"), {
254
- appId: n?.appId,
255
- entryId: n?.entryId,
256
- group_id: r,
257
- groupLimit: i,
258
- memberLimit: a,
259
- skip: s,
260
- limit: o
261
- }), { list: [] });
262
- return {
263
- ...c,
264
- ...E(c.list || [], {
265
- skip: s,
266
- limit: o,
267
- total: T(c, ["total", "count"])
268
- })
269
- };
270
- }, B = async ({ requestContext: n, groupId: r = "", limit: i = 100, skip: a = 0 }) => {
271
- let o = v(await e.post(t("/v1/contact/outsider/member/list"), {
272
- appId: n?.appId,
273
- entryId: n?.entryId,
274
- group_id: r,
275
- skip: a,
276
- limit: i
277
- }), { list: [] });
278
- return {
279
- ...o,
280
- ...E(o.list || [], {
281
- skip: a,
282
- limit: i,
283
- total: T(o, ["total", "count"])
284
- })
285
- };
286
- }, V = async ({ requestContext: n } = {}) => v(await e.post(t("/v1/contact/relation/list"), {
287
- appId: n?.appId,
288
- entryId: n?.entryId
289
- }), { list: [] }), H = async ({ requestContext: r, keyword: i = "", memberSearchLimit: a, limit: o = 100, skip: s = 0 }) => {
290
- let c = a || n, l = v(await e.post(t("/v1/contact/data/member_limit"), {
291
- appId: r?.appId,
292
- entryId: r?.entryId,
293
- key: i,
294
- skip: s,
295
- limit: o,
296
- hasLimit: c.hasLimit,
297
- creator: c.creator,
298
- users: c.users,
299
- dockcorpValue: c.dockcorpValue,
300
- dockdeptValue: c.dockdeptValue,
301
- dockuserValue: c.dockuserValue,
302
- dockroleValue: c.dockroleValue,
303
- departs: c.departs,
304
- roles: c.roles,
305
- jobtitle: c.jobtitle
306
- }), {
307
- users: [],
308
- dock_user_list: []
309
- }), u = [...l.users || [], ...l.dock_user_list || []];
310
- return {
311
- ...l,
312
- ...E(u, {
313
- skip: s,
314
- limit: o,
315
- total: T(l, [
316
- "total",
317
- "count",
318
- "users_count"
319
- ])
320
- })
321
- };
322
- }, U = async ({ requestContext: n, keyword: r = "", groupLimit: i = [], memberLimit: a = [], limit: o = 100, skip: s = 0 }) => {
323
- let c = v(await e.post(t("/v1/contact/data/outsider/member/list"), {
324
- appId: n?.appId,
325
- entryId: n?.entryId,
326
- key: r,
327
- groupLimit: i,
328
- memberLimit: a,
329
- skip: s,
330
- limit: o
331
- }), { list: [] });
332
- return {
333
- ...c,
334
- ...E(c.list || [], {
335
- skip: s,
336
- limit: o,
337
- total: T(c, ["total", "count"])
338
- })
339
- };
340
- };
341
- //#endregion
342
- export { j as _, B as a, _ as b, F as c, H as d, U as f, z as g, L as h, R as i, N as l, O as m, k as n, M as o, D as p, A as r, V as s, x as t, I as u, P as v, r as y };