@bwg-ui/core 1.3.7 → 1.3.9
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/chunks/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
- package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
- package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
- package/dist/chunks/{CMSearchIntfGwP01-DCHZJn2H.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
- package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
- package/dist/chunks/{MenuReport-IBdoU2S3.js → MenuReport-DgMjx5Hs.js} +5 -5
- package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
- package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
- package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
- package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
- package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
- package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
- package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
- package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
- package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
- package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
- package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
- package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
- package/dist/chunks/UploadMultiFileP01-CffgcIXm.cjs +1 -0
- package/dist/chunks/UploadMultiFileP01-Cy2LeYfy.js +38 -0
- package/dist/chunks/{layout-components-DnuV2Psp.js → layout-components-Cpzy8mH1.js} +1053 -951
- package/dist/chunks/layout-components-y9YpQQbx.cjs +38 -0
- package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
- package/dist/chunks/provider-ff4RVDYo.js +711 -0
- package/dist/components/common/ButtonAccessController.d.ts +2 -3
- package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
- package/dist/components/common/BwgButtonGroup.d.ts +1 -1
- package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
- package/dist/components/common/BwgCol.d.ts +1 -1
- package/dist/components/common/BwgCol.d.ts.map +1 -1
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgModal.d.ts +10 -0
- package/dist/components/common/BwgModal.d.ts.map +1 -0
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.d.ts +2 -1
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +4887 -28
- package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
- package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
- package/dist/components/core/BwgDeptSearch.d.ts +38 -0
- package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
- package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
- package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
- package/dist/components/core/BwgEmpSearch.d.ts +12 -4
- package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
- package/dist/components/core/BwgUploader.d.ts +6 -92
- package/dist/components/core/BwgUploader.d.ts.map +1 -1
- package/dist/components/core/BwgUploader_bak.d.ts +98 -0
- package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
- package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
- package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.d.ts +11 -2
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +1318 -1164
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +17 -17
- package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
- package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
- package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
- package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
- package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
- package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleAuthMapper.d.ts +8 -0
- package/dist/components/pages/auth/RoleAuthMapper.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
- package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleView.d.ts +17 -0
- package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
- package/dist/components/pages/board/AdminBoard.d.ts +6 -0
- package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
- package/dist/components/pages/board/BoardComment.d.ts +8 -0
- package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
- package/dist/components/pages/board/MyBoard.d.ts +6 -0
- package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +10 -10
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
- package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
- package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
- package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
- package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
- package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
- package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
- package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
- package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
- package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
- package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
- package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
- package/dist/components/pages/types.d.ts +5 -1
- package/dist/components/pages/types.d.ts.map +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
- package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
- package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
- package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.d.ts +1 -0
- package/dist/components/popup/index.d.ts.map +1 -1
- package/dist/components/popup/index.js +16 -8
- package/dist/index.cjs +186 -1
- package/dist/index.js +32378 -290
- package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
- package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
- package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
- package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
- package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
- package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
- package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
- package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
- package/dist/provider/hooks/index.d.ts +1 -0
- package/dist/provider/hooks/index.d.ts.map +1 -1
- package/dist/provider/hooks/useFileUploader.d.ts +74 -0
- package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
- package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +8 -7
- package/dist/stores/codeStore.d.ts +65 -128
- package/dist/stores/codeStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.d.ts +3 -3
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +815 -1625
- package/dist/stores/menuModelStore.d.ts +22 -7
- package/dist/stores/menuModelStore.d.ts.map +1 -1
- package/dist/stores/menuViewStore.d.ts +3 -3
- package/dist/stores/menuViewStore.d.ts.map +1 -1
- package/dist/stores/systemStore.d.ts +50 -17
- package/dist/stores/systemStore.d.ts.map +1 -1
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico1-design.png +0 -0
- package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
- package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico2-design.png +0 -0
- package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
- package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico3-design.png +0 -0
- package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/colorFormat.d.ts.map +1 -1
- package/dist/utils/commonUtils.d.ts +1 -2
- package/dist/utils/commonUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +9 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1118 -1962
- package/dist/utils/serviceConfig.d.ts +9 -3
- package/dist/utils/serviceConfig.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunks/CMSearchIntfGwP01-0t3umcc_.cjs +0 -1
- package/dist/chunks/MenuReport-C70mGz2g.cjs +0 -1
- package/dist/chunks/common-components-DNgQR-Ge.cjs +0 -1109
- package/dist/chunks/common-components-DeYL3J6X.js +0 -52604
- package/dist/chunks/layout-components-Bf9IsLUS.cjs +0 -38
- package/dist/chunks/provider-Bi5OYngn.cjs +0 -1
- package/dist/chunks/provider-Bx4VpaFf.js +0 -465
- package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
- package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
- package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
- package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
- package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
- package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
- package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
- package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
- package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
- package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { SearchOutlined as V, TeamOutlined as X } from "@ant-design/icons";
|
|
3
|
+
import { message as R, Splitter as O, Flex as Z, Row as _, Col as j, Input as ee, Checkbox as te, Spin as ne, Tree as re } from "antd";
|
|
4
|
+
import { useState as x, useCallback as g, useEffect as le, useMemo as A } from "react";
|
|
5
|
+
import { callService as de } from "../utils/index.js";
|
|
6
|
+
import { BwgPopup as ie, ContentLayOut as oe, ContentBox as ce, BwgTitleBox as se } from "../components/common/index.js";
|
|
7
|
+
const ae = (r) => {
|
|
8
|
+
if (r == null) return "";
|
|
9
|
+
const f = String(r).trim();
|
|
10
|
+
return !f || f.toUpperCase() === "NULL" ? "" : f.toUpperCase();
|
|
11
|
+
}, B = (r, f = 0) => {
|
|
12
|
+
const h = Number(r);
|
|
13
|
+
return Number.isFinite(h) ? h : f;
|
|
14
|
+
};
|
|
15
|
+
function v(r) {
|
|
16
|
+
return {
|
|
17
|
+
crprCd: r.crprCd || void 0,
|
|
18
|
+
wkplCd: r.wkplCd || void 0,
|
|
19
|
+
deptCd: ae(r.deptCd),
|
|
20
|
+
deptNm: (r.deptNm ?? "").toString().trim(),
|
|
21
|
+
hrnkDeptCd: r.hrnkDeptCd || null,
|
|
22
|
+
hrnkDeptNm: r.hrnkDeptNm || null,
|
|
23
|
+
deptGbCd: r.deptGbCd || null,
|
|
24
|
+
deptLvl: B(r.deptLvl, r.hrnkDeptCd ? 2 : 1),
|
|
25
|
+
orgSortOrd: B(r.orgSortOrd, 0),
|
|
26
|
+
orgOtptOrd: B(r.orgOtptOrd, 0),
|
|
27
|
+
deptAbrv: r.deptAbrv || null,
|
|
28
|
+
deptFullNm: r.deptFullNm || null,
|
|
29
|
+
deptEnglNm: r.deptEnglNm || null,
|
|
30
|
+
isLeaf: r.isLeaf || null
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function pe(r) {
|
|
34
|
+
const f = /* @__PURE__ */ new Set(), h = r.map(v).filter((l) => l.deptCd).filter((l) => (l.deptCd === l.hrnkDeptCd && (l.hrnkDeptCd = ""), !0)).filter((l) => f.has(l.deptCd) ? !1 : (f.add(l.deptCd), !0));
|
|
35
|
+
h.sort(
|
|
36
|
+
(l, c) => (l.deptLvl || 0) - (c.deptLvl || 0) || (l.orgSortOrd || 0) - (c.orgSortOrd || 0) || l.deptCd.localeCompare(c.deptCd)
|
|
37
|
+
);
|
|
38
|
+
const s = /* @__PURE__ */ new Map();
|
|
39
|
+
for (const l of h)
|
|
40
|
+
s.set(l.deptCd, {
|
|
41
|
+
...l,
|
|
42
|
+
children: []
|
|
43
|
+
});
|
|
44
|
+
const C = [];
|
|
45
|
+
for (const l of h) {
|
|
46
|
+
const c = s.get(l.deptCd), y = l.hrnkDeptCd;
|
|
47
|
+
y && s.has(y) ? s.get(y).children.push(c) : C.push(c);
|
|
48
|
+
}
|
|
49
|
+
const D = (l) => {
|
|
50
|
+
!l || l.length === 0 || (l.sort((c, y) => c.deptCd.localeCompare(y.deptCd)), l.forEach((c) => D(c.children)));
|
|
51
|
+
};
|
|
52
|
+
D(C);
|
|
53
|
+
const S = (l) => {
|
|
54
|
+
if (!l.children || l.children.length === 0) {
|
|
55
|
+
delete l.children;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
l.children.forEach(S);
|
|
59
|
+
};
|
|
60
|
+
if (C.forEach(S), C.length > 1) {
|
|
61
|
+
const l = C.find((c) => c.deptCd === "D00");
|
|
62
|
+
if (l) return [l];
|
|
63
|
+
}
|
|
64
|
+
return C;
|
|
65
|
+
}
|
|
66
|
+
function fe(r) {
|
|
67
|
+
const f = r.map(v), h = f.filter((s) => s.isLeaf !== "Y").map((s) => s.deptCd);
|
|
68
|
+
return h.length > 200 ? f.filter((s) => (s.deptLvl || 0) <= 2).map((s) => s.deptCd) : h;
|
|
69
|
+
}
|
|
70
|
+
const ke = ({ popup: r, onClose: f }) => {
|
|
71
|
+
const [h, s] = x(""), [C, D] = x(""), [S, l] = x([]), [c, y] = x([]), [b, L] = x([]), [K, F] = x(!1), [u, U] = x([]), [H, E] = x(!1), I = g(
|
|
72
|
+
async (e) => {
|
|
73
|
+
try {
|
|
74
|
+
E(!0);
|
|
75
|
+
const t = await de("SCMUTIL00103", {
|
|
76
|
+
...r?.popupParams,
|
|
77
|
+
...e
|
|
78
|
+
}), n = Array.isArray(t?.data) ? t.data : Array.isArray(t?.deptList) ? t.deptList : Array.isArray(t) ? t : [], d = pe(n);
|
|
79
|
+
U(d);
|
|
80
|
+
const o = fe(n);
|
|
81
|
+
l(o);
|
|
82
|
+
const a = d[0]?.deptCd || v(
|
|
83
|
+
n.find((p) => v(p).deptLvl === 1) || {}
|
|
84
|
+
).deptCd || v(n[0] || {}).deptCd || "";
|
|
85
|
+
y(a ? [a] : []);
|
|
86
|
+
} catch {
|
|
87
|
+
R.error("조직 데이터를 불러오는 중 오류가 발생했습니다.");
|
|
88
|
+
} finally {
|
|
89
|
+
E(!1);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
[r?.popupParams]
|
|
93
|
+
);
|
|
94
|
+
le(() => {
|
|
95
|
+
I();
|
|
96
|
+
}, [I]);
|
|
97
|
+
const w = g(
|
|
98
|
+
(e, t) => {
|
|
99
|
+
for (const n of e) {
|
|
100
|
+
if (n.deptCd === t) return n;
|
|
101
|
+
if (n.children) {
|
|
102
|
+
const d = w(n.children, t);
|
|
103
|
+
if (d) return d;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
},
|
|
108
|
+
[u]
|
|
109
|
+
), N = A(() => b.map((e) => {
|
|
110
|
+
const t = w(u, e);
|
|
111
|
+
if (!t) return null;
|
|
112
|
+
const { children: n, ...d } = t;
|
|
113
|
+
return d;
|
|
114
|
+
}).filter(Boolean), [b, u, w]), T = A(() => {
|
|
115
|
+
const e = (t) => t.map((n) => ({
|
|
116
|
+
title: n.deptNm,
|
|
117
|
+
key: n.deptCd,
|
|
118
|
+
meta: n,
|
|
119
|
+
// ★ 원본
|
|
120
|
+
children: n.children ? e(n.children) : void 0,
|
|
121
|
+
isLeaf: !n.children || n.children.length === 0
|
|
122
|
+
}));
|
|
123
|
+
return e(u);
|
|
124
|
+
}, [u]), M = A(() => {
|
|
125
|
+
const e = h.trim().toLowerCase();
|
|
126
|
+
if (!e) return T;
|
|
127
|
+
const t = (n) => n.map((d) => {
|
|
128
|
+
const o = d.meta, a = (o?.deptNm || "").toLowerCase().includes(e) || (o?.deptCd || "").toLowerCase().includes(e), p = d.children ? t(d.children) : void 0;
|
|
129
|
+
return a || p && p.length > 0 ? { ...d, children: p } : null;
|
|
130
|
+
}).filter(Boolean);
|
|
131
|
+
return t(T);
|
|
132
|
+
}, [T, h]), z = g(
|
|
133
|
+
(e) => {
|
|
134
|
+
const t = [], n = (d) => {
|
|
135
|
+
for (const o of d)
|
|
136
|
+
if (o.deptCd === e && o.children) {
|
|
137
|
+
const a = (p) => {
|
|
138
|
+
for (const k of p)
|
|
139
|
+
t.push(k.deptCd), k.children && a(k.children);
|
|
140
|
+
};
|
|
141
|
+
a(o.children);
|
|
142
|
+
} else o.children && n(o.children);
|
|
143
|
+
};
|
|
144
|
+
return n(u), t;
|
|
145
|
+
},
|
|
146
|
+
[u]
|
|
147
|
+
), Y = g(
|
|
148
|
+
(e, t) => {
|
|
149
|
+
let n = Array.isArray(e) ? e : e?.checked ?? [];
|
|
150
|
+
if (K && t?.node?.key) {
|
|
151
|
+
const d = t.node.key, o = z(d);
|
|
152
|
+
if (t.checked) {
|
|
153
|
+
const a = new Set(n);
|
|
154
|
+
for (const p of o) a.add(p);
|
|
155
|
+
n = Array.from(a);
|
|
156
|
+
} else {
|
|
157
|
+
const a = /* @__PURE__ */ new Set([d, ...o]);
|
|
158
|
+
n = n.filter((p) => !a.has(p));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
L(n);
|
|
162
|
+
},
|
|
163
|
+
[K, z]
|
|
164
|
+
), q = g(
|
|
165
|
+
(e) => {
|
|
166
|
+
const t = e.map(String);
|
|
167
|
+
if (y(t), t.length > 0) {
|
|
168
|
+
const n = t[0], d = (a, p) => {
|
|
169
|
+
for (const k of a) {
|
|
170
|
+
if (k.deptCd === p) return k.deptNm;
|
|
171
|
+
if (k.children) {
|
|
172
|
+
const W = d(k.children, p);
|
|
173
|
+
if (W) return W;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return null;
|
|
177
|
+
}, o = d(u, n);
|
|
178
|
+
o && D(o);
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
[u]
|
|
182
|
+
), G = g(
|
|
183
|
+
(e) => l(e.map(String)),
|
|
184
|
+
[]
|
|
185
|
+
), $ = g(
|
|
186
|
+
(e, t) => {
|
|
187
|
+
if (e.stopPropagation(), t.children && t.children.length > 0) {
|
|
188
|
+
const n = S.includes(t.key);
|
|
189
|
+
l(
|
|
190
|
+
(d) => n ? d.filter((o) => o !== t.key) : [...d, t.key]
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
[S]
|
|
195
|
+
), J = g((e) => {
|
|
196
|
+
L((t) => t.filter((n) => n !== e));
|
|
197
|
+
}, []), Q = g(() => {
|
|
198
|
+
L([]);
|
|
199
|
+
}, []), P = {
|
|
200
|
+
// search: () => {
|
|
201
|
+
// //console.log('🔍 검색 키워드:', searchKeyword);
|
|
202
|
+
// // 검색 키워드가 있으면 검색 파라미터로 전달
|
|
203
|
+
// const searchParams = searchKeyword.trim()
|
|
204
|
+
// ? { searchKeyword: searchKeyword.trim() }
|
|
205
|
+
// : {};
|
|
206
|
+
// loadDepartmentData(searchParams);
|
|
207
|
+
// },
|
|
208
|
+
confirm: () => {
|
|
209
|
+
if (b.length === 0) {
|
|
210
|
+
R.error("부서를 선택해주세요.");
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const t = Array.from(new Set(b)).map((d) => {
|
|
214
|
+
const o = w(u, d);
|
|
215
|
+
return o ? {
|
|
216
|
+
deptCd: o.deptCd,
|
|
217
|
+
deptNm: o.deptNm,
|
|
218
|
+
hrnkDeptCd: o.hrnkDeptCd,
|
|
219
|
+
hrnkDeptNm: o.hrnkDeptNm
|
|
220
|
+
} : null;
|
|
221
|
+
}).filter(Boolean), n = r?.config;
|
|
222
|
+
n?.onSelect ? n.onSelect(t) : r?.config?.callback && r.config.callback(JSON.stringify(t)), n?.onClose && n.onClose(), r?.close?.();
|
|
223
|
+
},
|
|
224
|
+
cancel: () => {
|
|
225
|
+
const e = r?.config;
|
|
226
|
+
e?.onCancel && e.onCancel(), r?.close?.();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
return /* @__PURE__ */ i(
|
|
230
|
+
ie,
|
|
231
|
+
{
|
|
232
|
+
popup: r,
|
|
233
|
+
buttons: [
|
|
234
|
+
{
|
|
235
|
+
id: "confirm",
|
|
236
|
+
label: "확인",
|
|
237
|
+
onClick: () => {
|
|
238
|
+
P.confirm();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
popupEvent: P,
|
|
243
|
+
onClose: () => {
|
|
244
|
+
r?.close?.(), f?.();
|
|
245
|
+
},
|
|
246
|
+
children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(ce, { border: !1, style: { paddingBottom: 20 }, children: /* @__PURE__ */ m(O, { layout: "vertical", style: { height: "100%" }, children: [
|
|
247
|
+
/* @__PURE__ */ m(O.Panel, { defaultSize: "60%", min: "20%", max: "80%", children: [
|
|
248
|
+
/* @__PURE__ */ i(
|
|
249
|
+
"div",
|
|
250
|
+
{
|
|
251
|
+
style: {
|
|
252
|
+
position: "sticky",
|
|
253
|
+
top: 0,
|
|
254
|
+
zIndex: 10,
|
|
255
|
+
backgroundColor: "white",
|
|
256
|
+
borderBottom: "1px solid #e0e0e0",
|
|
257
|
+
padding: "8px"
|
|
258
|
+
},
|
|
259
|
+
children: /* @__PURE__ */ m(Z, { gap: 8, vertical: !0, style: { marginBottom: 6 }, children: [
|
|
260
|
+
/* @__PURE__ */ i(se, { title: "조직도" }),
|
|
261
|
+
/* @__PURE__ */ i(
|
|
262
|
+
"div",
|
|
263
|
+
{
|
|
264
|
+
style: {
|
|
265
|
+
fontSize: 14,
|
|
266
|
+
color: "#666",
|
|
267
|
+
padding: 8,
|
|
268
|
+
backgroundColor: "#f8f8f8",
|
|
269
|
+
borderRadius: 4
|
|
270
|
+
},
|
|
271
|
+
children: C
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
/* @__PURE__ */ m(_, { gutter: [16, 16], children: [
|
|
275
|
+
/* @__PURE__ */ i(j, { span: 18, children: /* @__PURE__ */ i(
|
|
276
|
+
ee,
|
|
277
|
+
{
|
|
278
|
+
placeholder: "부서명, 부서장명, 부서코드 검색",
|
|
279
|
+
prefix: /* @__PURE__ */ i(V, {}),
|
|
280
|
+
value: h,
|
|
281
|
+
allowClear: !0,
|
|
282
|
+
onChange: (e) => s(e.target.value)
|
|
283
|
+
}
|
|
284
|
+
) }),
|
|
285
|
+
/* @__PURE__ */ i(
|
|
286
|
+
j,
|
|
287
|
+
{
|
|
288
|
+
span: 6,
|
|
289
|
+
style: {
|
|
290
|
+
justifyContent: "center",
|
|
291
|
+
display: "flex",
|
|
292
|
+
alignItems: "center"
|
|
293
|
+
},
|
|
294
|
+
children: /* @__PURE__ */ i(
|
|
295
|
+
te,
|
|
296
|
+
{
|
|
297
|
+
checked: K,
|
|
298
|
+
onChange: (e) => F(e.target.checked),
|
|
299
|
+
children: "하위까지 선택"
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
)
|
|
304
|
+
] })
|
|
305
|
+
] })
|
|
306
|
+
}
|
|
307
|
+
),
|
|
308
|
+
/* @__PURE__ */ i("div", { style: { padding: 16, overflowY: "hidden" }, children: /* @__PURE__ */ i(ne, { spinning: H, children: /* @__PURE__ */ i(
|
|
309
|
+
re,
|
|
310
|
+
{
|
|
311
|
+
className: "bwg-ogrn-tree",
|
|
312
|
+
treeData: M,
|
|
313
|
+
expandedKeys: S,
|
|
314
|
+
selectedKeys: c,
|
|
315
|
+
checkedKeys: b,
|
|
316
|
+
checkable: !0,
|
|
317
|
+
checkStrictly: !0,
|
|
318
|
+
showLine: !0,
|
|
319
|
+
showIcon: !1,
|
|
320
|
+
selectable: !0,
|
|
321
|
+
onSelect: q,
|
|
322
|
+
onExpand: G,
|
|
323
|
+
onCheck: Y,
|
|
324
|
+
onDoubleClick: $,
|
|
325
|
+
style: { overflow: "hidden" },
|
|
326
|
+
titleRender: (e) => {
|
|
327
|
+
const t = e.meta;
|
|
328
|
+
return /* @__PURE__ */ m(
|
|
329
|
+
"span",
|
|
330
|
+
{
|
|
331
|
+
style: {
|
|
332
|
+
display: "flex",
|
|
333
|
+
justifyContent: "space-between",
|
|
334
|
+
alignItems: "center",
|
|
335
|
+
padding: "2px 4px",
|
|
336
|
+
width: "100%"
|
|
337
|
+
},
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ i(
|
|
340
|
+
"span",
|
|
341
|
+
{
|
|
342
|
+
style: {
|
|
343
|
+
fontWeight: c.includes(e.key) ? "bold" : "normal"
|
|
344
|
+
},
|
|
345
|
+
children: t.deptNm
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
/* @__PURE__ */ i(
|
|
349
|
+
"span",
|
|
350
|
+
{
|
|
351
|
+
style: {
|
|
352
|
+
fontSize: 11,
|
|
353
|
+
color: "#999",
|
|
354
|
+
marginLeft: 8
|
|
355
|
+
},
|
|
356
|
+
children: t.deptCd
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
) }) })
|
|
365
|
+
] }),
|
|
366
|
+
/* @__PURE__ */ i(O.Panel, { collapsible: !0, children: /* @__PURE__ */ m("div", { style: { padding: 16, overflowY: "hidden" }, children: [
|
|
367
|
+
/* @__PURE__ */ m(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
style: {
|
|
371
|
+
marginBottom: 12,
|
|
372
|
+
display: "flex",
|
|
373
|
+
alignItems: "center",
|
|
374
|
+
gap: 8
|
|
375
|
+
},
|
|
376
|
+
children: [
|
|
377
|
+
/* @__PURE__ */ m("h3", { style: { margin: 0, fontSize: 16, fontWeight: 700 }, children: [
|
|
378
|
+
"선택된 부서 (",
|
|
379
|
+
N.length,
|
|
380
|
+
"개)"
|
|
381
|
+
] }),
|
|
382
|
+
N.length > 0 && /* @__PURE__ */ i(
|
|
383
|
+
"button",
|
|
384
|
+
{
|
|
385
|
+
onClick: Q,
|
|
386
|
+
style: {
|
|
387
|
+
border: "none",
|
|
388
|
+
background: "transparent",
|
|
389
|
+
color: "#8c8c8c",
|
|
390
|
+
cursor: "pointer",
|
|
391
|
+
fontSize: 12,
|
|
392
|
+
padding: 4
|
|
393
|
+
},
|
|
394
|
+
title: "전체 해제",
|
|
395
|
+
children: "전체 해제"
|
|
396
|
+
}
|
|
397
|
+
)
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
),
|
|
401
|
+
/* @__PURE__ */ i(
|
|
402
|
+
"div",
|
|
403
|
+
{
|
|
404
|
+
style: {
|
|
405
|
+
display: "flex",
|
|
406
|
+
flexWrap: "wrap",
|
|
407
|
+
gap: 8,
|
|
408
|
+
alignItems: "flex-start",
|
|
409
|
+
minHeight: 48
|
|
410
|
+
},
|
|
411
|
+
children: N.length === 0 ? /* @__PURE__ */ i("div", { style: { color: "#999", fontSize: 14 }, children: "선택된 부서가 없습니다." }) : N.map((e) => /* @__PURE__ */ m(
|
|
412
|
+
"span",
|
|
413
|
+
{
|
|
414
|
+
style: {
|
|
415
|
+
display: "inline-flex",
|
|
416
|
+
alignItems: "center",
|
|
417
|
+
gap: 8,
|
|
418
|
+
padding: "4px 8px",
|
|
419
|
+
borderRadius: 999,
|
|
420
|
+
border: "1px solid #e6e6e6",
|
|
421
|
+
background: "#fafafa",
|
|
422
|
+
lineHeight: 1.1,
|
|
423
|
+
cursor: "default",
|
|
424
|
+
maxWidth: 260
|
|
425
|
+
},
|
|
426
|
+
title: `${e.deptNm}`,
|
|
427
|
+
children: [
|
|
428
|
+
/* @__PURE__ */ i(
|
|
429
|
+
"span",
|
|
430
|
+
{
|
|
431
|
+
style: {
|
|
432
|
+
width: 18,
|
|
433
|
+
height: 18,
|
|
434
|
+
borderRadius: "50%",
|
|
435
|
+
border: "1px solid #e6e6e6",
|
|
436
|
+
display: "inline-flex",
|
|
437
|
+
alignItems: "center",
|
|
438
|
+
justifyContent: "center",
|
|
439
|
+
fontSize: 12,
|
|
440
|
+
color: "#8c8c8c",
|
|
441
|
+
background: "#fff",
|
|
442
|
+
flex: "0 0 auto"
|
|
443
|
+
},
|
|
444
|
+
children: /* @__PURE__ */ i(X, {})
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
/* @__PURE__ */ m(
|
|
448
|
+
"span",
|
|
449
|
+
{
|
|
450
|
+
style: {
|
|
451
|
+
display: "inline-flex",
|
|
452
|
+
flexDirection: "column",
|
|
453
|
+
gap: 2,
|
|
454
|
+
overflow: "hidden"
|
|
455
|
+
},
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ i(
|
|
458
|
+
"span",
|
|
459
|
+
{
|
|
460
|
+
style: {
|
|
461
|
+
fontSize: 13,
|
|
462
|
+
fontWeight: 600,
|
|
463
|
+
whiteSpace: "nowrap",
|
|
464
|
+
overflow: "hidden",
|
|
465
|
+
textOverflow: "ellipsis",
|
|
466
|
+
maxWidth: 180
|
|
467
|
+
},
|
|
468
|
+
children: e.deptNm
|
|
469
|
+
}
|
|
470
|
+
),
|
|
471
|
+
/* @__PURE__ */ i(
|
|
472
|
+
"span",
|
|
473
|
+
{
|
|
474
|
+
style: {
|
|
475
|
+
fontSize: 11,
|
|
476
|
+
color: "#8c8c8c",
|
|
477
|
+
whiteSpace: "nowrap",
|
|
478
|
+
overflow: "hidden",
|
|
479
|
+
textOverflow: "ellipsis",
|
|
480
|
+
maxWidth: 180
|
|
481
|
+
},
|
|
482
|
+
children: e.deptCd
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
/* @__PURE__ */ i(
|
|
489
|
+
"button",
|
|
490
|
+
{
|
|
491
|
+
onClick: () => J(e.deptCd),
|
|
492
|
+
style: {
|
|
493
|
+
border: "none",
|
|
494
|
+
background: "transparent",
|
|
495
|
+
color: "#8c8c8c",
|
|
496
|
+
cursor: "pointer",
|
|
497
|
+
padding: 2,
|
|
498
|
+
lineHeight: 0
|
|
499
|
+
},
|
|
500
|
+
"aria-label": `${e.deptNm} 선택 해제`,
|
|
501
|
+
title: "선택 해제",
|
|
502
|
+
children: "×"
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
e.deptCd
|
|
508
|
+
))
|
|
509
|
+
}
|
|
510
|
+
)
|
|
511
|
+
] }) })
|
|
512
|
+
] }) }) })
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
};
|
|
516
|
+
export {
|
|
517
|
+
ke as default
|
|
518
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),z=require("@ant-design/icons"),m=require("antd"),o=require("react"),$=require("../utils/index.cjs"),w=require("../components/common/index.cjs"),J=r=>{if(r==null)return"";const f=String(r).trim();return!f||f.toUpperCase()==="NULL"?"":f.toUpperCase()},T=(r,f=0)=>{const u=Number(r);return Number.isFinite(u)?u:f};function b(r){return{crprCd:r.crprCd||void 0,wkplCd:r.wkplCd||void 0,deptCd:J(r.deptCd),deptNm:(r.deptNm??"").toString().trim(),hrnkDeptCd:r.hrnkDeptCd||null,hrnkDeptNm:r.hrnkDeptNm||null,deptGbCd:r.deptGbCd||null,deptLvl:T(r.deptLvl,r.hrnkDeptCd?2:1),orgSortOrd:T(r.orgSortOrd,0),orgOtptOrd:T(r.orgOtptOrd,0),deptAbrv:r.deptAbrv||null,deptFullNm:r.deptFullNm||null,deptEnglNm:r.deptEnglNm||null,isLeaf:r.isLeaf||null}}function Q(r){const f=new Set,u=r.map(b).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>f.has(l.deptCd)?!1:(f.add(l.deptCd),!0));u.sort((l,c)=>(l.deptLvl||0)-(c.deptLvl||0)||(l.orgSortOrd||0)-(c.orgSortOrd||0)||l.deptCd.localeCompare(c.deptCd));const a=new Map;for(const l of u)a.set(l.deptCd,{...l,children:[]});const g=[];for(const l of u){const c=a.get(l.deptCd),y=l.hrnkDeptCd;y&&a.has(y)?a.get(y).children.push(c):g.push(c)}const j=l=>{!l||l.length===0||(l.sort((c,y)=>c.deptCd.localeCompare(y.deptCd)),l.forEach(c=>j(c.children)))};j(g);const k=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(k)};if(g.forEach(k),g.length>1){const l=g.find(c=>c.deptCd==="D00");if(l)return[l]}return g}function V(r){const f=r.map(b),u=f.filter(a=>a.isLeaf!=="Y").map(a=>a.deptCd);return u.length>200?f.filter(a=>(a.deptLvl||0)<=2).map(a=>a.deptCd):u}const X=({popup:r,onClose:f})=>{const[u,a]=o.useState(""),[g,j]=o.useState(""),[k,l]=o.useState([]),[c,y]=o.useState([]),[S,N]=o.useState([]),[L,q]=o.useState(!1),[C,P]=o.useState([]),[R,O]=o.useState(!1),A=o.useCallback(async e=>{try{O(!0);const t=await $.callService("SCMUTIL00103",{...r?.popupParams,...e}),n=Array.isArray(t?.data)?t.data:Array.isArray(t?.deptList)?t.deptList:Array.isArray(t)?t:[],d=Q(n);P(d);const i=V(n);l(i);const p=d[0]?.deptCd||b(n.find(h=>b(h).deptLvl===1)||{}).deptCd||b(n[0]||{}).deptCd||"";y(p?[p]:[])}catch{m.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{O(!1)}},[r?.popupParams]);o.useEffect(()=>{A()},[A]);const v=o.useCallback((e,t)=>{for(const n of e){if(n.deptCd===t)return n;if(n.children){const d=v(n.children,t);if(d)return d}}return null},[C]),D=o.useMemo(()=>S.map(e=>{const t=v(C,e);if(!t)return null;const{children:n,...d}=t;return d}).filter(Boolean),[S,C,v]),K=o.useMemo(()=>{const e=t=>t.map(n=>({title:n.deptNm,key:n.deptCd,meta:n,children:n.children?e(n.children):void 0,isLeaf:!n.children||n.children.length===0}));return e(C)},[C]),W=o.useMemo(()=>{const e=u.trim().toLowerCase();if(!e)return K;const t=n=>n.map(d=>{const i=d.meta,p=(i?.deptNm||"").toLowerCase().includes(e)||(i?.deptCd||"").toLowerCase().includes(e),h=d.children?t(d.children):void 0;return p||h&&h.length>0?{...d,children:h}:null}).filter(Boolean);return t(K)},[K,u]),I=o.useCallback(e=>{const t=[],n=d=>{for(const i of d)if(i.deptCd===e&&i.children){const p=h=>{for(const x of h)t.push(x.deptCd),x.children&&p(x.children)};p(i.children)}else i.children&&n(i.children)};return n(C),t},[C]),M=o.useCallback((e,t)=>{let n=Array.isArray(e)?e:e?.checked??[];if(L&&t?.node?.key){const d=t.node.key,i=I(d);if(t.checked){const p=new Set(n);for(const h of i)p.add(h);n=Array.from(p)}else{const p=new Set([d,...i]);n=n.filter(h=>!p.has(h))}}N(n)},[L,I]),F=o.useCallback(e=>{const t=e.map(String);if(y(t),t.length>0){const n=t[0],d=(p,h)=>{for(const x of p){if(x.deptCd===h)return x.deptNm;if(x.children){const E=d(x.children,h);if(E)return E}}return null},i=d(C,n);i&&j(i)}},[C]),U=o.useCallback(e=>l(e.map(String)),[]),H=o.useCallback((e,t)=>{if(e.stopPropagation(),t.children&&t.children.length>0){const n=k.includes(t.key);l(d=>n?d.filter(i=>i!==t.key):[...d,t.key])}},[k]),Y=o.useCallback(e=>{N(t=>t.filter(n=>n!==e))},[]),G=o.useCallback(()=>{N([])},[]),B={confirm:()=>{if(S.length===0){m.message.error("부서를 선택해주세요.");return}const t=Array.from(new Set(S)).map(d=>{const i=v(C,d);return i?{deptCd:i.deptCd,deptNm:i.deptNm,hrnkDeptCd:i.hrnkDeptCd,hrnkDeptNm:i.hrnkDeptNm}:null}).filter(Boolean),n=r?.config;n?.onSelect?n.onSelect(t):r?.config?.callback&&r.config.callback(JSON.stringify(t)),n?.onClose&&n.onClose(),r?.close?.()},cancel:()=>{const e=r?.config;e?.onCancel&&e.onCancel(),r?.close?.()}};return s.jsx(w.BwgPopup,{popup:r,buttons:[{id:"confirm",label:"확인",onClick:()=>{B.confirm()}}],popupEvent:B,onClose:()=>{r?.close?.(),f?.()},children:s.jsx(w.ContentLayOut,{children:s.jsx(w.ContentBox,{border:!1,style:{paddingBottom:20},children:s.jsxs(m.Splitter,{layout:"vertical",style:{height:"100%"},children:[s.jsxs(m.Splitter.Panel,{defaultSize:"60%",min:"20%",max:"80%",children:[s.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:s.jsxs(m.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[s.jsx(w.BwgTitleBox,{title:"조직도"}),s.jsx("div",{style:{fontSize:14,color:"#666",padding:8,backgroundColor:"#f8f8f8",borderRadius:4},children:g}),s.jsxs(m.Row,{gutter:[16,16],children:[s.jsx(m.Col,{span:18,children:s.jsx(m.Input,{placeholder:"부서명, 부서장명, 부서코드 검색",prefix:s.jsx(z.SearchOutlined,{}),value:u,allowClear:!0,onChange:e=>a(e.target.value)})}),s.jsx(m.Col,{span:6,style:{justifyContent:"center",display:"flex",alignItems:"center"},children:s.jsx(m.Checkbox,{checked:L,onChange:e=>q(e.target.checked),children:"하위까지 선택"})})]})]})}),s.jsx("div",{style:{padding:16,overflowY:"hidden"},children:s.jsx(m.Spin,{spinning:R,children:s.jsx(m.Tree,{className:"bwg-ogrn-tree",treeData:W,expandedKeys:k,selectedKeys:c,checkedKeys:S,checkable:!0,checkStrictly:!0,showLine:!0,showIcon:!1,selectable:!0,onSelect:F,onExpand:U,onCheck:M,onDoubleClick:H,style:{overflow:"hidden"},titleRender:e=>{const t=e.meta;return s.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%"},children:[s.jsx("span",{style:{fontWeight:c.includes(e.key)?"bold":"normal"},children:t.deptNm}),s.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:t.deptCd})]})}})})})]}),s.jsx(m.Splitter.Panel,{collapsible:!0,children:s.jsxs("div",{style:{padding:16,overflowY:"hidden"},children:[s.jsxs("div",{style:{marginBottom:12,display:"flex",alignItems:"center",gap:8},children:[s.jsxs("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:["선택된 부서 (",D.length,"개)"]}),D.length>0&&s.jsx("button",{onClick:G,style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",fontSize:12,padding:4},title:"전체 해제",children:"전체 해제"})]}),s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"flex-start",minHeight:48},children:D.length===0?s.jsx("div",{style:{color:"#999",fontSize:14},children:"선택된 부서가 없습니다."}):D.map(e=>s.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,padding:"4px 8px",borderRadius:999,border:"1px solid #e6e6e6",background:"#fafafa",lineHeight:1.1,cursor:"default",maxWidth:260},title:`${e.deptNm}`,children:[s.jsx("span",{style:{width:18,height:18,borderRadius:"50%",border:"1px solid #e6e6e6",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#8c8c8c",background:"#fff",flex:"0 0 auto"},children:s.jsx(z.TeamOutlined,{})}),s.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",gap:2,overflow:"hidden"},children:[s.jsx("span",{style:{fontSize:13,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:e.deptNm}),s.jsx("span",{style:{fontSize:11,color:"#8c8c8c",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:e.deptCd})]}),s.jsx("button",{onClick:()=>Y(e.deptCd),style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",padding:2,lineHeight:0},"aria-label":`${e.deptNm} 선택 해제`,title:"선택 해제",children:"×"})]},e.deptCd))})]})})]})})})})};exports.default=X;
|