@bwg-ui/core 1.3.6 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/chunks/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
  2. package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
  3. package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
  4. package/dist/chunks/{CMSearchIntfGwP01-BBdPmalj.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
  5. package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
  6. package/dist/chunks/{MenuReport-CYK_Eaqa.js → MenuReport-DgMjx5Hs.js} +5 -5
  7. package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
  8. package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
  9. package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
  10. package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
  11. package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
  12. package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
  13. package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
  14. package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
  15. package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
  16. package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
  17. package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
  18. package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
  19. package/dist/chunks/UploadMultiFileP01-Bf1qonGN.cjs +1 -0
  20. package/dist/chunks/UploadMultiFileP01-BgyIhfac.js +38 -0
  21. package/dist/chunks/{layout-components-gqu1pmfr.js → layout-components-Lyp9SZ7V.js} +1134 -1008
  22. package/dist/chunks/layout-components-NtKR0O6Y.cjs +38 -0
  23. package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
  24. package/dist/chunks/provider-ff4RVDYo.js +711 -0
  25. package/dist/components/common/ButtonAccessController.d.ts +2 -3
  26. package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
  27. package/dist/components/common/BwgButtonGroup.d.ts +1 -1
  28. package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
  29. package/dist/components/common/BwgCol.d.ts +1 -1
  30. package/dist/components/common/BwgCol.d.ts.map +1 -1
  31. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  32. package/dist/components/common/BwgModal.d.ts +10 -0
  33. package/dist/components/common/BwgModal.d.ts.map +1 -0
  34. package/dist/components/common/BwgView.d.ts.map +1 -1
  35. package/dist/components/common/index.cjs +1 -1
  36. package/dist/components/common/index.d.ts +1 -0
  37. package/dist/components/common/index.d.ts.map +1 -1
  38. package/dist/components/common/index.js +4887 -28
  39. package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
  40. package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
  41. package/dist/components/core/BwgDeptSearch.d.ts +38 -0
  42. package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
  43. package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
  44. package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
  45. package/dist/components/core/BwgEmpSearch.d.ts +12 -4
  46. package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
  47. package/dist/components/core/BwgUploader.d.ts +6 -92
  48. package/dist/components/core/BwgUploader.d.ts.map +1 -1
  49. package/dist/components/core/BwgUploader_bak.d.ts +98 -0
  50. package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
  51. package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
  52. package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
  53. package/dist/components/core/index.cjs +1 -1
  54. package/dist/components/core/index.d.ts +11 -2
  55. package/dist/components/core/index.d.ts.map +1 -1
  56. package/dist/components/core/index.js +1318 -1164
  57. package/dist/components/guide/index.cjs +1 -1
  58. package/dist/components/guide/index.js +17 -17
  59. package/dist/components/layout/AppWrapper.d.ts +5 -1
  60. package/dist/components/layout/AppWrapper.d.ts.map +1 -1
  61. package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
  62. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  63. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  64. package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
  65. package/dist/components/layout/index.cjs +1 -1
  66. package/dist/components/layout/index.js +1 -1
  67. package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
  68. package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
  69. package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
  70. package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
  71. package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
  72. package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
  73. package/dist/components/pages/auth/RoleView.d.ts +17 -0
  74. package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
  75. package/dist/components/pages/board/AdminBoard.d.ts +6 -0
  76. package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
  77. package/dist/components/pages/board/BoardComment.d.ts +8 -0
  78. package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
  79. package/dist/components/pages/board/MyBoard.d.ts +6 -0
  80. package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
  81. package/dist/components/pages/index.d.ts +9 -10
  82. package/dist/components/pages/index.d.ts.map +1 -1
  83. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
  84. package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
  85. package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
  86. package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
  87. package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
  88. package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
  89. package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
  90. package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
  91. package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
  92. package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
  93. package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
  94. package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
  95. package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
  96. package/dist/components/pages/types.d.ts +5 -1
  97. package/dist/components/pages/types.d.ts.map +1 -1
  98. package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
  99. package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
  100. package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
  101. package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
  102. package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
  103. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
  104. package/dist/components/popup/index.cjs +1 -1
  105. package/dist/components/popup/index.d.ts +1 -0
  106. package/dist/components/popup/index.d.ts.map +1 -1
  107. package/dist/components/popup/index.js +16 -8
  108. package/dist/index.cjs +185 -1
  109. package/dist/index.js +31237 -288
  110. package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
  111. package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
  112. package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
  113. package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
  114. package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
  115. package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
  116. package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
  117. package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
  118. package/dist/provider/contexts/PageContentContext.d.ts +23 -0
  119. package/dist/provider/contexts/PageContentContext.d.ts.map +1 -0
  120. package/dist/provider/contexts/index.d.ts +1 -0
  121. package/dist/provider/contexts/index.d.ts.map +1 -1
  122. package/dist/provider/hooks/index.d.ts +1 -0
  123. package/dist/provider/hooks/index.d.ts.map +1 -1
  124. package/dist/provider/hooks/useFileUploader.d.ts +74 -0
  125. package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
  126. package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
  127. package/dist/provider/index.cjs +1 -1
  128. package/dist/provider/index.d.ts +1 -0
  129. package/dist/provider/index.d.ts.map +1 -1
  130. package/dist/provider/index.js +22 -19
  131. package/dist/stores/codeStore.d.ts +65 -128
  132. package/dist/stores/codeStore.d.ts.map +1 -1
  133. package/dist/stores/index.cjs +2 -2
  134. package/dist/stores/index.d.ts +3 -3
  135. package/dist/stores/index.d.ts.map +1 -1
  136. package/dist/stores/index.js +815 -1625
  137. package/dist/stores/menuModelStore.d.ts +22 -7
  138. package/dist/stores/menuModelStore.d.ts.map +1 -1
  139. package/dist/stores/menuViewStore.d.ts +3 -3
  140. package/dist/stores/menuViewStore.d.ts.map +1 -1
  141. package/dist/stores/systemStore.d.ts +50 -17
  142. package/dist/stores/systemStore.d.ts.map +1 -1
  143. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  144. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  145. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  146. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  147. package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
  148. package/dist/styles/assets/images/menus/ico1-design.png +0 -0
  149. package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
  150. package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
  151. package/dist/styles/assets/images/menus/ico2-design.png +0 -0
  152. package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
  153. package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
  154. package/dist/styles/assets/images/menus/ico3-design.png +0 -0
  155. package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
  156. package/dist/utils/apiUtils.d.ts.map +1 -1
  157. package/dist/utils/commonUtils.d.ts +1 -2
  158. package/dist/utils/commonUtils.d.ts.map +1 -1
  159. package/dist/utils/index.cjs +1 -1
  160. package/dist/utils/index.d.ts +25 -25
  161. package/dist/utils/index.d.ts.map +1 -1
  162. package/dist/utils/index.js +980 -1967
  163. package/dist/utils/messageUtils.d.ts +36 -48
  164. package/dist/utils/messageUtils.d.ts.map +1 -1
  165. package/dist/utils/modalUtils.d.ts +68 -0
  166. package/dist/utils/modalUtils.d.ts.map +1 -0
  167. package/dist/utils/notificationUtils.d.ts +50 -41
  168. package/dist/utils/notificationUtils.d.ts.map +1 -1
  169. package/dist/utils/serviceConfig.d.ts +9 -3
  170. package/dist/utils/serviceConfig.d.ts.map +1 -1
  171. package/package.json +5 -5
  172. package/dist/chunks/CMSearchIntfGwP01-Cs78BtE7.cjs +0 -1
  173. package/dist/chunks/MenuReport-BCO-gXwk.cjs +0 -1
  174. package/dist/chunks/common-components-C61ER0qC.js +0 -52599
  175. package/dist/chunks/common-components-mXgJEMpT.cjs +0 -1109
  176. package/dist/chunks/layout-components-D7I6VhXN.cjs +0 -38
  177. package/dist/chunks/provider-Kxea5IoZ.js +0 -449
  178. package/dist/chunks/provider-r4mkv5Zs.cjs +0 -1
  179. package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
  180. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
  181. package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
  182. package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
  183. package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
  184. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
  185. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
  186. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
  187. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
  188. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
  189. package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
  190. package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
  191. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
  192. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
  193. package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
  194. package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),p=require("antd"),k=require("@ant-design/icons"),q=require("../stores/index.cjs"),u=require("../components/common/index.cjs"),T=require("../components/core/index.cjs");function L(o){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const f=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(d,l,f.get?f:{enumerable:!0,get:()=>o[l]})}}return d.default=o,Object.freeze(d)}const R=L(k),N=({popup:o})=>{const d=s.useRef(null),[l,f]=s.useState(""),{menuList:x}=q.useMenuModelStore(),[y,v]=s.useState(void 0),[b,P]=s.useState(null),C=s.useCallback(n=>{const e=[],r=c=>{c.forEach(i=>{i.children&&i.children.length>0&&(e.push(i.menuId),r(i.children))})};return r(n),e},[]),[O,j]=s.useState(()=>C([])),M=s.useCallback((n,e,r)=>{const c=(e||"").trim().toLowerCase(),i=h=>{const a=!c||h.menuNm?.toLowerCase().includes(c)||h.menuId?.toLowerCase().includes(c),m=!r||h.sysCd===r;return a&&m},I=h=>h.map(a=>{const m=a.children?I(a.children):[];return i(a)||m.length>0?{...a,children:m}:null}).filter(Boolean);return I(n||[])},[]),g=s.useMemo(()=>M(x,l,y),[x,l,y,M]),S=s.useCallback(n=>n.map(e=>({key:e.menuId,label:t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(!e.children||e.children.length===0)&&t.jsx(p.Tag,{color:"blue",style:{margin:0},children:e.menuId}),t.jsx("span",{children:e.menuNm})]}),children:e.children&&e.children.length>0?S(e.children):void 0,icon:K(e.iconCd,e.menuGbCd)})),[]),K=(n,e)=>{if(n){const r=R[n];if(r)return t.jsx(r,{})}if(e)switch(e){case"CMPRGRM":return t.jsx(R.HomeOutlined,{});case"CMPRGRS":return null;case"CMPRGRP":return null;default:return null}return null},w=s.useCallback((n,e)=>{for(const r of n){if(r.menuId===e)return r;if(r.children&&r.children.length>0){const c=w(r.children,e);if(c)return c}}return null},[]);s.useEffect(()=>{l&&j(C(g))},[l,g,C]);const B=[{id:"confirm",label:"확인",onClick:()=>{if(!b)return;const n=w(g,b);n&&(o?.config?.callback?.({menuId:n.menuId,menuNm:n.menuNm}),o?.close?.())}}];return t.jsx(u.BwgPopup,{popup:o,buttons:B,children:t.jsx(u.ContentLayOut,{children:t.jsxs(u.ContentBox,{border:!1,children:[t.jsx(u.SearchBox,{ref:d,reqRows:t.jsx(t.Fragment,{children:t.jsxs(u.BwgRow,{gutter:[12,8],style:{marginBottom:"8px"},children:[t.jsx(u.BwgCol,{span:8,children:t.jsx(T.BwgSelect,{itemProps:{name:"sysCd",label:"시스템 코드"},selectProps:{options:[{label:"공통",value:"CM"},{label:"K-ERP",value:"KE"},{label:"K-HR",value:"HR"},{label:"K-업무지원",value:"KS"}],onChange:n=>v(n),placeholder:"전체"}})}),t.jsx(u.BwgCol,{span:8,children:t.jsx(p.Input,{placeholder:"메뉴 이름, ID 검색",prefix:t.jsx(k.SearchOutlined,{}),value:l,allowClear:!0,onChange:n=>{f(n.target.value)}})})]})})}),t.jsx(p.Menu,{mode:"inline",theme:"light",items:S(g),openKeys:O,onOpenChange:j,onClick:({key:n})=>{P(String(n))},style:{overflow:"auto"}})]})})})};exports.default=N;
