@bwg-ui/core 1.1.3 → 1.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/chunks/{SSOHandler-BFys-2Zz.js → SSOHandler-Bu3v95k0.js} +6 -3
- package/dist/chunks/SSOHandler-Bu3v95k0.js.map +1 -0
- package/dist/chunks/{SSOHandler-De8MPtGZ.cjs → SSOHandler-kghWABfM.cjs} +2 -2
- package/dist/chunks/SSOHandler-kghWABfM.cjs.map +1 -0
- package/dist/chunks/menuStore-2zsN-PRt.js +266 -0
- package/dist/chunks/{menuStore-CvQrMo35.js.map → menuStore-2zsN-PRt.js.map} +1 -1
- package/dist/chunks/menuStore-D7zl2c89.cjs +2 -0
- package/dist/chunks/{menuStore-CBvENehP.cjs.map → menuStore-D7zl2c89.cjs.map} +1 -1
- package/dist/components/common/BwgGrid.d.ts +1 -1
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/stores/menuStore.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/SSOHandler-BFys-2Zz.js.map +0 -1
- package/dist/chunks/SSOHandler-De8MPtGZ.cjs.map +0 -1
- package/dist/chunks/menuStore-CBvENehP.cjs +0 -2
- package/dist/chunks/menuStore-CvQrMo35.js +0 -381
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const _=require("./jsx-runtime-CeSfJrVB.cjs"),R=require("react"),Z=require("antd"),dt=require("@ant-design/icons"),Ft=require("./serviceConfig-Cc8jfw_Y.cjs"),Li=require("./SearchBoxContext-mcPWk862.cjs"),St=require("realgrid"),ps=require("realgrid-react"),_o=require("react-dom"),Wd=require("react-rnd"),Hi=require("./_commonjsHelpers-DwGv2jUC.cjs"),ys=require("./menuStore-CBvENehP.cjs"),qd=require("./envUtils-CduTHoHu.cjs"),Ud=require("./AuthContext-CXng9fj0.cjs"),bs=require("react-router-dom");function gc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=gc(R),Rn=gc(dt),Kd=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:o="middle",style:a,className:i,onButtonClick:s})=>{const l=Li.useServiceCodeValue("AUTH_BTNS"),{user:c}=Ft.useUserStore(),[u,d]=R.useState([]),[f,p]=R.useState(!0),[g,y]=R.useState(null),[h,b]=R.useState({}),m=async()=>{try{p(!0),y(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const x=await Ft.callService(l,{userId:c?.userId,crprCd:c?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",x),x?.data&&Array.isArray(x.data)){const w=x.data.sort((C,O)=>C.btnSq-O.btnSq);d(w)}else d([])}catch(x){console.error("버튼 권한 조회 실패:",x),y("버튼 권한을 조회하는 중 오류가 발생했습니다."),d([])}finally{p(!1)}};R.useEffect(()=>{m()},[e,t]);const S=async(x,w)=>{b(C=>({...C,[x]:{loading:!0}}));try{const C=r?.[x];C?await C():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${x}`),s&&s(x,w,e)}catch(C){console.error("버튼 이벤트 실행 실패:",C),Z.message.error("작업 중 오류가 발생했습니다.")}finally{b(C=>({...C,[x]:{loading:!1}}))}},$=x=>{const w=h[x.btnId]||{loading:!1};return _.jsxRuntimeExports.jsxs(Z.Button,{size:o,loading:w.loading,onClick:()=>S(x.btnId,x.btnNm),className:"bwg-btn",style:{...x.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[x.iconVal&&_.jsxRuntimeExports.jsxs(_.jsxRuntimeExports.Fragment,{children:[x.iconType==="ANTD"&&Rn[x.iconVal]&&R.createElement(Rn[x.iconVal],{style:{fontSize:"14px"}}),x.iconType!=="ANTD"&&_.jsxRuntimeExports.jsx("span",{className:x.iconVal,style:{fontSize:"14px"}})]}),x.btnNm]},x.btnId)};return f?_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Space,{direction:n==="vertical"?"vertical":"horizontal",size:o,children:_.jsxRuntimeExports.jsx(Z.Button,{loading:!0,size:o,children:"권한 조회 중..."})})}):g?_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"권한 오류",description:g,type:"error",showIcon:!0,style:{minHeight:"40px"}})}):u.length===0?_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})}):_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Flex,{gap:3,children:u.map($)})})},Gd=({content:e,layout:t="flex",gap:r=16,minWidth:n=120,maxWidth:o=300,style:a,className:i})=>{if(!(Array.isArray(e)&&e.length>0&&Array.isArray(e[0])))return _.jsxRuntimeExports.jsx("div",{style:a,className:i,children:e});const l=e.filter(p=>p&&p.length>0),c=R.useMemo(()=>{const p=l[0];if(!p||p.length===0)return{totalCols:0,baseWidth:0};let g=0;const y=[];p.forEach(b=>{const m=b,S=m?.props?.["data-colspan"]?parseInt(String(m.props["data-colspan"])):1;g+=S,y.push(S)});const h=g>0?100/g:0;return{totalCols:g,baseWidth:h,componentWidths:y}},[l]),u=(p,g,y)=>{const h=p,b=h?.props?.["data-colspan"]?parseInt(String(h.props["data-colspan"])):1;switch(t){case"equal":return 100/y;case"auto":return 100/y;case"grid":return 100/c.totalCols*b;case"flex":default:const m=c.baseWidth*b;return Math.max(n,Math.min(o,m))}},d=p=>{if(!p||typeof p!="object")return p;const g=p;if(!g.props)return p;const h={...g.props.style||{},width:"100%"};return R.cloneElement(g,{...g.props,style:h})},f=(p,g)=>{if(!p||p.length===0)return null;const y=p.length;return t==="grid"?_.jsxRuntimeExports.jsx("div",{className:"erp-cmm-form",style:{display:"grid",gridTemplateColumns:`repeat(${c.totalCols}, 1fr)`,gap:`${r}px`,width:"100%"},children:p.map((h,b)=>{const m=h?.props?.["data-colspan"]?parseInt(String(h.props["data-colspan"])):1,S=d(h);return _.jsxRuntimeExports.jsx("div",{style:{gridColumn:`span ${m}`,minWidth:`${n}px`},className:"form-component-wrapper",children:S},`row-${g}-col-${b}`)})},`row-${g}`):_.jsxRuntimeExports.jsx(Z.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:p.map((h,b)=>{const m=u(h,b,y),S=d(h),$=t==="flex"?{width:`${m}px`,minWidth:`${n}px`,maxWidth:`${o}px`,flexShrink:0}:{width:`${m}%`,minWidth:`${n}px`};return _.jsxRuntimeExports.jsx("div",{style:$,className:"form-component-wrapper",children:S},`row-${g}-col-${b}`)})},`row-${g}`)};return _.jsxRuntimeExports.jsx(Z.Flex,{gap:"small",vertical:!0,style:a,className:i,children:l.map((p,g)=>f(p,g+1))})},Yd=({children:e,...t})=>_.jsxRuntimeExports.jsx(Z.Col,{...t,className:"bwg-col",children:e});var hn={},da={exports:{}},xs;function Lo(){return xs||(xs=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(da)),da.exports}var vn={},Cs;function Xd(){if(Cs)return vn;Cs=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=void 0;var e={items_per_page:"/ 페이지",jump_to:"이동하기",jump_to_confirm:"확인하다",page:"페이지",prev_page:"이전 페이지",next_page:"다음 페이지",prev_5:"이전 5 페이지",next_5:"다음 5 페이지",prev_3:"이전 3 페이지",next_3:"다음 3 페이지",page_size:"페이지 크기"};return vn.default=e,vn}var gn={},mn={},pn={},fa={exports:{}},ha={exports:{}},va={exports:{}},ga={exports:{}},ws;function mc(){return ws||(ws=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ga)),ga.exports}var ma={exports:{}},Ss;function Qd(){return Ss||(Ss=1,(function(e){var t=mc().default;function r(n,o){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var i=a.call(n,o||"default");if(t(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ma)),ma.exports}var Es;function Zd(){return Es||(Es=1,(function(e){var t=mc().default,r=Qd();function n(o){var a=r(o,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(va)),va.exports}var Rs;function Jd(){return Rs||(Rs=1,(function(e){var t=Zd();function r(n,o,a){return(o=t(o))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ha)),ha.exports}var $s;function ef(){return $s||($s=1,(function(e){var t=Jd();function r(o,a){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);a&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(o,l).enumerable})),i.push.apply(i,s)}return i}function n(o){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?r(Object(i),!0).forEach(function(s){t(o,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))})}return o}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(fa)),fa.exports}var yn={},Os;function tf(){return Os||(Os=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.commonLocale=void 0,yn.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),yn}var js;function rf(){if(js)return pn;js=1;var e=Lo().default;Object.defineProperty(pn,"__esModule",{value:!0}),pn.default=void 0;var t=e(ef()),r=tf(),n=(0,t.default)((0,t.default)({},r.commonLocale),{},{locale:"ko_KR",today:"오늘",now:"현재 시각",backToToday:"오늘로 돌아가기",ok:"확인",clear:"지우기",week:"주",month:"월",year:"년",timeSelect:"시간 선택",dateSelect:"날짜 선택",monthSelect:"달 선택",yearSelect:"연 선택",decadeSelect:"연대 선택",yearFormat:"YYYY년",dateFormat:"YYYY-MM-DD",dateTimeFormat:"YYYY-MM-DD HH:mm:ss",monthBeforeYear:!1,previousMonth:"이전 달 (PageUp)",nextMonth:"다음 달 (PageDown)",previousYear:"이전 해 (Control + left)",nextYear:"다음 해 (Control + right)",previousDecade:"이전 연대",nextDecade:"다음 연대",previousCentury:"이전 세기",nextCentury:"다음 세기"});return pn.default=n,pn}var bn={},_s;function pc(){if(_s)return bn;_s=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return bn.default=e,bn}var Ps;function yc(){if(Ps)return mn;Ps=1;var e=Lo().default;Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=void 0;var t=e(rf()),r=e(pc());const n={lang:Object.assign({placeholder:"날짜 선택",yearPlaceholder:"연도 선택",quarterPlaceholder:"분기 선택",monthPlaceholder:"월 선택",weekPlaceholder:"주 선택",rangePlaceholder:["시작일","종료일"],rangeYearPlaceholder:["시작 연도","종료 연도"],rangeMonthPlaceholder:["시작 월","종료 월"],rangeQuarterPlaceholder:["시작 분기","종료 분기"],rangeWeekPlaceholder:["시작 주","종료 주"],shortWeekDays:["일","월","화","수","목","금","토"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},t.default),timePickerLocale:Object.assign({},r.default)};return mn.default=n,mn}var Ts;function nf(){if(Ts)return gn;Ts=1;var e=Lo().default;Object.defineProperty(gn,"__esModule",{value:!0}),gn.default=void 0;var t=e(yc());return gn.default=t.default,gn}var As;function of(){if(As)return hn;As=1;var e=Lo().default;Object.defineProperty(hn,"__esModule",{value:!0}),hn.default=void 0;var t=e(Xd()),r=e(nf()),n=e(yc()),o=e(pc());const a="${label} 유효하지 않은 ${type}",i={locale:"ko",Pagination:t.default,DatePicker:n.default,TimePicker:o.default,Calendar:r.default,global:{placeholder:"선택하세요",close:"닫기"},Table:{filterTitle:"필터 메뉴",filterConfirm:"확인",filterReset:"초기화",filterEmptyText:"필터 없음",filterCheckAll:"전체 선택",filterSearchPlaceholder:"필터 검색",emptyText:"데이터 없음",selectAll:"전체 선택",selectInvert:"선택 반전",selectNone:"없음",selectionAll:"전체 선택",sortTitle:"정렬",expand:"펼치기",collapse:"접기",triggerDesc:"내림차순으로 정렬하기",triggerAsc:"오름차순으로 정렬하기",cancelSort:"정렬 취소하기"},Tour:{Next:"다음",Previous:"이전",Finish:"종료"},Modal:{okText:"확인",cancelText:"취소",justOkText:"확인"},Popconfirm:{okText:"확인",cancelText:"취소"},Transfer:{titles:["",""],searchPlaceholder:"여기에 검색하세요",itemUnit:"개",itemsUnit:"개",remove:"삭제",selectCurrent:"현재 페이지 선택",removeCurrent:"현재 페이지 삭제",selectAll:"전체 선택",removeAll:"전체 삭제",selectInvert:"선택 반전"},Upload:{uploading:"업로드 중...",removeFile:"파일 삭제",uploadError:"업로드 실패",previewFile:"파일 미리보기",downloadFile:"파일 다운로드"},Empty:{description:"데이터 없음"},Icon:{icon:"아이콘"},Text:{edit:"수정",copy:"복사",copied:"복사 됨",expand:"확장"},Form:{optional:"(선택사항)",defaultValidateMessages:{default:"필드 유효성 검사 오류 ${label}",required:"${label} 값을 입력해 주세요",enum:"${label} [${enum}] 중에 하나여야 합니다",whitespace:"${label} 비워둘 수 없습니다",date:{format:"${label} 유효하지 않은 날짜 형식입니다",parse:"${label} 날짜 형식으로 변환될 수 없습니다",invalid:"${label} 유효하지 않은 날짜입니다"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} ${len}글자여야 합니다",min:"${label} 적어도 ${min}글자 이상이어야 합니다",max:"${label} ${max}글자 이하여야 합니다",range:"${label} ${min}-${max}글자 사이어야 합니다"},number:{len:"${label} 값은 ${len}이어야 합니다",min:"${label} 최솟값은 ${min}입니다",max:"${label} 최댓값은 ${max}입니다",range:"${label} 값은 ${min}-${max} 사이어야 합니다"},array:{len:"${len}이어야 합니다 ${label}",min:"최소 ${min}이어야 합니다 ${label}",max:"최대 ${max}이어야 합니다 ${label}",range:"${label} ${min}-${max} 사이어야 합니다"},pattern:{mismatch:"${label} ${pattern} 패턴과 일치하지 않습니다"}}},Image:{preview:"미리보기"},QRCode:{expired:"만료된 QR 코드",refresh:"새로고침"},ColorPicker:{presetEmpty:"미정",transparent:"투명",singleColor:"단색",gradientColor:"그라데이션"}};return hn.default=i,hn}var pa,Ms;function af(){return Ms||(Ms=1,pa=of()),pa}var sf=af();const bc=Hi.getDefaultExportFromCjs(sf),xc=({children:e,customTheme:t,customComponentSize:r="middle",layout:n="comfortable",getPopupContainer:o})=>{const i=(()=>{const l={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'"Noto Sans KR", sans-serif',fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:Z.theme.defaultAlgorithm};switch(n){case"compact":return{...l,token:{...l.token,padding:8,margin:8,borderRadius:4,fontSize:12,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}};case"spacious":return{...l,token:{...l.token,padding:24,margin:24,borderRadius:8,fontSize:16,fontSizeHeading1:44,fontSizeHeading2:36,fontSizeHeading3:28,fontSizeHeading4:24,fontSizeHeading5:20}};default:return{...l,token:{...l.token,padding:16,margin:16,borderRadius:6,fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}}}})(),s={...i,...t,token:{...i.token,...t?.token},components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)",colorText:"var(--text-primary)"},Radio:{colorPrimary:"var(--check-primary)",colorPrimaryActive:"var(--check-primary-active)",colorPrimaryHover:"var(--check-primary-active)"},Tree:{nodeHoverBg:"var(--tree-selected-bg)",nodeHoverColor:"var(--primary-color)",nodeSelectedBg:"var(--tree-selected-bg)",nodeSelectedColor:"var(--primary-color)",colorText:"var(--text-primary)"},...t?.components??{}}};return _.jsxRuntimeExports.jsx(Z.ConfigProvider,{locale:bc,theme:s,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},getPopupContainer:o,children:e})},zi=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:o=0,marginBottom:a=0,children:i})=>{const s=Rn.AppstoreTwoTone;return R.useMemo(()=>t?.type==="antd"&&t.icon&&Rn[t.icon]||s,[t?.type,t?.icon]),_.jsxRuntimeExports.jsx(Z.Flex,{vertical:!0,children:_.jsxRuntimeExports.jsxs("div",{className:`bwg-title-box ${o?`pb${o}`:""} ${a?`mb${a}`:""}`,children:[_.jsxRuntimeExports.jsx("div",{className:"bwg-title-box-left",children:_.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[_.jsxRuntimeExports.jsx(Z.Typography.Title,{level:4,children:_.jsxRuntimeExports.jsx("span",{children:e})}),r&&_.jsxRuntimeExports.jsx(Z.Tooltip,{title:r.title,placement:r.placement,children:_.jsxRuntimeExports.jsx(Rn.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),_.jsxRuntimeExports.jsx("div",{className:"bwg-title-box-right",children:_.jsxRuntimeExports.jsx(Z.Flex,{gap:6,children:i})})]})})},{Panel:Fs}=Z.Collapse,Bi=R.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:o},a)=>{const[i]=Z.Form.useForm(),[s,l]=R.useState("1"),c=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};R.useImperativeHandle(a,()=>({getFormData:()=>i.getFieldsValue(),setFormData:d=>{i.setFieldsValue(d)},resetForm:()=>{i.resetFields()},validateForm:async()=>{try{return{success:!0,data:await i.validateFields()}}catch(d){return{success:!1,error:d}}}}));const u=()=>{l(d=>d.includes("subRows")?d.filter(f=>f!=="subRows"):[...d,"subRows"])};return console.log({reqRows:e,subRows:t}),_.jsxRuntimeExports.jsxs("div",{style:r?{border:"1px solid #ddd",padding:"10px 12px",borderRadius:"8px",marginBottom:"10px"}:{},children:[o&&_.jsxRuntimeExports.jsx(zi,{title:o.title,children:o.buttons}),_.jsxRuntimeExports.jsx(Z.Form,{form:i,layout:"inline",className:"bwgview-header-form",labelCol:c(),labelAlign:"left",children:_.jsxRuntimeExports.jsxs("div",{style:{position:"relative",width:"100%"},children:[t&&_.jsxRuntimeExports.jsx("div",{style:{position:"absolute",top:"15px",left:"-9px",zIndex:10},children:s.includes("subRows")?_.jsxRuntimeExports.jsx(Z.Tooltip,{title:"접기",children:_.jsxRuntimeExports.jsx("span",{className:"search-collapsed-arrow",onClick:u,children:_.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:_.jsxRuntimeExports.jsx("path",{d:"M5.28321 0.986589C4.88285 0.482264 4.11715 0.482265 3.71679 0.986589L1.0243 4.37824C0.50404 5.0336 0.970753 6 1.80751 6L7.19249 6C8.02925 6 8.49596 5.0336 7.9757 4.37824L5.28321 0.986589Z",fill:"#AEB9C4"})})})}):_.jsxRuntimeExports.jsx(Z.Tooltip,{title:"펼치기",children:_.jsxRuntimeExports.jsx("span",{className:"search-collapsed-arrow",onClick:u,children:_.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:_.jsxRuntimeExports.jsx("path",{d:"M5.28321 5.01341C4.88285 5.51774 4.11715 5.51773 3.71679 5.01341L1.0243 1.62176C0.50404 0.966397 0.970753 1.64312e-07 1.80751 2.37464e-07L7.19249 7.08234e-07C8.02925 7.81386e-07 8.49596 0.966399 7.9757 1.62176L5.28321 5.01341Z",fill:"#AEB9C4"})})})})}),_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:{components:{Collapse:{}}},children:_.jsxRuntimeExports.jsxs(Z.Collapse,{activeKey:["reqRows",...s.includes("subRows")?["subRows"]:[]],onChange:l,className:"searchbox-collapse",bordered:!1,ghost:!0,children:[e&&_.jsxRuntimeExports.jsx(Fs,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&_.jsxRuntimeExports.jsx(Fs,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})})]})})]})}),lf=({children:e,showSearchBox:t,showCloseButton:r=!0,showEyesButton:n=!0,shotSettingButton:o=!0,styles:a,...i})=>{const[s,l]=R.useState(!0),[c,u]=R.useState(()=>{const b=i.placement;return b==="left"||b==="right"||b==="top"||b==="bottom"?b:"bottom"}),[d,f]=R.useState(!1),g=(b=>{const m={wrapper:{...i.width&&{width:i.width},...i.height&&{height:i.height},margin:"0 auto"},content:{},header:{backgroundColor:"var(--drawer-header-bg)",color:"var(--text-primary)"}};switch(b){case"bottom":return{...m,wrapper:{...m.wrapper,borderRadius:"30px 30px 0 0"},content:{borderRadius:"30px 30px 0 0"},header:{...m.header,borderRadius:"30px 30px 0 0"}};case"top":return{...m,wrapper:{...m.wrapper,borderRadius:"0 0 30px 30px"},content:{borderRadius:"0 0 30px 30px"},header:{...m.header}};case"left":return{...m,wrapper:{...m.wrapper,borderRadius:"0 30px 0px 0"},content:{borderRadius:"0 30px 0px 0"},header:{...m.header,borderRadius:"0 30px 0 0"}};case"right":return{...m,wrapper:{...m.wrapper,borderRadius:"30px 0 0 0"},content:{borderRadius:"30px 0 0 0"},header:{...m.header,borderRadius:"30px 0 0 0"}};default:return m}})(c),y={wrapper:{...g?.wrapper,...a?.wrapper},content:{...g?.content,...a?.content},header:{...g?.header,...a?.header}},h=()=>{const b=[];if(o){const m=[{key:"top",label:"상단",icon:_.jsxRuntimeExports.jsx(dt.CaretUpOutlined,{})},{key:"right",label:"우측",icon:_.jsxRuntimeExports.jsx(dt.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:_.jsxRuntimeExports.jsx(dt.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:_.jsxRuntimeExports.jsx(dt.CaretLeftOutlined,{})}],S=_.jsxRuntimeExports.jsx(Z.Space.Compact,{children:m.map($=>_.jsxRuntimeExports.jsx(Z.Button,{type:c===$.key?"primary":"default",size:"small",onClick:()=>{u($.key),f(!1)},icon:$.icon},$.key))});b.push(_.jsxRuntimeExports.jsx(Z.Popover,{content:S,trigger:"click",placement:"left",open:d,onOpenChange:f,children:_.jsxRuntimeExports.jsx(Z.Tooltip,{placement:"bottom",title:"위치변경",zIndex:2100,children:_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.SettingOutlined,{}),type:"text",size:"middle"})})},"shotSetting"))}return n&&b.push(_.jsxRuntimeExports.jsx(Z.Tooltip,{placement:"bottom",title:s?"배경 보기":"배경 숨기기",zIndex:2100,children:_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.EyeOutlined,{}),type:"text",size:"middle",onClick:()=>l(!s)})},"eyes")),i.extra&&b.push(_.jsxRuntimeExports.jsx("div",{style:{margin:"0 8px"},children:i.extra},"extra")),r&&b.push(_.jsxRuntimeExports.jsx(Z.Tooltip,{placement:"bottom",title:"닫기",zIndex:2100,children:_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.CloseOutlined,{}),onClick:i.onClose,type:"text",size:"middle"})},"close")),b};return _.jsxRuntimeExports.jsx(Z.Drawer,{className:"main-drawer",footer:!0,...i,placement:c,styles:y,maskClosable:!1,closable:!1,mask:s,extra:_.jsxRuntimeExports.jsx(Z.Space,{size:"small",align:"center",children:h()}),afterOpenChange:b=>{b||(l(!0),u(i.placement)),i.afterOpenChange?.(b)},destroyOnHidden:!0,children:t?_.jsxRuntimeExports.jsxs(Ho,{type:"vertical",children:[_.jsxRuntimeExports.jsxs(Z.Flex,{justify:"space-between",align:"center",style:{width:"100%"},children:[_.jsxRuntimeExports.jsx("div",{children:t.title}),_.jsxRuntimeExports.jsx(Z.Flex,{gap:2,children:t.extra})]}),_.jsxRuntimeExports.jsx(Bi,{...t.searchBox}),_.jsxRuntimeExports.jsx(Z.Divider,{}),e]}):e})};var Tr={},Ns;function cf(){if(Ns)return Tr;Ns=1;var e=_o;if(process.env.NODE_ENV==="production")Tr.createRoot=e.createRoot,Tr.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Tr.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},Tr.hydrateRoot=function(r,n,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,o)}finally{t.usingClientEntryPoint=!1}}}return Tr}var uf=cf();const df="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC",ff="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",hf=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],vf=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(들여쓰기 표시)",tag:"showIndentExcel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],gf=({children:e})=>{const[t,r]=R.useState(!1),[n,o]=R.useState(null);return t?_.jsxRuntimeExports.jsx("div",{style:{padding:"20px",border:"1px solid #ff4d4f",borderRadius:"6px",backgroundColor:"#fff2f0",margin:"10px"},children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"리얼그리드 로드 실패",description:_.jsxRuntimeExports.jsxs("div",{children:[_.jsxRuntimeExports.jsx("p",{children:"리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다."}),_.jsxRuntimeExports.jsxs("p",{style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:["오류: ",n?.message||"알 수 없는 오류"]}),_.jsxRuntimeExports.jsx(Z.Button,{type:"primary",size:"small",style:{marginTop:"8px"},onClick:()=>{r(!1),o(null),window.location.reload()},children:"다시 시도"})]}),type:"error",showIcon:!0})}):_.jsxRuntimeExports.jsx(mf,{onError:a=>{console.error("BwgGrid 에러:",a),o(a),r(!0)},children:e})};class mf extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError(t)}render(){return this.state.hasError?null:this.props.children}}const pf=R.forwardRef(({type:e="nrml",gridDivStyle:t,gridDivClassName:r,gridColumns:n,gridOptions:o,gridEvents:a,bindRef:i,gridContext:s,renderers:l,gridInitCallback:c},u)=>{const d=R.useRef(null),f=(E,D,L,W)=>{let z=[],K=[];const J="treeNode";for(let Q in E){let te=E[Q];z[te[L]]=E[Q];let oe=z[te[D]];if(oe==null||oe=="-"){K.push(te);continue}oe[J]==null&&(oe[J]=[]),oe[J].push(te)}return K},p=R.useCallback(E=>{const D=W=>{const z=[];return W.forEach(K=>{K.children&&K.children.length>0?z.push(...D(K.children)):z.push(K)}),z};return D(E).map(W=>({fieldName:W.fieldName,dataType:W.dataType||"text"}))},[]),g=R.useCallback(E=>{const D=W=>{const z=[];return W.forEach(K=>{K.children&&K.children.length>0?z.push(...D(K.children)):z.push(K)}),z};return D(E).map(W=>({...W,header:{template:W.required?`<img src='${df}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:W.editable?`<img src='${ff}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:W.header?.text??""},text:W.header?.text||""},styleName:W.dataType==="number"?"right":W.styleName||"center"}))},[]);R.useImperativeHandle(u,()=>({addAllData(E,D){const L=d.current?.gridView.getCurrent().dataRow;if(d.current?.dataProvider instanceof St.LocalDataProvider){d.current.dataProvider.clearRows();try{d.current.dataProvider.fillJsonData(E)}catch(W){console.error("fillJsonData 오류:",W)}}if(d.current?.dataProvider instanceof St.LocalTreeDataProvider){if(d.current.dataProvider.clearRows(),D?.treeOption?.dataField==null||D?.treeOption?.parentField==null)return;const W={rows:"treeNode"};let z=f(E,D.treeOption?.parentField,D.treeOption?.dataField);d.current.dataProvider.fillJsonData({treeNode:z},W),D.treeOption.isExpand&&d.current.gridView?.expandAll()}D?.isCurrent?d.current?.gridView.setCurrent({dataRow:L}):d.current?.gridView.setCurrent({dataRow:0})},getGridInstance:()=>d.current,getCurrentRow:()=>d.current?.gridView.getCurrent().dataRow??-1,getCurrentIndex:()=>d.current?.gridView.getCurrent().itemIndex??-1,gridExcelDown(E){d.current?.gridView.exportGrid({type:"excel",target:"local",allItems:!1,lookupDisplay:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!E?.indenting,header:"default",footer:"default",sheetName:"",fileName:E?.fileName||"sample.xlsx",...E})},dp:d.current?.dataProvider??null,vw:d.current?.gridView??null}));const y=R.useCallback((E,D,L)=>{if(i!==void 0&&L>=0){let W=E.getDataSource().getJsonRow(L);i?.current?.setFieldsValue(W)}else i!==void 0&&L<0&&i?.current?.resetFields();E.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(E,D,L)},[i,a]),h=R.useCallback((E,D,L)=>{const W=D.fieldName??"";i?.current?.getFieldInstance(W)&&i?.current.setFieldValue(W,L),a?.onEditChange&&a?.onEditChange(E,D,L)},[i,a]),b=R.useCallback((E,D,L)=>{const W=E.getOrgFieldName(L),z=E.getValue(D,L);i?.current?.setFieldValue(W,z)},[i]),m=R.useCallback((E,D,L,W)=>{const z=E.getColumn(W).name??"",K=E.getValue(D,W);i?.current?.getFieldInstance(z)&&i?.current.setFieldValue(z,K),a?.onCellEdited&&a?.onCellEdited(E,D,L,W)},[i,a]),S=R.useCallback(E=>{},[]),$=R.useCallback(()=>{if(!d.current)return;const E=d.current.gridView,D=E.getDataSource(),L=["onKeyDown"],W=["onRowInserted"];Object.keys(a??{}).map(z=>{L.includes(z)?E[z+"Add"]=a?.[z]:E[z]=a?.[z],W.includes(z)?D[z+"Add"]=a?.[z]:D[z]=a?.[z]}),D instanceof St.LocalDataProvider&&(D.onRowInserted=(z,K)=>{K<0||(setTimeout(function(){E?.setCurrent({dataRow:K})},1),z.onRowInsertedAdd!==void 0&&z.onRowInsertedAdd(z,K))}),E.onKeyDown=function(z,K){if(K.code=="Space"){let J=z.getSelectedItems(!0);for(const Q in J)z.isCheckable(J[Q])&&(z.isCheckedItem(J[Q])?z.checkItem(J[Q],!1,!1):z.checkItem(J[Q],!0,!1))}return z.onKeyDownAdd!==void 0&&z.onKeyDownAdd(z,K),!0},d.current.gridView.onCurrentRowChanged=y,d.current.gridView.onEditChange=h,d.current.gridView.getDataSource().onValueChanged=b,d.current.gridView.onCellEdited=m,d.current.gridView.onDataLoadComplated=S},[y,h,b,m,S]),x=R.useCallback(E=>{if(E){try{E.gridView.setSortingOptions({enabled:!0}),E.gridView.sortMode=St.SortMode.EXPLICIT,E.gridView.editorOptions.viewGridInside=!0,E.gridView instanceof St.TreeView&&E.gridView.setTreeOptions({expandWhenSetData:St.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:St.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0}),E.gridView.setDisplayOptions({showEmptyMessage:!0,emptyMessage:"조회된 데이터가 존재하지 않습니다.",useFocusClass:!0,minRowHeight:o?.display?.minRowHeight||43,maxRowHeight:o?.display?.maxRowHeight||100,rowHeight:o?.display?.rowHeight||43,rowChangeDelay:o?.display?.rowChangeDelay||0,selectionStyle:o?.display?.selectionStyle||St.SelectionStyle.ROWS,fitStyle:o?.display?.fitStyle||St.GridFitStyle.FILL,useAlternateRowStyle:o?.display?.useAlternateRowStyle||!1}),E.gridView.setEditOptions({commitWhenExitLast:!0,columnEditableFirst:!1,commitByCell:!0,commitWhenLeave:!0,crossWhenExitLast:!0,confirmWhenDelete:!1,deletable:!1,revertable:!1,showOnlyValidationMessage:!0,editable:o?.edit?.editable||!1,validateOnEdited:o?.edit?.validateOnEdited||!1}),E.gridView.setCopyOptions({singleMode:o?.copy?.singleMode||!1}),E.gridView.setPasteOptions({selectBlockPaste:!0,checkReadOnly:!0,throwValidationError:!1}),E.gridView.header.height=o?.header?.height||43,E.gridView.header.styleName=o?.header?.styleName||"bwgGridHeader",o?.container?.radio?E.gridView.setCheckBar({exclusive:o?.container?.radio||!1}):E.gridView.setCheckBar({visible:o?.container?.check||!1,showAll:o?.container?.checkAll||!1}),E.gridView.setStateBar({visible:o?.container?.state||!1}),E.gridView.rowIndicator.visible=o?.container?.indicator||!1,E.gridView instanceof St.GridView&&(E.gridView.groupPanel.visible=o?.container?.panel||!1),E.gridView.setFooters({visible:o?.container?.footer||!1}),E.gridView.setHeader({visible:o?.container?.header||!0}),E.gridView.formatOptions.numberFormat="#,##0"}catch(D){console.log("그리드 옵션 설정 중 오류:",D)}try{E.gridView instanceof St.TreeView?E.gridView.setContextMenu(vf):E.gridView.setContextMenu(hf),E.gridView.onContextMenuItemClicked=function(D,L,W){if(!(!W||!W.column)){if(L.tag=="excel")T(D,{isTitle:!1},s?.excel);else if(L.tag=="showIndentExcel")T(D,{isTitle:!1,treeBlank:!0},s?.excel);else if(L.tag=="withTitleExcel")T(D,{isTitle:!0,treeBlank:!1},s?.excel);else if(L.tag=="filter")F(D,L);else if(L.tag=="fixedCol"){const K=D.getDataSource().getFieldIndex(W.column);D.setFixedOptions({colCount:K})}else if(L.tag=="fixedRow")D.setFixedOptions({rowCount:(W.itemIndex||0)+1});else if(L.tag=="fixedCancel")D.setFixedOptions({colCount:0,rowCount:0});else if(L.tag=="hide")D.setColumnProperty(W.column,"visible",!1),D._hideCols[D._hideCols.length]=W.column;else if(L.tag=="hideClear")for(var z=0;z<D._hideCols.length;z++)D.setColumnProperty(D._hideCols[z],"visible",!0)}}}catch(D){console.log("컨텍스트 설정 중 오류:",D)}}},[o]),w=E=>{if(!(!l||l.length===0))try{l.forEach(D=>{const{name:L,renderer:W}=D;if(L&&W){const z=typeof W=="function"?new W:W;E.gridView.registerCustomRenderer(L,z)}})}catch(D){console.error("커스텀 렌더러 초기화 중 오류:",D)}},C=E=>{if(o?.layout?.colspan&&o.layout.colspan.length>0&&o?.layout?.colspan.forEach(D=>{const L=E.gridView.layoutByColumn(D.fieldName);if(L){const W=D.span;L.spanCallback=function(z,K,J){return W}}}),n&&n.length>0&&n.some(L=>L.children&&L.children.length>0))try{(()=>{const W=JSON.parse(JSON.stringify(n)),z=[],K=J=>{const Q=[];return J.children.map(te=>{if(te.children&&te.children.length>0){const oe=K(te),ae=te.header?.text||te.fieldName,me=E.gridView.getColumnProperty(te.fieldName,"header");delete te.children,delete te.header;let U={name:te.fieldName,header:{text:me?.text||ae,template:me?.template,values:me?.values},items:oe,...te};Q.push(U)}else Q.push(te.fieldName)}),Q};W.map(J=>{if(J.children&&J.children.length>0){const Q=K(J),te=J.header?.text||J.fieldName,oe=E.gridView.getColumnProperty(J.fieldName,"header");delete J.children,delete J.header;const ae={name:J.fieldName,header:{text:oe?.text||te,template:oe?.template,values:oe?.values},items:Q,...J};z.push(ae)}else z.push(J.fieldName)}),console.log("Final Layout!!",z),E.gridView.setColumnLayout(z)})()}catch(L){console.error("컬럼 레이아웃 설정 오류:",L)}},O=()=>{if(d.current){if(e==="nrml"){const E=d.current;if(x(E),w(E),n&&n.length>0){const D=p(n),L=g(n);E.gridView.getDataSource().setFields(D),E.gridView.setColumns(L)}C(E)}else{const E=d.current;if(x(E),w(E),n&&n.length>0){const D=p(n),L=g(n);E.gridView.getDataSource().setFields(D),E.gridView.setColumns(L)}C(d.current)}setTimeout(()=>{c&&d.current&&c(d.current)},0)}},T=(E,D,L)=>{const W=E.getDataSource();let z=L?.footer==null?"default":L.footer;W.getRowCount()<1&&(z="hidden");let K={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!D?.treeBlank,footer:z,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:L?.fileName||"sample.xlsx"};W instanceof St.LocalTreeDataProvider&&(K.indenting=!!D?.treeBlank),L?.isCellMerge==!0&&(K.separateRows=!1),Ft.isEmpty(L?.sheetName)==!1&&(K.sheetName=L?.sheetName),D?.isTitle&&(K.documentTitle={message:Ft.isSafeEmpty(L?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},Ft.isEmpty(L?.subTitle)==!1&&(K.documentSubtitle={message:L?.subTitle,visible:!0,styleName:"center",height:20}),Ft.isEmpty(L?.tailTitle)==!1&&(K.documentTail={message:L?.tailTitle,visible:!0,styleName:"documentStyle"})),E.exportGrid(K)},F=(E,D)=>{const L=E.getDataSource(),W=L.getOrgFieldNames();if(D.checked)for(var z=0;z<W.length;z++){let J=[],Q=L.getDistinctValues(W[z])??[];if(Q.length==0)continue;let te=E.columnByName(W[z]);for(var K=0;K<Q.length;K++){if(Q[K]==null)continue;let oe=te.values!=null&&te.values.indexOf(Q[K])!=-1?te?.labels?.[te.values.indexOf(Q[K])]:Q[K];Ft.isEmpty(oe)&&(Ft.isEmpty(Q[K])?oe=" ":oe=Q[K]);let ae="";Q[K]==null?ae="value="+Q[K]:ae="value='"+Q[K]+"'",J.push({name:oe,criteria:ae})}E.setColumnFilters(W[z],J)}else for(var z=0;z<W.length;z++)E.clearColumnFilters(W[z]),E.activateAllColumnFilters(W[z],!1),E.clearColumnFilters(W[z])};R.useEffect(()=>{if(d.current&&d.current.gridView)if(e==="nrml"){const E=d.current;x(E)}else{const E=d.current;x(E)}},[e,o,x]),R.useEffect(()=>{!d.current||!n||n.length===0||O()},[n]),R.useEffect(()=>{d.current&&$()},[a,$]);const[V,H]=R.useState(!1),[N,A]=R.useState(""),B=R.useRef(null);R.useEffect(()=>{V&&setTimeout(()=>{B.current?.focus?.()},0)},[V]),R.useEffect(()=>()=>{if(d.current)try{const E=d.current;E.gridView&&(E.gridView.onDataLoadComplated=void 0,E.gridView.onCurrentRowChanged=void 0,E.gridView.onCellClicked=void 0,E.gridView.onCellDblClicked=void 0,E.gridView.onEditRowChanged=void 0,E.gridView.onItemChecked=void 0,E.gridView.onItemAllChecked=void 0,E.gridView.onColumnCheckedChanged=void 0,E.gridView.onCellButtonClicked=void 0,E.gridView.onEditChange=void 0,E.gridView.onCellEdited=void 0,E.gridView.onKeyUp=void 0,E.gridView.onKeyDown=void 0,E.gridView.onWheel=void 0,E.gridView.onValidateColumn=void 0,E.gridView.onValidateRow=void 0,E.gridView.onValidationFail=void 0,E.gridView.onRowInserting=void 0,E.gridView.onCellItemClicked=void 0,E.gridView.onShowEditor=void 0,E.gridView.getDataSource()&&(E.gridView.getDataSource().clearRows(),E.gridView.getDataSource().setFields([])),E.gridView.getDataSource().clearRows())}catch(E){console.warn("⚠️ BwgGrid cleanup error:",E)}},[]);const k=R.useCallback(E=>{P(E)},[]),P=R.useCallback(E=>{const D=d.current?.gridView;if(D?.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(D?.commit(),Ft.isEmpty(E))return;const L=D?.getCurrent().itemIndex??-1;if(L<0)return;const W={value:E,startIndex:L+1,wrap:!0,caseSensitive:!1,partialMatch:!0},z=D?.searchCell(W);D?.setCurrent(z)},[]),I=R.useCallback(E=>{E.key==="Escape"&&(E.preventDefault(),H(!1))},[]),q=R.useCallback(E=>{E.ctrlKey&&E.code==="KeyF"&&(E.preventDefault(),A(""),H(!V))},[V]),X={searchRow:k,searchEnter:P,handleCloseKeyword:I,handleSearch:q},Y=R.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%"}),[t]);return _.jsxRuntimeExports.jsx(gf,{children:_.jsxRuntimeExports.jsxs("div",{style:Y,className:r,onKeyDown:E=>X.handleSearch(E),children:[V&&_.jsxRuntimeExports.jsx("div",{className:"grid-search-box",children:_.jsxRuntimeExports.jsxs(Z.Flex,{gap:3,children:[_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:{components:{Button:{controlHeight:32},Input:{controlHeight:32}}},children:_.jsxRuntimeExports.jsxs(Z.Space.Compact,{children:[_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.SearchOutlined,{})}),_.jsxRuntimeExports.jsx(Z.Input,{ref:B,value:N,name:"srchField",autoComplete:"off",onKeyUp:E=>X.handleCloseKeyword(E),onChange:E=>A(E.target.value),onPressEnter:E=>X.searchEnter(E)})]})}),_.jsxRuntimeExports.jsx(Z.Button,{variant:"solid",icon:_.jsxRuntimeExports.jsx(dt.CloseOutlined,{}),onClick:()=>H(!1)})]})}),e==="nrml"?_.jsxRuntimeExports.jsx(ps.RealGridReact,{ref:d,autoGenerateField:!0,onInitialized:O}):_.jsxRuntimeExports.jsx(ps.RealTreeReact,{ref:d,autoGenerateField:!1,onInitialized:O})]})})}),yf=e=>({initContent(t){this._root=uf.createRoot(t)},render(t,r,n,o){const a=this._root;a&&e(t,r,n,o,a)},clearContent(t){const r=this._root;r&&setTimeout(()=>{r&&(r.unmount(),this._root=null)},0)},canClick(t){return!0},click(){return{}}}),bf=R.memo(({title:e,border:t,children:r,titleChildren:n})=>{const o=R.useMemo(()=>({components:{Form:{labelColor:"#9A9A9A"},Select:{colorTextDisabled:"#000"}}}),[]);return _.jsxRuntimeExports.jsxs(Ho,{type:"vertical",children:[_.jsxRuntimeExports.jsx(zi,{title:e,icons:{type:"antd",icon:"InfoCircleTwoTone"},children:n}),_.jsxRuntimeExports.jsx(Bd,{border:!1,children:_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:o,children:r})})]})}),Ho=({type:e="horizontal",layoutAlign:t="left",verticalAlign:r,className:n,style:o,children:a})=>_.jsxRuntimeExports.jsx("div",{style:o,className:`bwgview-content-layout ${e=="horizontal"?"hz-layout":"vt-layout"} layout-${t} ${r&&`vertical-${r}`} ${n||""}`,children:a}),ks=(e,t)=>{const r=window.innerWidth,n=window.innerHeight,o=Math.min(Math.max(e.x,0),Math.max(0,r-t.width)),a=Math.min(Math.max(e.y,0),Math.max(0,n-t.height));return{x:o,y:a}},xf=({buttons:e,popupData:t,onButtonClick:r})=>!e||e.length===0?null:_.jsxRuntimeExports.jsx("div",{style:{display:"flex",gap:6},children:e.map(n=>_.jsxRuntimeExports.jsx(Z.Button,{type:n.type||"default",danger:n.danger,disabled:n.disabled,onClick:()=>r?.(n.key,t),className:"bwg-btn popup-btn",children:n.text},n.key))}),Cf=({popup:e,popupEvent:t,onClose:r,children:n})=>{const o=R.useRef(null);e?.popupId;const a=e?.popupTitle||"팝업",i=e?.width||800,s=e?.height||600,l=e?.buttonList?.map((w,C)=>({key:w.btnId||`btn_${C}`,text:w.btnNm,type:w.btnId==="CLOSE"?"default":"primary",disabled:w.enblYn!=="Y",danger:!1}))||[],u=l.some(w=>w.key==="CLOSE"||w.key==="close")?l:[...l,{key:"CLOSE",text:"닫기",type:"default",disabled:!1,danger:!1}],[d,f]=R.useState(i),[p,g]=R.useState(s),y=R.useMemo(()=>{const w=Math.max(0,(window.innerWidth-i)/2),C=Math.max(0,(window.innerHeight-s)/2);return{x:w,y:C}},[i,s]),[h,b]=R.useState(y),m=(w,C)=>{if(w==="CLOSE"||w==="close"){e?.close?.()||r?.();return}t&&t[w]?t[w]():e?.close?.()||r?.()},S=(w,C)=>{const O=ks({x:C.x,y:C.y},{width:d,height:p});b(O)},$=(w,C,O,T,F)=>{const V={width:parseInt(O.style.width,10),height:parseInt(O.style.height,10)},H=ks(F,V);f(V.width),g(V.height),b(H)},x=()=>o.current??document.body;return _.jsxRuntimeExports.jsxs("div",{style:{position:"fixed",inset:0,zIndex:1e3},children:[_.jsxRuntimeExports.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),_.jsxRuntimeExports.jsxs(Wd.Rnd,{className:"bwg-popup",size:{width:d,height:p},position:h,bounds:"window",minWidth:400,minHeight:300,onDragStop:S,onResizeStop:$,dragHandleClassName:"drag-handle",cancel:".rnd-cancel",enableUserSelectHack:!1,style:{backgroundColor:"white",borderRadius:20,boxShadow:"0 4px 15px rgba(0,0,0,0.25)",overflow:"visible",position:"absolute",zIndex:1},children:[_.jsxRuntimeExports.jsx("div",{className:"bwg-popup-content",style:{overflow:"hidden",borderRadius:20,height:"100%"},children:_.jsxRuntimeExports.jsx(xc,{getPopupContainer:x,children:_.jsxRuntimeExports.jsx(Ho,{type:"vertical",children:_.jsxRuntimeExports.jsx(Z.Card,{className:"popup-drag-container",title:_.jsxRuntimeExports.jsx("div",{className:"drag-handle",style:{display:"flex",alignItems:"center",gap:8},children:a}),style:{width:"100%",height:"100%"},styles:{body:{height:"calc(100% - 77px)",padding:20,overflow:"auto"}},extra:_.jsxRuntimeExports.jsx(xf,{buttons:u,popupData:e,onButtonClick:m}),children:_.jsxRuntimeExports.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:n})})})})}),_.jsxRuntimeExports.jsx("div",{ref:o,className:"bwg-popup-portal-root",style:{position:"relative"}})]})]})},wf=({children:e,...t})=>_.jsxRuntimeExports.jsx(Z.Row,{...t,className:"bwg-row",children:e}),Sf=({rowKey:e="id",columns:t,dataSource:r,loading:n=!1,rowSelection:o,size:a="middle",pagination:i=!1,...s})=>_.jsxRuntimeExports.jsx(Z.Table,{rowKey:e,columns:t,dataSource:r,loading:n,rowSelection:o,size:a,pagination:i,bordered:!0,scroll:{x:"max-content"},locale:{emptyText:"데이터가 없습니다."},...s}),Ef=e=>{const{type:t="card",animated:r=!0,...n}=e;return _.jsxRuntimeExports.jsx(Z.Tabs,{type:t,animated:r,...n})};function Ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Rf(e){if(Array.isArray(e))return Ka(e)}function Cc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wi(e,t){if(e){if(typeof e=="string")return Ka(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ka(e,t):void 0}}function $f(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
"use strict";const _=require("./jsx-runtime-CeSfJrVB.cjs"),R=require("react"),Z=require("antd"),dt=require("@ant-design/icons"),Ft=require("./serviceConfig-Cc8jfw_Y.cjs"),Li=require("./SearchBoxContext-mcPWk862.cjs"),St=require("realgrid"),ps=require("realgrid-react"),_o=require("react-dom"),Wd=require("react-rnd"),Hi=require("./_commonjsHelpers-DwGv2jUC.cjs"),ys=require("./menuStore-D7zl2c89.cjs"),qd=require("./envUtils-CduTHoHu.cjs"),Ud=require("./AuthContext-CXng9fj0.cjs"),bs=require("react-router-dom");function gc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=gc(R),Rn=gc(dt),Kd=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:o="middle",style:a,className:i,onButtonClick:s})=>{const l=Li.useServiceCodeValue("AUTH_BTNS"),{user:c}=Ft.useUserStore(),[u,d]=R.useState([]),[f,p]=R.useState(!0),[g,y]=R.useState(null),[h,b]=R.useState({}),m=async()=>{try{p(!0),y(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const x=await Ft.callService(l,{userId:c?.userId,crprCd:c?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",x),x?.data&&Array.isArray(x.data)){const w=x.data.sort((C,O)=>C.btnSq-O.btnSq);d(w)}else d([])}catch(x){console.error("버튼 권한 조회 실패:",x),y("버튼 권한을 조회하는 중 오류가 발생했습니다."),d([])}finally{p(!1)}};R.useEffect(()=>{m()},[e,t]);const S=async(x,w)=>{b(C=>({...C,[x]:{loading:!0}}));try{const C=r?.[x];C?await C():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${x}`),s&&s(x,w,e)}catch(C){console.error("버튼 이벤트 실행 실패:",C),Z.message.error("작업 중 오류가 발생했습니다.")}finally{b(C=>({...C,[x]:{loading:!1}}))}},$=x=>{const w=h[x.btnId]||{loading:!1};return _.jsxRuntimeExports.jsxs(Z.Button,{size:o,loading:w.loading,onClick:()=>S(x.btnId,x.btnNm),className:"bwg-btn",style:{...x.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[x.iconVal&&_.jsxRuntimeExports.jsxs(_.jsxRuntimeExports.Fragment,{children:[x.iconType==="ANTD"&&Rn[x.iconVal]&&R.createElement(Rn[x.iconVal],{style:{fontSize:"14px"}}),x.iconType!=="ANTD"&&_.jsxRuntimeExports.jsx("span",{className:x.iconVal,style:{fontSize:"14px"}})]}),x.btnNm]},x.btnId)};return f?_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Space,{direction:n==="vertical"?"vertical":"horizontal",size:o,children:_.jsxRuntimeExports.jsx(Z.Button,{loading:!0,size:o,children:"권한 조회 중..."})})}):g?_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"권한 오류",description:g,type:"error",showIcon:!0,style:{minHeight:"40px"}})}):u.length===0?_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})}):_.jsxRuntimeExports.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${i||""}`,style:a,children:_.jsxRuntimeExports.jsx(Z.Flex,{gap:3,children:u.map($)})})},Gd=({content:e,layout:t="flex",gap:r=16,minWidth:n=120,maxWidth:o=300,style:a,className:i})=>{if(!(Array.isArray(e)&&e.length>0&&Array.isArray(e[0])))return _.jsxRuntimeExports.jsx("div",{style:a,className:i,children:e});const l=e.filter(p=>p&&p.length>0),c=R.useMemo(()=>{const p=l[0];if(!p||p.length===0)return{totalCols:0,baseWidth:0};let g=0;const y=[];p.forEach(b=>{const m=b,S=m?.props?.["data-colspan"]?parseInt(String(m.props["data-colspan"])):1;g+=S,y.push(S)});const h=g>0?100/g:0;return{totalCols:g,baseWidth:h,componentWidths:y}},[l]),u=(p,g,y)=>{const h=p,b=h?.props?.["data-colspan"]?parseInt(String(h.props["data-colspan"])):1;switch(t){case"equal":return 100/y;case"auto":return 100/y;case"grid":return 100/c.totalCols*b;case"flex":default:const m=c.baseWidth*b;return Math.max(n,Math.min(o,m))}},d=p=>{if(!p||typeof p!="object")return p;const g=p;if(!g.props)return p;const h={...g.props.style||{},width:"100%"};return R.cloneElement(g,{...g.props,style:h})},f=(p,g)=>{if(!p||p.length===0)return null;const y=p.length;return t==="grid"?_.jsxRuntimeExports.jsx("div",{className:"erp-cmm-form",style:{display:"grid",gridTemplateColumns:`repeat(${c.totalCols}, 1fr)`,gap:`${r}px`,width:"100%"},children:p.map((h,b)=>{const m=h?.props?.["data-colspan"]?parseInt(String(h.props["data-colspan"])):1,S=d(h);return _.jsxRuntimeExports.jsx("div",{style:{gridColumn:`span ${m}`,minWidth:`${n}px`},className:"form-component-wrapper",children:S},`row-${g}-col-${b}`)})},`row-${g}`):_.jsxRuntimeExports.jsx(Z.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:p.map((h,b)=>{const m=u(h,b,y),S=d(h),$=t==="flex"?{width:`${m}px`,minWidth:`${n}px`,maxWidth:`${o}px`,flexShrink:0}:{width:`${m}%`,minWidth:`${n}px`};return _.jsxRuntimeExports.jsx("div",{style:$,className:"form-component-wrapper",children:S},`row-${g}-col-${b}`)})},`row-${g}`)};return _.jsxRuntimeExports.jsx(Z.Flex,{gap:"small",vertical:!0,style:a,className:i,children:l.map((p,g)=>f(p,g+1))})},Yd=({children:e,...t})=>_.jsxRuntimeExports.jsx(Z.Col,{...t,className:"bwg-col",children:e});var hn={},da={exports:{}},xs;function Lo(){return xs||(xs=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(da)),da.exports}var vn={},Cs;function Xd(){if(Cs)return vn;Cs=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=void 0;var e={items_per_page:"/ 페이지",jump_to:"이동하기",jump_to_confirm:"확인하다",page:"페이지",prev_page:"이전 페이지",next_page:"다음 페이지",prev_5:"이전 5 페이지",next_5:"다음 5 페이지",prev_3:"이전 3 페이지",next_3:"다음 3 페이지",page_size:"페이지 크기"};return vn.default=e,vn}var gn={},mn={},pn={},fa={exports:{}},ha={exports:{}},va={exports:{}},ga={exports:{}},ws;function mc(){return ws||(ws=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ga)),ga.exports}var ma={exports:{}},Ss;function Qd(){return Ss||(Ss=1,(function(e){var t=mc().default;function r(n,o){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var i=a.call(n,o||"default");if(t(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ma)),ma.exports}var Es;function Zd(){return Es||(Es=1,(function(e){var t=mc().default,r=Qd();function n(o){var a=r(o,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(va)),va.exports}var Rs;function Jd(){return Rs||(Rs=1,(function(e){var t=Zd();function r(n,o,a){return(o=t(o))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ha)),ha.exports}var $s;function ef(){return $s||($s=1,(function(e){var t=Jd();function r(o,a){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);a&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(o,l).enumerable})),i.push.apply(i,s)}return i}function n(o){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?r(Object(i),!0).forEach(function(s){t(o,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))})}return o}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(fa)),fa.exports}var yn={},Os;function tf(){return Os||(Os=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.commonLocale=void 0,yn.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),yn}var js;function rf(){if(js)return pn;js=1;var e=Lo().default;Object.defineProperty(pn,"__esModule",{value:!0}),pn.default=void 0;var t=e(ef()),r=tf(),n=(0,t.default)((0,t.default)({},r.commonLocale),{},{locale:"ko_KR",today:"오늘",now:"현재 시각",backToToday:"오늘로 돌아가기",ok:"확인",clear:"지우기",week:"주",month:"월",year:"년",timeSelect:"시간 선택",dateSelect:"날짜 선택",monthSelect:"달 선택",yearSelect:"연 선택",decadeSelect:"연대 선택",yearFormat:"YYYY년",dateFormat:"YYYY-MM-DD",dateTimeFormat:"YYYY-MM-DD HH:mm:ss",monthBeforeYear:!1,previousMonth:"이전 달 (PageUp)",nextMonth:"다음 달 (PageDown)",previousYear:"이전 해 (Control + left)",nextYear:"다음 해 (Control + right)",previousDecade:"이전 연대",nextDecade:"다음 연대",previousCentury:"이전 세기",nextCentury:"다음 세기"});return pn.default=n,pn}var bn={},_s;function pc(){if(_s)return bn;_s=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return bn.default=e,bn}var Ps;function yc(){if(Ps)return mn;Ps=1;var e=Lo().default;Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=void 0;var t=e(rf()),r=e(pc());const n={lang:Object.assign({placeholder:"날짜 선택",yearPlaceholder:"연도 선택",quarterPlaceholder:"분기 선택",monthPlaceholder:"월 선택",weekPlaceholder:"주 선택",rangePlaceholder:["시작일","종료일"],rangeYearPlaceholder:["시작 연도","종료 연도"],rangeMonthPlaceholder:["시작 월","종료 월"],rangeQuarterPlaceholder:["시작 분기","종료 분기"],rangeWeekPlaceholder:["시작 주","종료 주"],shortWeekDays:["일","월","화","수","목","금","토"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},t.default),timePickerLocale:Object.assign({},r.default)};return mn.default=n,mn}var Ts;function nf(){if(Ts)return gn;Ts=1;var e=Lo().default;Object.defineProperty(gn,"__esModule",{value:!0}),gn.default=void 0;var t=e(yc());return gn.default=t.default,gn}var As;function of(){if(As)return hn;As=1;var e=Lo().default;Object.defineProperty(hn,"__esModule",{value:!0}),hn.default=void 0;var t=e(Xd()),r=e(nf()),n=e(yc()),o=e(pc());const a="${label} 유효하지 않은 ${type}",i={locale:"ko",Pagination:t.default,DatePicker:n.default,TimePicker:o.default,Calendar:r.default,global:{placeholder:"선택하세요",close:"닫기"},Table:{filterTitle:"필터 메뉴",filterConfirm:"확인",filterReset:"초기화",filterEmptyText:"필터 없음",filterCheckAll:"전체 선택",filterSearchPlaceholder:"필터 검색",emptyText:"데이터 없음",selectAll:"전체 선택",selectInvert:"선택 반전",selectNone:"없음",selectionAll:"전체 선택",sortTitle:"정렬",expand:"펼치기",collapse:"접기",triggerDesc:"내림차순으로 정렬하기",triggerAsc:"오름차순으로 정렬하기",cancelSort:"정렬 취소하기"},Tour:{Next:"다음",Previous:"이전",Finish:"종료"},Modal:{okText:"확인",cancelText:"취소",justOkText:"확인"},Popconfirm:{okText:"확인",cancelText:"취소"},Transfer:{titles:["",""],searchPlaceholder:"여기에 검색하세요",itemUnit:"개",itemsUnit:"개",remove:"삭제",selectCurrent:"현재 페이지 선택",removeCurrent:"현재 페이지 삭제",selectAll:"전체 선택",removeAll:"전체 삭제",selectInvert:"선택 반전"},Upload:{uploading:"업로드 중...",removeFile:"파일 삭제",uploadError:"업로드 실패",previewFile:"파일 미리보기",downloadFile:"파일 다운로드"},Empty:{description:"데이터 없음"},Icon:{icon:"아이콘"},Text:{edit:"수정",copy:"복사",copied:"복사 됨",expand:"확장"},Form:{optional:"(선택사항)",defaultValidateMessages:{default:"필드 유효성 검사 오류 ${label}",required:"${label} 값을 입력해 주세요",enum:"${label} [${enum}] 중에 하나여야 합니다",whitespace:"${label} 비워둘 수 없습니다",date:{format:"${label} 유효하지 않은 날짜 형식입니다",parse:"${label} 날짜 형식으로 변환될 수 없습니다",invalid:"${label} 유효하지 않은 날짜입니다"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} ${len}글자여야 합니다",min:"${label} 적어도 ${min}글자 이상이어야 합니다",max:"${label} ${max}글자 이하여야 합니다",range:"${label} ${min}-${max}글자 사이어야 합니다"},number:{len:"${label} 값은 ${len}이어야 합니다",min:"${label} 최솟값은 ${min}입니다",max:"${label} 최댓값은 ${max}입니다",range:"${label} 값은 ${min}-${max} 사이어야 합니다"},array:{len:"${len}이어야 합니다 ${label}",min:"최소 ${min}이어야 합니다 ${label}",max:"최대 ${max}이어야 합니다 ${label}",range:"${label} ${min}-${max} 사이어야 합니다"},pattern:{mismatch:"${label} ${pattern} 패턴과 일치하지 않습니다"}}},Image:{preview:"미리보기"},QRCode:{expired:"만료된 QR 코드",refresh:"새로고침"},ColorPicker:{presetEmpty:"미정",transparent:"투명",singleColor:"단색",gradientColor:"그라데이션"}};return hn.default=i,hn}var pa,Ms;function af(){return Ms||(Ms=1,pa=of()),pa}var sf=af();const bc=Hi.getDefaultExportFromCjs(sf),xc=({children:e,customTheme:t,customComponentSize:r="middle",layout:n="comfortable",getPopupContainer:o})=>{const i=(()=>{const l={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'"Noto Sans KR", sans-serif',fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:Z.theme.defaultAlgorithm};switch(n){case"compact":return{...l,token:{...l.token,padding:8,margin:8,borderRadius:4,fontSize:12,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}};case"spacious":return{...l,token:{...l.token,padding:24,margin:24,borderRadius:8,fontSize:16,fontSizeHeading1:44,fontSizeHeading2:36,fontSizeHeading3:28,fontSizeHeading4:24,fontSizeHeading5:20}};default:return{...l,token:{...l.token,padding:16,margin:16,borderRadius:6,fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}}}})(),s={...i,...t,token:{...i.token,...t?.token},components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)",colorText:"var(--text-primary)"},Radio:{colorPrimary:"var(--check-primary)",colorPrimaryActive:"var(--check-primary-active)",colorPrimaryHover:"var(--check-primary-active)"},Tree:{nodeHoverBg:"var(--tree-selected-bg)",nodeHoverColor:"var(--primary-color)",nodeSelectedBg:"var(--tree-selected-bg)",nodeSelectedColor:"var(--primary-color)",colorText:"var(--text-primary)"},...t?.components??{}}};return _.jsxRuntimeExports.jsx(Z.ConfigProvider,{locale:bc,theme:s,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},getPopupContainer:o,children:e})},zi=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:o=0,marginBottom:a=0,children:i})=>{const s=Rn.AppstoreTwoTone;return R.useMemo(()=>t?.type==="antd"&&t.icon&&Rn[t.icon]||s,[t?.type,t?.icon]),_.jsxRuntimeExports.jsx(Z.Flex,{vertical:!0,children:_.jsxRuntimeExports.jsxs("div",{className:`bwg-title-box ${o?`pb${o}`:""} ${a?`mb${a}`:""}`,children:[_.jsxRuntimeExports.jsx("div",{className:"bwg-title-box-left",children:_.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[_.jsxRuntimeExports.jsx(Z.Typography.Title,{level:4,children:_.jsxRuntimeExports.jsx("span",{children:e})}),r&&_.jsxRuntimeExports.jsx(Z.Tooltip,{title:r.title,placement:r.placement,children:_.jsxRuntimeExports.jsx(Rn.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),_.jsxRuntimeExports.jsx("div",{className:"bwg-title-box-right",children:_.jsxRuntimeExports.jsx(Z.Flex,{gap:6,children:i})})]})})},{Panel:Fs}=Z.Collapse,Bi=R.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:o},a)=>{const[i]=Z.Form.useForm(),[s,l]=R.useState("1"),c=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};R.useImperativeHandle(a,()=>({getFormData:()=>i.getFieldsValue(),setFormData:d=>{i.setFieldsValue(d)},resetForm:()=>{i.resetFields()},validateForm:async()=>{try{return{success:!0,data:await i.validateFields()}}catch(d){return{success:!1,error:d}}}}));const u=()=>{l(d=>d.includes("subRows")?d.filter(f=>f!=="subRows"):[...d,"subRows"])};return console.log({reqRows:e,subRows:t}),_.jsxRuntimeExports.jsxs("div",{style:r?{border:"1px solid #ddd",padding:"10px 12px",borderRadius:"8px",marginBottom:"10px"}:{},children:[o&&_.jsxRuntimeExports.jsx(zi,{title:o.title,children:o.buttons}),_.jsxRuntimeExports.jsx(Z.Form,{form:i,layout:"inline",className:"bwgview-header-form",labelCol:c(),labelAlign:"left",children:_.jsxRuntimeExports.jsxs("div",{style:{position:"relative",width:"100%"},children:[t&&_.jsxRuntimeExports.jsx("div",{style:{position:"absolute",top:"15px",left:"-9px",zIndex:10},children:s.includes("subRows")?_.jsxRuntimeExports.jsx(Z.Tooltip,{title:"접기",children:_.jsxRuntimeExports.jsx("span",{className:"search-collapsed-arrow",onClick:u,children:_.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:_.jsxRuntimeExports.jsx("path",{d:"M5.28321 0.986589C4.88285 0.482264 4.11715 0.482265 3.71679 0.986589L1.0243 4.37824C0.50404 5.0336 0.970753 6 1.80751 6L7.19249 6C8.02925 6 8.49596 5.0336 7.9757 4.37824L5.28321 0.986589Z",fill:"#AEB9C4"})})})}):_.jsxRuntimeExports.jsx(Z.Tooltip,{title:"펼치기",children:_.jsxRuntimeExports.jsx("span",{className:"search-collapsed-arrow",onClick:u,children:_.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:_.jsxRuntimeExports.jsx("path",{d:"M5.28321 5.01341C4.88285 5.51774 4.11715 5.51773 3.71679 5.01341L1.0243 1.62176C0.50404 0.966397 0.970753 1.64312e-07 1.80751 2.37464e-07L7.19249 7.08234e-07C8.02925 7.81386e-07 8.49596 0.966399 7.9757 1.62176L5.28321 5.01341Z",fill:"#AEB9C4"})})})})}),_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:{components:{Collapse:{}}},children:_.jsxRuntimeExports.jsxs(Z.Collapse,{activeKey:["reqRows",...s.includes("subRows")?["subRows"]:[]],onChange:l,className:"searchbox-collapse",bordered:!1,ghost:!0,children:[e&&_.jsxRuntimeExports.jsx(Fs,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&_.jsxRuntimeExports.jsx(Fs,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})})]})})]})}),lf=({children:e,showSearchBox:t,showCloseButton:r=!0,showEyesButton:n=!0,shotSettingButton:o=!0,styles:a,...i})=>{const[s,l]=R.useState(!0),[c,u]=R.useState(()=>{const b=i.placement;return b==="left"||b==="right"||b==="top"||b==="bottom"?b:"bottom"}),[d,f]=R.useState(!1),g=(b=>{const m={wrapper:{...i.width&&{width:i.width},...i.height&&{height:i.height},margin:"0 auto"},content:{},header:{backgroundColor:"var(--drawer-header-bg)",color:"var(--text-primary)"}};switch(b){case"bottom":return{...m,wrapper:{...m.wrapper,borderRadius:"30px 30px 0 0"},content:{borderRadius:"30px 30px 0 0"},header:{...m.header,borderRadius:"30px 30px 0 0"}};case"top":return{...m,wrapper:{...m.wrapper,borderRadius:"0 0 30px 30px"},content:{borderRadius:"0 0 30px 30px"},header:{...m.header}};case"left":return{...m,wrapper:{...m.wrapper,borderRadius:"0 30px 0px 0"},content:{borderRadius:"0 30px 0px 0"},header:{...m.header,borderRadius:"0 30px 0 0"}};case"right":return{...m,wrapper:{...m.wrapper,borderRadius:"30px 0 0 0"},content:{borderRadius:"30px 0 0 0"},header:{...m.header,borderRadius:"30px 0 0 0"}};default:return m}})(c),y={wrapper:{...g?.wrapper,...a?.wrapper},content:{...g?.content,...a?.content},header:{...g?.header,...a?.header}},h=()=>{const b=[];if(o){const m=[{key:"top",label:"상단",icon:_.jsxRuntimeExports.jsx(dt.CaretUpOutlined,{})},{key:"right",label:"우측",icon:_.jsxRuntimeExports.jsx(dt.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:_.jsxRuntimeExports.jsx(dt.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:_.jsxRuntimeExports.jsx(dt.CaretLeftOutlined,{})}],S=_.jsxRuntimeExports.jsx(Z.Space.Compact,{children:m.map($=>_.jsxRuntimeExports.jsx(Z.Button,{type:c===$.key?"primary":"default",size:"small",onClick:()=>{u($.key),f(!1)},icon:$.icon},$.key))});b.push(_.jsxRuntimeExports.jsx(Z.Popover,{content:S,trigger:"click",placement:"left",open:d,onOpenChange:f,children:_.jsxRuntimeExports.jsx(Z.Tooltip,{placement:"bottom",title:"위치변경",zIndex:2100,children:_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.SettingOutlined,{}),type:"text",size:"middle"})})},"shotSetting"))}return n&&b.push(_.jsxRuntimeExports.jsx(Z.Tooltip,{placement:"bottom",title:s?"배경 보기":"배경 숨기기",zIndex:2100,children:_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.EyeOutlined,{}),type:"text",size:"middle",onClick:()=>l(!s)})},"eyes")),i.extra&&b.push(_.jsxRuntimeExports.jsx("div",{style:{margin:"0 8px"},children:i.extra},"extra")),r&&b.push(_.jsxRuntimeExports.jsx(Z.Tooltip,{placement:"bottom",title:"닫기",zIndex:2100,children:_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.CloseOutlined,{}),onClick:i.onClose,type:"text",size:"middle"})},"close")),b};return _.jsxRuntimeExports.jsx(Z.Drawer,{className:"main-drawer",footer:!0,...i,placement:c,styles:y,maskClosable:!1,closable:!1,mask:s,extra:_.jsxRuntimeExports.jsx(Z.Space,{size:"small",align:"center",children:h()}),afterOpenChange:b=>{b||(l(!0),u(i.placement)),i.afterOpenChange?.(b)},destroyOnHidden:!0,children:t?_.jsxRuntimeExports.jsxs(Ho,{type:"vertical",children:[_.jsxRuntimeExports.jsxs(Z.Flex,{justify:"space-between",align:"center",style:{width:"100%"},children:[_.jsxRuntimeExports.jsx("div",{children:t.title}),_.jsxRuntimeExports.jsx(Z.Flex,{gap:2,children:t.extra})]}),_.jsxRuntimeExports.jsx(Bi,{...t.searchBox}),_.jsxRuntimeExports.jsx(Z.Divider,{}),e]}):e})};var Tr={},Ns;function cf(){if(Ns)return Tr;Ns=1;var e=_o;if(process.env.NODE_ENV==="production")Tr.createRoot=e.createRoot,Tr.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Tr.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},Tr.hydrateRoot=function(r,n,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,o)}finally{t.usingClientEntryPoint=!1}}}return Tr}var uf=cf();const df="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC",ff="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",hf=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],vf=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(들여쓰기 표시)",tag:"showIndentExcel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],gf=({children:e})=>{const[t,r]=R.useState(!1),[n,o]=R.useState(null);return t?_.jsxRuntimeExports.jsx("div",{style:{padding:"20px",border:"1px solid #ff4d4f",borderRadius:"6px",backgroundColor:"#fff2f0",margin:"10px"},children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"리얼그리드 로드 실패",description:_.jsxRuntimeExports.jsxs("div",{children:[_.jsxRuntimeExports.jsx("p",{children:"리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다."}),_.jsxRuntimeExports.jsxs("p",{style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:["오류: ",n?.message||"알 수 없는 오류"]}),_.jsxRuntimeExports.jsx(Z.Button,{type:"primary",size:"small",style:{marginTop:"8px"},onClick:()=>{r(!1),o(null),window.location.reload()},children:"다시 시도"})]}),type:"error",showIcon:!0})}):_.jsxRuntimeExports.jsx(mf,{onError:a=>{console.error("BwgGrid 에러:",a),o(a),r(!0)},children:e})};class mf extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError(t)}render(){return this.state.hasError?null:this.props.children}}const pf=R.forwardRef(({type:e="nrml",gridDivStyle:t,gridDivClassName:r,gridColumns:n,gridOptions:o,gridEvents:a,bindRef:i,gridContext:s,renderers:l,gridInitCallback:c},u)=>{const d=R.useRef(null),f=(E,D,L,W)=>{let z=[],K=[];const J="treeNode";for(let Q in E){let te=E[Q];z[te[L]]=E[Q];let oe=z[te[D]];if(oe==null||oe=="-"){K.push(te);continue}oe[J]==null&&(oe[J]=[]),oe[J].push(te)}return K},p=R.useCallback(E=>{const D=W=>{const z=[];return W.forEach(K=>{K.children&&K.children.length>0?z.push(...D(K.children)):z.push(K)}),z};return D(E).map(W=>({fieldName:W.fieldName,dataType:W.dataType||"text"}))},[]),g=R.useCallback(E=>{const D=W=>{const z=[];return W.forEach(K=>{K.children&&K.children.length>0?z.push(...D(K.children)):z.push(K)}),z};return D(E).map(W=>({...W,header:{template:W.required?`<img src='${df}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:W.editable?`<img src='${ff}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:W.header?.text??""},text:W.header?.text||""},styleName:W.dataType==="number"?"right":W.styleName||"center"}))},[]);R.useImperativeHandle(u,()=>({addAllData(E,D){const L=d.current?.gridView.getCurrent().dataRow;if(d.current?.dataProvider instanceof St.LocalDataProvider){d.current.dataProvider.clearRows();try{d.current.dataProvider.fillJsonData(E)}catch(W){console.error("fillJsonData 오류:",W)}}if(d.current?.dataProvider instanceof St.LocalTreeDataProvider){if(d.current.dataProvider.clearRows(),D?.treeOption?.dataField==null||D?.treeOption?.parentField==null)return;const W={rows:"treeNode"};let z=f(E,D.treeOption?.parentField,D.treeOption?.dataField);d.current.dataProvider.fillJsonData({treeNode:z},W),D.treeOption.isExpand&&d.current.gridView?.expandAll()}D?.isCurrent?d.current?.gridView.setCurrent({dataRow:L}):d.current?.gridView.setCurrent({dataRow:0})},getGridInstance:()=>d.current,getCurrentRow:()=>d.current?.gridView.getCurrent().dataRow??-1,getCurrentIndex:()=>d.current?.gridView.getCurrent().itemIndex??-1,gridExcelDown(E){d.current?.gridView.exportGrid({type:"excel",target:"local",allItems:!1,lookupDisplay:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!E?.indenting,header:"default",footer:"default",sheetName:"",fileName:E?.fileName||"sample.xlsx",...E})},dp:d.current?.dataProvider??null,vw:d.current?.gridView??null}));const y=R.useCallback((E,D,L)=>{if(i!==void 0&&L>=0){let W=E.getDataSource().getJsonRow(L);i?.current?.setFieldsValue(W)}else i!==void 0&&L<0&&i?.current?.resetFields();E.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(E,D,L)},[i,a]),h=R.useCallback((E,D,L)=>{const W=D.fieldName??"";i?.current?.getFieldInstance(W)&&i?.current.setFieldValue(W,L),a?.onEditChange&&a?.onEditChange(E,D,L)},[i,a]),b=R.useCallback((E,D,L)=>{const W=E.getOrgFieldName(L),z=E.getValue(D,L);i?.current?.setFieldValue(W,z)},[i]),m=R.useCallback((E,D,L,W)=>{const z=E.getColumn(W).name??"",K=E.getValue(D,W);i?.current?.getFieldInstance(z)&&i?.current.setFieldValue(z,K),a?.onCellEdited&&a?.onCellEdited(E,D,L,W)},[i,a]),S=R.useCallback(E=>{},[]),$=R.useCallback(()=>{if(!d.current)return;const E=d.current.gridView,D=E.getDataSource(),L=["onKeyDown"],W=["onRowInserted"];Object.keys(a??{}).map(z=>{L.includes(z)?E[z+"Add"]=a?.[z]:E[z]=a?.[z],W.includes(z)?D[z+"Add"]=a?.[z]:D[z]=a?.[z]}),D instanceof St.LocalDataProvider&&(D.onRowInserted=(z,K)=>{K<0||(setTimeout(function(){E?.setCurrent({dataRow:K})},1),z.onRowInsertedAdd!==void 0&&z.onRowInsertedAdd(z,K))}),E.onKeyDown=function(z,K){if(K.code=="Space"){let J=z.getSelectedItems(!0);for(const Q in J)z.isCheckable(J[Q])&&(z.isCheckedItem(J[Q])?z.checkItem(J[Q],!1,!1):z.checkItem(J[Q],!0,!1))}return z.onKeyDownAdd!==void 0&&z.onKeyDownAdd(z,K),!0},d.current.gridView.onCurrentRowChanged=y,d.current.gridView.onEditChange=h,d.current.gridView.getDataSource().onValueChanged=b,d.current.gridView.onCellEdited=m,d.current.gridView.onDataLoadComplated=S},[y,h,b,m,S]),x=R.useCallback(E=>{if(E){try{E.gridView.setSortingOptions({enabled:!0}),E.gridView.sortMode=St.SortMode.EXPLICIT,E.gridView.editorOptions.viewGridInside=!0,E.gridView instanceof St.TreeView&&E.gridView.setTreeOptions({expandWhenSetData:St.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:St.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0}),E.gridView.setDisplayOptions({showEmptyMessage:!0,emptyMessage:"조회된 데이터가 존재하지 않습니다.",useFocusClass:!0,minRowHeight:o?.display?.minRowHeight||43,maxRowHeight:o?.display?.maxRowHeight||100,rowHeight:o?.display?.rowHeight||43,rowChangeDelay:o?.display?.rowChangeDelay||0,selectionStyle:o?.display?.selectionStyle||St.SelectionStyle.ROWS,fitStyle:o?.display?.fitStyle||St.GridFitStyle.FILL,useAlternateRowStyle:o?.display?.useAlternateRowStyle||!1}),E.gridView.setEditOptions({commitWhenExitLast:!0,columnEditableFirst:!1,commitByCell:!0,commitWhenLeave:!0,crossWhenExitLast:!0,confirmWhenDelete:!1,deletable:!1,revertable:!1,showOnlyValidationMessage:!0,editable:o?.edit?.editable||!1,validateOnEdited:o?.edit?.validateOnEdited||!1}),E.gridView.setCopyOptions({singleMode:o?.copy?.singleMode||!1}),E.gridView.setPasteOptions({selectBlockPaste:!0,checkReadOnly:!0,throwValidationError:!1}),E.gridView.header.height=o?.header?.height||43,E.gridView.header.styleName=o?.header?.styleName||"bwgGridHeader",o?.container?.radio?E.gridView.setCheckBar({exclusive:o?.container?.radio||!1}):E.gridView.setCheckBar({visible:o?.container?.check||!1,showAll:o?.container?.checkAll||!1}),E.gridView.setStateBar({visible:o?.container?.state||!1}),E.gridView.rowIndicator.visible=o?.container?.indicator||!1,E.gridView instanceof St.GridView&&(E.gridView.groupPanel.visible=o?.container?.panel||!1),E.gridView.setFooters({visible:o?.container?.footer||!1}),E.gridView.setHeader({visible:o?.container?.header||!0}),E.gridView.formatOptions.numberFormat="#,##0"}catch(D){console.log("그리드 옵션 설정 중 오류:",D)}try{E.gridView instanceof St.TreeView?E.gridView.setContextMenu(vf):E.gridView.setContextMenu(hf),E.gridView.onContextMenuItemClicked=function(D,L,W){if(!(!W||!W.column)){if(L.tag=="excel")T(D,{isTitle:!1},s?.excel);else if(L.tag=="showIndentExcel")T(D,{isTitle:!1,treeBlank:!0},s?.excel);else if(L.tag=="withTitleExcel")T(D,{isTitle:!0,treeBlank:!1},s?.excel);else if(L.tag=="filter")F(D,L);else if(L.tag=="fixedCol"){const K=D.getDataSource().getFieldIndex(W.column);D.setFixedOptions({colCount:K})}else if(L.tag=="fixedRow")D.setFixedOptions({rowCount:(W.itemIndex||0)+1});else if(L.tag=="fixedCancel")D.setFixedOptions({colCount:0,rowCount:0});else if(L.tag=="hide")D.setColumnProperty(W.column,"visible",!1),D._hideCols[D._hideCols.length]=W.column;else if(L.tag=="hideClear")for(var z=0;z<D._hideCols.length;z++)D.setColumnProperty(D._hideCols[z],"visible",!0)}}}catch(D){console.log("컨텍스트 설정 중 오류:",D)}}},[o]),w=E=>{if(!(!l||l.length===0))try{l.forEach(D=>{const{name:L,renderer:W}=D;if(L&&W){const z=typeof W=="function"?new W:W;E.gridView.registerCustomRenderer(L,z)}})}catch(D){console.error("커스텀 렌더러 초기화 중 오류:",D)}},C=E=>{if(o?.layout?.colspan&&o.layout.colspan.length>0&&o?.layout?.colspan.forEach(D=>{const L=E.gridView.layoutByColumn(D.fieldName);if(L){const W=D.span;L.spanCallback=function(z,K,J){return W}}}),n&&n.length>0&&n.some(L=>L.children&&L.children.length>0))try{(()=>{const W=JSON.parse(JSON.stringify(n)),z=[],K=J=>{const Q=[];return J.children.map(te=>{if(te.children&&te.children.length>0){const oe=K(te),ae=te.header?.text||te.fieldName,me=E.gridView.getColumnProperty(te.fieldName,"header");delete te.children,delete te.header;let U={name:te.fieldName,header:{text:me?.text||ae,template:me?.template,values:me?.values},items:oe,...te};Q.push(U)}else Q.push(te.fieldName)}),Q};W.map(J=>{if(J.children&&J.children.length>0){const Q=K(J),te=J.header?.text||J.fieldName,oe=E.gridView.getColumnProperty(J.fieldName,"header");delete J.children,delete J.header;const ae={name:J.fieldName,header:{text:oe?.text||te,template:oe?.template,values:oe?.values},items:Q,...J};z.push(ae)}else z.push(J.fieldName)}),console.log("Final Layout!!",z),E.gridView.setColumnLayout(z)})()}catch(L){console.error("컬럼 레이아웃 설정 오류:",L)}},O=()=>{if(d.current){if(e==="nrml"){const E=d.current;if(x(E),w(E),n&&n.length>0){const D=p(n),L=g(n);E.gridView.getDataSource().setFields(D),E.gridView.setColumns(L)}C(E)}else{const E=d.current;if(x(E),w(E),n&&n.length>0){const D=p(n),L=g(n);E.gridView.getDataSource().setFields(D),E.gridView.setColumns(L)}C(d.current)}setTimeout(()=>{if(c){const E=typeof u=="object"&&u!==null?u.current:null;c(E)}},0)}},T=(E,D,L)=>{const W=E.getDataSource();let z=L?.footer==null?"default":L.footer;W.getRowCount()<1&&(z="hidden");let K={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!D?.treeBlank,footer:z,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:L?.fileName||"sample.xlsx"};W instanceof St.LocalTreeDataProvider&&(K.indenting=!!D?.treeBlank),L?.isCellMerge==!0&&(K.separateRows=!1),Ft.isEmpty(L?.sheetName)==!1&&(K.sheetName=L?.sheetName),D?.isTitle&&(K.documentTitle={message:Ft.isSafeEmpty(L?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},Ft.isEmpty(L?.subTitle)==!1&&(K.documentSubtitle={message:L?.subTitle,visible:!0,styleName:"center",height:20}),Ft.isEmpty(L?.tailTitle)==!1&&(K.documentTail={message:L?.tailTitle,visible:!0,styleName:"documentStyle"})),E.exportGrid(K)},F=(E,D)=>{const L=E.getDataSource(),W=L.getOrgFieldNames();if(D.checked)for(var z=0;z<W.length;z++){let J=[],Q=L.getDistinctValues(W[z])??[];if(Q.length==0)continue;let te=E.columnByName(W[z]);for(var K=0;K<Q.length;K++){if(Q[K]==null)continue;let oe=te.values!=null&&te.values.indexOf(Q[K])!=-1?te?.labels?.[te.values.indexOf(Q[K])]:Q[K];Ft.isEmpty(oe)&&(Ft.isEmpty(Q[K])?oe=" ":oe=Q[K]);let ae="";Q[K]==null?ae="value="+Q[K]:ae="value='"+Q[K]+"'",J.push({name:oe,criteria:ae})}E.setColumnFilters(W[z],J)}else for(var z=0;z<W.length;z++)E.clearColumnFilters(W[z]),E.activateAllColumnFilters(W[z],!1),E.clearColumnFilters(W[z])};R.useEffect(()=>{if(d.current&&d.current.gridView)if(e==="nrml"){const E=d.current;x(E)}else{const E=d.current;x(E)}},[e,o,x]),R.useEffect(()=>{!d.current||!n||n.length===0||O()},[n]),R.useEffect(()=>{d.current&&$()},[a,$]);const[V,H]=R.useState(!1),[N,A]=R.useState(""),B=R.useRef(null);R.useEffect(()=>{V&&setTimeout(()=>{B.current?.focus?.()},0)},[V]),R.useEffect(()=>()=>{if(d.current)try{const E=d.current;E.gridView&&(E.gridView.onDataLoadComplated=void 0,E.gridView.onCurrentRowChanged=void 0,E.gridView.onCellClicked=void 0,E.gridView.onCellDblClicked=void 0,E.gridView.onEditRowChanged=void 0,E.gridView.onItemChecked=void 0,E.gridView.onItemAllChecked=void 0,E.gridView.onColumnCheckedChanged=void 0,E.gridView.onCellButtonClicked=void 0,E.gridView.onEditChange=void 0,E.gridView.onCellEdited=void 0,E.gridView.onKeyUp=void 0,E.gridView.onKeyDown=void 0,E.gridView.onWheel=void 0,E.gridView.onValidateColumn=void 0,E.gridView.onValidateRow=void 0,E.gridView.onValidationFail=void 0,E.gridView.onRowInserting=void 0,E.gridView.onCellItemClicked=void 0,E.gridView.onShowEditor=void 0,E.gridView.getDataSource()&&(E.gridView.getDataSource().clearRows(),E.gridView.getDataSource().setFields([])),E.gridView.getDataSource().clearRows())}catch(E){console.warn("⚠️ BwgGrid cleanup error:",E)}},[]);const k=R.useCallback(E=>{P(E)},[]),P=R.useCallback(E=>{const D=d.current?.gridView;if(D?.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(D?.commit(),Ft.isEmpty(E))return;const L=D?.getCurrent().itemIndex??-1;if(L<0)return;const W={value:E,startIndex:L+1,wrap:!0,caseSensitive:!1,partialMatch:!0},z=D?.searchCell(W);D?.setCurrent(z)},[]),I=R.useCallback(E=>{E.key==="Escape"&&(E.preventDefault(),H(!1))},[]),q=R.useCallback(E=>{E.ctrlKey&&E.code==="KeyF"&&(E.preventDefault(),A(""),H(!V))},[V]),X={searchRow:k,searchEnter:P,handleCloseKeyword:I,handleSearch:q},Y=R.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%"}),[t]);return _.jsxRuntimeExports.jsx(gf,{children:_.jsxRuntimeExports.jsxs("div",{style:Y,className:r,onKeyDown:E=>X.handleSearch(E),children:[V&&_.jsxRuntimeExports.jsx("div",{className:"grid-search-box",children:_.jsxRuntimeExports.jsxs(Z.Flex,{gap:3,children:[_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:{components:{Button:{controlHeight:32},Input:{controlHeight:32}}},children:_.jsxRuntimeExports.jsxs(Z.Space.Compact,{children:[_.jsxRuntimeExports.jsx(Z.Button,{icon:_.jsxRuntimeExports.jsx(dt.SearchOutlined,{})}),_.jsxRuntimeExports.jsx(Z.Input,{ref:B,value:N,name:"srchField",autoComplete:"off",onKeyUp:E=>X.handleCloseKeyword(E),onChange:E=>A(E.target.value),onPressEnter:E=>X.searchEnter(E)})]})}),_.jsxRuntimeExports.jsx(Z.Button,{variant:"solid",icon:_.jsxRuntimeExports.jsx(dt.CloseOutlined,{}),onClick:()=>H(!1)})]})}),e==="nrml"?_.jsxRuntimeExports.jsx(ps.RealGridReact,{ref:d,autoGenerateField:!0,onInitialized:O}):_.jsxRuntimeExports.jsx(ps.RealTreeReact,{ref:d,autoGenerateField:!1,onInitialized:O})]})})}),yf=e=>({initContent(t){this._root=uf.createRoot(t)},render(t,r,n,o){const a=this._root;a&&e(t,r,n,o,a)},clearContent(t){const r=this._root;r&&setTimeout(()=>{r&&(r.unmount(),this._root=null)},0)},canClick(t){return!0},click(){return{}}}),bf=R.memo(({title:e,border:t,children:r,titleChildren:n})=>{const o=R.useMemo(()=>({components:{Form:{labelColor:"#9A9A9A"},Select:{colorTextDisabled:"#000"}}}),[]);return _.jsxRuntimeExports.jsxs(Ho,{type:"vertical",children:[_.jsxRuntimeExports.jsx(zi,{title:e,icons:{type:"antd",icon:"InfoCircleTwoTone"},children:n}),_.jsxRuntimeExports.jsx(Bd,{border:!1,children:_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:o,children:r})})]})}),Ho=({type:e="horizontal",layoutAlign:t="left",verticalAlign:r,className:n,style:o,children:a})=>_.jsxRuntimeExports.jsx("div",{style:o,className:`bwgview-content-layout ${e=="horizontal"?"hz-layout":"vt-layout"} layout-${t} ${r&&`vertical-${r}`} ${n||""}`,children:a}),ks=(e,t)=>{const r=window.innerWidth,n=window.innerHeight,o=Math.min(Math.max(e.x,0),Math.max(0,r-t.width)),a=Math.min(Math.max(e.y,0),Math.max(0,n-t.height));return{x:o,y:a}},xf=({buttons:e,popupData:t,onButtonClick:r})=>!e||e.length===0?null:_.jsxRuntimeExports.jsx("div",{style:{display:"flex",gap:6},children:e.map(n=>_.jsxRuntimeExports.jsx(Z.Button,{type:n.type||"default",danger:n.danger,disabled:n.disabled,onClick:()=>r?.(n.key,t),className:"bwg-btn popup-btn",children:n.text},n.key))}),Cf=({popup:e,popupEvent:t,onClose:r,children:n})=>{const o=R.useRef(null);e?.popupId;const a=e?.popupTitle||"팝업",i=e?.width||800,s=e?.height||600,l=e?.buttonList?.map((w,C)=>({key:w.btnId||`btn_${C}`,text:w.btnNm,type:w.btnId==="CLOSE"?"default":"primary",disabled:w.enblYn!=="Y",danger:!1}))||[],u=l.some(w=>w.key==="CLOSE"||w.key==="close")?l:[...l,{key:"CLOSE",text:"닫기",type:"default",disabled:!1,danger:!1}],[d,f]=R.useState(i),[p,g]=R.useState(s),y=R.useMemo(()=>{const w=Math.max(0,(window.innerWidth-i)/2),C=Math.max(0,(window.innerHeight-s)/2);return{x:w,y:C}},[i,s]),[h,b]=R.useState(y),m=(w,C)=>{if(w==="CLOSE"||w==="close"){e?.close?.()||r?.();return}t&&t[w]?t[w]():e?.close?.()||r?.()},S=(w,C)=>{const O=ks({x:C.x,y:C.y},{width:d,height:p});b(O)},$=(w,C,O,T,F)=>{const V={width:parseInt(O.style.width,10),height:parseInt(O.style.height,10)},H=ks(F,V);f(V.width),g(V.height),b(H)},x=()=>o.current??document.body;return _.jsxRuntimeExports.jsxs("div",{style:{position:"fixed",inset:0,zIndex:1e3},children:[_.jsxRuntimeExports.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),_.jsxRuntimeExports.jsxs(Wd.Rnd,{className:"bwg-popup",size:{width:d,height:p},position:h,bounds:"window",minWidth:400,minHeight:300,onDragStop:S,onResizeStop:$,dragHandleClassName:"drag-handle",cancel:".rnd-cancel",enableUserSelectHack:!1,style:{backgroundColor:"white",borderRadius:20,boxShadow:"0 4px 15px rgba(0,0,0,0.25)",overflow:"visible",position:"absolute",zIndex:1},children:[_.jsxRuntimeExports.jsx("div",{className:"bwg-popup-content",style:{overflow:"hidden",borderRadius:20,height:"100%"},children:_.jsxRuntimeExports.jsx(xc,{getPopupContainer:x,children:_.jsxRuntimeExports.jsx(Ho,{type:"vertical",children:_.jsxRuntimeExports.jsx(Z.Card,{className:"popup-drag-container",title:_.jsxRuntimeExports.jsx("div",{className:"drag-handle",style:{display:"flex",alignItems:"center",gap:8},children:a}),style:{width:"100%",height:"100%"},styles:{body:{height:"calc(100% - 77px)",padding:20,overflow:"auto"}},extra:_.jsxRuntimeExports.jsx(xf,{buttons:u,popupData:e,onButtonClick:m}),children:_.jsxRuntimeExports.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:n})})})})}),_.jsxRuntimeExports.jsx("div",{ref:o,className:"bwg-popup-portal-root",style:{position:"relative"}})]})]})},wf=({children:e,...t})=>_.jsxRuntimeExports.jsx(Z.Row,{...t,className:"bwg-row",children:e}),Sf=({rowKey:e="id",columns:t,dataSource:r,loading:n=!1,rowSelection:o,size:a="middle",pagination:i=!1,...s})=>_.jsxRuntimeExports.jsx(Z.Table,{rowKey:e,columns:t,dataSource:r,loading:n,rowSelection:o,size:a,pagination:i,bordered:!0,scroll:{x:"max-content"},locale:{emptyText:"데이터가 없습니다."},...s}),Ef=e=>{const{type:t="card",animated:r=!0,...n}=e;return _.jsxRuntimeExports.jsx(Z.Tabs,{type:t,animated:r,...n})};function Ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Rf(e){if(Array.isArray(e))return Ka(e)}function Cc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wi(e,t){if(e){if(typeof e=="string")return Ka(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ka(e,t):void 0}}function $f(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(e){return Rf(e)||Cc(e)||Wi(e)||$f()}function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ie.apply(null,arguments)}var Of={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function wc(e){if(Array.isArray(e))return e}function jf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,a,i,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function Sc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G(e,t){return wc(e)||jf(e,t)||Wi(e,t)||Sc()}function ve(e){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ve(e)}function _f(e,t){if(ve(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ve(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ec(e){var t=_f(e,"string");return ve(t)=="symbol"?t:t+""}function j(e,t,r){return(t=Ec(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pf(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ft(e,t){if(e==null)return{};var r,n,o=Pf(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var ya={exports:{}};/*!
|
|
4
4
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -181,4 +181,4 @@ html body {
|
|
|
181
181
|
${t}-edit,
|
|
182
182
|
${t}-copy
|
|
183
183
|
`]:Object.assign(Object.assign({},_u(e)),{marginInlineStart:e.marginXXS})}),Vy(e)),Dy(e)),Ly()),{"&-rtl":{direction:"rtl"}})}},zy=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),Id=Wn("Typography",Hy,zy),By=e=>{const{prefixCls:t,"aria-label":r,className:n,style:o,direction:a,maxLength:i,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:p=v.createElement(Cd,null)}=e,g=v.useRef(null),y=v.useRef(!1),h=v.useRef(null),[b,m]=v.useState(l);v.useEffect(()=>{m(l)},[l]),v.useEffect(()=>{var A;if(!((A=g.current)===null||A===void 0)&&A.resizableTextArea){const{textArea:B}=g.current.resizableTextArea;B.focus();const{length:k}=B.value;B.setSelectionRange(k,k)}},[]);const S=({target:A})=>{m(A.value.replace(/[\n\r]/g,""))},$=()=>{y.current=!0},x=()=>{y.current=!1},w=({keyCode:A})=>{y.current||(h.current=A)},C=()=>{c(b.trim())},O=({keyCode:A,ctrlKey:B,altKey:k,metaKey:P,shiftKey:I})=>{h.current!==A||y.current||B||k||P||I||(A===rc.ENTER?(C(),d?.()):A===rc.ESC&&u())},T=()=>{C()},[F,V,H]=Id(t),N=le(t,`${t}-edit-content`,{[`${t}-rtl`]:a==="rtl",[`${t}-${f}`]:!!f},n,V,H);return F(v.createElement("div",{className:N,style:o},v.createElement(My,{ref:g,maxLength:i,value:b,onChange:S,onKeyDown:w,onKeyUp:O,onCompositionStart:$,onCompositionEnd:x,onBlur:T,"aria-label":r,rows:1,autoSize:s}),p!==null?fd(p,{className:`${t}-edit-content-confirm`}):null))};var Da,cc;function Wy(){return cc||(cc=1,Da=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(o){e.addRange(o)}),t&&t.focus()}}),Da}var La,uc;function qy(){if(uc)return La;uc=1;var e=Wy(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(a){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,i)}function o(a,i){var s,l,c,u,d,f,p=!1;i||(i={}),s=i.debug||!1;try{c=e(),u=document.createRange(),d=document.getSelection(),f=document.createElement("span"),f.textContent=a,f.ariaHidden="true",f.style.all="unset",f.style.position="fixed",f.style.top=0,f.style.clip="rect(0, 0, 0, 0)",f.style.whiteSpace="pre",f.style.webkitUserSelect="text",f.style.MozUserSelect="text",f.style.msUserSelect="text",f.style.userSelect="text",f.addEventListener("copy",function(y){if(y.stopPropagation(),i.format)if(y.preventDefault(),typeof y.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=t[i.format]||t.default;window.clipboardData.setData(h,a)}else y.clipboardData.clearData(),y.clipboardData.setData(i.format,a);i.onCopy&&(y.preventDefault(),i.onCopy(y.clipboardData))}),document.body.appendChild(f),u.selectNodeContents(f),d.addRange(u);var g=document.execCommand("copy");if(!g)throw new Error("copy command was unsuccessful");p=!0}catch(y){s&&console.error("unable to copy using execCommand: ",y),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",a),i.onCopy&&i.onCopy(window.clipboardData),p=!0}catch(h){s&&console.error("unable to copy using clipboardData: ",h),s&&console.error("falling back to prompt"),l=n("message"in i?i.message:r),window.prompt(l,a)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(u):d.removeAllRanges()),f&&document.body.removeChild(f),c()}return p}return La=o,La}var Uy=qy();const Ky=Hi.getDefaultExportFromCjs(Uy),Gy=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];var Yy=function(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(u){try{c(n.next(u))}catch(d){i(d)}}function l(u){try{c(n.throw(u))}catch(d){i(d)}}function c(u){u.done?a(u.value):o(u.value).then(s,l)}c((n=n.apply(e,t||[])).next())})};const Xy=({copyConfig:e,children:t})=>{const[r,n]=v.useState(!1),[o,a]=v.useState(!1),i=v.useRef(null),s=()=>{i.current&&clearTimeout(i.current)},l={};e.format&&(l.format=e.format),v.useEffect(()=>s,[]);const c=vt(u=>Yy(void 0,void 0,void 0,function*(){var d;u?.preventDefault(),u?.stopPropagation(),a(!0);try{const f=typeof e.text=="function"?yield e.text():e.text;Ky(f||Gy(t,!0).join("")||"",l),a(!1),n(!0),s(),i.current=setTimeout(()=>{n(!1)},3e3),(d=e.onCopy)===null||d===void 0||d.call(e,u)}catch(f){throw a(!1),f}}));return{copied:r,copyLoading:o,onClick:c}};function Ha(e,t){return v.useMemo(()=>{const r=!!e;return[r,Object.assign(Object.assign({},t),r&&typeof e=="object"?e:null)]},[e])}const Qy=e=>{const t=R.useRef(void 0);return R.useEffect(()=>{t.current=e}),t.current},Zy=(e,t,r)=>R.useMemo(()=>e===!0?{title:t??r}:R.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??r},e):{title:e},[e,t,r]);var Jy=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Vd=v.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:o,rootClassName:a,setContentRef:i,children:s,direction:l,style:c}=e,u=Jy(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:p,style:g}=Ko("typography"),y=l??f,h=i?Hn(t,i):t,b=d("typography",r);process.env.NODE_ENV!=="production"&&qt("Typography").deprecated(!i,"setContentRef","ref");const[m,S,$]=Id(b),x=le(b,p,{[`${b}-rtl`]:y==="rtl"},o,a,S,$),w=Object.assign(Object.assign({},g),c);return m(v.createElement(n,Object.assign({className:x,style:w,ref:h},u),s))});process.env.NODE_ENV!=="production"&&(Vd.displayName="Typography");var eb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},tb=function(t,r){return v.createElement(tr,Ie({},t,{ref:r,icon:eb}))},Dd=v.forwardRef(tb);process.env.NODE_ENV!=="production"&&(Dd.displayName="CheckOutlined");var rb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},nb=function(t,r){return v.createElement(tr,Ie({},t,{ref:r,icon:rb}))},Ld=v.forwardRef(nb);process.env.NODE_ENV!=="production"&&(Ld.displayName="CopyOutlined");var ob={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},ab=function(t,r){return v.createElement(tr,Ie({},t,{ref:r,icon:ob}))},Hd=v.forwardRef(ab);process.env.NODE_ENV!=="production"&&(Hd.displayName="LoadingOutlined");function dc(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function za(e,t,r){return e===!0||e===void 0?t:e||r&&t}function ib(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}const gs=e=>["string","number"].includes(typeof e),sb=({prefixCls:e,copied:t,locale:r,iconOnly:n,tooltips:o,icon:a,tabIndex:i,onCopy:s,loading:l})=>{const c=dc(o),u=dc(a),{copied:d,copy:f}=r??{},p=t?d:f,g=za(c[t?1:0],p),y=typeof g=="string"?g:p;return v.createElement(Yn,{title:g,getPopupContainer:h=>h.parentNode},v.createElement("button",{type:"button",className:le(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:n}),onClick:s,"aria-label":y,tabIndex:i},t?za(u[1],v.createElement(Dd,null),!0):za(u[0],l?v.createElement(Hd,null):v.createElement(Ld,null),!0)))},xo=v.forwardRef(({style:e,children:t},r)=>{const n=v.useRef(null);return v.useImperativeHandle(r,()=>({isExceed:()=>{const o=n.current;return o.scrollHeight>o.clientHeight},getHeight:()=>n.current.clientHeight})),v.createElement("span",{"aria-hidden":!0,ref:n,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),lb=e=>e.reduce((t,r)=>t+(gs(r)?String(r).length:1),0);function fc(e,t){let r=0;const n=[];for(let o=0;o<e.length;o+=1){if(r===t)return n;const a=e[o],s=gs(a)?String(a).length:1,l=r+s;if(l>t){const c=t-r;return n.push(String(a).slice(0,c)),n}n.push(a),r=l}return e}const Ba=0,Wa=1,qa=2,Ua=3,hc=4,Co={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function cb(e){const{enableMeasure:t,width:r,text:n,children:o,rows:a,expanded:i,miscDeps:s,onEllipsis:l}=e,c=v.useMemo(()=>qr(n),[n]),u=v.useMemo(()=>lb(c),[n]),d=v.useMemo(()=>o(c,!1),[n]),[f,p]=v.useState(null),g=v.useRef(null),y=v.useRef(null),h=v.useRef(null),b=v.useRef(null),m=v.useRef(null),[S,$]=v.useState(!1),[x,w]=v.useState(Ba),[C,O]=v.useState(0),[T,F]=v.useState(null);Be(()=>{w(t&&r&&u?Wa:Ba)},[r,n,a,t,c]),Be(()=>{var A,B,k,P;if(x===Wa){w(qa);const I=y.current&&getComputedStyle(y.current).whiteSpace;F(I)}else if(x===qa){const I=!!(!((A=h.current)===null||A===void 0)&&A.isExceed());w(I?Ua:hc),p(I?[0,u]:null),$(I);const q=((B=h.current)===null||B===void 0?void 0:B.getHeight())||0,X=a===1?0:((k=b.current)===null||k===void 0?void 0:k.getHeight())||0,Y=((P=m.current)===null||P===void 0?void 0:P.getHeight())||0,E=Math.max(q,X+Y);O(E+1),l(I)}},[x]);const V=f?Math.ceil((f[0]+f[1])/2):0;Be(()=>{var A;const[B,k]=f||[0,0];if(B!==k){const I=(((A=g.current)===null||A===void 0?void 0:A.getHeight())||0)>C;let q=V;k-B===1&&(q=I?B:k),p(I?[B,q]:[q,k])}},[f,V]);const H=v.useMemo(()=>{if(!t)return o(c,!1);if(x!==Ua||!f||f[0]!==f[1]){const A=o(c,!1);return[hc,Ba].includes(x)?A:v.createElement("span",{style:Object.assign(Object.assign({},Co),{WebkitLineClamp:a})},A)}return o(i?c:fc(c,f[0]),S)},[i,x,f,c].concat(se(s))),N={width:r,margin:0,padding:0,whiteSpace:T==="nowrap"?"normal":"inherit"};return v.createElement(v.Fragment,null,H,x===qa&&v.createElement(v.Fragment,null,v.createElement(xo,{style:Object.assign(Object.assign(Object.assign({},N),Co),{WebkitLineClamp:a}),ref:h},d),v.createElement(xo,{style:Object.assign(Object.assign(Object.assign({},N),Co),{WebkitLineClamp:a-1}),ref:b},d),v.createElement(xo,{style:Object.assign(Object.assign(Object.assign({},N),Co),{WebkitLineClamp:1}),ref:m},o([],!0))),x===Ua&&f&&f[0]!==f[1]&&v.createElement(xo,{style:Object.assign(Object.assign({},N),{top:400}),ref:g},o(fc(c,V),!0)),x===Wa&&v.createElement("span",{style:{whiteSpace:"inherit"},ref:y}))}const zd=({enableEllipsis:e,isEllipsis:t,children:r,tooltipProps:n})=>!n?.title||!e?r:v.createElement(Yn,Object.assign({open:t?void 0:!1},n),r);process.env.NODE_ENV!=="production"&&(zd.displayName="EllipsisTooltip");var ub=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function db({mark:e,code:t,underline:r,delete:n,strong:o,keyboard:a,italic:i},s){let l=s;function c(u,d){d&&(l=v.createElement(u,{},l))}return c("strong",o),c("u",r),c("del",n),c("code",t),c("mark",e),c("kbd",a),c("i",i),l}const fb="...",vc=["delete","mark","code","underline","strong","keyboard","italic"],hb=v.forwardRef((e,t)=>{var r;const{prefixCls:n,className:o,style:a,type:i,disabled:s,children:l,ellipsis:c,editable:u,copyable:d,component:f,title:p}=e,g=ub(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:y,direction:h}=v.useContext(Ut),[b]=Yv("Text"),m=v.useRef(null),S=v.useRef(null),$=y("typography",n),x=Gc(g,vc),[w,C]=Ha(u),[O,T]=Er(!1,{value:C.editing}),{triggerType:F=["icon"]}=C,V=ie=>{var fe;ie&&((fe=C.onStart)===null||fe===void 0||fe.call(C)),T(ie)},H=Qy(O);Be(()=>{var ie;!O&&H&&((ie=S.current)===null||ie===void 0||ie.focus())},[O]);const N=ie=>{ie?.preventDefault(),V(!0)},A=ie=>{var fe;(fe=C.onChange)===null||fe===void 0||fe.call(C,ie),V(!1)},B=()=>{var ie;(ie=C.onCancel)===null||ie===void 0||ie.call(C),V(!1)},[k,P]=Ha(d),{copied:I,copyLoading:q,onClick:X}=Xy({copyConfig:P,children:l}),[Y,E]=v.useState(!1),[D,L]=v.useState(!1),[W,z]=v.useState(!1),[K,J]=v.useState(!1),[Q,te]=v.useState(!0),[oe,ae]=Ha(c,{expandable:!1,symbol:ie=>ie?b?.collapse:b?.expand}),[me,U]=Er(ae.defaultExpanded||!1,{value:ae.expanded}),ce=oe&&(!me||ae.expandable==="collapsible"),{rows:re=1}=ae,ue=v.useMemo(()=>ce&&(ae.suffix!==void 0||ae.onEllipsis||ae.expandable||w||k),[ce,ae,w,k]);Be(()=>{oe&&!ue&&(E(tl("webkitLineClamp")),L(tl("textOverflow")))},[ue,oe]);const[ye,de]=v.useState(ce),$e=v.useMemo(()=>ue?!1:re===1?D:Y,[ue,D,Y]);Be(()=>{de($e&&ce)},[$e,ce]);const be=ce&&(ye?K:W),Ee=ce&&re===1&&ye,ge=ce&&re>1&&ye,ee=(ie,fe)=>{var Ue;U(fe.expanded),(Ue=ae.onExpand)===null||Ue===void 0||Ue.call(ae,ie,fe)},[Ce,Re]=v.useState(0),Qe=({offsetWidth:ie})=>{Re(ie)},ke=ie=>{var fe;z(ie),W!==ie&&((fe=ae.onEllipsis)===null||fe===void 0||fe.call(ae,ie))};v.useEffect(()=>{const ie=m.current;if(oe&&ye&&ie){const fe=ib(ie);K!==fe&&J(fe)}},[oe,ye,l,ge,Q,Ce]),v.useEffect(()=>{const ie=m.current;if(typeof IntersectionObserver>"u"||!ie||!ye||!ce)return;const fe=new IntersectionObserver(()=>{te(!!ie.offsetParent)});return fe.observe(ie),()=>{fe.disconnect()}},[ye,ce]);const Ve=Zy(ae.tooltip,C.text,l),tt=v.useMemo(()=>{if(!(!oe||ye))return[C.text,l,p,Ve.title].find(gs)},[oe,ye,p,Ve.title,be]);if(O)return v.createElement(By,{value:(r=C.text)!==null&&r!==void 0?r:typeof l=="string"?l:"",onSave:A,onCancel:B,onEnd:C.onEnd,prefixCls:$,className:o,style:a,direction:h,component:f,maxLength:C.maxLength,autoSize:C.autoSize,enterIcon:C.enterIcon});const Te=()=>{const{expandable:ie,symbol:fe}=ae;return ie?v.createElement("button",{type:"button",key:"expand",className:`${$}-${me?"collapse":"expand"}`,onClick:Ue=>ee(Ue,{expanded:!me}),"aria-label":me?b.collapse:b?.expand},typeof fe=="function"?fe(me):fe):null},Oe=()=>{if(!w)return;const{icon:ie,tooltip:fe,tabIndex:Ue}=C,Kt=qr(fe)[0]||b?.edit,gr=typeof Kt=="string"?Kt:"";return F.includes("icon")?v.createElement(Yn,{key:"edit",title:fe===!1?"":Kt},v.createElement("button",{type:"button",ref:S,className:`${$}-edit`,onClick:N,"aria-label":gr,tabIndex:Ue},ie||v.createElement(Ic,{role:"button"}))):null},Se=()=>k?v.createElement(sb,Object.assign({key:"copy"},P,{prefixCls:$,copied:I,locale:b,onCopy:X,loading:q,iconOnly:l==null})):null,pe=ie=>[ie&&Te(),Oe(),Se()],De=ie=>[ie&&!me&&v.createElement("span",{"aria-hidden":!0,key:"ellipsis"},fb),ae.suffix,pe(ie)];return v.createElement(tn,{onResize:Qe,disabled:!ce},ie=>v.createElement(zd,{tooltipProps:Ve,enableEllipsis:ce,isEllipsis:be},v.createElement(Vd,Object.assign({className:le({[`${$}-${i}`]:i,[`${$}-disabled`]:s,[`${$}-ellipsis`]:oe,[`${$}-ellipsis-single-line`]:Ee,[`${$}-ellipsis-multiple-line`]:ge},o),prefixCls:n,style:Object.assign(Object.assign({},a),{WebkitLineClamp:ge?re:void 0}),component:f,ref:Hn(ie,m,t),direction:h,onClick:F.includes("text")?N:void 0,"aria-label":tt?.toString(),title:p},x),v.createElement(cb,{enableMeasure:ce&&!ye,text:l,rows:re,width:Ce,onEllipsis:ke,expanded:me,miscDeps:[I,me,q,w,k,b].concat(se(vc.map(fe=>e[fe])))},(fe,Ue)=>db(e,v.createElement(v.Fragment,null,fe.length>0&&Ue&&!me&&tt?v.createElement("span",{key:"show-content","aria-hidden":!0},fe):fe,De(Ue)))))))}),vb=v.forwardRef((e,t)=>v.createElement(hb,Object.assign({ref:t},e,{component:"div"}))),gb=({reqRows:e,subRows:t})=>{const{searchBoxRef:r}=Li.useSearchBox();return _.jsxRuntimeExports.jsx(Bi,{ref:r,reqRows:e,subRows:t})},mb=({children:e,searchBox:t,title:r,preRenderEvents:n=[],postRenderEvents:o=[],loading:a=!1,error:i=null,grantEvent:s={},customEvent:l={}})=>{const c=Li.useServiceCodeValue("AUTH_BTNS"),{user:u,isLoggedIn:d}=Ft.useUserStore(),{currentProgram:f,activeMenu:p}=ys.useMenuStore(),{isFavorite:g,addFavorite:y,removeFavorite:h}=ys.useFavoriteStore(),[b,m]=R.useState({isInitialized:!1,isReady:!1,error:null,loading:!0,preRenderComplete:!1,postRenderComplete:!1}),[S,$]=R.useState(null),[x,w]=R.useState([]),[C,O]=R.useState([]),T=async()=>{if(n.length===0){m(P=>({...P,preRenderComplete:!0}));return}try{for(const P of n)await P();m(P=>({...P,preRenderComplete:!0}))}catch(P){m(I=>({...I,error:P instanceof Error?P.message:"사전 렌더링 실패",preRenderComplete:!0}))}},F=async()=>{if(o.length===0){m(P=>({...P,postRenderComplete:!0}));return}try{for(const P of o)await P();m(P=>({...P,postRenderComplete:!0}))}catch(P){m(I=>({...I,error:P instanceof Error?P.message:"사후 렌더링 실패",postRenderComplete:!0}))}};R.useEffect(()=>{if(b.isInitialized)return;(async()=>{try{try{console.log("SCMSIGN00202 권한 서비스 호출 시작");const I=await Ft.callService(c,{crprCd:u?.crprCd,userId:u?.userId,menuId:f?.menuId});if(console.log("SCMSIGN00202 권한 서비스 응답:",I),I?.data&&I.data.length>0){const q=I.data?.filter(Y=>Y.grpId?.toUpperCase()==="DEFAULT").map(Y=>({id:Y.btnId,label:Y.btnNm,type:"default",disabled:!1,onClick:s[Y.btnId]||void 0}))||[];w(q);const X=I.data?.filter(Y=>Y.grpId?.toUpperCase()==="CUSTOM").map(Y=>({id:Y.btnId,label:Y.btnNm,type:"default",disabled:!1,onClick:l[Y.btnId]||void 0}))||[];O(X)}else w([]),O([])}catch(I){console.error("SCMSIGN00202 권한 서비스 호출 실패:",I),w([]),O([])}await T(),m(I=>({...I,isInitialized:!0,loading:!1}))}catch(I){console.error("BwgView 초기화 실패:",I),m(q=>({...q,isInitialized:!0,loading:!1}))}})()},[]),R.useEffect(()=>{b.isInitialized&&b.preRenderComplete&&!b.isReady&&setTimeout(async()=>{await F(),m(I=>({...I,isReady:!0}))},100)},[b.isInitialized,b.preRenderComplete,b.isReady]),R.useEffect(()=>{i&&m(P=>({...P,error:i}))},[i]);const V=()=>_.jsxRuntimeExports.jsxs("div",{className:"bwgview-header-container",children:[_.jsxRuntimeExports.jsxs("div",{className:"bwgview-header",children:[_.jsxRuntimeExports.jsx("div",{className:"bwgview-header-left",children:k.LEFT}),_.jsxRuntimeExports.jsx("div",{className:"bwgview-header-right",children:k.RIGHT})]}),t&&_.jsxRuntimeExports.jsx(gb,{reqRows:t.reqRows,subRows:t.subRows})]});if(R.useEffect(()=>{},[u,f]),b.loading||a)return _.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"200px"},children:[_.jsxRuntimeExports.jsx(Z.Spin,{size:"large"}),_.jsxRuntimeExports.jsx("p",{style:{marginLeft:"16px"},children:"컴포넌트를 로드하는 중..."})]});if(b.error||i)return _.jsxRuntimeExports.jsx("div",{style:{padding:"24px"},children:_.jsxRuntimeExports.jsx(Z.Alert,{message:"오류 발생",description:b.error||i,type:"error",showIcon:!0})});const H=()=>_.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 20",width:"1em",height:"1em",fill:"none",children:_.jsxRuntimeExports.jsx("path",{d:"M9.9348 1.4645C10.2382 0.845167 10.7437 0.845167 11.0597 1.4645L13.0694 5.5344C13.3727 6.15374 14.1943 6.74779 14.8768 6.84891L19.3638 7.50616C20.0464 7.60727 20.2107 8.08757 19.7051 8.56787L16.4568 11.7277C15.9638 12.208 15.6478 13.1686 15.7616 13.8512L16.5326 18.3129C16.6464 18.9954 16.2419 19.2988 15.6226 18.9701L11.6159 16.8594C10.9965 16.5307 9.998 16.5307 9.37867 16.8594L5.37196 18.9701C4.75263 19.2988 4.34817 18.9954 4.46192 18.3129L5.23293 13.8512C5.34668 13.1686 5.04334 12.208 4.53776 11.7277L1.28942 8.56787C0.79648 8.08757 0.948154 7.60727 1.63068 7.50616L6.11769 6.84891C6.80022 6.74779 7.62179 6.15374 7.92513 5.5344L9.9348 1.4645Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"})}),N=()=>_.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 20",width:"1em",height:"1em",fill:"none",children:_.jsxRuntimeExports.jsx("path",{d:"M9.9348 1.4645C10.2382 0.845167 10.7437 0.845167 11.0597 1.4645L13.0694 5.5344C13.3727 6.15374 14.1943 6.74779 14.8768 6.84891L19.3638 7.50616C20.0464 7.60727 20.2107 8.08757 19.7051 8.56787L16.4568 11.7277C15.9638 12.208 15.6478 13.1686 15.7616 13.8512L16.5326 18.3129C16.6464 18.9954 16.2419 19.2988 15.6226 18.9701L11.6159 16.8594C10.9965 16.5307 9.998 16.5307 9.37867 16.8594L5.37196 18.9701C4.75263 19.2988 4.34817 18.9954 4.46192 18.3129L5.23293 13.8512C5.34668 13.1686 5.04334 12.208 4.53776 11.7277L1.28942 8.56787C0.79648 8.08757 0.948154 7.60727 1.63068 7.50616L6.11769 6.84891C6.80022 6.74779 7.62178 6.15374 7.92513 5.5344L9.9348 1.4645Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",fill:"none"})}),A=P=>_.jsxRuntimeExports.jsx(dt,{component:H,...P}),B=P=>_.jsxRuntimeExports.jsx(dt,{component:N,...P}),k={LEFT:_.jsxRuntimeExports.jsx("div",{className:"bwgview-header-left",children:_.jsxRuntimeExports.jsxs(Z.ConfigProvider,{theme:{components:{Tag:{controlHeight:28,controlHeightLG:28,controlHeightSM:28,controlHeightXS:28}}},children:[_.jsxRuntimeExports.jsxs(Z.Space,{children:[f&&(g(f.menuId)?_.jsxRuntimeExports.jsx(A,{className:"bookmark-icon",style:{color:"#faad14"},onClick:async()=>{try{await h(f.menuId,u?.userId||"")}catch{}}}):_.jsxRuntimeExports.jsx(B,{className:"bookmark-icon",onClick:async()=>{try{await y(f,u?.userId||"")}catch{}}})),_.jsxRuntimeExports.jsxs(Z.Space.Compact,{style:{alignItems:"center"},children:[_.jsxRuntimeExports.jsx("span",{className:"pageMenuNm",children:(()=>{let P="";return r?.useMenuTitle&&f?P=f.menuNm:r?.text?P=r.text:f&&(P=f.menuPrntId==="CM00"?f.menuNm.substring(f.menuNm.indexOf(" ")+1):f.menuNm),r?.prefix&&(P=`${r.prefix} ${P}`),r?.suffix&&(P=`${P} ${r.suffix}`),P})()}),f?.menuNo&&_.jsxRuntimeExports.jsx(Z.Tag,{className:"page-num-tag",children:f?.menuNo}),_.jsxRuntimeExports.jsx(Z.Tooltip,{title:"도움말",color:"geekblue",children:_.jsxRuntimeExports.jsx(Z.Button,{variant:"text",type:"text",className:"menu-help-btn",icon:_.jsxRuntimeExports.jsx("span",{className:"bwgHelpIcon"})})})]})]}),f?.scrnId&&qd.isLocal&&_.jsxRuntimeExports.jsx(Z.Tag,{style:{marginLeft:8,fontSize:13,fontWeight:500,display:"flex"},children:_.jsxRuntimeExports.jsx(vb,{copyable:!0,style:{display:"inherit",justifyContent:"center",alignItems:"center",marginBottom:0},children:f?.scrnId})})]})}),RIGHT:_.jsxRuntimeExports.jsx("div",{className:"bwgview-header-right",children:_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:{components:{Space:{padding:8}}},children:_.jsxRuntimeExports.jsxs(Z.Space,{children:[_.jsxRuntimeExports.jsx(Z.Flex,{gap:8,children:C.map(P=>_.jsxRuntimeExports.jsx(Z.Button,{type:P.type,disabled:P.disabled,className:"bwg-btn",onClick:()=>{typeof P.onClick=="function"&&P.onClick()},children:P.label},P.id))}),_.jsxRuntimeExports.jsx(Z.ConfigProvider,{theme:{components:{Divider:{verticalMarginInline:0}}},children:_.jsxRuntimeExports.jsx(Z.Divider,{type:"vertical"})}),_.jsxRuntimeExports.jsx(Z.Flex,{gap:8,className:"permission-buttons",children:x.length>0?x.map(P=>_.jsxRuntimeExports.jsx(Z.Button,{type:P.type,disabled:P.disabled,className:"bwg-btn",onClick:()=>{typeof P.onClick=="function"&&P.onClick()},children:P.label},P.id)):_.jsxRuntimeExports.jsx(Z.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})})]})})})};return _.jsxRuntimeExports.jsxs("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column"},children:[V(),_.jsxRuntimeExports.jsx("div",{className:"bwgview-content",children:_.jsxRuntimeExports.jsx(R.Suspense,{fallback:_.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[_.jsxRuntimeExports.jsx(Z.Spin,{size:"large"}),_.jsxRuntimeExports.jsx("p",{style:{marginLeft:"16px"},children:"컴포넌트를 로드하는 중..."})]}),children:_.jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:e})})})]})},Bd=({width:e="100%",height:t="100%",boxAlign:r,display:n="show",overflow:o,style:a,className:i,border:s=!0,children:l,ref:c})=>_.jsxRuntimeExports.jsx("div",{style:{width:e,height:t,display:n==="show"?"":n,overflowX:o?.x,overflowY:o?.y,...a},className:`bwgview-content-box ${r?`content-box-${r}`:""} ${i||""} ${s?"":"none-box-st"}`,ref:c,children:l}),pb=({children:e,customTheme:t,customComponentSize:r="middle"})=>{const n={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',fontSize:14,fontSizeHeading1:38,fontSizeHeading2:30,fontSizeHeading3:24,fontSizeHeading4:20,fontSizeHeading5:16,padding:16,margin:16,borderRadius:6,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:Z.theme.defaultAlgorithm},o={...n,...t,token:{...n.token,...t?.token}};return _.jsxRuntimeExports.jsx(Z.ConfigProvider,{locale:bc,theme:o,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},children:e})},yb="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9273)'%3e%3cpath%20d='M25.9254%2020.8996C27.5151%2020.8996%2028.8039%2019.6108%2028.8039%2018.0211C28.8039%2016.4313%2027.5151%2015.1426%2025.9254%2015.1426C24.3356%2015.1426%2023.0469%2016.4313%2023.0469%2018.0211C23.0469%2019.6108%2024.3356%2020.8996%2025.9254%2020.8996Z'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M31.4825%2032.4711V25.9066C31.4825%2024.5671%2030.485%2023.4746%2029.2595%2023.4746H22.6C21.3745%2023.4746%2020.377%2024.5671%2020.377%2025.9066'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.2696%2026.7334H14.2686L16.5106%2032.6234H27.5021L25.2696%2026.7334Z'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5617%2018.8385C6.1462%2017.4135%205.2627%2015.447%205.2627%2013.2715C5.2627%208.91095%208.7967%205.37695%2013.1572%205.37695C17.5177%205.37695%2021.0517%208.91095%2021.0517%2013.2715C21.0517%2015.124%2020.4152%2016.815%2019.3512%2018.164C18.0497%2019.8075%2016.1117%2020.919%2013.9172%2021.128'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.1572%2013.2715L16.0167%2015.5705'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.1572%208.62598V13.2715'%20stroke='%23925CFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.35963%2016.1973L7.84663%2019.1328L4.91113%2018.6293'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.91113%2032.623H33.0881'%20stroke='%235244A2'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9273'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",bb="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9289)'%3e%3cpath%20d='M27.3705%2010.9919C28.5405%2010.9919%2029.489%2010.0434%2029.489%208.87338C29.489%207.70337%2028.5405%206.75488%2027.3705%206.75488C26.2004%206.75488%2025.252%207.70337%2025.252%208.87338C25.252%2010.0434%2026.2004%2010.9919%2027.3705%2010.9919Z'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M30.3053%2017.2998V32.3098H24.4248V17.2998'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M27.3701%2032.31V23.3135'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M22.2305%2022.1925V17.642V15.6945C22.2305%2014.3075%2023.3515%2013.1865%2024.7385%2013.1865H29.9825C31.3695%2013.1865%2032.4905%2014.3075%2032.4905%2015.6945V17.642V22.1925'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.2519%2021.4229H18.6199C19.1044%2021.4229%2019.5034%2021.8219%2019.5034%2022.3064V24.4154H16.3779V22.3064C16.3779%2021.8219%2016.7769%2021.4229%2017.2614%2021.4229H17.2519Z'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.8339%2024.4062H15.0294C14.6254%2024.4062%2014.2979%2024.7338%2014.2979%2025.1377V31.6832C14.2979%2032.0872%2014.6254%2032.4147%2015.0294%2032.4147H20.8339C21.2378%2032.4147%2021.5654%2032.0872%2021.5654%2031.6832V25.1377C21.5654%2024.7338%2021.2378%2024.4062%2020.8339%2024.4062Z'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.8252%2027.1895V29.631'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.0391%2027.1895V29.631'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.71875%2014.1642H8.53075C9.03425%2014.1642%209.49025%2013.8602%209.68025%2013.4042L10.3263%2011.8652'%20stroke='%2342AAFF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.4991%205.54803L12.2266%2011.8655H17.5371L19.8836%205.51953L17.4991%205.54803Z'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M22.2017%2016.4639H6.57421C5.97571%2016.4639%205.49121%2015.9794%205.49121%2015.3809C5.49121%2013.4334%207.06821%2011.8564%209.01571%2011.8564H20.3492'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.56738%2032.4805H32.2909'%20stroke='%23204AA4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9289'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",xb="data:image/svg+xml,%3csvg%20width='38'%20height='38'%20viewBox='0%200%2038%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_127_9314)'%3e%3cpath%20d='M15.1807%2019.3994L18.7717%2029.7164'%20stroke='%23FF8CC3'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.9033%209.25293L12.6063%2011.2574C12.6063%2011.2574%2010.7443%2014.7724%2013.2618%2022.0209'%20stroke='%23FF8CC4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.9033%209.25293L12.6063%2011.2574C12.6063%2011.2574%2016.2448%2012.8534%2018.7718%2020.1019'%20stroke='%23FF8CC4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.8257%2016.71C22.2202%2012.112%2017.1947%209.67999%2012.5967%2011.276C7.99871%2012.8815%205.56671%2017.907%207.16271%2022.505L7.67571%2023.968L7.88471%2023.892C7.93221%2022.7235%208.67321%2021.6405%209.85121%2021.232C11.0292%2020.8235%2012.2737%2021.2035%2013.0432%2022.0965L13.4422%2021.954C13.4897%2020.7855%2014.2307%2019.7025%2015.4087%2019.294C16.5867%2018.8855%2017.8312%2019.2655%2018.6007%2020.1585L18.9997%2020.016C19.0472%2018.8475%2019.7882%2017.7645%2020.9662%2017.356C22.1442%2016.9475%2023.3887%2017.3275%2024.1582%2018.2205L24.3577%2018.154L23.8447%2016.691L23.8257%2016.71Z'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.37%2015.4193C23.636%2015.4858%2023.9115%2015.5238%2024.1965%2015.5238C26.068%2015.5238%2027.5785%2014.0038%2027.5785%2012.1418C27.5785%2010.2798%2026.0585%208.75977%2024.1965%208.75977C22.3345%208.75977%2020.8145%2010.2798%2020.8145%2012.1418'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M24.2061%206.12784V5.00684'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.8641%207.79018L19.1611%207.09668'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M28.5381%2016.4736L29.2411%2017.1766'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M30.21%2012.1318H31.331'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M28.5469%207.79018L29.2404%207.09668'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.3355%2029.8213H14.2305'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.2302%2029.8213L10.3447%2025.2803'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8527%2028.4531L7.76074%2032.9941'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.8447%2029.8213L27.4072%2032.9943'%20stroke='%239F2878'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_127_9314'%3e%3crect%20width='38'%20height='38'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Cb=({children:e})=>{const[t,r]=R.useState({x:0,y:0}),[n,o]=R.useState(!1),[a,i]=R.useState({x:0,y:0}),[s,l]=R.useState(!1),[c,u]=R.useState(!0),d=R.useRef(null),f=[{id:"overtime",title:"시간 외 근무신청",icon:_.jsxRuntimeExports.jsx("img",{src:yb,alt:"시간외근무신청",className:"quick-overtime"}),color:"#722ed1",onClick:()=>{console.log("시간 외 근무 신청 클릭")}},{id:"business-trip",title:"출장신청",icon:_.jsxRuntimeExports.jsx("img",{src:bb,alt:"출장신청",className:"quick-business-trip"}),color:"#1890ff",onClick:()=>{console.log("출장 신청 클릭")}},{id:"vacation",title:"휴가신청",icon:_.jsxRuntimeExports.jsx("img",{src:xb,alt:"휴가신청",className:"quick-holiday"}),color:"#eb2f96",onClick:()=>{console.log("휴가 신청 클릭")}},{id:"document",title:"문서신청",icon:_.jsxRuntimeExports.jsx(dt.FileTextOutlined,{}),color:"#52c41a",onClick:()=>{console.log("문서 신청 클릭")}},{id:"profile",title:"인사정보",icon:_.jsxRuntimeExports.jsx(dt.UserOutlined,{}),color:"#fa8c16",onClick:()=>{console.log("인사 정보 클릭")}},{id:"settings",title:"설정",icon:_.jsxRuntimeExports.jsx(dt.SettingOutlined,{}),color:"#13c2c2",onClick:()=>{console.log("설정 클릭")}}];R.useEffect(()=>{const m=()=>{const S=window.innerHeight,x=Math.max(64,(S-300)/3);r({x:0,y:x});const w=S/2;u(x<w)};return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const p=m=>{if(m.preventDefault(),m.stopPropagation(),d.current){const S=d.current.getBoundingClientRect();i({x:m.clientX-S.left,y:m.clientY-S.top}),o(!0)}},g=m=>{if(n){const S=m.clientY-a.y,$=window.innerHeight-24,w=Math.max(64,Math.min($,S));r({x:t.x,y:w});const C=window.innerHeight/2;u(w<C)}},y=()=>{o(!1)},h=()=>{l(!s)},b=m=>{m.onClick&&m.onClick()};return R.useEffect(()=>{if(n)return document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",y)}},[n,a]),_.jsxRuntimeExports.jsxs("div",{className:"quick-tab-container",ref:d,style:{position:"fixed",right:0,top:t.y,zIndex:1e3,userSelect:"none",touchAction:"none"},children:[_.jsxRuntimeExports.jsxs("div",{className:"quick-tab",style:{position:"absolute",right:"40px",top:c?0:"auto",bottom:c?"auto":0,display:"flex",flexDirection:"column",gap:"15px",border:"1px solid #E0DEEF",borderRadius:"15px",padding:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.3)",minWidth:"88px",maxWidth:"88px",maxHeight:c?`calc(100vh - ${t.y+12}px)`:`${t.y-12}px`,transform:s?"translateX(0)":"translateX(calc(100% + 100px))",transition:"transform 0.3s ease",marginTop:c&&t.y<100?"32px":"0",marginBottom:!c&&t.y>window.innerHeight-100?"8px":"0"},children:[_.jsxRuntimeExports.jsx("div",{className:"quick-tab-items-wrap",style:{background:"#ffffff",borderRadius:"10px",flex:1,overflowY:"auto",maxHeight:c?`calc(100vh - ${t.y+120}px)`:`${t.y-60}px`,padding:"14px 0"},children:f.map(m=>_.jsxRuntimeExports.jsx(Z.Card,{className:"quick-tab-items",size:"small",style:{border:"none",boxShadow:"none",marginBottom:"15px",cursor:"pointer",transition:"all 0.2s ease"},bodyStyle:{padding:"0"},onClick:()=>b(m),onMouseEnter:S=>{},onMouseLeave:S=>{},children:_.jsxRuntimeExports.jsxs("div",{className:"quick-tab-item-inner",children:[_.jsxRuntimeExports.jsx("div",{className:"quick-tab-items-icon",style:{width:"44px",height:"44px",borderRadius:"8PX",fontSize:"24px",color:m.color,marginBottom:"5px"},children:m.icon}),_.jsxRuntimeExports.jsx("div",{className:"quick-tab-items-title",children:m.title})]})},m.id))}),_.jsxRuntimeExports.jsx("div",{className:"quick-tab-add-btn",style:{height:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease",flexShrink:0,marginBottom:"7px"},onMouseEnter:m=>{},onMouseLeave:m=>{},children:_.jsxRuntimeExports.jsx(dt.PlusOutlined,{style:{color:"#CDC4FF",fontSize:"15px"}})})]}),_.jsxRuntimeExports.jsx("div",{className:"quick-tab-drag-btn",style:{cursor:n?"grabbing":"grab",zIndex:1001},onMouseDown:p}),_.jsxRuntimeExports.jsx(Z.Button,{className:`quick-tab-toggle-btn ${s?"expanded":""}`,type:"default",style:{border:"0",backgroundColor:"transparent"},onClick:h})]})},wb=()=>{const{verifyWithToken:e}=Ud.useAuth(),t=bs.useNavigate(),r=bs.useLocation();return R.useEffect(()=>{const o=new URLSearchParams(r.search).get("token");if(!o){t("/login",{replace:!0});return}(async()=>{const a=await e(o);t(a?"/main":"/login",{replace:!0})})()},[r.search]),_.jsxRuntimeExports.jsx("div",{style:{display:"grid",placeItems:"center",height:"100dvh"},children:_.jsxRuntimeExports.jsx(Z.Spin,{tip:"인증중..."})})};exports.BwgButtonGroup=Kd;exports.BwgCmptArea=Gd;exports.BwgCol=Yd;exports.BwgConfigProvider=xc;exports.BwgDrawer=lf;exports.BwgGrid=pf;exports.BwgInfoArea=bf;exports.BwgPopup=Cf;exports.BwgRow=wf;exports.BwgTable=Sf;exports.BwgTabs=Ef;exports.BwgTitleBox=zi;exports.BwgView=mb;exports.ContentBox=Bd;exports.ContentLayOut=Ho;exports.GlobalConfigProvider=pb;exports.QuickServiceToggle=Cb;exports.SSOHandler=wb;exports.SearchBox=Bi;exports.createBwgGridRenderer=yf;
|
|
184
|
-
//# sourceMappingURL=SSOHandler-
|
|
184
|
+
//# sourceMappingURL=SSOHandler-kghWABfM.cjs.map
|