@baishuyun/ui-business 5.1.4 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DeptsMemberSelector/{Department-CkzkA99U.js → Department-12ftZfXD.js} +4 -4
- package/dist/DeptsMemberSelector/{DeptsMemberSelector-CGggVPiJ.js → DeptsMemberSelector-BXWGwgUq.js} +160 -154
- package/dist/DeptsMemberSelector/DeptsUser-C8hYQ6z-.js +790 -0
- package/dist/DeptsMemberSelector/ExtraConcactPanel-BDNrz5rV.js +647 -0
- package/dist/DeptsMemberSelector/Member-B4tEHksu.js +375 -0
- package/dist/DeptsMemberSelector/{OrganizationPanel-BAhvhgOL.js → OrganizationPanel-DoM4UNxv.js} +3 -3
- package/dist/DeptsMemberSelector/{RelationShipDepts-DadyalUU.js → RelationShipDepts-kpemRPz1.js} +1 -1
- package/dist/DeptsMemberSelector/{RelationShipList-BVTUyw1-.js → RelationShipList-BhiAdVjm.js} +1 -1
- package/dist/DeptsMemberSelector/{TabGroup-DjfuvblW.js → TabGroup-Ds7bTbKL.js} +20 -4
- package/dist/DeptsMemberSelector/index.js +10 -10
- package/dist/DeptsMemberSelector/services/contact/{selector.service-cz8fZZaA.js → selector.service-CY5vQea8.js} +5 -3
- package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +4 -4
- package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +7 -7
- package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +4 -4
- package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipDepts/index.js +2 -2
- package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +2 -2
- package/dist/DeptsMemberSelector/{useDeptsMemberSelector-xc9GWJaL.js → useDeptsMemberSelector-t7b8yu-A.js} +1 -1
- package/dist/DeptsMemberSelector/utils/index.js +7 -4
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersPositionPanel/DeptUsersPositionPanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersPositionPanel/useDeptUsersPositionPanelData.d.ts +50 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/DeptUsersRolePanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/useDeptUsersRolePanelData.d.ts +40 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipMember/RelationShipMember.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/useMemberRelationShipPanelData.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/utils/index.d.ts +2 -1
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/lang/en-US.json.d.ts +4 -1
- package/dist/lang/zh-CN.json.d.ts +4 -1
- package/dist/services/contact/selector.service.d.ts +6 -1
- package/dist/vendors/useLocale.js +8 -2
- package/package.json +1 -1
- package/dist/DeptsMemberSelector/DeptsUser-CaXbrm8n.js +0 -366
- package/dist/DeptsMemberSelector/ExtraConcactPanel-D5luX4_D.js +0 -953
- package/dist/DeptsMemberSelector/Member-DeBpChCx.js +0 -64
package/dist/DeptsMemberSelector/{DeptsMemberSelector-CGggVPiJ.js → DeptsMemberSelector-BXWGwgUq.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
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-
|
|
5
|
-
import { b as m, d as h, f as g, h as _, p as v, t as y } from "./services/contact/selector.service-
|
|
6
|
-
import { n as b, r as x } from "./TabGroup-
|
|
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";
|
|
6
|
+
import { n as b, r as x } from "./TabGroup-Ds7bTbKL.js";
|
|
7
7
|
import { t as S } from "../vendors/useLocale.js";
|
|
8
|
-
import { findNodeInTree as C, getColorByName as w } from "./utils/index.js";
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { forwardRef as
|
|
8
|
+
import { findNodeInTree as C, getColorByName as w, getMemberDisplayName as T } from "./utils/index.js";
|
|
9
|
+
import { t as E } from "./DeptsUser-C8hYQ6z-.js";
|
|
10
|
+
import { t as D } from "./Member-B4tEHksu.js";
|
|
11
|
+
import { n as O, t as k } from "./Department-12ftZfXD.js";
|
|
12
|
+
import { forwardRef as A, useCallback as ee, useEffect as j, useImperativeHandle as te, useMemo as M, useRef as N, useState as P } from "react";
|
|
13
13
|
import { Avatar as F, Button as I, Spin as L } from "antd";
|
|
14
|
-
import { Icon as R, Tree as
|
|
15
|
-
import { createPortal as
|
|
16
|
-
import { AnimatePresence as
|
|
17
|
-
import { useControllableValue as B, useRequest as V, useToggle as
|
|
14
|
+
import { Icon as R, Tree as ne } from "@baishuyun/ui-base";
|
|
15
|
+
import { createPortal as re } from "react-dom";
|
|
16
|
+
import { AnimatePresence as ie, motion as z } from "motion/react";
|
|
17
|
+
import { useControllableValue as B, useRequest as V, useToggle as ae } from "ahooks";
|
|
18
18
|
import { jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
19
|
-
import { produce as
|
|
19
|
+
import { produce as oe } from "immer";
|
|
20
20
|
//#region src/components/DeptsMemberSelector/subcomponents/SelectionArea/SelectionArea.module.scss
|
|
21
21
|
var W = {
|
|
22
22
|
"selection-area": "_selection-area_7ti3u_1",
|
|
@@ -31,14 +31,14 @@ var W = {
|
|
|
31
31
|
"selection-area__measure-group": "_selection-area__measure-group_7ti3u_53",
|
|
32
32
|
"selection-area__mask": "_selection-area__mask_7ti3u_61",
|
|
33
33
|
"selection-area__measure-wrapper": "_selection-area__measure-wrapper_7ti3u_67"
|
|
34
|
-
},
|
|
35
|
-
function
|
|
34
|
+
}, se = "bsy_dept_member", ce = "preset_bsy_dept_member";
|
|
35
|
+
function G(e, t) {
|
|
36
36
|
try {
|
|
37
37
|
let n = e.includes("-relationSub-") ? "relationSub" : e.includes("-relationUser-") ? "relationUser" : e.includes("-relation-") ? "relation" : null;
|
|
38
38
|
if (!n) return t;
|
|
39
|
-
let r = e.split("-")[0], i, a = sessionStorage.getItem(
|
|
39
|
+
let r = e.split("-")[0], i, a = sessionStorage.getItem(ce);
|
|
40
40
|
if (a && (i = JSON.parse(a).find((e) => String(e._id) === r)), !i) {
|
|
41
|
-
let e = sessionStorage.getItem(
|
|
41
|
+
let e = sessionStorage.getItem(se);
|
|
42
42
|
e && (i = JSON.parse(e).find((e) => String(e._id) === r));
|
|
43
43
|
}
|
|
44
44
|
if (!i) return t;
|
|
@@ -54,7 +54,7 @@ function ce(e, t) {
|
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/components/DeptsMemberSelector/subcomponents/SelectionArea/PreviewSelectedItems/PreviewSelectedItems.module.scss
|
|
57
|
-
var le = "_anticon_184kl_76",
|
|
57
|
+
var le = "_anticon_184kl_76", K = {
|
|
58
58
|
"preview-selected-items": "_preview-selected-items_184kl_1",
|
|
59
59
|
"preview-selected-items--measure": "_preview-selected-items--measure_184kl_4",
|
|
60
60
|
"preview-selected-items__wrapper": "_preview-selected-items__wrapper_184kl_13",
|
|
@@ -72,36 +72,36 @@ var le = "_anticon_184kl_76", G = {
|
|
|
72
72
|
anticon: le,
|
|
73
73
|
"preview-selected-items__more": "_preview-selected-items__more_184kl_83",
|
|
74
74
|
"preview-selected-items__more-button": "_preview-selected-items__more-button_184kl_89"
|
|
75
|
-
},
|
|
75
|
+
}, q = A((e, n) => {
|
|
76
76
|
let { isMeasure: i = !1, showEllipsisButton: a = !1, onToggle: o, hiddenCount: s = 0, previewCount: c = 0 } = e, { t: l } = S(), { value: u = [], setValue: d, type: p } = f(), m = N(null), h = N(null), g = {
|
|
77
77
|
dockcorp: l("department.externalContactGroup"),
|
|
78
78
|
dockcorpdept: l("department.contact")
|
|
79
79
|
}, _ = (e) => d?.(u.filter((t) => t._id !== e));
|
|
80
|
-
return
|
|
80
|
+
return te(n, () => ({
|
|
81
81
|
measureRef: m.current,
|
|
82
82
|
ellipsisButtonRef: h.current
|
|
83
83
|
})), /* @__PURE__ */ H("div", {
|
|
84
|
-
className: t(
|
|
84
|
+
className: t(K["preview-selected-items"], { [K["preview-selected-items--measure"]]: i }),
|
|
85
85
|
children: /* @__PURE__ */ U("ul", {
|
|
86
|
-
className:
|
|
86
|
+
className: K["preview-selected-items__list"],
|
|
87
87
|
ref: i ? m : void 0,
|
|
88
88
|
"data-role": i ? "measure-list" : "preview-list",
|
|
89
89
|
children: [u.slice(0, c)?.map((e, n) => {
|
|
90
|
-
let a = e
|
|
90
|
+
let a = T(e), o = e.type ? e.type : Object.prototype.hasOwnProperty.call(e, "departmentId") ? null : "group", s = [
|
|
91
91
|
"relation",
|
|
92
92
|
"relationSub",
|
|
93
93
|
"relationUser"
|
|
94
|
-
].some((t) => e._id.includes(t)), c = s ?
|
|
94
|
+
].some((t) => e._id.includes(t)), c = s ? G(e._id, a) : a, l = s ? "relation" : o, u = !!e.nickname;
|
|
95
95
|
return /* @__PURE__ */ U("li", {
|
|
96
|
-
className: t(
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
96
|
+
className: t(K["preview-selected-items__item"], {
|
|
97
|
+
[K["preview-selected-items__item--user"]]: [x.USER, x.USER_GROUP].includes(p),
|
|
98
|
+
[K["preview-selected-items__item--department"]]: [x.DEPARMENT, x.DEPARMENT_GROUP].includes(p),
|
|
99
|
+
[K["preview-selected-items__item--relation"]]: s,
|
|
100
|
+
[K["preview-selected-items__item--public"]]: e.type === "public"
|
|
101
101
|
}),
|
|
102
102
|
children: [
|
|
103
103
|
/* @__PURE__ */ H("div", {
|
|
104
|
-
className:
|
|
104
|
+
className: K["preview-selected-items__content"],
|
|
105
105
|
children: u ? e.avatarurl ? /* @__PURE__ */ H(F, {
|
|
106
106
|
src: e.avatarurl,
|
|
107
107
|
size: 20
|
|
@@ -117,14 +117,14 @@ var le = "_anticon_184kl_76", G = {
|
|
|
117
117
|
}) : /* @__PURE__ */ H(b, { type: l })
|
|
118
118
|
}),
|
|
119
119
|
/* @__PURE__ */ U("div", {
|
|
120
|
-
className:
|
|
120
|
+
className: K["preview-selected-items__text"],
|
|
121
121
|
"data-type": e.type,
|
|
122
122
|
children: [/* @__PURE__ */ H("span", {
|
|
123
|
-
className:
|
|
123
|
+
className: K["preview-selected-items__name"],
|
|
124
124
|
title: c,
|
|
125
125
|
children: c
|
|
126
126
|
}), e.type === "dockcorpdept" || e.type === "dockcorp" ? /* @__PURE__ */ U("span", {
|
|
127
|
-
className:
|
|
127
|
+
className: K["preview-selected-items__badge"],
|
|
128
128
|
children: [
|
|
129
129
|
"(",
|
|
130
130
|
g[e.type],
|
|
@@ -134,7 +134,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
134
134
|
}),
|
|
135
135
|
/* @__PURE__ */ H("div", {
|
|
136
136
|
role: "button",
|
|
137
|
-
className:
|
|
137
|
+
className: K["preview-selected-items__close"],
|
|
138
138
|
onClick: i ? r : () => _(e._id),
|
|
139
139
|
children: /* @__PURE__ */ H(R, {
|
|
140
140
|
name: "close",
|
|
@@ -145,11 +145,11 @@ var le = "_anticon_184kl_76", G = {
|
|
|
145
145
|
}, n);
|
|
146
146
|
}), a && !i && /* @__PURE__ */ H("li", {
|
|
147
147
|
ref: h,
|
|
148
|
-
className:
|
|
148
|
+
className: K["preview-selected-items__more"],
|
|
149
149
|
"data-button": "ellipsis-button",
|
|
150
150
|
children: /* @__PURE__ */ U("div", {
|
|
151
151
|
role: "button",
|
|
152
|
-
className:
|
|
152
|
+
className: K["preview-selected-items__more-button"],
|
|
153
153
|
onClick: () => {
|
|
154
154
|
o?.();
|
|
155
155
|
},
|
|
@@ -159,14 +159,14 @@ var le = "_anticon_184kl_76", G = {
|
|
|
159
159
|
})
|
|
160
160
|
});
|
|
161
161
|
}), ue = () => {
|
|
162
|
-
let { value: n = [], type: r } = f(), { t: i } = S(), [a, o] = P(0), [s, { toggle: c }] =
|
|
163
|
-
|
|
162
|
+
let { value: n = [], type: r } = f(), { t: i } = S(), [a, o] = P(0), [s, { toggle: c }] = ae(!1), [l, u] = P(!1), [d, p] = P(null), m = N(null), h = N(null), g = [x.DEPARMENT, x.USER].includes(r) ? 30 : 68;
|
|
163
|
+
j(() => {
|
|
164
164
|
s && u(!0);
|
|
165
165
|
}, [s]);
|
|
166
166
|
let _ = () => {
|
|
167
167
|
s || u(!1);
|
|
168
168
|
}, [v, y] = P(!1);
|
|
169
|
-
|
|
169
|
+
j(() => {
|
|
170
170
|
if (!m.current || !h.current) return;
|
|
171
171
|
let e = () => {
|
|
172
172
|
requestAnimationFrame(() => {
|
|
@@ -214,7 +214,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
214
214
|
/* @__PURE__ */ U("div", {
|
|
215
215
|
className: t(W["selection-area__body"], { [W["selection-area__body--expanded"]]: s }),
|
|
216
216
|
ref: h,
|
|
217
|
-
children: [/* @__PURE__ */ H(
|
|
217
|
+
children: [/* @__PURE__ */ H(q, {
|
|
218
218
|
isMeasure: !0,
|
|
219
219
|
previewCount: n.length
|
|
220
220
|
}), /* @__PURE__ */ H(e, {
|
|
@@ -225,7 +225,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
225
225
|
className: W["selection-area__scroll"],
|
|
226
226
|
ref: m,
|
|
227
227
|
style: { height: w + "px" },
|
|
228
|
-
children: /* @__PURE__ */ H(
|
|
228
|
+
children: /* @__PURE__ */ H(q, {
|
|
229
229
|
previewCount: s ? n.length : a,
|
|
230
230
|
showEllipsisButton: C,
|
|
231
231
|
hiddenCount: b,
|
|
@@ -237,7 +237,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
237
237
|
})
|
|
238
238
|
})]
|
|
239
239
|
}),
|
|
240
|
-
d &&
|
|
240
|
+
d && re(/* @__PURE__ */ H(ie, { children: s && /* @__PURE__ */ H(z.div, {
|
|
241
241
|
className: W["selection-area__mask"],
|
|
242
242
|
initial: {
|
|
243
243
|
opacity: 0,
|
|
@@ -257,9 +257,9 @@ var le = "_anticon_184kl_76", G = {
|
|
|
257
257
|
},
|
|
258
258
|
onAnimationComplete: _
|
|
259
259
|
}) }), d),
|
|
260
|
-
/* @__PURE__ */ H(
|
|
260
|
+
/* @__PURE__ */ H(ie, {
|
|
261
261
|
mode: "wait",
|
|
262
|
-
children: s && /* @__PURE__ */ H(
|
|
262
|
+
children: s && /* @__PURE__ */ H(z.div, {
|
|
263
263
|
className: W["selection-area__button"],
|
|
264
264
|
initial: { opacity: 1 },
|
|
265
265
|
exit: { opacity: 0 },
|
|
@@ -275,7 +275,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
275
275
|
]
|
|
276
276
|
})
|
|
277
277
|
});
|
|
278
|
-
},
|
|
278
|
+
}, J = {
|
|
279
279
|
"selection-tab-list": "_selection-tab-list_ujxba_1",
|
|
280
280
|
"selection-tab-list__tabs-wrapper": "_selection-tab-list__tabs-wrapper_ujxba_8",
|
|
281
281
|
"selection-tab-list__tabs": "_selection-tab-list__tabs_ujxba_8",
|
|
@@ -291,7 +291,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
291
291
|
width: 0,
|
|
292
292
|
transform: "translateX(0)"
|
|
293
293
|
}), u = N(n((t) => e.onSearch?.(t), 250)).current;
|
|
294
|
-
|
|
294
|
+
j(() => () => {
|
|
295
295
|
u.cancel();
|
|
296
296
|
}, [u]);
|
|
297
297
|
let d = (e) => {
|
|
@@ -304,34 +304,34 @@ var le = "_anticon_184kl_76", G = {
|
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
|
-
return
|
|
307
|
+
return j(() => {
|
|
308
308
|
let t = r && e.tabs.some((e) => e.key === r) ? r : e.tabs.length ? e.tabs[0].key : void 0;
|
|
309
309
|
t && d(t);
|
|
310
310
|
}, [e.tabs, r]), /* @__PURE__ */ U("div", {
|
|
311
|
-
className:
|
|
311
|
+
className: J["selection-tab-list"],
|
|
312
312
|
children: [/* @__PURE__ */ U("div", {
|
|
313
|
-
className:
|
|
313
|
+
className: J["selection-tab-list__tabs-wrapper"],
|
|
314
314
|
children: [/* @__PURE__ */ H("div", {
|
|
315
|
-
className:
|
|
315
|
+
className: J["selection-tab-list__indicator"],
|
|
316
316
|
style: {
|
|
317
317
|
width: `${c.width}px`,
|
|
318
318
|
transform: c.transform
|
|
319
319
|
}
|
|
320
320
|
}), /* @__PURE__ */ H("ul", {
|
|
321
|
-
className:
|
|
321
|
+
className: J["selection-tab-list__tabs"],
|
|
322
322
|
children: e.tabs.map((e) => /* @__PURE__ */ H("li", {
|
|
323
323
|
ref: (t) => {
|
|
324
324
|
t && s.current.set(e.key, t);
|
|
325
325
|
},
|
|
326
326
|
onClick: () => i(e.key),
|
|
327
|
-
className: t(
|
|
327
|
+
className: t(J["selection-tab-list__item"], { [J["selection-tab-list__item--active"]]: r === e.key }),
|
|
328
328
|
children: e.label
|
|
329
329
|
}, e.key))
|
|
330
330
|
})]
|
|
331
331
|
}), /* @__PURE__ */ H("div", {
|
|
332
|
-
className:
|
|
332
|
+
className: J["selection-tab-list__search"],
|
|
333
333
|
children: /* @__PURE__ */ U("div", {
|
|
334
|
-
className:
|
|
334
|
+
className: J["selection-tab-list__search-field"],
|
|
335
335
|
children: [/* @__PURE__ */ H("input", {
|
|
336
336
|
type: "text",
|
|
337
337
|
value: a,
|
|
@@ -339,10 +339,10 @@ var le = "_anticon_184kl_76", G = {
|
|
|
339
339
|
o(e.target.value), u(e.target.value);
|
|
340
340
|
},
|
|
341
341
|
placeholder: e.searchPlaceholder,
|
|
342
|
-
className:
|
|
342
|
+
className: J["selection-tab-list__input"]
|
|
343
343
|
}), /* @__PURE__ */ H(R, {
|
|
344
344
|
name: "search",
|
|
345
|
-
className:
|
|
345
|
+
className: J["selection-tab-list__search-icon"]
|
|
346
346
|
})]
|
|
347
347
|
})
|
|
348
348
|
})]
|
|
@@ -354,7 +354,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
354
354
|
style: { height: n + "px" },
|
|
355
355
|
children: e.children
|
|
356
356
|
});
|
|
357
|
-
}, me = { "selection-tabs": "_selection-tabs_88491_1" },
|
|
357
|
+
}, me = { "selection-tabs": "_selection-tabs_88491_1" }, Y = {
|
|
358
358
|
"member-search": "_member-search_162pf_1",
|
|
359
359
|
"member-search__tree-wrapper": "_member-search__tree-wrapper_162pf_6",
|
|
360
360
|
"member-search__tree-content": "_member-search__tree-content_162pf_9",
|
|
@@ -365,8 +365,8 @@ var le = "_anticon_184kl_76", G = {
|
|
|
365
365
|
"member-search__switch-icon--expanded": "_member-search__switch-icon--expanded_162pf_41",
|
|
366
366
|
"member-search__empty": "_member-search__empty_162pf_44",
|
|
367
367
|
"member-search__empty-text": "_member-search__empty-text_162pf_51"
|
|
368
|
-
},
|
|
369
|
-
className:
|
|
368
|
+
}, X = ({ avatarurl: e, randomColor: t, name: n, extra: r }) => /* @__PURE__ */ U("div", {
|
|
369
|
+
className: Y["member-search__tree-title"],
|
|
370
370
|
children: [
|
|
371
371
|
e ? /* @__PURE__ */ H(F, {
|
|
372
372
|
src: e,
|
|
@@ -384,7 +384,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
384
384
|
children: n.charAt(0)
|
|
385
385
|
}),
|
|
386
386
|
/* @__PURE__ */ H("span", {
|
|
387
|
-
className:
|
|
387
|
+
className: Y["member-search__tree-name"],
|
|
388
388
|
children: n
|
|
389
389
|
}),
|
|
390
390
|
r
|
|
@@ -402,7 +402,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
402
402
|
o?.entryId,
|
|
403
403
|
u.enabled,
|
|
404
404
|
_
|
|
405
|
-
] }), { data:
|
|
405
|
+
] }), { data: E, loading: D } = V(async () => {
|
|
406
406
|
if (!u.enabled || !m) return [];
|
|
407
407
|
let t = await h({
|
|
408
408
|
requestContext: o,
|
|
@@ -417,19 +417,20 @@ var le = "_anticon_184kl_76", G = {
|
|
|
417
417
|
o?.entryId,
|
|
418
418
|
u.enabled,
|
|
419
419
|
m
|
|
420
|
-
] }),
|
|
420
|
+
] }), O = v || [], k = E || [], A = [_ ? {
|
|
421
421
|
title: p("externalContact.title"),
|
|
422
422
|
value: "waibulianxiren",
|
|
423
|
-
children:
|
|
424
|
-
let t = e
|
|
423
|
+
children: O.map((e) => {
|
|
424
|
+
let t = T(e), n = w(t);
|
|
425
425
|
return {
|
|
426
426
|
...e,
|
|
427
|
-
|
|
427
|
+
name: t,
|
|
428
|
+
title: /* @__PURE__ */ H(X, {
|
|
428
429
|
avatarurl: e.avatarurl,
|
|
429
430
|
randomColor: n,
|
|
430
431
|
name: t,
|
|
431
432
|
extra: /* @__PURE__ */ U("span", {
|
|
432
|
-
className:
|
|
433
|
+
className: Y["member-search__tree-extra"],
|
|
433
434
|
children: [
|
|
434
435
|
"(",
|
|
435
436
|
p("externalContact.title"),
|
|
@@ -445,16 +446,17 @@ var le = "_anticon_184kl_76", G = {
|
|
|
445
446
|
} : void 0, m ? {
|
|
446
447
|
title: p("member.title"),
|
|
447
448
|
value: "chengyuan",
|
|
448
|
-
children:
|
|
449
|
-
let t = e
|
|
449
|
+
children: k.map((e) => {
|
|
450
|
+
let t = T(e), n = w(t);
|
|
450
451
|
return {
|
|
451
452
|
...e,
|
|
452
|
-
|
|
453
|
+
name: t,
|
|
454
|
+
title: /* @__PURE__ */ H(X, {
|
|
453
455
|
avatarurl: e.avatarurl,
|
|
454
456
|
randomColor: n,
|
|
455
457
|
name: t,
|
|
456
458
|
extra: /* @__PURE__ */ H("span", {
|
|
457
|
-
className:
|
|
459
|
+
className: Y["member-search__tree-extra"],
|
|
458
460
|
children: e.user_type === "dock_user" ? `(${p("department.external")}:${e.dock_corpname})` : e.deptnames
|
|
459
461
|
})
|
|
460
462
|
}),
|
|
@@ -464,21 +466,21 @@ var le = "_anticon_184kl_76", G = {
|
|
|
464
466
|
} : void 0].filter((e) => !!e?.children.length);
|
|
465
467
|
return {
|
|
466
468
|
containerHeight: a,
|
|
467
|
-
treeData:
|
|
468
|
-
defaultExpandedKeys:
|
|
469
|
+
treeData: A,
|
|
470
|
+
defaultExpandedKeys: A.map((e) => e.value),
|
|
469
471
|
defaultSelectedKeys: i?.map((e) => e._id),
|
|
470
|
-
isLoading:
|
|
472
|
+
isLoading: D || b,
|
|
471
473
|
checkType: n === x.USER ? "radio" : "checkbox",
|
|
472
474
|
handleSelectMember: (e) => {
|
|
473
475
|
if (x.USER === n) {
|
|
474
|
-
let t = C(e,
|
|
476
|
+
let t = C(e, A);
|
|
475
477
|
t && r({
|
|
476
478
|
type: "insertOnly",
|
|
477
479
|
payload: { ...t }
|
|
478
480
|
});
|
|
479
481
|
}
|
|
480
482
|
if (x.USER_GROUP === n) {
|
|
481
|
-
let t = C(e,
|
|
483
|
+
let t = C(e, A);
|
|
482
484
|
if (!t) return;
|
|
483
485
|
r({
|
|
484
486
|
type: "addOne",
|
|
@@ -496,22 +498,22 @@ var le = "_anticon_184kl_76", G = {
|
|
|
496
498
|
}, ge = (n) => {
|
|
497
499
|
let { t: r } = S(), i = he({ wd: n.wd });
|
|
498
500
|
return /* @__PURE__ */ U("div", {
|
|
499
|
-
className:
|
|
501
|
+
className: Y["member-search"],
|
|
500
502
|
children: [/* @__PURE__ */ H(L, {
|
|
501
503
|
spinning: i.isLoading,
|
|
502
504
|
children: /* @__PURE__ */ H(e, {
|
|
503
505
|
style: { height: i.containerHeight - 8 },
|
|
504
|
-
className:
|
|
506
|
+
className: Y["member-search__tree-wrapper"],
|
|
505
507
|
children: i.treeData.length && !i.isLoading ? /* @__PURE__ */ H("div", {
|
|
506
|
-
className:
|
|
507
|
-
children: /* @__PURE__ */ H(
|
|
508
|
+
className: Y["member-search__tree-content"],
|
|
509
|
+
children: /* @__PURE__ */ H(ne, {
|
|
508
510
|
data: i.treeData,
|
|
509
511
|
checkType: i.checkType,
|
|
510
512
|
defaultSelectedKeys: i.defaultSelectedKeys,
|
|
511
513
|
defaultExpandedKeys: i.defaultExpandedKeys,
|
|
512
514
|
switcherIcon: (e) => /* @__PURE__ */ H(R, {
|
|
513
515
|
name: "xiangxiazhankai-11",
|
|
514
|
-
className: t(
|
|
516
|
+
className: t(Y["member-search__switch-icon"], { [Y["member-search__switch-icon--expanded"]]: e })
|
|
515
517
|
}),
|
|
516
518
|
onSelect: i.handleSelectMember,
|
|
517
519
|
onDeSelect: i.handleDeSelectMember
|
|
@@ -519,14 +521,14 @@ var le = "_anticon_184kl_76", G = {
|
|
|
519
521
|
}) : null
|
|
520
522
|
})
|
|
521
523
|
}), !i.treeData.length && !i.isLoading && /* @__PURE__ */ H("div", {
|
|
522
|
-
className:
|
|
524
|
+
className: Y["member-search__empty"],
|
|
523
525
|
children: /* @__PURE__ */ H("span", {
|
|
524
|
-
className:
|
|
526
|
+
className: Y["member-search__empty-text"],
|
|
525
527
|
children: r("member.noAvailable")
|
|
526
528
|
})
|
|
527
529
|
})]
|
|
528
530
|
});
|
|
529
|
-
},
|
|
531
|
+
}, Z = {
|
|
530
532
|
"department-search": "_department-search_i1rya_1",
|
|
531
533
|
"department-search__scroll": "_department-search__scroll_i1rya_5",
|
|
532
534
|
"department-search__tree-content": "_department-search__tree-content_i1rya_8",
|
|
@@ -539,7 +541,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
539
541
|
"department-search__empty": "_department-search__empty_i1rya_42",
|
|
540
542
|
"department-search__empty-text": "_department-search__empty-text_i1rya_49"
|
|
541
543
|
}, _e = ({ wd: e }) => {
|
|
542
|
-
let { type: t, dispatch: n, value: r, containerHeight: i, requestContext: a, limits: s, departmentSelectableRange: c, departmentPanelRequestGuard: l } = f(), { t: d } = S(), p = M(() =>
|
|
544
|
+
let { type: t, dispatch: n, value: r, containerHeight: i, requestContext: a, limits: s, departmentSelectableRange: c, departmentPanelRequestGuard: l } = f(), { t: d } = S(), p = M(() => O(c), [c]), { data: m, loading: h } = V(() => o(l, () => v({
|
|
543
545
|
requestContext: a,
|
|
544
546
|
limits: s,
|
|
545
547
|
departmentSelectableRange: c,
|
|
@@ -560,18 +562,18 @@ var le = "_anticon_184kl_76", G = {
|
|
|
560
562
|
c,
|
|
561
563
|
p.externalContactGroup,
|
|
562
564
|
l
|
|
563
|
-
] }), C = g?.list || [], w = m?.departments || [], T = (m?.label_corp_list || []).filter((e) => e.type !== "dockcorpdept"), E = [...w, ...T].filter((e) => e.type !== "label"),
|
|
565
|
+
] }), C = g?.list || [], w = m?.departments || [], T = (m?.label_corp_list || []).filter((e) => e.type !== "dockcorpdept"), E = [...w, ...T].filter((e) => e.type !== "label"), D = [p.externalContactGroup ? {
|
|
564
566
|
title: d("externalContact.group"),
|
|
565
567
|
_id: "waibulianxiren",
|
|
566
568
|
children: C.filter((t) => t.status === 1 && t.name?.includes(e)).map((e) => ({
|
|
567
569
|
...e,
|
|
568
570
|
title: /* @__PURE__ */ U("span", {
|
|
569
|
-
className:
|
|
571
|
+
className: Z["department-search__title"],
|
|
570
572
|
children: [/* @__PURE__ */ H(b, {
|
|
571
573
|
type: "group",
|
|
572
574
|
size: 16
|
|
573
575
|
}), /* @__PURE__ */ H("span", {
|
|
574
|
-
className:
|
|
576
|
+
className: Z["department-search__name"],
|
|
575
577
|
children: e.name
|
|
576
578
|
})]
|
|
577
579
|
})
|
|
@@ -582,15 +584,15 @@ var le = "_anticon_184kl_76", G = {
|
|
|
582
584
|
children: E.map((e) => ({
|
|
583
585
|
...e,
|
|
584
586
|
title: /* @__PURE__ */ U("span", {
|
|
585
|
-
className:
|
|
587
|
+
className: Z["department-search__title"],
|
|
586
588
|
children: [
|
|
587
589
|
/* @__PURE__ */ H(R, {
|
|
588
590
|
name: "dept-one",
|
|
589
|
-
className:
|
|
591
|
+
className: Z["department-search__icon"],
|
|
590
592
|
size: 16
|
|
591
593
|
}),
|
|
592
594
|
/* @__PURE__ */ H("span", {
|
|
593
|
-
className:
|
|
595
|
+
className: Z["department-search__name"],
|
|
594
596
|
children: e.name
|
|
595
597
|
}),
|
|
596
598
|
[
|
|
@@ -598,7 +600,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
598
600
|
"dockcorp",
|
|
599
601
|
"dockcorpdept"
|
|
600
602
|
].includes(e.type) && /* @__PURE__ */ U("span", {
|
|
601
|
-
className:
|
|
603
|
+
className: Z["department-search__extra"],
|
|
602
604
|
children: [
|
|
603
605
|
"(",
|
|
604
606
|
d("department.external"),
|
|
@@ -611,8 +613,8 @@ var le = "_anticon_184kl_76", G = {
|
|
|
611
613
|
} : null].filter((e) => !!e?.children.length);
|
|
612
614
|
return {
|
|
613
615
|
containerHeight: i,
|
|
614
|
-
treeData:
|
|
615
|
-
defaultExpandedKeys:
|
|
616
|
+
treeData: D,
|
|
617
|
+
defaultExpandedKeys: D.map((e) => e._id),
|
|
616
618
|
selectedKeys: r?.map((e) => e._id),
|
|
617
619
|
isLoading: h || y,
|
|
618
620
|
checkType: t === x.DEPARMENT ? "radio" : "checkbox",
|
|
@@ -643,18 +645,18 @@ var le = "_anticon_184kl_76", G = {
|
|
|
643
645
|
payload: e
|
|
644
646
|
})
|
|
645
647
|
};
|
|
646
|
-
},
|
|
648
|
+
}, ve = (n) => {
|
|
647
649
|
let { t: r } = S(), i = _e({ wd: n.wd });
|
|
648
650
|
return /* @__PURE__ */ U("div", {
|
|
649
|
-
className:
|
|
651
|
+
className: Z["department-search"],
|
|
650
652
|
children: [/* @__PURE__ */ H(L, {
|
|
651
653
|
spinning: i.isLoading,
|
|
652
654
|
children: /* @__PURE__ */ H(e, {
|
|
653
655
|
style: { height: i.containerHeight - 8 },
|
|
654
|
-
className:
|
|
656
|
+
className: Z["department-search__scroll"],
|
|
655
657
|
children: i.treeData.length && !i.isLoading ? /* @__PURE__ */ H("div", {
|
|
656
|
-
className:
|
|
657
|
-
children: /* @__PURE__ */ H(
|
|
658
|
+
className: Z["department-search__tree-content"],
|
|
659
|
+
children: /* @__PURE__ */ H(ne, {
|
|
658
660
|
data: i.treeData,
|
|
659
661
|
checkType: i.checkType,
|
|
660
662
|
selectedKeys: i.selectedKeys,
|
|
@@ -666,7 +668,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
666
668
|
defaultExpandedKeys: i.defaultExpandedKeys,
|
|
667
669
|
switcherIcon: (e) => /* @__PURE__ */ H(R, {
|
|
668
670
|
name: "xiangxiazhankai-11",
|
|
669
|
-
className: t(
|
|
671
|
+
className: t(Z["department-search__switch-icon"], { [Z["department-search__switch-icon--expanded"]]: e })
|
|
670
672
|
}),
|
|
671
673
|
onSelect: i.handleSelectDepartment,
|
|
672
674
|
onDeSelect: i.handleDeSelectDepartment
|
|
@@ -674,33 +676,33 @@ var le = "_anticon_184kl_76", G = {
|
|
|
674
676
|
}) : null
|
|
675
677
|
})
|
|
676
678
|
}), !i.treeData.length && !i.isLoading && /* @__PURE__ */ H("div", {
|
|
677
|
-
className:
|
|
679
|
+
className: Z["department-search__empty"],
|
|
678
680
|
children: /* @__PURE__ */ H("span", {
|
|
679
|
-
className:
|
|
681
|
+
className: Z["department-search__empty-text"],
|
|
680
682
|
children: r("department.noAvailable")
|
|
681
683
|
})
|
|
682
684
|
})]
|
|
683
685
|
});
|
|
684
|
-
},
|
|
686
|
+
}, ye = ({ wd: e, t, memberTabItems: n }) => ({
|
|
685
687
|
raw: /* @__PURE__ */ H(ge, { wd: e }),
|
|
686
688
|
placeholder: t("tabs.searchMember"),
|
|
687
689
|
tabItems: n
|
|
688
|
-
}),
|
|
689
|
-
raw: /* @__PURE__ */ H(
|
|
690
|
+
}), be = ({ wd: e, t, departmentTabItems: n }) => ({
|
|
691
|
+
raw: /* @__PURE__ */ H(ve, { wd: e }),
|
|
690
692
|
placeholder: t("tabs.searchDepartment"),
|
|
691
693
|
tabItems: n
|
|
692
|
-
}),
|
|
693
|
-
user:
|
|
694
|
-
usergroup:
|
|
695
|
-
dept:
|
|
696
|
-
deptgroup:
|
|
694
|
+
}), xe = {
|
|
695
|
+
user: ye,
|
|
696
|
+
usergroup: ye,
|
|
697
|
+
dept: be,
|
|
698
|
+
deptgroup: be,
|
|
697
699
|
deptusers: ({ wd: e, t, deptUserTabItems: n }) => ({
|
|
698
|
-
raw: /* @__PURE__ */ H(
|
|
700
|
+
raw: /* @__PURE__ */ H(ve, { wd: e }),
|
|
699
701
|
placeholder: t("common.searchPlaceholder"),
|
|
700
702
|
tabItems: n
|
|
701
703
|
})
|
|
702
|
-
},
|
|
703
|
-
let n =
|
|
704
|
+
}, Se = (e, t) => {
|
|
705
|
+
let n = D(), r = k(), i = E(), { t: a } = S(), o = xe[e];
|
|
704
706
|
if (!o) throw Error(`No search strategy found for type: ${e}`);
|
|
705
707
|
return { config: o({
|
|
706
708
|
wd: t,
|
|
@@ -709,9 +711,9 @@ var le = "_anticon_184kl_76", G = {
|
|
|
709
711
|
departmentTabItems: r,
|
|
710
712
|
deptUserTabItems: i
|
|
711
713
|
}) };
|
|
712
|
-
},
|
|
713
|
-
let { type: e } = f(), [n, r] = P(), { config: i } =
|
|
714
|
-
|
|
714
|
+
}, Ce = () => {
|
|
715
|
+
let { type: e } = f(), [n, r] = P(), { config: i } = Se(e, n), { tabItems: a } = i, [o, s] = P(a[0].key);
|
|
716
|
+
j(() => {
|
|
715
717
|
a.length && (a.some((e) => e.key === o) || (s(a[0].key), r(void 0)));
|
|
716
718
|
}, [a, o]);
|
|
717
719
|
let c = (e) => {
|
|
@@ -733,7 +735,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
733
735
|
searchPlaceholder: p
|
|
734
736
|
}), /* @__PURE__ */ H(pe, { children: d })]
|
|
735
737
|
});
|
|
736
|
-
},
|
|
738
|
+
}, we = (e, t) => oe(e, (e) => {
|
|
737
739
|
switch (t.type) {
|
|
738
740
|
case "addOne": {
|
|
739
741
|
let n = t.payload;
|
|
@@ -787,39 +789,39 @@ var le = "_anticon_184kl_76", G = {
|
|
|
787
789
|
"depts-member__actions": "_depts-member__actions_s7xsa_43",
|
|
788
790
|
"depts-member__cancel-button": "_depts-member__cancel-button_s7xsa_50",
|
|
789
791
|
"depts-member__confirm-button": "_depts-member__confirm-button_s7xsa_53"
|
|
790
|
-
},
|
|
792
|
+
}, Te = () => {
|
|
791
793
|
if (!(typeof window > "u")) return window.FX?.STATIC?.user;
|
|
792
|
-
},
|
|
794
|
+
}, Ee = (e) => {
|
|
793
795
|
let t = e?._id ?? e?.id;
|
|
794
796
|
return t == null || t === "" ? "" : String(t);
|
|
795
|
-
},
|
|
797
|
+
}, De = (e) => {
|
|
796
798
|
let t = /* @__PURE__ */ new Set();
|
|
797
799
|
return e.filter((e) => {
|
|
798
|
-
let n =
|
|
800
|
+
let n = Ee(e);
|
|
799
801
|
return !n || t.has(n) ? !1 : (t.add(n), !0);
|
|
800
802
|
});
|
|
801
|
-
},
|
|
803
|
+
}, Oe = (e) => ({
|
|
802
804
|
current_departments: e?.current_departments || [],
|
|
803
805
|
current_sub_departments: e?.current_sub_departments || [],
|
|
804
806
|
dock_current_departments: e?.dock_current_departments || [],
|
|
805
807
|
dock_current_sub_departments: e?.dock_current_sub_departments || []
|
|
806
|
-
}),
|
|
808
|
+
}), ke = (e) => {
|
|
807
809
|
if (!e) return [];
|
|
808
810
|
let t = e.name ?? e.nickname ?? e.username ?? "";
|
|
809
|
-
return
|
|
811
|
+
return De([Ee(e), e.dock_userid === void 0 || e.dock_userid === null || e.dock_userid === "" ? "" : String(e.dock_userid)].filter(Boolean).map((n) => ({
|
|
810
812
|
...e,
|
|
811
813
|
_id: n,
|
|
812
814
|
id: n,
|
|
813
815
|
name: t
|
|
814
816
|
})));
|
|
815
|
-
},
|
|
817
|
+
}, Ae = (e) => typeof e == "string" ? e.trim().length > 0 : !e || Array.isArray(e) ? !1 : Object.keys(e).length > 0, je = (e, t) => !["user", "usergroup"].includes(e) || !t ? l : Ae(t.limitWidget) && Array.isArray(t.limit) ? t.limit.length === 0 ? {
|
|
816
818
|
enabled: !1,
|
|
817
819
|
reason: a.LIMIT_WIDGET_EMPTY_ARRAY
|
|
818
820
|
} : {
|
|
819
821
|
enabled: !0,
|
|
820
822
|
reason: a.ALLOWED
|
|
821
|
-
} : l,
|
|
822
|
-
let t =
|
|
823
|
+
} : l, Me = (e) => {
|
|
824
|
+
let t = Te(), n = Oe(t), r = e.type || "user";
|
|
823
825
|
return {
|
|
824
826
|
type: r,
|
|
825
827
|
auth: {
|
|
@@ -839,20 +841,20 @@ var le = "_anticon_184kl_76", G = {
|
|
|
839
841
|
widgetAttr: e.widgetAttr
|
|
840
842
|
}),
|
|
841
843
|
currentContext: n,
|
|
842
|
-
currentUsers:
|
|
844
|
+
currentUsers: ke(t),
|
|
843
845
|
memberPanelVisibility: p(r, e.widgetAttr),
|
|
844
|
-
memberPanelRequestGuard:
|
|
846
|
+
memberPanelRequestGuard: je(r, e.widgetAttr)
|
|
845
847
|
};
|
|
846
|
-
},
|
|
848
|
+
}, Ne = [
|
|
847
849
|
"departs",
|
|
848
850
|
"dockcorpValue",
|
|
849
851
|
"dockdeptValue",
|
|
850
852
|
"outsiderGroup"
|
|
851
|
-
],
|
|
852
|
-
if (!
|
|
853
|
+
], Pe = (e) => Array.isArray(e) && e.some((e) => e != null && e !== ""), Fe = (e) => e == null ? !0 : Array.isArray(e) ? !Pe(e) : typeof e == "object" ? !Ne.some((t) => Pe(e[t])) : !0, Ie = (e) => e === "dept" || e === "deptgroup", Le = ({ type: e, widgetAttr: t, status: n, hasRequestHandler: r }) => {
|
|
854
|
+
if (!Ie(e) || !t || !r || n !== "idle" || t.valueOption !== 0 || !Fe(t.limit)) return !1;
|
|
853
855
|
let i = t.rely;
|
|
854
856
|
return !i || typeof i != "object" ? !1 : i.data != null;
|
|
855
|
-
},
|
|
857
|
+
}, Re = ({ type: e, widgetAttr: t, requestContext: n }) => ({
|
|
856
858
|
type: e,
|
|
857
859
|
widgetName: t?.widgetName,
|
|
858
860
|
rely: t?.rely,
|
|
@@ -864,7 +866,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
864
866
|
items: t?.items,
|
|
865
867
|
requestContext: n,
|
|
866
868
|
widgetAttr: t
|
|
867
|
-
}), $ = (e) => Array.isArray(e) ? e.map($) : e && typeof e == "object" ? Object.keys(e).sort().reduce((t, n) => (t[n] = $(e[n]), t), {}) : e ?? null,
|
|
869
|
+
}), $ = (e) => Array.isArray(e) ? e.map($) : e && typeof e == "object" ? Object.keys(e).sort().reduce((t, n) => (t[n] = $(e[n]), t), {}) : e ?? null, ze = (e) => JSON.stringify($(e)), Be = (e) => {
|
|
868
870
|
if (e) return {
|
|
869
871
|
type: e.type,
|
|
870
872
|
widgetName: e.widgetName,
|
|
@@ -880,46 +882,46 @@ var le = "_anticon_184kl_76", G = {
|
|
|
880
882
|
entryId: e.entryId,
|
|
881
883
|
__departmentRelyLimit: e.__departmentRelyLimit
|
|
882
884
|
};
|
|
883
|
-
},
|
|
885
|
+
}, Ve = ({ type: e, requestContext: t, widgetAttr: n }) => ze({
|
|
884
886
|
type: e,
|
|
885
887
|
requestContext: {
|
|
886
888
|
appId: t?.appId,
|
|
887
889
|
entryId: t?.entryId
|
|
888
890
|
},
|
|
889
|
-
widgetAttr:
|
|
890
|
-
}),
|
|
891
|
+
widgetAttr: Be(n)
|
|
892
|
+
}), He = ({ type: e, requestContext: t, widgetAttr: n }) => ({
|
|
891
893
|
type: e,
|
|
892
894
|
requestContext: {
|
|
893
895
|
appId: t?.appId,
|
|
894
896
|
entryId: t?.entryId
|
|
895
897
|
},
|
|
896
|
-
widgetAttr:
|
|
897
|
-
}),
|
|
898
|
+
widgetAttr: Be(n)
|
|
899
|
+
}), Ue = (e) => ({
|
|
898
900
|
publicPermissionEnable: e?.publicPermissionEnable || !1,
|
|
899
901
|
managerPermissionEnable: e?.managerPermissionEnable || !1
|
|
900
|
-
}),
|
|
901
|
-
let { onRequestRelyLimit: t } = e, [n, r] = P(), [i, a] = P(!1), [o, s] = P("idle"), c = N(!0), l = e.type || e.widgetAttr?.type || "user", u = N(), f =
|
|
902
|
+
}), We = (e) => {
|
|
903
|
+
let { onRequestRelyLimit: t } = e, [n, r] = P(), [i, a] = P(!1), [o, s] = P("idle"), c = N(!0), l = e.type || e.widgetAttr?.type || "user", u = N(), f = Le({
|
|
902
904
|
type: l,
|
|
903
905
|
widgetAttr: e.widgetAttr,
|
|
904
906
|
status: o,
|
|
905
907
|
hasRequestHandler: !!t
|
|
906
|
-
}), p =
|
|
908
|
+
}), p = Ve({
|
|
907
909
|
type: l,
|
|
908
910
|
requestContext: e.requestContext,
|
|
909
911
|
widgetAttr: e.widgetAttr
|
|
910
912
|
});
|
|
911
913
|
u.current?.key !== p && (u.current = {
|
|
912
914
|
key: p,
|
|
913
|
-
value:
|
|
915
|
+
value: Ie(l) ? Re({
|
|
914
916
|
type: l,
|
|
915
917
|
widgetAttr: e.widgetAttr,
|
|
916
918
|
requestContext: e.requestContext
|
|
917
919
|
}) : void 0
|
|
918
920
|
});
|
|
919
921
|
let m = u.current.value;
|
|
920
|
-
|
|
922
|
+
j(() => (c.current = !0, () => {
|
|
921
923
|
c.current = !1;
|
|
922
|
-
}), []),
|
|
924
|
+
}), []), j(() => {
|
|
923
925
|
!f || !t || !m || (s("loading"), Promise.resolve(t(m)).then((e) => {
|
|
924
926
|
if (!c.current) return;
|
|
925
927
|
let t = Array.isArray(e) && e.length > 0 && e.every((e) => typeof e == "string");
|
|
@@ -951,28 +953,28 @@ var le = "_anticon_184kl_76", G = {
|
|
|
951
953
|
shouldBlockContent: f || o === "loading" || o === "failed",
|
|
952
954
|
departmentPanelRequestGuard: g
|
|
953
955
|
};
|
|
954
|
-
},
|
|
956
|
+
}, Ge = (e) => {
|
|
955
957
|
let { onCancel: t, onConfirm: n, onChange: r, defaultValue: i } = e, a = e.auth?.publicPermissionEnable, o = e.auth?.managerPermissionEnable, { t: s } = S(), [l, u] = B(e, { defaultValue: i || [] }), d = ee((e) => {
|
|
956
|
-
let t =
|
|
958
|
+
let t = we(l, e);
|
|
957
959
|
u(t), r?.(t);
|
|
958
960
|
}, [
|
|
959
961
|
u,
|
|
960
962
|
l,
|
|
961
963
|
r
|
|
962
|
-
]), { effectiveWidgetAttr: f, isLoading: p, isFailed: m, departmentPanelRequestGuard: h } =
|
|
964
|
+
]), { effectiveWidgetAttr: f, isLoading: p, isFailed: m, departmentPanelRequestGuard: h } = We(e), g = N(), _ = Ve({
|
|
963
965
|
type: e.type,
|
|
964
966
|
requestContext: e.requestContext,
|
|
965
967
|
widgetAttr: f
|
|
966
968
|
});
|
|
967
969
|
g.current?.key !== _ && (g.current = {
|
|
968
970
|
key: _,
|
|
969
|
-
value:
|
|
971
|
+
value: He({
|
|
970
972
|
type: e.type,
|
|
971
973
|
requestContext: e.requestContext,
|
|
972
974
|
widgetAttr: f
|
|
973
975
|
})
|
|
974
976
|
});
|
|
975
|
-
let v = g.current.value, y = M(() =>
|
|
977
|
+
let v = g.current.value, y = M(() => Me(v), [v]), b = M(() => Ue({
|
|
976
978
|
publicPermissionEnable: a,
|
|
977
979
|
managerPermissionEnable: o
|
|
978
980
|
}), [o, a]), { type: C, currentUsers: w, requestContext: T, limits: E, departmentSelectableRange: D, currentContext: O, memberPanelVisibility: k, memberPanelRequestGuard: A } = y, j = M(() => ({
|
|
@@ -1004,7 +1006,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
1004
1006
|
A,
|
|
1005
1007
|
h,
|
|
1006
1008
|
b
|
|
1007
|
-
]),
|
|
1009
|
+
]), te = () => p ? /* @__PURE__ */ H("div", {
|
|
1008
1010
|
className: Q["depts-member__state"],
|
|
1009
1011
|
children: "加载中"
|
|
1010
1012
|
}) : m ? /* @__PURE__ */ H("div", {
|
|
@@ -1012,7 +1014,7 @@ var le = "_anticon_184kl_76", G = {
|
|
|
1012
1014
|
children: "可选范围加载失败"
|
|
1013
1015
|
}) : /* @__PURE__ */ U(c.Provider, {
|
|
1014
1016
|
value: j,
|
|
1015
|
-
children: [/* @__PURE__ */ H(ue, {}), /* @__PURE__ */ H(
|
|
1017
|
+
children: [/* @__PURE__ */ H(ue, {}), /* @__PURE__ */ H(Ce, {})]
|
|
1016
1018
|
});
|
|
1017
1019
|
return /* @__PURE__ */ U("div", {
|
|
1018
1020
|
className: Q["depts-member"],
|
|
@@ -1021,11 +1023,15 @@ var le = "_anticon_184kl_76", G = {
|
|
|
1021
1023
|
children: /* @__PURE__ */ H("div", {
|
|
1022
1024
|
className: Q["depts-member__content"],
|
|
1023
1025
|
"data-teleport": "DeptsMemberSelector",
|
|
1024
|
-
children:
|
|
1026
|
+
children: te()
|
|
1025
1027
|
})
|
|
1026
1028
|
}), /* @__PURE__ */ U("div", {
|
|
1027
1029
|
className: Q["depts-member__footer"],
|
|
1028
|
-
children: [[
|
|
1030
|
+
children: [[
|
|
1031
|
+
x.DEPARMENT_GROUP,
|
|
1032
|
+
x.USER_GROUP,
|
|
1033
|
+
x.DEPT_USERS
|
|
1034
|
+
].includes(C) && /* @__PURE__ */ H("div", {
|
|
1029
1035
|
className: Q["depts-member__clear-area"],
|
|
1030
1036
|
children: /* @__PURE__ */ U("div", {
|
|
1031
1037
|
className: Q["depts-member__clear-button"],
|
|
@@ -1055,4 +1061,4 @@ var le = "_anticon_184kl_76", G = {
|
|
|
1055
1061
|
});
|
|
1056
1062
|
};
|
|
1057
1063
|
//#endregion
|
|
1058
|
-
export {
|
|
1064
|
+
export { G as n, Ge as t };
|