@bwg-ui/core 1.2.4 → 1.2.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.
@@ -15770,30 +15770,30 @@ const Xb = ({ reqRows: e, subRows: t }) => {
15770
15770
  };
15771
15771
  export {
15772
15772
  Pc as B,
15773
- jr as C,
15773
+ Wr as C,
15774
15774
  Iy as G,
15775
15775
  My as Q,
15776
15776
  Ha as S,
15777
15777
  _y as a,
15778
- by as b,
15779
- vy as c,
15780
- yy as d,
15781
- xy as e,
15782
- Cy as f,
15778
+ Ry as b,
15779
+ jr as c,
15780
+ ja as d,
15781
+ by as e,
15782
+ vy as f,
15783
15783
  Ba as g,
15784
- wy as h,
15785
- Sy as i,
15786
- Ls as j,
15787
- ah as k,
15788
- Ey as l,
15789
- Fa as m,
15790
- Ry as n,
15791
- $y as o,
15792
- Ty as p,
15793
- Oy as q,
15794
- ja as r,
15795
- Py as s,
15796
- Wr as t,
15784
+ yy as h,
15785
+ xy as i,
15786
+ Cy as j,
15787
+ wy as k,
15788
+ Sy as l,
15789
+ Ls as m,
15790
+ ah as n,
15791
+ Ey as o,
15792
+ Fa as p,
15793
+ $y as q,
15794
+ Ty as r,
15795
+ Oy as s,
15796
+ Py as t,
15797
15797
  ky as u,
15798
15798
  Si as v
15799
15799
  };