@@ -0,0 +1,154 @@
1
+ import { jsxs as g, jsx as t, Fragment as L } from "react/jsx-runtime";
2
+ import { useRef as T, useState as d, useCallback as h, useMemo as E, useEffect as N } from "react";
3
+ import { Input as G, Menu as H, Tag as j } from "antd";
4
+ import * as v from "@ant-design/icons";
5
+ import { SearchOutlined as q } from "@ant-design/icons";
6
+ import { useMenuModelStore as A } from "../stores/index.js";
7
+ import { BwgPopup as D, ContentLayOut as F, ContentBox as z, SearchBox as J, BwgRow as Q, BwgCol as K } from "../components/common/index.js";
8
+ import { BwgSelect as U } from "../components/core/index.js";
9
+ const ne = ({ popup: f }) => {
10
+ const P = T(null), [c, S] = d(""), { menuList: p } = A(), [C, k] = d(void 0), [y, x] = d(null), m = h((n) => {
11
+ const e = [], r = (l) => {
12
+ l.forEach((o) => {
13
+ o.children && o.children.length > 0 && (e.push(o.menuId), r(o.children));
14
+ });
15
+ };
16
+ return r(n), e;
17
+ }, []), [B, I] = d(
18
+ () => m([])
19
+ ), M = h(
20
+ (n, e, r) => {
21
+ const l = (e || "").trim().toLowerCase(), o = (i) => {
22
+ const s = !l || i.menuNm?.toLowerCase().includes(l) || i.menuId?.toLowerCase().includes(l), a = !r || i.sysCd === r;
23
+ return s && a;
24
+ }, R = (i) => i.map((s) => {
25
+ const a = s.children ? R(s.children) : [];
26
+ return o(s) || a.length > 0 ? { ...s, children: a } : null;
27
+ }).filter(Boolean);
28
+ return R(n || []);
29
+ },
30
+ []
31
+ ), u = E(
32
+ () => M(p, c, C),
33
+ [p, c, C, M]
34
+ ), w = h((n) => n.map((e) => ({
35
+ key: e.menuId,
36
+ label: /* @__PURE__ */ g(
37
+ "div",
38
+ {
39
+ style: {
40
+ display: "flex",
41
+ alignItems: "center",
42
+ gap: "8px"
43
+ },
44
+ children: [
45
+ (!e.children || e.children.length === 0) && /* @__PURE__ */ t(j, { color: "blue", style: { margin: 0 }, children: e.menuId }),
46
+ /* @__PURE__ */ t("span", { children: e.menuNm })
47
+ ]
48
+ }
49
+ ),
50
+ children: e.children && e.children.length > 0 ? w(e.children) : void 0,
51
+ icon: O(e.iconCd, e.menuGbCd)
52
+ })), []), O = (n, e) => {
53
+ if (n) {
54
+ const r = v[n];
55
+ if (r)
56
+ return /* @__PURE__ */ t(r, {});
57
+ }
58
+ if (e)
59
+ switch (e) {
60
+ case "CMPRGRM":
61
+ return /* @__PURE__ */ t(v.HomeOutlined, {});
62
+ case "CMPRGRS":
63
+ return null;
64
+ case "CMPRGRP":
65
+ return null;
66
+ default:
67
+ return null;
68
+ }
69
+ return null;
70
+ }, b = h((n, e) => {
71
+ for (const r of n) {
72
+ if (r.menuId === e)
73
+ return r;
74
+ if (r.children && r.children.length > 0) {
75
+ const l = b(r.children, e);
76
+ if (l) return l;
77
+ }
78
+ }
79
+ return null;
80
+ }, []);
81
+ return N(() => {
82
+ c && I(m(u));
83
+ }, [c, u, m]), /* @__PURE__ */ t(D, { popup: f, buttons: [
84
+ {
85
+ id: "confirm",
86
+ label: "확인",
87
+ onClick: () => {
88
+ if (!y) return;
89
+ const n = b(u, y);
90
+ n && (f?.config?.callback?.({
91
+ menuId: n.menuId,
92
+ menuNm: n.menuNm
93
+ }), f?.close?.());
94
+ }
95
+ }
96
+ ], children: /* @__PURE__ */ t(F, { children: /* @__PURE__ */ g(z, { border: !1, children: [
97
+ /* @__PURE__ */ t(
98
+ J,
99
+ {
100
+ ref: P,
101
+ reqRows: /* @__PURE__ */ t(L, { children: /* @__PURE__ */ g(Q, { gutter: [12, 8], style: { marginBottom: "8px" }, children: [
102
+ /* @__PURE__ */ t(K, { span: 8, children: /* @__PURE__ */ t(
103
+ U,
104
+ {
105
+ itemProps: {
106
+ name: "sysCd",
107
+ label: "시스템 코드"
108
+ },
109
+ selectProps: {
110
+ options: [
111
+ { label: "공통", value: "CM" },
112
+ { label: "K-ERP", value: "KE" },
113
+ { label: "K-HR", value: "HR" },
114
+ { label: "K-업무지원", value: "KS" }
115
+ ],
116
+ onChange: (n) => k(n),
117
+ placeholder: "전체"
118
+ }
119
+ }
120
+ ) }),
121
+ /* @__PURE__ */ t(K, { span: 8, children: /* @__PURE__ */ t(
122
+ G,
123
+ {
124
+ placeholder: "메뉴 이름, ID 검색",
125
+ prefix: /* @__PURE__ */ t(q, {}),
126
+ value: c,
127
+ allowClear: !0,
128
+ onChange: (n) => {
129
+ S(n.target.value);
130
+ }
131
+ }
132
+ ) })
133
+ ] }) })
134
+ }
135
+ ),
136
+ /* @__PURE__ */ t(
137
+ H,
138
+ {
139
+ mode: "inline",
140
+ theme: "light",
141
+ items: w(u),
142
+ openKeys: B,
143
+ onOpenChange: I,
144
+ onClick: ({ key: n }) => {
145
+ x(String(n));
146
+ },
147
+ style: { overflow: "auto" }
148
+ }
149
+ )
150
+ ] }) }) });
151
+ };
152
+ export {
153
+ ne as default
154
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),U=require("@ant-design/icons"),L=require("antd"),o=require("react"),p=require("dayjs"),l=require("../components/common/index.cjs"),h=require("../components/core/index.cjs"),F=require("../utils/index.cjs"),W=[{label:"전체",value:""},{label:"기안",value:"DRAFT"},{label:"결재중",value:"IN_PROGRESS"},{label:"승인",value:"APPROVED"},{label:"반려",value:"REJECTED"}],Y=({popup:i,onClose:G})=>{const D=o.useRef(null),P=o.useRef(null),B=o.useRef(null),[j,v]=o.useState([]),[k,A]=o.useState(!1),[m,N]=o.useState(null),[I,E]=o.useState(1),[C,M]=o.useState(10),[K,O]=o.useState(0),T=o.useMemo(()=>{const a=p(),c=[];for(let s=1;s<=120;s++){const n=["DRAFT","IN_PROGRESS","APPROVED","REJECTED"];c.push({gwDcmtKey:`GW-${String(1e4+s)}`,gwDcmtNm:`업무 기안서 #${s}`,userId:`user${s%7+1}`,dprtNo:["HR","GEN","DEV1","DEV2","FIN"][s%5],aprvStts:n[s%n.length],aprvKey:F.generateUID(),createdAt:a.add(-(s%45),"day").hour(9+s%8).toISOString()})}return c},[]),w=o.useCallback(async(a,c)=>{A(!0),N(null);try{const s=B.current?.getFormData?.()??{},n=a??I,f=c??C,u={...s,page:n,pageSize:f},y=i?.popupParams?.serviceCode;if(y){const r=await F.callService(y,u),d=(r?.list||r?.data||[]).map(t=>({gwDcmtKey:t.gwDcmtKey??t.docNo??t.doc_id??t.id??"",gwDcmtNm:t.gwDcmtNm??t.title??t.subject??"",userId:t.userId??t.drafter??t.writerName??"",dprtNo:t.dprtNo??t.deptName??t.department??"",aprvStts:t.aprvStts??t.status??"DRAFT",createdAt:t.createdAt??t.writeYmd??t.created_at??"",aprvKey:t.aprvKey??void 0}));v(d),O(Number(r?.totalCount??r?.total??d.length));return}const S=T.filter(r=>{const d=u.keyword?.trim()?.toLowerCase(),t=!d||r.gwDcmtKey.toLowerCase().includes(d)||r.gwDcmtNm.toLowerCase().includes(d)||r.userId.toLowerCase().includes(d)||r.dprtNo.toLowerCase().includes(d),R=!u.status||r.aprvStts===u.status,g=u.createdAt,H=!g||(p(r.createdAt).isAfter(g[0].startOf("day"))||p(r.createdAt).isSame(g[0],"day"))&&(p(r.createdAt).isBefore(g[1].endOf("day"))||p(r.createdAt).isSame(g[1],"day"));return t&&R&&H});O(S.length);const x=(n-1)*f,$=S.slice(x,x+f);v($)}catch{L.message.error("목록 조회 중 오류가 발생했습니다.")}finally{A(!1)}},[I,C,i?.popupParams,T]);o.useEffect(()=>{w()},[]);const q=o.useCallback(()=>{E(1),w(1,C)},[w,C]),z=o.useCallback((a,c)=>{E(a),M(c),w(a,c)},[w]),b=o.useCallback(()=>{if(!m){L.message.warning("항목을 선택해주세요.");return}const a=i?.config;a?.onSelect?a.onSelect(m):i?.popupParams?.onSelect?i.popupParams.onSelect(m):i?.config?.callback&&i.config.callback(m),a?.onClose?.(),i?.close?.()},[m,i]),J=o.useMemo(()=>[{fieldName:"gwDcmtKey",name:"gwDcmtKey",header:{text:"문서번호"},width:140},{fieldName:"gwDcmtNm",name:"gwDcmtNm",header:{text:"제목"},width:260,button:"action"},{fieldName:"userId",name:"userId",header:{text:"기안자"},width:120},{fieldName:"aprvKey",name:"aprvKey",header:{text:"기안연계키값"},width:120},{fieldName:"dprtNo",name:"dprtNo",header:{text:"기안부서"},width:140},{fieldName:"aprvStts",name:"aprvStts",header:{text:"상태"},width:110},{fieldName:"createdAt",name:"createdAt",header:{text:"기안일"},width:160}],[]),_=o.useMemo(()=>({header:{height:40},display:{rowHeight:36},container:{indicator:!0,check:!1,footer:!1},edit:{editable:!1}}),[]),V=o.useMemo(()=>({onCellClicked:(a,c)=>{try{const s=c?.itemIndex??c?.dataRow??-1;if(s<0)return;const n=a.getDataSource()?.getJsonRow(s);n&&N(n)}catch{}},onCellDblClicked:(a,c)=>{try{const s=c?.itemIndex??c?.dataRow??-1;if(s<0)return;const n=a.getDataSource()?.getJsonRow(s);n&&(N(n),setTimeout(()=>b(),0))}catch{}},onCellButtonClicked(a,c,s){if(c.dataRow===void 0)return;let n=a.getDataSource().getJsonRow(c.dataRow);const f="https://kgwd.krx.co.kr/ezConn/ezApprGate.do",u="width=1000,height=600";console.log(n);const y=n?.dprtNo,S=n?.emplNo,x=n?.aprvKey,r=`${n?.formId}:${y}:${S}:${x}:SAMP`;console.log("@@ params",r);const d=new TextEncoder().encode(r),t=Array.from(d,g=>String.fromCharCode(g)).join(""),R=`${f}?connkey=${btoa(t)}`;console.log("@@ url",R),window.open(R,"_blank",u)}}),[b]);return o.useEffect(()=>{D.current&&D.current.addAllData(j||[])},[j]),o.useEffect(()=>{P.current&&P.current.setTotalData(K||0)},[K]),e.jsx(l.BwgPopup,{popup:i,buttons:[{id:"confirm",label:"확인",type:"primary",onClick:b}],onClose:()=>{i?.config?.onClose?.(),G?.(),i?.close?.()},children:e.jsx(l.ContentLayOut,{children:e.jsxs(l.ContentBox,{border:!1,style:{paddingBottom:16},children:[e.jsx(l.SearchBox,{ref:B,reqRows:e.jsx(e.Fragment,{children:e.jsx(l.BwgRow,{children:e.jsxs(l.BwgCol,{span:24,children:[e.jsx(l.BwgTitleBox,{title:"기안 검색"}),e.jsxs(l.BwgRow,{gutter:[12,8],style:{marginTop:8},children:[e.jsx(l.BwgCol,{span:8,children:e.jsx(h.BwgInput,{inputProps:{placeholder:"제목/기안자/부서/문서번호",prefix:e.jsx(U.SearchOutlined,{}),allowClear:!0,onPressEnter:q},itemProps:{name:"keyword"}})}),e.jsx(l.BwgCol,{span:6,children:e.jsx(h.BwgSelect,{selectProps:{options:W},itemProps:{label:"상태",name:"status"}})}),e.jsxs(l.BwgCol,{span:8,children:[e.jsx(h.BwgRangePicker,{type:"datetime",itemProps:{label:"기안일",name:"createdAt"},inputProps:{style:{width:"100%"},allowEmpty:[!1,!1]}}),e.jsx(h.BwgRangePicker,{type:"datetime",itemProps:{label:"기안완료일",name:"completedAt"},inputProps:{style:{width:"100%"},allowEmpty:[!1,!1]}})]}),e.jsx(l.BwgCol,{span:2,children:e.jsx(h.BwgButton,{type:"primary",onClick:q,loading:k,style:{width:"100%"},children:"검색"})})]})]})})})}),e.jsx(l.BwgGrid,{ref:D,type:"nrml",gridColumns:J,gridOptions:_,gridEvents:V}),e.jsx(l.BwgPagination,{ref:P,mode:"server",onServerPageChange:z,pageSizeOptions:[10,20,50,100]}),j.length===0&&!k&&e.jsx(l.BwgRow,{style:{display:"none"},children:e.jsx(l.BwgCol,{span:24,children:e.jsx("span",{})})})]})})})};exports.default=Y;
@@ -3,7 +3,7 @@ import { SearchOutlined as ee } from "@ant-design/icons";
3
3
  import { message as V } from "antd";