@@ -1,4 +1,4 @@
1
- import { b as I, c as B } from "./common-components-6bDxIO7h.js";
1
+ import { e as I, f as B } from "./common-components-CnAjT_Gi.js";
2
2
  function W(y) {
3
3
  throw new Error('Could not dynamically require "' + y + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -10,10 +10,10 @@ const E = {}, O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
10
10
  var T = p.exports, b;
11
11
  function A() {
12
12
  return b || (b = 1, (function(y, $) {
13
- (function(v, c) {
14
- y.exports = c();
13
+ (function(v, f) {
14
+ y.exports = f();
15
15
  })(T, function() {
16
- var v = v || (function(c, C) {
16
+ var v = v || (function(f, C) {
17
17
  var s;
18
18
  if (typeof window < "u" && window.crypto && (s = window.crypto), typeof self < "u" && self.crypto && (s = self.crypto), typeof globalThis < "u" && globalThis.crypto && (s = globalThis.crypto), !s && typeof window < "u" && window.msCrypto && (s = window.msCrypto), !s && typeof B < "u" && B.crypto && (s = B.crypto), !s && typeof W == "function")
19
19
  try {
@@ -41,7 +41,7 @@ function A() {
41
41
  var e;
42
42
  return t.prototype = r, e = new t(), t.prototype = null, e;
43
43
  };
44
- })(), l = {}, d = l.lib = {}, f = d.Base = /* @__PURE__ */ (function() {
44
+ })(), l = {}, d = l.lib = {}, c = d.Base = /* @__PURE__ */ (function() {
45
45
  return {
46
46
  /**
47
47
  * Creates a new object that inherits from this object.
@@ -126,7 +126,7 @@ function A() {
126
126
  return this.init.prototype.extend(this);
127
127
  }
128
128
  };
129
- })(), u = d.WordArray = f.extend({
129
+ })(), u = d.WordArray = c.extend({
130
130
  /**
131
131
  * Initializes a newly created word array.
132
132
  *
@@ -190,7 +190,7 @@ function A() {
190
190
  */
191
191
  clamp: function() {
192
192
  var t = this.words, r = this.sigBytes;
193
- t[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, t.length = c.ceil(r / 4);
193
+ t[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, t.length = f.ceil(r / 4);
194
194
  },
195
195
  /**
196
196
  * Creates a copy of this word array.
@@ -202,7 +202,7 @@ function A() {
202
202
  * var clone = wordArray.clone();
203
203
  */
204
204
  clone: function() {
205
- var t = f.clone.call(this);
205
+ var t = c.clone.call(this);
206
206
  return t.words = this.words.slice(0), t;
207
207
  },
208
208
  /**
@@ -338,7 +338,7 @@ function A() {
338
338
  parse: function(t) {
339
339
  return _.parse(unescape(encodeURIComponent(t)));
340
340
  }
341
- }, x = d.BufferedBlockAlgorithm = f.extend({
341
+ }, x = d.BufferedBlockAlgorithm = c.extend({
342
342
  /**
343
343
  * Resets this block algorithm's data buffer to its initial state.
344
344
  *
@@ -378,8 +378,8 @@ function A() {
378
378
  */
379
379
  _process: function(t) {
380
380
  var r, e = this._data, n = e.words, i = e.sigBytes, o = this.blockSize, w = o * 4, a = i / w;
381
- t ? a = c.ceil(a) : a = c.max((a | 0) - this._minBufferSize, 0);
382
- var h = a * o, S = c.min(h * 4, i);
381
+ t ? a = f.ceil(a) : a = f.max((a | 0) - this._minBufferSize, 0);
382
+ var h = a * o, S = f.min(h * 4, i);
383
383
  if (h) {
384
384
  for (var m = 0; m < h; m += o)
385
385
  this._doProcessBlock(n, m);
@@ -397,7 +397,7 @@ function A() {
397
397
  * var clone = bufferedBlockAlgorithm.clone();
398
398
  */
399
399
  clone: function() {
400
- var t = f.clone.call(this);
400
+ var t = c.clone.call(this);
401
401
  return t._data = this._data.clone(), t;
402
402
  },
403
403
  _minBufferSize: 0
@@ -406,7 +406,7 @@ function A() {
406
406
  /**
407
407
  * Configuration options.
408
408
  */
409
- cfg: f.extend(),
409
+ cfg: c.extend(),
410
410
  /**
411
411
  * Initializes a newly created hasher.
412
412
  *
@@ -1,5 +1,5 @@
1
- import { g as A } from "./common-components-6bDxIO7h.js";
2
- import { r as b } from "./core-B5OXmMfR.js";
1
+ import { g as A } from "./common-components-CnAjT_Gi.js";
2
+ import { r as b } from "./core-C5T-8H8j.js";
3
3
  function O(p, g) {
4
4
  for (var f = 0; f < g.length; f++) {
5
5
  const a = g[f];
@@ -1,5 +1,5 @@
1
- import { g as N } from "./common-components-6bDxIO7h.js";
2
- import { r as R } from "./core-B5OXmMfR.js";
1
+ import { g as N } from "./common-components-CnAjT_Gi.js";
2
+ import { r as R } from "./core-C5T-8H8j.js";
3
3
  function T(p, A) {
4
4
  for (var c = 0; c < A.length; c++) {
5
5
  const t = A[c];
@@ -1,7 +1,7 @@
1
- import { d as s, e as o, f as r, B as g, h as B, i as w, j as t, k as i, l as n, m as l, n as d, o as p, a as C, p as f, q as u, r as S, s as c, C as m, t as x, G, Q as v, u as P, S as T, v as b } from "../../chunks/common-components-6bDxIO7h.js";
1
+ import { h as e, i as o, j as r, B as g, k as B, l as w, m as t, n as i, o as n, p as l, b as d, q as p, a as C, r as c, s as u, d as S, t as f, c as m, C as x, G, Q as b, u as v, S as P, v as T } from "../../chunks/common-components-CnAjT_Gi.js";
2
2
  import { realFormat as k } from "../../utils/index.js";
3
3
  export {
4
- s as BwgButtonGroup,
4
+ e as BwgButtonGroup,
5
5
  o as BwgCmptArea,
6
6
  r as BwgCol,
7
7
  g as BwgConfigProvider,
@@ -14,16 +14,16 @@ export {
14
14
  d as BwgPopup,
15
15
  p as BwgRow,
16
16
  C as BwgSpace,
17
- f as BwgTable,
17
+ c as BwgTable,
18
18
  u as BwgTabs,
19
19
  S as BwgTitleBox,
20
- c as BwgView,
20
+ f as BwgView,
21
21
  m as ContentBox,
22
22
  x as ContentLayOut,
23
23
  G as GlobalConfigProvider,
24
- v as QuickServiceToggle,
25
- P as SSOHandler,
26
- T as SearchBox,
27
- b as createBwgGridRenderer,
24
+ b as QuickServiceToggle,
25
+ v as SSOHandler,
26
+ P as SearchBox,
27
+ T as createBwgGridRenderer,
28
28
  k as realFormat
29
29
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { a as o } from "../../chunks/common-components-6bDxIO7h.js";
2
+ import { a as o } from "../../chunks/common-components-CnAjT_Gi.js";
3
3
  const t = () => /* @__PURE__ */ e(o, { children: "BwgComponentGuide" }), i = () => /* @__PURE__ */ e(o, { children: "BwgDeveloperGuide" });
4
4
  export {
5
5
  t as BwgComponentGuide,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as b, jsx as e, Fragment as G } from "react/jsx-runtime";
2
2
  import { ServiceCodeProvider as de, CommonCodeProvider as ce, ScreenProtectProvider as ue, useLock as me, SearchBoxProvider as pe } from "../../provider/index.js";
3
3
  import { Routes as he, Route as _, Navigate as ge, useNavigate as fe } from "react-router-dom";
4
- import { G as be, B as ye, Q as Ce } from "../../chunks/common-components-6bDxIO7h.js";
4
+ import { G as be, B as ye, Q as Ce } from "../../chunks/common-components-CnAjT_Gi.js";
5
5
  import { Spin as W, Layout as A, ColorPicker as ve, Button as x, Popover as we, Avatar as xe, Tabs as ke, Tooltip as z, AutoComplete as Ne, Input as Ie, Segmented as Se, Menu as Q, Result as ne, Space as Te, Typography as Le, Empty as U } from "antd";
6
6
  import { useEffect as B, useState as S, useRef as $, useMemo as V, useCallback as M, createElement as re, memo as Z, cloneElement as Pe, Component as Me, Suspense as oe, lazy as Be } from "react";
7
7
  import { useUserStore as Ee, useMenuViewStore as I, useMenuModelStore as De, useFavoriteStore as Fe, usePopupStore as se } from "../../stores/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"SearchDepartmentP01.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchDepartmentP01.tsx"],"names":[],"mappings":"AA4JA,QAAA,MAAM,mBAAmB,GAAI,WAAW,GAAG,4CAmV1C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"SearchDepartmentP01.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchDepartmentP01.tsx"],"names":[],"mappings":"AAuJA,QAAA,MAAM,mBAAmB,GAAI,WAAW,GAAG,4CAmV1C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchDepartmentP02.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchDepartmentP02.tsx"],"names":[],"mappings":"AA4JA,QAAA,MAAM,mBAAmB,GAAI,WAAW,GAAG,4CAqiB1C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"SearchDepartmentP02.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchDepartmentP02.tsx"],"names":[],"mappings":"AAuJA,QAAA,MAAM,mBAAmB,GAAI,WAAW,GAAG,4CAqiB1C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchOrganizationP01.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchOrganizationP01.tsx"],"names":[],"mappings":"AAmDE,QAAA,MAAM,qBAAqB,GAAI,WAAW,GAAG,4CA0kB5C,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"SearchOrganizationP01.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchOrganizationP01.tsx"],"names":[],"mappings":"AA8CE,QAAA,MAAM,qBAAqB,GAAI,WAAW,GAAG,4CA0kB5C,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchOrganizationP02.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchOrganizationP02.tsx"],"names":[],"mappings":"AAkDE,QAAA,MAAM,qBAAqB,GAAI,WAAW,GAAG,4CA6qB5C,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"SearchOrganizationP02.d.ts","sourceRoot":"","sources":["../../../src/components/popup/SearchOrganizationP02.tsx"],"names":[],"mappings":"AA2DE,QAAA,MAAM,qBAAqB,GAAI,WAAW,GAAG,4CA6qB5C,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),T=require("@ant-design/icons"),p=require("antd"),i=require("react"),G=require("../../utils/index.cjs"),z=require("../../chunks/common-components-Bhr_MU0K.cjs"),Q=o=>{if(o==null)return"";const c=String(o).trim();return!c||c.toUpperCase()==="NULL"?"":c.toUpperCase()},J=(o,c=0)=>{const b=Number(o);return Number.isFinite(b)?b:c};function q(o){return{crprCd:o.crprCd||void 0,wkplCd:o.wkplCd||void 0,deptCd:Q(o.deptCd),deptNm:(o.deptNm??"").toString().trim(),hrnkDeptCd:o.hrnkDeptCd||null,hrnkDeptNm:o.hrnkDeptNm||null,deptGbCd:o.deptGbCd||null,deptLvl:J(o.deptLvl,o.hrnkDeptCd?2:1),orgSortOrd:J(o.orgSortOrd,0),orgOtptOrd:J(o.orgOtptOrd,0),deptAbrv:o.deptAbrv||null,deptFullNm:o.deptFullNm||null,deptEnglNm:o.deptEnglNm||null,isLeaf:o.isLeaf||null}}function V(o){const c=new Set,b=o.map(q).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>c.has(l.deptCd)?!1:(c.add(l.deptCd),!0));b.sort((l,m)=>(l.deptLvl||0)-(m.deptLvl||0)||(l.orgSortOrd||0)-(m.orgSortOrd||0)||l.deptCd.localeCompare(m.deptCd));const x=new Map;for(const l of b)x.set(l.deptCd,{...l,children:[]});const v=[];for(const l of b){const m=x.get(l.deptCd),h=l.hrnkDeptCd;h&&x.has(h)?x.get(h).children.push(m):v.push(m)}const D=l=>{!l||l.length===0||(l.sort((m,h)=>m.deptCd.localeCompare(h.deptCd)),l.forEach(m=>D(m.children)))};D(v);const L=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(L)};if(v.forEach(L),v.length>1){const l=v.find(m=>m.deptCd==="D00");if(l)return[l]}return v}function X(o){const c=o.map(q),b=c.filter(x=>x.isLeaf!=="Y").map(x=>x.deptCd);return b.length>200?c.filter(x=>(x.deptLvl||0)<=2).map(x=>x.deptCd):b}const Z=({popup:o})=>{const[c,b]=i.useState(""),[x,v]=i.useState([]),[D,L]=i.useState([]),[l,m]=i.useState([]),[h,$]=i.useState(!1),E=i.useCallback(async y=>{try{$(!0);const k=await G.callService("SCMUTIL00103",{...o?.popupParams,...y}),O=Array.isArray(k?.data)?k.data:Array.isArray(k?.deptList)?k.deptList:Array.isArray(k)?k:[],w=V(O);m(w);const P=X(O);v(P);const s=w[0]?.deptCd||q(O.find(f=>q(f).deptLvl===1)||{}).deptCd||q(O[0]||{}).deptCd||"";L(s?[s]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{$(!1)}},[o?.popupParams]);i.useEffect(()=>{E()},[E]);const M=i.useCallback((y,k)=>{for(const O of y){if(O.deptCd===k)return O;if(O.children){const w=M(O.children,k);if(w)return w}}return null},[]),S=i.useMemo(()=>{const y=D[0];return y?M(l,y):null},[D,l,M]),I=i.useMemo(()=>{const y=O=>O.map(w=>({title:w.deptNm,key:w.deptCd,meta:w,children:w.children?y(w.children):void 0}));return y(l)},[l]),F=i.useMemo(()=>{const y=c.trim().toLowerCase();if(!y)return I;const k=O=>O.map(w=>{const P=w.meta,s=(P?.deptNm||"").toLowerCase().includes(y)||(P?.deptCd||"").toLowerCase().includes(y),f=w.children?k(w.children):void 0;return s||f&&f.length?{...w,children:f}:null}).filter(Boolean);return k(I)},[I,c]),U=i.useCallback(y=>{L(y.slice(0,1).map(String))},[]),R=i.useCallback(y=>v(y.map(String)),[]),A=i.useCallback((y,k)=>{if(y.stopPropagation(),!k.children||k.children.length===0)return;const O=x.includes(k.key);v(w=>O?w.filter(P=>P!==k.key):[...w,k.key])},[x]),W=i.useCallback(()=>L([]),[]),B={confirm:()=>{if(!S){p.message.error("부서를 선택해주세요.");return}const y={deptCd:S.deptCd,deptNm:S.deptNm,hrnkDeptCd:S.hrnkDeptCd,hrnkDeptNm:S.hrnkDeptNm,deptLvl:S.deptLvl,orgSortOrd:S.orgSortOrd};o?.config?.callback?.(JSON.stringify(y)),o?.close?.()}};return t.jsx(z.BwgPopup,{popup:o,popupEvent:B,children:t.jsx(z.ContentLayOut,{children:t.jsx(z.ContentBox,{border:!1,style:{paddingBottom:20},children:t.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[t.jsxs(p.Splitter.Panel,{defaultSize:"70%",min:"70%",max:"75%",children:[t.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:t.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[t.jsx(z.BwgTitleBox,{title:"조직도"}),t.jsx(p.Row,{gutter:[16,16],children:t.jsx(p.Col,{span:24,children:t.jsx(p.Input,{placeholder:"부서명, 부서코드 검색",prefix:t.jsx(T.SearchOutlined,{}),value:c,allowClear:!0,onChange:y=>b(y.target.value)})})})]})}),t.jsx("div",{style:{padding:16,overflowY:"hidden"},children:t.jsx(p.Spin,{spinning:h,children:t.jsx(p.Tree,{treeData:F,expandedKeys:x,selectedKeys:D,onSelect:U,onExpand:R,onDoubleClick:A,showLine:!0,showIcon:!1,selectable:!0,style:{overflow:"hidden"},titleRender:y=>{const k=y.meta;return t.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%",fontWeight:D.includes(y.key)?"bold":"normal"},children:[t.jsx("span",{children:k.deptNm}),t.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:k.deptCd})]})}})})})]}),t.jsx(p.Splitter.Panel,{collapsible:!0,children:t.jsxs("div",{style:{padding:16,overflowY:"hidden",height:"100%"},children:[t.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:16,fontWeight:700},children:"선택된 부서"}),S?t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:14,border:"1px solid #e0e0e0",borderRadius:12,background:"#fafafa"},children:[t.jsx("div",{style:{width:42,height:42,borderRadius:"50%",border:"1px solid #e6e6e6",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:18,color:"#8c8c8c",background:"#fff",flex:"0 0 auto"},children:t.jsx(T.TeamOutlined,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsxs("div",{style:{fontSize:15,fontWeight:700,marginBottom:4},children:[S.deptNm," ",t.jsxs("span",{style:{color:"#8c8c8c",fontSize:12},children:["(",S.deptCd,")"]})]}),t.jsxs("div",{style:{fontSize:12,color:"#666",marginBottom:2},children:["상위부서: ",S.hrnkDeptNm||"-"]})]}),t.jsx(p.Button,{type:"text",onClick:W,icon:t.jsx(T.RestOutlined,{style:{fontSize:24,color:"#FF6363"}})})]}):t.jsx("div",{style:{color:"#999",fontSize:14},children:"부서를 선택해주세요."})]})})]})})})})},_=o=>{if(o==null)return"";const c=String(o).trim();return!c||c.toUpperCase()==="NULL"?"":c.toUpperCase()},H=(o,c=0)=>{const b=Number(o);return Number.isFinite(b)?b:c};function Y(o){return{crprCd:o.crprCd||void 0,wkplCd:o.wkplCd||void 0,deptCd:_(o.deptCd),deptNm:(o.deptNm??"").toString().trim(),hrnkDeptCd:o.hrnkDeptCd||null,hrnkDeptNm:o.hrnkDeptNm||null,deptGbCd:o.deptGbCd||null,deptLvl:H(o.deptLvl,o.hrnkDeptCd?2:1),orgSortOrd:H(o.orgSortOrd,0),orgOtptOrd:H(o.orgOtptOrd,0),deptAbrv:o.deptAbrv||null,deptFullNm:o.deptFullNm||null,deptEnglNm:o.deptEnglNm||null,isLeaf:o.isLeaf||null}}function ee(o){const c=new Set,b=o.map(Y).filter(l=>l.deptCd).filter(l=>(l.deptCd===l.hrnkDeptCd&&(l.hrnkDeptCd=""),!0)).filter(l=>c.has(l.deptCd)?!1:(c.add(l.deptCd),!0));b.sort((l,m)=>(l.deptLvl||0)-(m.deptLvl||0)||(l.orgSortOrd||0)-(m.orgSortOrd||0)||l.deptCd.localeCompare(m.deptCd));const x=new Map;for(const l of b)x.set(l.deptCd,{...l,children:[]});const v=[];for(const l of b){const m=x.get(l.deptCd),h=l.hrnkDeptCd;h&&x.has(h)?x.get(h).children.push(m):v.push(m)}const D=l=>{!l||l.length===0||(l.sort((m,h)=>m.deptCd.localeCompare(h.deptCd)),l.forEach(m=>D(m.children)))};D(v);const L=l=>{if(!l.children||l.children.length===0){delete l.children;return}l.children.forEach(L)};if(v.forEach(L),v.length>1){const l=v.find(m=>m.deptCd==="D00");if(l)return[l]}return v}function te(o){const c=o.map(Y),b=c.filter(x=>x.isLeaf!=="Y").map(x=>x.deptCd);return b.length>200?c.filter(x=>(x.deptLvl||0)<=2).map(x=>x.deptCd):b}const ne=({popup:o})=>{const[c,b]=i.useState(""),[x,v]=i.useState(""),[D,L]=i.useState([]),[l,m]=i.useState([]),[h,$]=i.useState([]),[E,M]=i.useState(!1),[S,I]=i.useState([]),[F,U]=i.useState(!1),R=i.useCallback(async e=>{try{U(!0);const n=await G.callService("SCMUTIL00103",{...o?.popupParams,...e}),r=Array.isArray(n?.data)?n.data:Array.isArray(n?.deptList)?n.deptList:Array.isArray(n)?n:[],d=ee(r);I(d);const a=te(r);L(a);const u=d[0]?.deptCd||Y(r.find(g=>Y(g).deptLvl===1)||{}).deptCd||Y(r[0]||{}).deptCd||"";m(u?[u]:[])}catch{p.message.error("조직 데이터를 불러오는 중 오류가 발생했습니다.")}finally{U(!1)}},[o?.popupParams]);i.useEffect(()=>{R()},[R]);const A=i.useCallback((e,n)=>{for(const r of e){if(r.deptCd===n)return r;if(r.children){const d=A(r.children,n);if(d)return d}}return null},[S]),W=i.useMemo(()=>h.map(e=>{const n=A(S,e);if(!n)return null;const{children:r,...d}=n;return d}).filter(Boolean),[h,S,A]),B=i.useMemo(()=>{const e=n=>n.map(r=>({title:r.deptNm,key:r.deptCd,meta:r,children:r.children?e(r.children):void 0,isLeaf:!r.children||r.children.length===0}));return e(S)},[S]),y=i.useMemo(()=>{const e=c.trim().toLowerCase();if(!e)return B;const n=r=>r.map(d=>{const a=d.meta,u=(a?.deptNm||"").toLowerCase().includes(e)||(a?.deptCd||"").toLowerCase().includes(e),g=d.children?n(d.children):void 0;return u||g&&g.length>0?{...d,children:g}:null}).filter(Boolean);return n(B)},[B,c]),k=i.useCallback(e=>{const n=[],r=d=>{for(const a of d)if(a.deptCd===e&&a.children){const u=g=>{for(const j of g)n.push(j.deptCd),j.children&&u(j.children)};u(a.children)}else a.children&&r(a.children)};return r(S),n},[S]),O=i.useCallback((e,n)=>{let r=Array.isArray(e)?e:e?.checked??[];if(E&&n?.node?.key){const d=n.node.key,a=k(d);if(n.checked){const u=new Set(r);for(const g of a)u.add(g);r=Array.from(u)}else{const u=new Set([d,...a]);r=r.filter(g=>!u.has(g))}}$(r)},[E,k]),w=i.useCallback(e=>{const n=e.map(String);if(m(n),n.length>0){const r=n[0],d=(u,g)=>{for(const j of u){if(j.deptCd===g)return j.deptNm;if(j.children){const K=d(j.children,g);if(K)return K}}return null},a=d(S,r);a&&v(a)}},[S]),P=i.useCallback(e=>L(e.map(String)),[]),s=i.useCallback((e,n)=>{if(e.stopPropagation(),n.children&&n.children.length>0){const r=D.includes(n.key);L(d=>r?d.filter(a=>a!==n.key):[...d,n.key])}},[D]),f=i.useCallback(e=>{$(n=>n.filter(r=>r!==e))},[]),C=i.useCallback(()=>{$([])},[]),N={confirm:()=>{if(h.length===0){p.message.error("부서를 선택해주세요.");return}const n=Array.from(new Set(h)).map(r=>{const d=A(S,r);return d?{deptCd:d.deptCd,deptNm:d.deptNm,hrnkDeptCd:d.hrnkDeptCd,hrnkDeptNm:d.hrnkDeptNm}:null}).filter(Boolean);o?.config?.callback?.(JSON.stringify(n)),o?.close?.()}};return t.jsx(z.BwgPopup,{popup:o,popupEvent:N,children:t.jsx(z.ContentLayOut,{children:t.jsx(z.ContentBox,{border:!1,style:{paddingBottom:20},children:t.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[t.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"20%",max:"80%",children:[t.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:t.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[t.jsx(z.BwgTitleBox,{title:"조직도"}),t.jsx("div",{style:{fontSize:14,color:"#666",padding:8,backgroundColor:"#f8f8f8",borderRadius:4},children:x}),t.jsxs(p.Row,{gutter:[16,16],children:[t.jsx(p.Col,{span:18,children:t.jsx(p.Input,{placeholder:"부서명, 부서장명, 부서코드 검색",prefix:t.jsx(T.SearchOutlined,{}),value:c,allowClear:!0,onChange:e=>b(e.target.value)})}),t.jsx(p.Col,{span:6,style:{justifyContent:"center",display:"flex",alignItems:"center"},children:t.jsx(p.Checkbox,{checked:E,onChange:e=>M(e.target.checked),children:"하위까지 선택"})})]})]})}),t.jsx("div",{style:{padding:16,overflowY:"hidden"},children:t.jsx(p.Spin,{spinning:F,children:t.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:y,expandedKeys:D,selectedKeys:l,checkedKeys:h,checkable:!0,checkStrictly:!0,showLine:!0,showIcon:!1,selectable:!0,onSelect:w,onExpand:P,onCheck:O,onDoubleClick:s,style:{overflow:"hidden"},titleRender:e=>{const n=e.meta;return t.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"2px 4px",width:"100%"},children:[t.jsx("span",{style:{fontWeight:l.includes(e.key)?"bold":"normal"},children:n.deptNm}),t.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:8},children:n.deptCd})]})}})})})]}),t.jsx(p.Splitter.Panel,{collapsible:!0,children:t.jsxs("div",{style:{padding:16,overflowY:"hidden"},children:[t.jsxs("div",{style:{marginBottom:12,display:"flex",alignItems:"center",gap:8},children:[t.jsxs("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:["선택된 부서 (",W.length,"개)"]}),W.length>0&&t.jsx("button",{onClick:C,style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",fontSize:12,padding:4},title:"전체 해제",children:"전체 해제"})]}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"flex-start",minHeight:48},children:W.length===0?t.jsx("div",{style:{color:"#999",fontSize:14},children:"선택된 부서가 없습니다."}):W.map(e=>t.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:[t.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:t.jsx(T.TeamOutlined,{})}),t.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",gap:2,overflow:"hidden"},children:[t.jsx("span",{style:{fontSize:13,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:e.deptNm}),t.jsx("span",{style:{fontSize:11,color:"#8c8c8c",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:e.deptCd})]}),t.jsx("button",{onClick:()=>f(e.deptCd),style:{border:"none",background:"transparent",color:"#8c8c8c",cursor:"pointer",padding:2,lineHeight:0},"aria-label":`${e.deptNm} 선택 해제`,title:"선택 해제",children:"×"})]},e.deptCd))})]})})]})})})})},re=({popup:o})=>{const[c,b]=i.useState(""),[x,v]=i.useState(""),[D,L]=i.useState([]),[l,m]=i.useState([]),[h,$]=i.useState(null),[E,M]=i.useState([]),[S,I]=i.useState(!1),F=i.useCallback(async()=>{try{I(!0);const s=await G.callService("SCMUTIL00105",{...o?.popupParams});console.log("📊 조직도 API 응답:",s);const f=Array.isArray(s?.data)?s.data:Array.isArray(s?.orgnList)?s.orgnList:Array.isArray(s)?s:[];if(f.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const C=U(f);console.log("🌳 구성된 조직도 트리:",C),M(C);const N=f.filter(e=>e.deptLvl<=2).map(e=>e.deptCd);if(L(N),C.length>0){const e=C[0];m([e.deptCd]),v(e.deptNm)}console.log("✅ 조직도 데이터 로딩 완료")}catch(s){console.error("❌ 조직도 데이터 로딩 실패:",s),p.message.error("조직도 데이터를 불러오는 중 오류가 발생했습니다.")}finally{I(!1)}},[o?.popupParams]),U=i.useCallback(s=>{const f=[...s].sort((n,r)=>n.deptLvl-r.deptLvl||n.orgSortOrd-r.orgSortOrd||n.deptCd.localeCompare(r.deptCd)),C=new Map;for(const n of f)C.set(n.deptCd,{...n,children:[]});const N=[];for(const n of f){const r=C.get(n.deptCd),d=n.hrnkDeptCd;d&&C.has(d)?C.get(d).children.push(r):N.push(r)}const e=n=>{if(!n.children||n.children.length===0){delete n.children;return}n.children.forEach(e)};return N.forEach(e),N},[]);i.useEffect(()=>{F()},[F]);const R=i.useMemo(()=>{const s=N=>{let e=[];return N.forEach(n=>{n.employees&&(e=e.concat(n.employees)),n.children&&(e=e.concat(s(n.children)))}),e},f=s(E),C=f.filter((N,e,n)=>e===n.findIndex(r=>r.empNo===N.empNo));return console.log(`👥 전체 사원 수: ${f.length}, 중복 제거 후: ${C.length}`),C},[E]),A=i.useMemo(()=>{const s=f=>f.map(C=>({title:C.deptNm,key:C.deptCd,children:C.children?s(C.children):void 0,isLeaf:!C.children||C.children.length===0}));return s(E)},[E]),W=i.useMemo(()=>{if(!c.trim())return A;const s=f=>f.map(C=>{const N=C.title.toLowerCase().includes(c.toLowerCase()),e=C.children?s(C.children):void 0;return N||e&&e.length>0?{...C,children:e}:null}).filter(Boolean);return s(A)},[A,c]),B=i.useMemo(()=>{if(!c.trim()){const s=n=>{let r=[];return n.forEach(d=>{d.employees&&(r=r.concat(d.employees)),d.children&&(r=r.concat(s(d.children)))}),r},f=(n,r)=>{for(const d of n){if(d.deptCd===r){let a=[...d.employees||[]];return d.children&&(a=a.concat(s(d.children))),a}if(d.children){const a=f(d.children,r);if(a.length>0)return a}}return[]},C=l[0];if(!C)return[];const N=f(E,C),e=N.filter((n,r,d)=>r===d.findIndex(a=>a.empNo===n.empNo));return console.log(`🔍 선택된 부서: ${C}, 반환된 사원 수: ${N.length}, 중복 제거 후: ${e.length}`),e}return R.filter(s=>s.empNm.toLowerCase().includes(c.toLowerCase())||s.empNo.toLowerCase().includes(c.toLowerCase())||s.deptNm.toLowerCase().includes(c.toLowerCase())||s.jbpsCd.includes(c)||s.jbgdCd.includes(c)||s.emplyStCd.includes(c))},[c,l,R,E]),y=i.useCallback(s=>{$(s)},[]),k=i.useCallback(s=>{const f=s.map(String);if(console.log(`🌳 트리 선택: ${f.join(", ")}`),m(f),f.length>0){const C=f[0],N=(n,r)=>{for(const d of n){if(d.deptCd===r)return d.deptNm;if(d.children){const a=N(d.children,r);if(a)return a}}return null},e=N(E,C);e&&v(e)}},[E]),O=i.useCallback(s=>{L(s.map(String))},[]),w=i.useCallback((s,f)=>{if(s.stopPropagation(),f.children&&f.children.length>0){const C=D.includes(f.key);L(C?N=>N.filter(e=>e!==f.key):N=>[...N,f.key])}},[D]),P={confirm:()=>{h?(o?.popupParams?.onSelect?o.popupParams.onSelect(h):o?.config?.callback&&o.config.callback(JSON.stringify(h,null,2)),o?.close?.()):p.message.error("사원을 선택해주세요.")}};return t.jsx(z.BwgPopup,{popup:o,popupEvent:P,children:t.jsx(z.ContentLayOut,{children:t.jsx(z.ContentBox,{border:!1,style:{paddingBottom:20},children:t.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[t.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"20%",max:"80%",children:[t.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:"8px"},children:t.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:"6px"},children:[t.jsx(z.BwgTitleBox,{title:"조직도"}),t.jsx(p.Input,{placeholder:"이름, 소속, 전화번호 검색",prefix:t.jsx(T.SearchOutlined,{}),value:c,allowClear:!0,onChange:s=>b(s.target.value)})]})}),t.jsx("div",{style:{padding:"16px",overflowY:"hidden"},children:t.jsx(p.Spin,{spinning:S,children:t.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:W,expandedKeys:D,selectedKeys:l,onSelect:k,onExpand:O,onDoubleClick:w,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:s=>t.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontWeight:l.includes(s.key)?"bold":"normal",display:"inline-block",width:"100%"},children:s.title})})})})]}),t.jsx(p.Splitter.Panel,{collapsible:!0,children:t.jsxs("div",{style:{padding:"16px",overflowY:"hidden"},children:[t.jsx("div",{style:{marginBottom:"16px"},children:t.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px",fontWeight:"bold"},children:c?"검색 결과":x})}),t.jsxs("div",{style:{overflow:"hidden",height:"100%"},children:[B.map(s=>t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"12px",border:"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:h&&h.crprCd===s.crprCd&&h.wkplCd===s.wkplCd&&h.empNo===s.empNo&&h.jbpsCd===s.jbpsCd&&h.jbgdCd===s.jbgdCd&&h.empMarkOrd===s.empMarkOrd?"#efebff":"white"},onClick:()=>y(s),children:[t.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"},onClick:f=>{f.stopPropagation(),$(s)},children:h&&h.crprCd===s.crprCd&&h.wkplCd===s.wkplCd&&h.empNo===s.empNo&&h.jbpsCd===s.jbpsCd&&h.jbgdCd===s.jbgdCd&&h.empMarkOrd===s.empMarkOrd?t.jsx(T.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):t.jsx(T.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),t.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",fontSize:"18px",color:"#666"},children:t.jsx(T.UserOutlined,{})}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px"},children:[s.empNm,t.jsxs("span",{style:{fontSize:"12px",fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",s.empNo,")"]})]}),t.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"2px"},children:[s.deptNm," (",s.deptCd,") | 직급:"," ",s.jbpsCd," | 등급: ",s.jbgdCd]})]})]},`emp-${s.crprCd}-${s.wkplCd}-${s.empNo}-${s.jbpsCd}-${s.jbgdCd}-${s.empMarkOrd}`)),B.length===0&&t.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:c?"검색 결과가 없습니다.":"해당 부서에 직원이 없습니다."})]})]})})]})})})})},le=({popup:o})=>{const[c,b]=i.useState(""),[x,v]=i.useState(""),[D,L]=i.useState([]),[l,m]=i.useState([]),[h,$]=i.useState([]),[E,M]=i.useState(!1),[S,I]=i.useState({}),F=i.useCallback(async()=>{try{M(!0);const e=await G.callService("SCMUTIL00105",{...o?.popupParams});console.log("📊 조직도 API 응답:",e);const n=Array.isArray(e?.data)?e.data:Array.isArray(e?.orgnList)?e.orgnList:Array.isArray(e)?e:[];if(n.length===0){console.warn("⚠️ 조직도 데이터가 없습니다.");return}const r=U(n);console.log("🌳 구성된 조직도 트리:",r),$(r);const d=n.filter(a=>a.deptLvl<=2).map(a=>a.deptCd);if(L(d),r.length>0){const a=r[0];m([a.deptCd]),v(a.deptNm)}console.log("✅ 조직도 데이터 로딩 완료")}catch(e){console.error("❌ 조직도 데이터 로딩 실패:",e),p.message.error("조직도 데이터를 불러오는 중 오류가 발생했습니다.")}finally{M(!1)}},[o?.popupParams]),U=i.useCallback(e=>{const n=[...e].sort((u,g)=>u.deptLvl-g.deptLvl||u.orgSortOrd-g.orgSortOrd||u.deptCd.localeCompare(g.deptCd)),r=new Map;for(const u of n)r.set(u.deptCd,{...u,children:[]});const d=[];for(const u of n){const g=r.get(u.deptCd),j=u.hrnkDeptCd;j&&r.has(j)?r.get(j).children.push(g):d.push(g)}const a=u=>{if(!u.children||u.children.length===0){delete u.children;return}u.children.forEach(a)};return d.forEach(a),d},[]);i.useEffect(()=>{F()},[F]);const R=i.useMemo(()=>{const e=d=>{let a=[];return d.forEach(u=>{u.employees&&(a=a.concat(u.employees)),u.children&&(a=a.concat(e(u.children)))}),a},n=e(h),r=n.filter((d,a,u)=>a===u.findIndex(g=>g.empNo===d.empNo));return console.log(`👥 전체 사원 수: ${n.length}, 중복 제거 후: ${r.length}`),r},[h]),A=i.useMemo(()=>{const e=n=>n.map(r=>({title:r.deptNm,key:r.deptCd,children:r.children?e(r.children):void 0,isLeaf:!r.children||r.children.length===0}));return e(h)},[h]),W=i.useMemo(()=>{if(!c.trim())return A;const e=n=>n.map(r=>{const d=r.title.toLowerCase().includes(c.toLowerCase()),a=r.children?e(r.children):void 0;return d||a&&a.length>0?{...r,children:a}:null}).filter(Boolean);return e(A)},[A,c]),B=i.useMemo(()=>{if(!c.trim()){const e=u=>{let g=[];return u.forEach(j=>{j.employees&&(g=g.concat(j.employees)),j.children&&(g=g.concat(e(j.children)))}),g},n=(u,g)=>{for(const j of u){if(j.deptCd===g){let K=[...j.employees||[]];return j.children&&(K=K.concat(e(j.children))),K}if(j.children){const K=n(j.children,g);if(K.length>0)return K}}return[]},r=l[0];if(!r)return[];const d=n(h,r),a=d.filter((u,g,j)=>g===j.findIndex(K=>K.empNo===u.empNo));return console.log(`🔍 선택된 부서: ${r}, 반환된 사원 수: ${d.length}, 중복 제거 후: ${a.length}`),a}return R.filter(e=>e.empNm.toLowerCase().includes(c.toLowerCase())||e.empNo.toLowerCase().includes(c.toLowerCase())||e.deptNm.toLowerCase().includes(c.toLowerCase())||e.jbpsCd.includes(c)||e.jbgdCd.includes(c)||e.emplyStCd.includes(c))},[c,l,R,h]),y=i.useCallback(e=>{I(n=>{const r={...n};return r[e.empNo]?delete r[e.empNo]:r[e.empNo]=e,r})},[]),k=i.useCallback(e=>{I(n=>{const r={...n};return delete r[e],r})},[]),O=i.useCallback(()=>I({}),[]),w=i.useCallback(()=>{I(e=>{const n={...e};for(const r of B)n[r.empNo]=r;return n})},[B]),P=i.useCallback(()=>{I(e=>{const n={...e};for(const r of B)delete n[r.empNo];return n})},[B]),s=i.useCallback(e=>{const n=e.map(String);if(console.log(`🌳 트리 선택: ${n.join(", ")}`),m(n),n.length>0){const r=n[0],d=(u,g)=>{for(const j of u){if(j.deptCd===g)return j.deptNm;if(j.children){const K=d(j.children,g);if(K)return K}}return null},a=d(h,r);a&&v(a)}},[h]),f=i.useCallback(e=>{L(e.map(String))},[]),C=i.useCallback((e,n)=>{if(e.stopPropagation(),!n.children||!n.children.length)return;const r=D.includes(n.key);L(d=>r?d.filter(a=>a!==n.key):[...d,n.key])},[D]),N={confirm:()=>{const e=Object.values(S).map(n=>({crprCd:n.crprCd,wkplCd:n.wkplCd,empNo:n.empNo,deptCd:n.deptCd,deptNm:n.deptNm,empNm:n.empNm,jbpsCd:n.jbpsCd,jbgdCd:n.jbgdCd,empMarkOrd:n.empMarkOrd,emplyStCd:n.emplyStCd}));if(e.length===0){p.message.error("직원을 선택해주세요.");return}o?.config?.callback?.(JSON.stringify(e)),o?.close?.()}};return t.jsx(z.BwgPopup,{popup:o,popupEvent:N,children:t.jsx(z.ContentLayOut,{children:t.jsx(z.ContentBox,{border:!1,style:{paddingBottom:20},children:t.jsxs(p.Splitter,{style:{height:"100%"},children:[t.jsx(p.Splitter.Panel,{defaultSize:"50%",min:"50%",max:"70%",children:t.jsxs(p.Splitter,{layout:"vertical",style:{height:"100%"},children:[t.jsxs(p.Splitter.Panel,{defaultSize:"60%",min:"35%",max:"75%",children:[t.jsx("div",{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"white",borderBottom:"1px solid #e0e0e0",padding:8},children:t.jsxs(p.Flex,{gap:8,vertical:!0,style:{marginBottom:6},children:[t.jsx(z.BwgTitleBox,{title:"조직도"}),t.jsx(p.Input,{placeholder:"이름, 소속, 직급/직위, 사번 검색",prefix:t.jsx(T.SearchOutlined,{}),value:c,allowClear:!0,onChange:e=>b(e.target.value)})]})}),t.jsx("div",{style:{padding:16,overflowY:"hidden"},children:t.jsx(p.Spin,{spinning:E,children:t.jsx(p.Tree,{className:"bwg-ogrn-tree",treeData:W,expandedKeys:D,selectedKeys:l,onSelect:s,onExpand:f,onDoubleClick:C,showLine:!0,showIcon:!1,style:{overflow:"hidden"},titleRender:e=>t.jsx("span",{style:{padding:"4px 8px",borderRadius:4,fontWeight:l.includes(e.key)?"bold":"normal",display:"inline-block",width:"100%"},children:e.title})})})})]}),t.jsx(p.Splitter.Panel,{children:t.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("h3",{style:{margin:0,fontSize:16,fontWeight:700},children:c?"검색 결과":`${x} 사용자`}),t.jsxs("div",{style:{display:"flex",gap:8},children:[t.jsx(p.Button,{size:"small",onClick:w,children:"현재 목록 전체 선택"}),t.jsx(p.Button,{size:"small",onClick:P,children:"현재 목록 전체 해제"})]})]}),t.jsx(p.Divider,{style:{margin:"8px 0"}}),t.jsxs("div",{style:{overflowY:"auto"},children:[B.map(e=>{const n=!!S[e.empNo];return t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,cursor:"pointer",background:n?"#efebff":"#fff"},onClick:()=>y(e),children:[t.jsx("div",{style:{marginRight:12,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"},onClick:r=>{r.stopPropagation(),y(e)},children:n?t.jsx(T.CheckCircleFilled,{style:{fontSize:20,color:"#6449fc"}}):t.jsx(T.CheckCircleOutlined,{style:{fontSize:20,color:"#d9d9d9"}})}),t.jsx("div",{style:{width:36,height:36,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:12,fontSize:16,color:"#666",flex:"0 0 auto"},children:t.jsx(T.UserOutlined,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsxs("div",{style:{fontSize:14,fontWeight:600,marginBottom:2},children:[e.empNm,t.jsxs("span",{style:{fontSize:12,fontWeight:"normal",color:"#666",marginLeft:"8px"},children:["(",e.empNo,")"]})]}),t.jsxs("div",{style:{fontSize:12,color:"#666"},children:[e.deptNm," (",e.deptCd,") | 직급: ",e.jbpsCd," | 등급: ",e.jbgdCd]})]})]},`emp-${e.crprCd}-${e.wkplCd}-${e.empNo}-${e.jbpsCd}-${e.jbgdCd}-${e.empMarkOrd}`)}),B.length===0&&t.jsx("div",{style:{textAlign:"center",padding:32,color:"#999",fontSize:14},children:c?"검색 결과가 없습니다.":"해당 부서에 사용자 없음"})]})]})})]})}),t.jsx(p.Splitter.Panel,{collapsible:!0,children:t.jsxs("div",{style:{padding:16,height:"100%",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(z.BwgTitleBox,{title:`선택된 사용자 (${Object.keys(S).length})`}),t.jsx(p.Button,{type:"link",size:"small",onClick:O,children:"전체 해제"})]}),t.jsx(p.Divider,{style:{margin:"8px 0"}}),t.jsxs("div",{style:{overflowY:"auto",flex:1},children:[Object.values(S).map(e=>t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:10,border:"1px solid #e0e0e0",borderRadius:8,marginBottom:8,background:"#fafafa"},children:[t.jsx("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:"#e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",marginRight:10,color:"#666"},children:t.jsx(T.UserOutlined,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsxs("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:[e.empNm,t.jsxs("span",{style:{fontSize:11,fontWeight:"normal",color:"#666",marginLeft:"6px"},children:["(",e.empNo,")"]})]}),t.jsxs("div",{style:{fontSize:12,color:"#666"},children:[e.deptNm," (",e.deptCd,") | 직급: ",e.jbpsCd," | 등급: ",e.jbgdCd]})]}),t.jsx(p.Button,{type:"text",shape:"circle",icon:t.jsx(T.CloseOutlined,{}),onClick:()=>k(e.empNo)})]},`selected-${e.crprCd}-${e.wkplCd}-${e.empNo}-${e.jbpsCd}-${e.jbgdCd}-${e.empMarkOrd}`)),Object.keys(S).length===0&&t.jsx("div",{style:{color:"#999",fontSize:14,textAlign:"center",padding:24},children:"선택된 사용자가 없습니다."})]})]})})]})})})})};exports.SearchDepartmentP01=Z;exports.SearchDepartmentP02=ne;exports.SearchOrganizationP01=re;exports.SearchOrganizationP02=le;