4
4
  import { useRef as x, useState as m, useMemo as N, useCallback as R, useEffect as B } from "react";
5
5
  import p from "dayjs";
6
- import { m as te, C as ae, d as oe, S as re, i as E, j as g, e as ne, h as se, n as ce } from "./common-components-C61ER0qC.js";
6
+ import { BwgPopup as te, ContentLayOut as oe, ContentBox as ae, SearchBox as re, BwgRow as E, BwgCol as g, BwgTitleBox as ne, BwgGrid as se, BwgPagination as ce } from "../components/common/index.js";
7
7
  import { BwgInput as le, BwgSelect as de, BwgRangePicker as M, BwgButton as ie } from "../components/core/index.js";
8
8
  import { generateUID as me, callService as ge } from "../utils/index.js";
9
9
  const fe = [
@@ -13,9 +13,9 @@ const fe = [
13
13
  { label: "승인", value: "APPROVED" },
14
14
  { label: "반려", value: "REJECTED" }
15
15
  ], Pe = ({ popup: c, onClose: H }) => {
16
- const v = x(null), b = x(null), K = x(null), [A, O] = m([]), [T, $] = m(!1), [f, I] = m(null), [L, F] = m(1), [h, U] = m(10), [G, j] = m(0), z = N(() => {
17
- const o = p(), s = [];
18
- for (let a = 1; a <= 120; a++) {
16
+ const v = x(null), b = x(null), K = x(null), [A, O] = m([]), [T, $] = m(!1), [f, I] = m(null), [L, F] = m(1), [h, U] = m(10), [G, z] = m(0), j = N(() => {
17
+ const a = p(), s = [];
18
+ for (let o = 1; o <= 120; o++) {
19
19
  const r = [
20
20
  "DRAFT",
21
21
  "IN_PROGRESS",
@@ -23,21 +23,21 @@ const fe = [
23
23
  "REJECTED"
24
24
  ];
25
25
  s.push({
26
- gwDcmtKey: `GW-${String(1e4 + a)}`,
27
- gwDcmtNm: `업무 기안서 #${a}`,
28
- userId: `user${a % 7 + 1}`,
29
- dprtNo: ["HR", "GEN", "DEV1", "DEV2", "FIN"][a % 5],
30
- aprvStts: r[a % r.length],
26
+ gwDcmtKey: `GW-${String(1e4 + o)}`,
27
+ gwDcmtNm: `업무 기안서 #${o}`,
28
+ userId: `user${o % 7 + 1}`,
29
+ dprtNo: ["HR", "GEN", "DEV1", "DEV2", "FIN"][o % 5],
30
+ aprvStts: r[o % r.length],
31
31
  aprvKey: me(),
32
- createdAt: o.add(-(a % 45), "day").hour(9 + a % 8).toISOString()
32
+ createdAt: a.add(-(o % 45), "day").hour(9 + o % 8).toISOString()
33
33
  });
34
34
  }
35
35
  return s;
36
36
  }, []), u = R(
37
- async (o, s) => {
37
+ async (a, s) => {
38
38
  $(!0), I(null);
39
39
  try {
40
- const a = K.current?.getFormData?.() ?? {}, r = o ?? L, w = s ?? h, d = { ...a, page: r, pageSize: w }, y = c?.popupParams?.serviceCode;
40
+ const o = K.current?.getFormData?.() ?? {}, r = a ?? L, w = s ?? h, d = { ...o, page: r, pageSize: w }, y = c?.popupParams?.serviceCode;
41
41
  if (y) {
42
42
  const n = await ge(y, d), l = (n?.list || n?.data || []).map(
43
43
  (e) => ({
@@ -50,14 +50,14 @@ const fe = [
50
50
  aprvKey: e.aprvKey ?? void 0
51
51
  })
52
52
  );
53
- O(l), j(Number(n?.totalCount ?? n?.total ?? l.length));
53
+ O(l), z(Number(n?.totalCount ?? n?.total ?? l.length));
54
54
  return;
55
55
  }
56
- const C = z.filter((n) => {
56
+ const C = j.filter((n) => {
57
57
  const l = d.keyword?.trim()?.toLowerCase(), e = !l || n.gwDcmtKey.toLowerCase().includes(l) || n.gwDcmtNm.toLowerCase().includes(l) || n.userId.toLowerCase().includes(l) || n.dprtNo.toLowerCase().includes(l), D = !d.status || n.aprvStts === d.status, i = d.createdAt, X = !i || (p(n.createdAt).isAfter(i[0].startOf("day")) || p(n.createdAt).isSame(i[0], "day")) && (p(n.createdAt).isBefore(i[1].endOf("day")) || p(n.createdAt).isSame(i[1], "day"));
58
58
  return e && D && X;
59
59
  });
60
- j(C.length);
60
+ z(C.length);
61
61
  const S = (r - 1) * w, _ = C.slice(S, S + w);
62
62
  O(_);
63
63
  } catch {
@@ -66,7 +66,7 @@ const fe = [
66
66
  $(!1);
67
67
  }
68
68
  },
69
- [L, h, c?.popupParams, z]
69
+ [L, h, c?.popupParams, j]
70
70
  );
71
71
  B(() => {
72
72
  u();
@@ -74,8 +74,8 @@ const fe = [
74
74
  const J = R(() => {
75
75
  F(1), u(1, h);
76
76
  }, [u, h]), q = R(
77
- (o, s) => {
78
- F(o), U(s), u(o, s);
77
+ (a, s) => {
78
+ F(a), U(s), u(a, s);
79
79
  },
80
80
  [u]
81
81
  ), k = R(() => {
@@ -83,8 +83,8 @@ const fe = [
83
83
  V.warning("항목을 선택해주세요.");
84
84
  return;
85
85
  }
86
- const o = c?.config;
87
- o?.onSelect ? o.onSelect(f) : c?.popupParams?.onSelect ? c.popupParams.onSelect(f) : c?.config?.callback && c.config.callback(f), o?.onClose?.(), c?.close?.();
86
+ const a = c?.config;
87
+ a?.onSelect ? a.onSelect(f) : c?.popupParams?.onSelect ? c.popupParams.onSelect(f) : c?.config?.callback && c.config.callback(f), a?.onClose?.(), c?.close?.();
88
88
  }, [f, c]), W = N(
89
89
  () => [
90
90
  {
@@ -142,27 +142,27 @@ const fe = [
142
142
  []
143
143
  ), Q = N(
144
144
  () => ({
145
- onCellClicked: (o, s) => {
145
+ onCellClicked: (a, s) => {
146
146
  try {
147
- const a = s?.itemIndex ?? s?.dataRow ?? -1;
148
- if (a < 0) return;
149
- const r = o.getDataSource()?.getJsonRow(a);
147
+ const o = s?.itemIndex ?? s?.dataRow ?? -1;
148
+ if (o < 0) return;
149
+ const r = a.getDataSource()?.getJsonRow(o);
150
150
  r && I(r);
151
151
  } catch {
152
152
  }
153
153
  },
154
- onCellDblClicked: (o, s) => {
154
+ onCellDblClicked: (a, s) => {
155
155
  try {
156
- const a = s?.itemIndex ?? s?.dataRow ?? -1;
157
- if (a < 0) return;
158
- const r = o.getDataSource()?.getJsonRow(a);
156
+ const o = s?.itemIndex ?? s?.dataRow ?? -1;
157
+ if (o < 0) return;
158
+ const r = a.getDataSource()?.getJsonRow(o);
159
159
  r && (I(r), setTimeout(() => k(), 0));
160
160
  } catch {
161
161
  }
162
162
  },
163
- onCellButtonClicked(o, s, a) {
163
+ onCellButtonClicked(a, s, o) {
164
164
  if (s.dataRow === void 0) return;
165
- let r = o.getDataSource().getJsonRow(s.dataRow);
165
+ let r = a.getDataSource().getJsonRow(s.dataRow);
166
166
  const w = "https://kgwd.krx.co.kr/ezConn/ezApprGate.do", d = "width=1000,height=600";
167
167
  console.log(r);
168
168
  const y = r?.dprtNo, C = r?.emplNo, S = r?.aprvKey, n = `${r?.formId}:${y}:${C}:${S}:SAMP`;
@@ -190,7 +190,7 @@ const fe = [
190
190
  onClose: () => {
191
191
  c?.config?.onClose?.(), H?.(), c?.close?.();
192
192
  },
193
- children: /* @__PURE__ */ t(ae, { children: /* @__PURE__ */ P(oe, { border: !1, style: { paddingBottom: 16 }, children: [
193
+ children: /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ P(ae, { border: !1, style: { paddingBottom: 16 }, children: [
194
194
  /* @__PURE__ */ t(
195
195
  re,
196
196
  {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),I=require("@ant-design/icons"),t=require("antd"),he=require("dayjs"),l=require("react"),G=require("../stores/index.cjs"),f=require("../components/common/index.cjs"),h=require("../utils/index.cjs"),n=require("../components/core/index.cjs"),ge=require("./provider-DrmM0H4o.cjs"),{TextArea:fe}=t.Input,F=[{label:"전체",value:""},{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],je={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},Q=[{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],ye={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},W={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},Ie=({popup:S,onClose:O})=>{const{searchBoxRef:y}=ge.useSearchBox(),b=l.useRef(null),N=l.useRef(null),{user:C,hrInfo:H}=G.useUserStore(),{activeMenuItem:o}=G.useMenuViewStore(),[i]=t.Form.useForm(),[z,U]=l.useState(!1),[L,V]=l.useState(!1),[D,J]=l.useState(!1),[g,$]=l.useState(!1),[d,w]=l.useState(!1),[c,j]=l.useState("list");l.useState(null);const M=l.useRef(null),[R,A]=l.useState([]),[B,Y]=l.useState(""),[E]=l.useState(!1),[K,P]=l.useState(15),T=l.useRef(null),X=l.useMemo(()=>h.createBwgGridRenderer((r,s,a,u,p)=>{const x=r.getValue(s.index?.itemIndex,"type");p.render(e.jsx(t.Tag,{color:je[x],children:F.find(v=>v.value===x)?.label}))}),[]),Z=l.useMemo(()=>h.createBwgGridRenderer((r,s,a,u,p)=>{const x=r.getValue(s.index?.itemIndex,"status");p.render(e.jsx(t.Tag,{color:ye[x],children:Q.find(v=>v.value===x)?.label}))}),[]),_=l.useMemo(()=>h.createBwgGridRenderer((r,s,a,u,p)=>{r.getValue(s.index?.itemIndex,"urgentYn")==="Y"?p.render(e.jsx(I.AlertTwoTone,{twoToneColor:"red"})):p.render(e.jsx(e.Fragment,{}))}),[]),ee=[{fieldName:"boardMstrId",header:{text:"글 번호"},width:80},{name:"type",fieldName:"type",header:{text:"등록구분"},width:80,renderer:"tagType"},{fieldName:"title",header:{text:"제목"},width:200,styleName:"left"},{fieldName:"content",header:{text:"내용"},width:200,visible:!1},{name:"status",fieldName:"status",header:{text:"상태"},width:80,renderer:"statusTag"},{fieldName:"rgstUserId",visible:!1},{fieldName:"rgstUserNm",header:{text:"작성자"},width:100,styleName:"left"},{fieldName:"rgstUserDeptNm",visible:!1},{fieldName:"rgstDt",header:{text:"등록일자"},width:120,textFormat:h.realFormat.formatYmd,styleName:"right"},{fieldName:"dueDt",header:{text:"마감요청일자"},width:120,textFormat:h.realFormat.formatYmd,styleName:"right"},{fieldName:"urgentYn",header:{text:"긴급여부"},width:80,renderer:"alert"},{fieldName:"prcsUserId",visible:!1},{fieldName:"prcsUserNm",header:{text:"처리담당자"},width:100,styleName:"left"},{fieldName:"prcsUserDeptNm",visible:!1},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,textFormat:h.realFormat.formatYmd,styleName:"right"},{fieldName:"scrnId",header:{text:"화면ID"},width:100,visible:!1},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,visible:!1}],te={onCellDblClicked:(r,s)=>{const a=s.itemIndex??-1;if(a<0)return;const u=r.getValues(a);console.log("🔍 그리드 셀 더블클릭 이벤트:",u);const p={...u,menuId:o?.menuId,menuNm:o?.menuNm,scrnId:o?.scrnId};i.setFieldsValue(p),J(p.rgstUserId===C?.userId),$(p.status==="COMPLETED"||p.status==="REJECTED"),j("detail")}},k=()=>{i.resetFields(),j("list"),y?.current?.setFormData({menuId:o?.menuId,menuNm:o?.menuNm}),m.SCMBoardMstr0001(1,20)},q=async r=>{U(!0);try{i.validateFields().then(s=>{console.log("문의/신고 제출:",s),c==="new"?m.SCMBoardMstr0003(s):c==="detail"&&m.SCMBoardMstr0004(s)})}catch(s){console.error("문의/신고 제출 실패:",s)}finally{U(!1)}},re=()=>{m.SCMBoardMstr0005()},se=()=>{y?.current?.resetForm(),i.resetFields(),c==="new"?j("list"):(j("list"),O?.())},le=()=>{y?.current?.resetForm(),i.resetFields(),j("list"),O?.()},ne=()=>{(c==="detail"||c==="new")&&j("list")},ie=()=>{i.resetFields(),j("new")},ae=()=>{console.log("댓글 수동 새로고침"),P(15)},oe=()=>{if(!B.trim()){t.message.warning("댓글 상세내용 작성");return}m.SCMBoardDtls0002(i.getFieldValue("boardMstrId"),B.trim()),Y(""),setTimeout(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},100)},de=r=>{const s=R.find(a=>a.id===r);if(s&&s.regUserId!==C?.userId){t.message.error("본인이 작성한 댓글만 삭제할 수 있습니다.");return}m.SCMBoardDtls0003(i.getFieldValue("boardMstrId"),r)};l.useEffect(()=>{S&&setTimeout(()=>{m.SCMBoardMstr0001(1,20)},100)},[S]);const ce=()=>e.jsxs(f.ContentBox,{border:!1,children:[e.jsx(f.SearchBox,{border:!0,ref:y,reqRows:e.jsxs(e.Fragment,{children:[e.jsx(t.Row,{gutter:[16,8],style:{marginBottom:"8px"},children:e.jsx(t.Col,{span:24,children:e.jsx(n.BwgFormItem,{label:"화면 정보",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{disabled:!0})}),e.jsx(t.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{disabled:!0})})]})})})}),e.jsxs(t.Row,{gutter:[16,8],style:{marginBottom:"8px"},children:[e.jsx(t.Col,{span:6,children:e.jsx(n.BwgSelect,{itemProps:{label:"등록구분",name:"type"},selectProps:{options:F}})}),e.jsx(t.Col,{span:12,children:e.jsx(n.BwgRangePicker,{itemProps:{label:"등록일자",name:"rgstDt"},inputProps:{allowEmpty:!0}})}),e.jsx(t.Col,{span:6,children:e.jsx(n.BwgSwitch,{itemProps:{name:"myArticle",label:"내 글만"},inputProps:{format:"YN",onChange:()=>console.log("hello!!")}})})]}),e.jsx(t.Row,{children:e.jsx(t.Col,{span:24,children:e.jsx(n.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})})]})}),e.jsx(f.BwgGrid,{ref:T,gridColumns:ee,gridEvents:te,gridOptions:{},renderers:[{name:"tagType",renderer:X},{name:"statusTag",renderer:Z},{name:"alert",renderer:_}]}),e.jsx(f.BwgPagination,{ref:b,mode:"server",onServerPageChange:(r,s)=>{console.log("🔄 서버 모드 페이징 변경:",{page:r,size:s}),m.SCMBoardMstr0001(r,s)},pageSizeOptions:[10,20,50,100]})]}),me=()=>e.jsxs(t.Splitter,{children:[e.jsx(t.Splitter.Panel,{defaultSize:"70%",min:"60%",max:"80%",style:{paddingRight:"15px",overflowX:"hidden",overflowY:"hidden"},children:e.jsx(f.ContentBox,{children:e.jsxs(t.Form,{form:i,onFinish:q,labelCol:{flex:"100px"},disabled:!D||g,children:[e.jsxs(t.Row,{gutter:[16,8],children:[e.jsxs(t.Col,{span:8,children:[e.jsx(t.Form.Item,{name:"boardMstrId",hidden:!0,children:e.jsx(t.Input,{})}),e.jsx(n.BwgSelect,{itemProps:{name:"type",label:"구분"},selectProps:{options:F}})]}),e.jsxs(t.Col,{span:16,children:[e.jsx(n.BwgFormItem,{label:"화면 정보",name:void 0,children:e.jsxs(t.Space.Compact,{children:[e.jsx(t.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})}),e.jsx(t.Form.Item,{name:"scrnId",style:{width:"100%"},hidden:!0,children:e.jsx(t.Input,{readOnly:!0})})]})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(n.BwgFormItem,{label:"작성자",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"rgstUserDeptNm",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"rgstUserId",hidden:!0}),e.jsx(t.Form.Item,{name:"rgstUserNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})})}),e.jsx(t.Col,{span:8,children:e.jsx(n.BwgDatePicker,{itemProps:{label:"작성일자",name:"rgstDt"},inputProps:{disabled:!0}})}),e.jsx(t.Col,{span:8,children:e.jsx(n.BwgSelect,{itemProps:{name:"status",label:"상태"},selectProps:{options:Q,disabled:!0}})})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(n.BwgDatePicker,{itemProps:{label:"마감요청일",name:"dueDate"},inputProps:{disabled:!0}})}),e.jsx(t.Col,{span:8,children:e.jsxs(t.Flex,{vertical:!0,gap:2,children:[e.jsx("span",{style:{fontSize:"12px",color:"#000000E0"},children:"진척률"}),e.jsx(t.Progress,{percent:W[i.getFieldValue("status")],status:W[i.getFieldValue("status")]>0?"active":"normal",size:"small",format:r=>`${r}%`})]})}),e.jsx(t.Col,{span:8,children:e.jsx(n.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"},inputProps:{disabled:!0}})})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(n.BwgFormItem,{label:"처리담당자",name:void 0,help:"",children:e.jsxs(t.Space.Compact,{children:[e.jsx(t.Form.Item,{name:"prcsUserDeptNm",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"prcsUserId",hidden:!0}),e.jsx(t.Form.Item,{name:"prcsUserNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})})}),e.jsx(t.Col,{span:8,children:e.jsx(n.BwgDatePicker,{itemProps:{label:"처리일자",name:"prcsDt"}})})]}),e.jsx(t.Row,{gutter:[16,8],children:e.jsx(t.Col,{span:24,children:e.jsx(n.BwgFormItem,{label:"제목",name:"title",style:{width:"100%"},children:e.jsx(t.Input,{})})})}),e.jsx(f.BwgEditor,{border:!1,itemProps:{name:"content",label:"내용",rules:[{required:!0,message:"내용을 입력하세요."}]},editorProps:{isEditing:D&&!g,title:{title:"에디터"}}})]})})}),e.jsx(t.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:e.jsxs(f.ContentBox,{style:{flex:"0 0 400px",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{style:{borderBottom:"1px solid #e8e8e8",paddingBottom:"12px",marginBottom:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx("span",{style:{fontSize:"14px",fontWeight:"600",color:"#262626"},children:"댓글"}),e.jsxs("div",{style:{position:"relative",display:"inline-block"},children:[e.jsx(t.Button,{type:"text",icon:e.jsx(I.ReloadOutlined,{spin:E||d}),onClick:ae,disabled:E||d,size:"small",style:{fontSize:"12px",color:g?"#d9d9d9":d?"#8c8c8c":"#595959",height:"24px",padding:"0 8px"}}),!g&&e.jsx("span",{style:{position:"absolute",top:"-4px",right:"-4px",fontSize:"10px",fontWeight:"700",color:E?"#8c8c8c":"#1890ff",minWidth:"14px",height:"14px",lineHeight:"14px",textAlign:"center",borderRadius:"50%",pointerEvents:"none"},children:K})]})]}),e.jsx("div",{ref:M,style:{flex:1,overflowY:"auto",marginBottom:"16px",minHeight:0,position:"relative"},children:d?e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:[e.jsx("div",{style:{marginBottom:"12px"},children:e.jsx(I.ReloadOutlined,{spin:!0,style:{fontSize:"24px"}})}),e.jsx("div",{style:{fontSize:"13px"},children:"댓글을 불러오는 중..."})]}):R.length===0?e.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:e.jsx("div",{style:{fontSize:"13px"},children:"등록된 댓글이 없습니다."})}):e.jsx(t.List,{dataSource:R,renderItem:r=>e.jsxs(t.List.Item,{style:{position:"relative",paddingRight:"20px",padding:"12px 20px 12px 12px",borderBottom:"1px solid #f0f0f0"},children:[e.jsx(t.List.Item.Meta,{avatar:e.jsx(t.Avatar,{size:32,style:{backgroundColor:"#1890ff",fontSize:"13px"},children:r.author[0]}),title:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"4px"},children:[e.jsx("span",{style:{fontWeight:"500",fontSize:"13px",color:"#262626"},children:r.author}),e.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:r.regDt})]}),description:e.jsx("span",{style:{fontSize:"13px",color:"#595959",lineHeight:"1.5"},children:r.content})}),r.regUserId===C?.userId&&e.jsx(t.Button,{type:"text",danger:!0,icon:e.jsx(I.DeleteOutlined,{style:{fontSize:"12px"}}),size:"small",onClick:()=>de(r.id),disabled:d,style:{position:"absolute",right:"8px",top:"62%",transform:"translateY(-50%)",opacity:d?.3:.5,height:"24px",width:"24px",padding:0},onMouseEnter:s=>{d||(s.currentTarget.style.opacity="1")},onMouseLeave:s=>{s.currentTarget.style.opacity=d?"0.3":"0.5"}})]},r.id)})}),e.jsx("div",{style:{padding:"12px",borderTop:"1px solid #e8e8e8",backgroundColor:g?"#f5f5f5":"#fafafa",flexShrink:0,marginTop:"auto"},children:g?e.jsxs("div",{style:{textAlign:"center",padding:"20px",color:"#8c8c8c",fontSize:"13px",backgroundColor:"#ffffff",borderRadius:"6px",border:"1px solid #e8e8e8"},children:[e.jsx("div",{style:{marginBottom:"8px"},children:e.jsx(I.AlertTwoTone,{twoToneColor:"#faad14"})}),e.jsx("div",{children:"이미 완료처리된 게시글입니다."}),e.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"댓글을 작성할 수 없습니다."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{marginBottom:"8px"},children:e.jsx(fe,{rows:2,placeholder:d?"댓글 처리 중...":"댓글을 입력하세요...",value:B,onChange:r=>Y(r.target.value),maxLength:300,disabled:d,style:{borderRadius:"6px",border:"1px solid #d9d9d9",resize:"none",fontSize:"13px",backgroundColor:d?"#f5f5f5":"#ffffff",color:d?"#8c8c8c":"#000000"},onFocus:r=>{d||(r.target.style.borderColor="#1890ff",r.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.05)")},onBlur:r=>{r.target.style.borderColor="#d9d9d9",r.target.style.boxShadow="none"}})}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:d?"처리 중...":`${B.length} / 300자`}),e.jsx(t.Button,{type:"primary",onClick:oe,size:"small",loading:d,style:{borderRadius:"4px",fontSize:"12px",height:"28px",padding:"0 16px",fontWeight:"500"},disabled:!B.trim()||d,children:d?"등록 중...":"등록"})]})]})})]})})]}),ue=()=>e.jsx(f.ContentBox,{children:e.jsxs(n.BwgForm,{form:i,onFinish:q,initialValues:{type:"INQR"},labelCol:{flex:"100px"},style:{height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(n.BwgSelect,{itemProps:{name:"type",label:"구분",rules:[{required:!0,message:"구분을 선택해주세요."}]},selectProps:{options:[...F].filter(r=>r.value!=="")}})}),e.jsxs(t.Col,{span:16,children:[e.jsx(n.BwgFormItem,{label:"화면 정보",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})}),e.jsx(t.Form.Item,{name:"scrnId",style:{width:"100%"},hidden:!0,children:e.jsx(t.Input,{readOnly:!0})})]})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(n.BwgFormItem,{label:"작성자",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"rgstUserDeptNm",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"rgstUserId",hidden:!0}),e.jsx(t.Form.Item,{name:"rgstUserNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})})}),e.jsx(t.Col,{span:6,children:e.jsx(n.BwgFormItem,{label:"작성일자",name:"rgstDt",style:{width:"100%"},children:e.jsx(t.DatePicker,{disabled:!0})})}),e.jsx(t.Col,{span:6,children:e.jsx(n.BwgFormItem,{label:"마감요청일",name:"dueDate",style:{width:"100%"},children:e.jsx(t.DatePicker,{disabled:!0})})}),e.jsx(t.Col,{span:4,children:e.jsx(n.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"},inputProps:{disabled:!0}})})]}),e.jsx(t.Row,{gutter:[16,8],children:e.jsx(t.Col,{span:24,children:e.jsx(n.BwgFormItem,{label:"제목",name:"title",style:{width:"100%"},rules:[{required:!0,message:"제목을 입력해주세요."}],children:e.jsx(t.Input,{})})})}),e.jsx(f.BwgEditor,{border:!1,itemProps:{name:"content"},editorProps:{isEditing:L,title:{title:e.jsxs(e.Fragment,{children:[e.jsx(I.EditOutlined,{style:{marginRight:"5px"}})," 상세내용 작성"]}),children:e.jsx(t.Button,{icon:e.jsx(I.EyeFilled,{}),onClick:()=>V(!L),children:"미리보기"})}}})]})});l.useEffect(()=>{c==="new"&&(V(!0),i.setFieldsValue({type:"INQR",menuId:o?.menuId,menuNm:o?.menuNm,scrnId:o?.scrnId,rgstUserId:C?.userId,rgstUserNm:C?.userNm,rgstUserDeptNm:H?.deptNm,rgstDt:he(),content:""}))},[c,i,o,C]),l.useEffect(()=>{if(c==="detail"&&!g){const r=setInterval(()=>{P(s=>s<=1?(console.log("🔄 댓글 자동 갱신 실행 (카운트다운 완료)"),m.SCMBoardDtls0001(i.getFieldValue("boardMstrId")),15):s-1)},1e3);return m.SCMBoardDtls0001(i.getFieldValue("boardMstrId")),()=>{console.log("🧹 댓글 인터벌 정리"),clearInterval(r)}}else c==="detail"&&g&&(console.log("📋 완료된 게시글 - 댓글 조회만"),m.SCMBoardDtls0001(i.getFieldValue("boardMstrId")))},[c,g,i]),l.useEffect(()=>()=>{console.log("🧹 컴포넌트 언마운트 - 모든 인터벌 정리"),N.current&&(clearInterval(N.current),N.current=null)},[]),l.useEffect(()=>{c==="list"&&o&&(y?.current?.setFormData({menuId:o?.menuId,menuNm:o?.menuNm}),m.SCMBoardMstr0001(1,20))},[c,o]),l.useEffect(()=>{S&&o&&y?.current?.setFormData({menuId:o?.menuId,menuNm:o?.menuNm})},[S,o]);const m={SCMBoardMstr0001:async(r,s)=>{const a=r||b.current?.currentPage||1,u=s||b.current?.pageSize||20,p={...y?.current?.getFormData(),pageNum:a,pageCount:u};console.log("🔍 서버 모드 페이징 요청:",p);try{const x=await h.callService("SCMBoardMstr0001",p,{isPopup:!0});if(x&&x.pageList){const v=x.pageCnt||0;b.current?.setTotalData(v),T.current?.addAllData(x.pageList)}else b.current?.setTotalData(0),T.current?.addAllData([]),console.log("📭 서버 모드 페이징 데이터 없음")}catch(x){console.error("❌ SCMBoardMstr0001 호출 실패:",x),t.message.error("데이터 조회 중 오류가 발생했습니다.")}},SCMBoardMstr0003:r=>{h.callService("SCMBoardMstr0003",{...r,status:"READY"},{isPopup:!0}).then(s=>{console.log("문의/신고 제출 응답:",s),t.message.success("정상 접수되었습니다."),k()}).catch(s=>{console.error("문의/신고 제출 실패:",s),t.message.error("접수 중 오류가 발생했습니다.")})},SCMBoardMstr0004:r=>{h.callService("SCMBoardMstr0004",{boardMstrId:i.getFieldValue("boardMstrId"),...r},{isPopup:!0}).then(s=>{console.log("문의/신고 제출 응답:",s),t.message.success("수정이 완료되었습니다."),k()}).catch(s=>{console.error("문의/신고 변경 실패:",s)})},SCMBoardMstr0005:()=>{h.callService("SCMBoardMstr0005",{boardMstrId:i.getFieldValue("boardMstrId")},{isPopup:!0}).then(r=>{console.log("문의/신고 삭제 응답:",r),t.message.success("삭제가 완료되었습니다."),k()})},SCMBoardDtls0001:r=>{w(!0),h.callService("SCMBoardDtls0001",{boardMstrId:r},{isPopup:!0,showLoading:!1}).then(s=>{if(s&&s.subList){const a=s.subList.map(u=>({id:u.seq,author:u.userNm||u.regUserId,regUserId:u.regUserId,content:u.content,regDt:u.regDt}));A(a)}else A([])}).catch(s=>{console.error("게시글 댓글 목록 조회 실패:",s),t.message.error("댓글 목록 조회 중 오류가 발생했습니다.")}).finally(()=>{w(!1),P(15)})},SCMBoardDtls0002:(r,s)=>{w(!0),h.callService("SCMBoardDtls0002",{boardMstrId:r,content:s},{isPopup:!0,showLoading:!1}).then(a=>{a&&a.result===1?(t.message.success("댓글이 등록되었습니다."),m.SCMBoardDtls0001(r)):t.message.error("댓글 등록에 실패했습니다.")}).catch(a=>{t.message.error("댓글 등록 중 오류가 발생했습니다.")}).finally(()=>{w(!1)})},SCMBoardDtls0003:(r,s)=>{w(!0),h.callService("SCMBoardDtls0003",{boardMstrId:r,seq:s},{isPopup:!0,showLoading:!1}).then(a=>{a&&a.result===1?(t.message.success("댓글이 삭제되었습니다."),m.SCMBoardDtls0001(r)):t.message.error("댓글 삭제에 실패했습니다.")}).catch(a=>{t.message.error("댓글 삭제 중 오류가 발생했습니다.")}).finally(()=>{w(!1)})}},pe=()=>{switch(c){case"list":return[{id:"REFRESH",label:"조회",type:"default",onClick:()=>m.SCMBoardMstr0001(),disabled:z},{id:"NEW",label:"신규 등록",type:"primary",onClick:ie}];case"detail":return[{id:"BACK",label:"뒤로",type:"default",onClick:ne},{id:"EDIT",label:"수정",type:"primary",disabled:!D||g,onClick:()=>i.submit()},{id:"DELETE",label:"삭제",type:"default",disabled:!D||g,onClick:re}];case"new":return[{id:"SUBMIT",label:"제출",type:"primary",onClick:()=>i.submit(),disabled:z},{id:"CANCEL",label:"취소",type:"default",onClick:se}];default:return[]}},xe={};return e.jsxs(f.BwgPopup,{popup:S,buttons:pe(),popupEvent:xe,onClose:le,children:[c==="list"&&ce(),c==="detail"&&me(),c==="new"&&ue()]})};exports.default=Ie;
@@ -4,10 +4,10 @@ import { Form as s, Tag as de, message as g, Row as x, Col as n, Space as D, Inp
4
4
  import Ge from "dayjs";
5
5
  import { useRef as U, useState as b, useMemo as J, useEffect as M } from "react";
6
6
  import { useUserStore as je, useMenuViewStore as qe } from "../stores/index.js";
7
- import { m as Qe, d as k, S as We, h as He, n as Je, o as ce } from "./common-components-C61ER0qC.js";
7
+ import { BwgPopup as Qe, ContentBox as k, SearchBox as We, BwgGrid as He, BwgPagination as Je, BwgEditor as ce } from "../components/common/index.js";
8
8
  import { createBwgGridRenderer as $, callService as S, realFormat as K } from "../utils/index.js";
9
9
  import { BwgFormItem as I, BwgSelect as L, BwgRangePicker as $e, BwgSwitch as Ke, BwgInput as Xe, BwgDatePicker as X, BwgCheck as me, BwgForm as Ze } from "../components/core/index.js";
10
- import { c as _e } from "./provider-Kxea5IoZ.js";
10
+ import { c as _e } from "./provider-ff4RVDYo.js";
11
11
  const { TextArea: et } = d, V = [
12
12
  { label: "전체", value: "" },
13
13
  { label: "요청", value: "RQST" },
@@ -37,12 +37,12 @@ const { TextArea: et } = d, V = [
37
37
  PROCESSING: 50,
38
38
  COMPLETED: 100,
39
39
  REJECTED: 100
40
- }, ht = ({ popup: N, onClose: Z }) => {
40
+ }, pt = ({ popup: N, onClose: Z }) => {
41
41
  const { searchBoxRef: w } = _e(), E = U(null), A = U(null), { user: B, hrInfo: he } = je(), { activeMenuItem: o } = qe(), [i] = s.useForm(), [_, ee] = b(!1), [te, re] = b(!1), [T, ge] = b(!1), [y, fe] = b(!1), [c, v] = b(!1), [m, C] = b(
42
42
  "list"
43
43
  );
44
44
  b(null);
45
- const F = U(null), [Y, le] = b([]), [P, ne] = b(""), [G, lt] = b(!1), [ye, j] = b(15), q = U(null), xe = J(
45
+ const F = U(null), [Y, le] = b([]), [P, ne] = b(""), [G] = b(!1), [ye, j] = b(15), q = U(null), xe = J(
46
46
  () => $(
47
47
  (t, r, a, p, h) => {
48
48
  const f = t.getValue(r.index?.itemIndex, "type");
@@ -1268,5 +1268,5 @@ const { TextArea: et } = d, V = [
1268
1268
  );
1269
1269
  };
1270
1270
  export {
1271
- ht as default
1271
+ pt as default
1272
1272
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("@ant-design/icons"),t=require("antd"),r=require("react"),O=require("../utils/index.cjs"),h=require("../components/common/index.cjs"),H=[{label:"정확도 우선",value:"none"},{label:"도로명 포함",value:"road"},{label:"지번 포함",value:"location"}],G=["SELECT","INSERT","UPDATE","DELETE","DROP","CREATE","ALTER","TRUNCATE","EXEC","EXECUTE","UNION","OR","AND","WHERE","FROM","JOIN","INNER","OUTER","LEFT","RIGHT","FULL","ON","AS","IS","NULL","NOT","IN","LIKE","BETWEEN","EXISTS","HAVING","GROUP","BY","ORDER","ASC","DESC","DISTINCT","TOP","LIMIT","OFFSET","CASE","WHEN","THEN","ELSE","END","IF","WHILE","FOR","DECLARE","SET","BEGIN","COMMIT","ROLLBACK","TRANSACTION","GRANT","REVOKE","DENY","TABLE","VIEW","INDEX","PROCEDURE","FUNCTION","TRIGGER","DATABASE","SCHEMA","USER","ROLE","BACKUP","RESTORE"],K=({popup:l,onClose:I})=>{const o=r.useRef(null),y=r.useRef(null),[x,L]=r.useState(""),[f,j]=r.useState([]),[a,T]=r.useState(null),[w,E]=r.useState(!1),[A,v]=r.useState(0),[u,N]=r.useState("none"),[B,C]=r.useState(!1),P=r.useMemo(()=>e.jsxs("div",{style:{maxWidth:"400px"},children:[e.jsx(t.Typography.Title,{level:5,style:{marginTop:0,marginBottom:12},children:"검색 가이드"}),e.jsxs(t.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[e.jsxs("div",{children:[e.jsx(t.Typography.Text,{strong:!0,children:"• 검색 방법"}),e.jsx("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:"도로명, 지번, 건물명, 우편번호로 검색할 수 있습니다."})]}),e.jsxs("div",{children:[e.jsx(t.Typography.Text,{strong:!0,children:"• 검색 예시"}),e.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:['- 도로명: "논현로", "강남대로"',e.jsx("br",{}),'- 지번: "논현동 234", "역삼동 123"',e.jsx("br",{}),'- 건물명: "태성빌딩", "강남역"',e.jsx("br",{}),'- 우편번호: "06234", "12345"']})]}),e.jsxs("div",{children:[e.jsx(t.Typography.Text,{strong:!0,children:"• 정렬 옵션"}),e.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:["- 정확도 우선: 검색어와 가장 유사한 결과 우선",e.jsx("br",{}),"- 도로명 포함: 도로명 주소를 포함한 결과 우선",e.jsx("br",{}),"- 지번 포함: 지번 주소를 포함한 결과 우선"]})]}),e.jsxs("div",{children:[e.jsx(t.Typography.Text,{strong:!0,children:"• 검색 팁"}),e.jsxs("div",{style:{marginTop:4,fontSize:"12px",color:"#666"},children:["- 검색어는 최소 2글자 이상 입력해주세요.",e.jsx("br",{}),"- 공백은 자동으로 제거됩니다.",e.jsx("br",{}),"- 검색 결과를 클릭하여 주소를 선택하세요.",e.jsx("br",{}),"- 검색하기 위해 검색 버튼이나 엔터키를 눌러주세요."]})]})]})]}),[]),k=r.useMemo(()=>e.jsxs("div",{style:{maxWidth:"420px",maxHeight:"600px",overflowY:"auto"},children:[e.jsx(t.Typography.Title,{level:5,style:{marginTop:0,marginBottom:12},children:"에러 메시지 안내"}),e.jsxs(t.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[e.jsxs("div",{style:{fontSize:"12px",color:"#666"},children:[e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0005"}),": 검색어가 입력되지 않았습니다."]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0006"}),": 주소를 상세히 입력해 주시기 바랍니다.",e.jsx("div",{style:{marginLeft:40,fontSize:"11px",color:"#999"},children:"(예시: 여의나루로 76, 문현금융로 40)"})]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0008"}),": 검색어는 한글자 이상 입력되어야 합니다."]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0009"}),": 검색어는 문자와 숫자 같이 입력되어야 합니다. (숫자만 검색 불가)"]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0010"}),": 검색어가 너무 깁니다. (한글40자, 영문,숫자 80자 이하)"]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0011"}),": 검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자10자 이하)"]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0012"}),": 특수문자+숫자만으로는 검색이 불가능 합니다."]}),e.jsxs("div",{style:{marginBottom:6},children:[e.jsx(t.Typography.Text,{type:"danger",style:{fontSize:"12px"},children:"E0013"}),": SQL 예약어 또는 특수문자( %,=,",">",",","<",",[,] )는 검색이 불가능 합니다."]})]}),e.jsxs("div",{style:{marginTop:12,paddingTop:8,borderTop:"1px solid #f0f0f0"},children:[e.jsx(t.Typography.Text,{type:"warning",style:{fontSize:"12px",fontWeight:"bold"},children:"관리자 문의 바랍니다"}),e.jsxs("div",{style:{marginTop:6,fontSize:"11px",color:"#999"},children:["-999: 시스템에러",e.jsx("br",{}),"E0001: 승인되지 않은 KEY 입니다.",e.jsx("br",{}),"E0002: 승인되지 않은 사이트 입니다.",e.jsx("br",{}),"E0003: 정상적인 경로로 접속하시기 바랍니다.",e.jsx("br",{}),"E0014: 개발승인키 기간이 만료되어 서비스를 이용하실 수 없습니다."]})]})]})]}),[]);r.useEffect(()=>{(async()=>{try{const i=await O.callService("SCMUTIL00202",{},{showLoading:!1});C(i?.result===1)}catch{C(!1)}})()},[]);const S=r.useCallback(async(s,i)=>{if(x.trim().length<2){t.message.warning("검색어는 2글자 이상 입력해주세요.");return}const n=x.replace(/(시|도|구|군)(?=[가-힣0-9])/g,"$1 ").replace(/\s+/g," ").trim(),p=n.split(/\s+/).filter(c=>c.length>0);if(p.length===1&&/[시도구군]$/.test(p[0])){t.message.warning("주소를 상세히 입력해 주시기 바랍니다.");return}const U=/[가-힣]/.test(n)?40:80,b=/^\d+$/.test(n);if(n.length>U){t.message.warning("검색어가 너무 깁니다. (한글 40자, 영문/숫자 80자 이하)");return}if(/\d{11,}/.test(n)){t.message.warning("검색어에 너무 긴 숫자가 포함되어 있습니다. (숫자 10자 이하)");return}if(b&&n.length!==5||/^[0-9\W_]+$/.test(n)&&/\d/.test(n)&&!/[A-Za-z가-힣]/.test(n)&&!b){t.message.warning("특수문자+숫자만으로는 검색이 불가능 합니다.");return}if(G.some(c=>new RegExp(`\\b${c}\\b`,"i").test(n))||/[[\]%=><]/.test(n)){t.message.warning("SQL 예약어 또는 특수문자( %,=,>,<,[,] )는 검색이 불가능 합니다.");return}E(!0);try{const c=s||o.current?.currentPage||1,W=i||o.current?.pageSize||10,F={keyword:n,currentPage:c,countPerPage:W,firstSort:u,...l?.popupParams},d=await O.callService("SCMUTIL00201",F,{showLoading:!1});if(d.errorCode!=="0"){t.message.error(d.errorCode+" : "+d.errorMessage);return}const z=d?.pageList&&Array.isArray(d.pageList)&&d.pageList||[],m=d?.pageCnt||0;j(z),v(m),o.current?.setTotalData(m),setTimeout(()=>{y.current&&(y.current.scrollTop=0)},0),(z.length===0||m===0)&&t.message.info("검색 결과가 없습니다.")}catch(c){console.error("주소 검색 실패:",c),t.message.error("주소 검색 중 오류가 발생했습니다."),j([]),v(0),o.current?.setTotalData(0)}finally{E(!1)}},[x,u,l?.popupParams]),M=r.useCallback(()=>{o.current?o.current.setPage(1):S(1,10)},[S]),R=r.useCallback(s=>{a&&a.bdMgtSn===s.bdMgtSn?T(null):T(s)},[a]),D=r.useMemo(()=>({confirm:()=>{if(!a){t.message.error("주소를 선택해주세요.");return}const s={...a},i=l?.config;i?.onSelect?i.onSelect(s):l?.popupParams?.onSelect?l.popupParams.onSelect(s):l?.config?.callback&&l.config.callback(s),i?.onClose&&i.onClose(),l?.close?.()}}),[a,l]);return e.jsx(h.BwgPopup,{popup:l,buttons:[{id:"confirm",label:"확인",onClick:()=>{D.confirm()}}],onClose:()=>{l?.close?.(),I?.()},children:e.jsx(h.ContentLayOut,{children:e.jsxs(h.ContentBox,{border:!1,style:{paddingBottom:10},children:[e.jsx("div",{style:{paddingInline:"16px"},children:e.jsxs(t.Flex,{gap:12,vertical:!0,style:{marginBottom:"6px"},children:[e.jsxs(t.Flex,{gap:16,align:"center",justify:"space-between",wrap:!0,style:{width:"100%"},children:[B&&e.jsx(t.Radio.Group,{value:u,onChange:s=>{N(s.target.value)},children:H.map(s=>e.jsx(t.Radio,{value:s.value,children:s.label},s.value))}),e.jsxs(t.Flex,{gap:16,wrap:!0,align:"center",justify:"flex-end",children:[e.jsx(t.Popover,{content:P,title:null,trigger:"click",placement:"right",children:e.jsxs("span",{style:{display:"inline-flex",gap:4,alignItems:"center",color:"#1890ff",cursor:"pointer",fontSize:"13px"},children:[e.jsx(g.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"검색 가이드"]})}),e.jsx(t.Popover,{content:k,title:null,trigger:"click",placement:"right",children:e.jsxs("span",{style:{display:"inline-flex",gap:4,alignItems:"center",color:"#fa8c16",cursor:"pointer",fontSize:"13px"},children:[e.jsx(g.QuestionCircleOutlined,{style:{fontSize:"18px"}}),"에러 메시지 안내"]})})]})]}),e.jsx(t.Input.Search,{placeholder:"도로명, 지번, 건물명, 우편번호로 검색",prefix:e.jsx(g.SearchOutlined,{}),value:x,allowClear:!0,enterButton:"검색",onChange:s=>{L(s.target.value)},onSearch:M,style:{flex:1}})]})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[f.length>0&&e.jsx("div",{style:{padding:"16px 16px 12px 16px"},children:e.jsxs("h3",{style:{fontSize:"16px",fontWeight:"bold"},children:["검색 결과 (",A,"개)"]})}),e.jsx("div",{ref:y,style:{paddingInline:"15px",overflowY:"auto",flex:1},children:e.jsx(t.Spin,{spinning:w,children:f.length>0?e.jsx("div",{children:f.map((s,i)=>{const n=a?.bdMgtSn===s.bdMgtSn;return e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",padding:"12px",border:n?"2px solid #6449fc":"1px solid #e0e0e0",borderRadius:"8px",marginBottom:"8px",cursor:"pointer",backgroundColor:n?"#efebff":"white",transition:"all 0.2s ease"},onClick:()=>R(s),children:[e.jsx("div",{style:{marginRight:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginTop:"2px"},onClick:p=>{p.stopPropagation(),R(s)},children:n?e.jsx(g.CheckCircleFilled,{style:{fontSize:"20px",color:"#6449fc"}}):e.jsx(g.CheckCircleOutlined,{style:{fontSize:"20px",color:"#d9d9d9"}})}),e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"4px"},children:["[",s.zipNo,"]"]}),e.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"4px",lineHeight:"1.4",color:"#333"},children:s.roadAddr}),s.detBdNmList&&e.jsx("div",{style:{fontSize:"12px",color:"#666",marginBottom:"4px"},children:s.detBdNmList}),e.jsx("div",{style:{fontSize:"12px",color:"#999",lineHeight:"1.3"},children:s.jibunAddr})]})]},`addr-${s.bdMgtSn}-${i}`)})}):e.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#999",fontSize:"14px"},children:x?"검색 버튼이나 엔터키를 눌러 검색해주세요.":"주소를 검색해주세요."})})}),e.jsx(h.BwgPagination,{ref:o,mode:"server",onServerPageChange:(s,i)=>{S(s,i)},pageSizeOptions:[10,20,50]})]})]})})})};exports.default=K;