@bwg-ui/core 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) 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-DCHZJn2H.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
  5. package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
  6. package/dist/chunks/{MenuReport-IBdoU2S3.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-CffgcIXm.cjs +1 -0
  20. package/dist/chunks/UploadMultiFileP01-Cy2LeYfy.js +38 -0
  21. package/dist/chunks/{layout-components-DnuV2Psp.js → layout-components-Cpzy8mH1.js} +1053 -951
  22. package/dist/chunks/layout-components-y9YpQQbx.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 +2 -1
  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/BwgCoreLogin.d.ts.map +1 -1
  60. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  61. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  62. package/dist/components/layout/index.cjs +1 -1
  63. package/dist/components/layout/index.js +1 -1
  64. package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
  65. package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
  66. package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
  67. package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
  68. package/dist/components/pages/auth/RoleAuthMapper.d.ts +8 -0
  69. package/dist/components/pages/auth/RoleAuthMapper.d.ts.map +1 -0
  70. package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
  71. package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
  72. package/dist/components/pages/auth/RoleView.d.ts +17 -0
  73. package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
  74. package/dist/components/pages/board/AdminBoard.d.ts +6 -0
  75. package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
  76. package/dist/components/pages/board/BoardComment.d.ts +8 -0
  77. package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
  78. package/dist/components/pages/board/MyBoard.d.ts +6 -0
  79. package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
  80. package/dist/components/pages/index.d.ts +10 -10
  81. package/dist/components/pages/index.d.ts.map +1 -1
  82. package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
  83. package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
  84. package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
  85. package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
  86. package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
  87. package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
  88. package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
  89. package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
  90. package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
  91. package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
  92. package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
  93. package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
  94. package/dist/components/pages/types.d.ts +5 -1
  95. package/dist/components/pages/types.d.ts.map +1 -1
  96. package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
  97. package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
  98. package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
  99. package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
  100. package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
  101. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
  102. package/dist/components/popup/index.cjs +1 -1
  103. package/dist/components/popup/index.d.ts +1 -0
  104. package/dist/components/popup/index.d.ts.map +1 -1
  105. package/dist/components/popup/index.js +16 -8
  106. package/dist/index.cjs +186 -1
  107. package/dist/index.js +32378 -290
  108. package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
  109. package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
  110. package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
  111. package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
  112. package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
  113. package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
  114. package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
  115. package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
  116. package/dist/provider/hooks/index.d.ts +1 -0
  117. package/dist/provider/hooks/index.d.ts.map +1 -1
  118. package/dist/provider/hooks/useFileUploader.d.ts +74 -0
  119. package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
  120. package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
  121. package/dist/provider/index.cjs +1 -1
  122. package/dist/provider/index.d.ts +1 -0
  123. package/dist/provider/index.d.ts.map +1 -1
  124. package/dist/provider/index.js +8 -7
  125. package/dist/stores/codeStore.d.ts +65 -128
  126. package/dist/stores/codeStore.d.ts.map +1 -1
  127. package/dist/stores/index.cjs +2 -2
  128. package/dist/stores/index.d.ts +3 -3
  129. package/dist/stores/index.d.ts.map +1 -1
  130. package/dist/stores/index.js +815 -1625
  131. package/dist/stores/menuModelStore.d.ts +22 -7
  132. package/dist/stores/menuModelStore.d.ts.map +1 -1
  133. package/dist/stores/menuViewStore.d.ts +3 -3
  134. package/dist/stores/menuViewStore.d.ts.map +1 -1
  135. package/dist/stores/systemStore.d.ts +50 -17
  136. package/dist/stores/systemStore.d.ts.map +1 -1
  137. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  138. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  139. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  140. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  141. package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
  142. package/dist/styles/assets/images/menus/ico1-design.png +0 -0
  143. package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
  144. package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
  145. package/dist/styles/assets/images/menus/ico2-design.png +0 -0
  146. package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
  147. package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
  148. package/dist/styles/assets/images/menus/ico3-design.png +0 -0
  149. package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
  150. package/dist/utils/apiUtils.d.ts.map +1 -1
  151. package/dist/utils/colorFormat.d.ts.map +1 -1
  152. package/dist/utils/commonUtils.d.ts +1 -2
  153. package/dist/utils/commonUtils.d.ts.map +1 -1
  154. package/dist/utils/index.cjs +1 -1
  155. package/dist/utils/index.d.ts +9 -3
  156. package/dist/utils/index.d.ts.map +1 -1
  157. package/dist/utils/index.js +1118 -1962
  158. package/dist/utils/serviceConfig.d.ts +9 -3
  159. package/dist/utils/serviceConfig.d.ts.map +1 -1
  160. package/package.json +4 -4
  161. package/dist/chunks/CMSearchIntfGwP01-0t3umcc_.cjs +0 -1
  162. package/dist/chunks/MenuReport-C70mGz2g.cjs +0 -1
  163. package/dist/chunks/common-components-DNgQR-Ge.cjs +0 -1109
  164. package/dist/chunks/common-components-DeYL3J6X.js +0 -52604
  165. package/dist/chunks/layout-components-Bf9IsLUS.cjs +0 -38
  166. package/dist/chunks/provider-Bi5OYngn.cjs +0 -1
  167. package/dist/chunks/provider-Bx4VpaFf.js +0 -465
  168. package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
  169. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
  170. package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
  171. package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
  172. package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
  173. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
  174. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
  175. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
  176. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
  177. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
  178. package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
  179. package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
  180. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
  181. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
  182. package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
  183. package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
@@ -1,30 +1,4889 @@
1
- import { f as o, p as s, q as r, j as B, B as g, r as w, s as t, o as i, h as n, t as l, n as d, m as p, i as C, b as c, u, l as f, e as S, k as m, d as x, C as G, G as b, Q as v, v as P, S as T } from "../../chunks/common-components-DeYL3J6X.js";
2
- import { createBwgGridRenderer as h, realFormat as k } from "../../utils/index.js";
1
+ import { jsx as e, jsxs as m, Fragment as ge } from "react/jsx-runtime";
2
+ import * as Ve from "@ant-design/icons";
3
+ import Xe, { ExclamationCircleFilled as Rt, SettingOutlined as dt, EyeOutlined as zt, CloseOutlined as Ge, CaretUpOutlined as Pt, CaretRightOutlined as Ft, CaretDownOutlined as Tt, CaretLeftOutlined as Ht, PlusOutlined as ct, EditOutlined as Et, DeleteOutlined as _t, ArrowLeftOutlined as $t, SearchOutlined as jt, QuestionCircleTwoTone as Gt, BugFilled as Ot, ClearOutlined as Wt, FileTextOutlined as Ut, UserOutlined as Kt } from "@ant-design/icons";
4
+ import { Popover as Ke, Flex as ne, Space as pe, Button as $, Alert as Be, message as qt, Col as Qt, ConfigProvider as ee, theme as ut, Breadcrumb as Yt, Typography as de, Tooltip as oe, Form as Le, Collapse as ht, Drawer as Zt, Divider as Oe, Input as pt, Card as gt, Row as Xt, Table as Jt, Tabs as er, Modal as we, Empty as We, Tree as mt, Tag as Ie, Spin as tr } from "antd";
5
+ import { memo as ft, useMemo as X, useState as F, createElement as rr, cloneElement as nr, useCallback as Z, forwardRef as De, useEffect as O, useImperativeHandle as Re, useRef as ce, Component as or } from "react";
6
+ import { u as He, a as wt, b as ir, S as lr, c as yt, d as ar, e as sr, f as dr, M as cr, g as ur } from "../../chunks/provider-ff4RVDYo.js";
7
+ import { BwgButton as qe, BwgForm as hr, BwgInput as $e } from "../core/index.js";
8
+ import Ct from "antd/locale/ko_KR";
9
+ import { useMenuViewStore as Qe, useMenuModelStore as pr, useUserStore as ze, useFavoriteStore as Ne, useLoadingStore as gr } from "../../stores/index.js";
10
+ import mr from "dompurify";
11
+ import kt from "quill";
12
+ import fr from "react-quill";
13
+ import Je from "quill-image-resize-module-react";
14
+ import { generateUID as wr, removeGridLayout as et, isEmpty as xe, isSafeEmpty as yr, getGridLayout as Cr, saveGridLayout as kr, colorFormat as Ue, getUserId as tt, callService as xr, isLocal as br } from "../../utils/index.js";
15
+ import { createBwgGridRenderer as $n, realFormat as jn } from "../../utils/index.js";
16
+ import { RowState as ye, LocalDataProvider as rt, LocalTreeDataProvider as nt, SortMode as vr, TreeView as ot, TreeExpanderIconStyle as Sr, ExpandWhenSetData as Mr, GridFitStyle as Ar, SelectionStyle as Ir, GridView as Vr } from "realgrid";
17
+ import { RealGridReact as Nr, RealTreeReact as Br } from "realgrid-react";
18
+ import { Rnd as xt } from "react-rnd";
19
+ import Lr from "antd/es/typography/Paragraph";
20
+ import { L as Dr } from "../../chunks/layout-components-Cpzy8mH1.js";
21
+ import { useNavigate as Rr, useLocation as zr } from "react-router-dom";
22
+ const Pr = ({
23
+ checkAuth: s = !1,
24
+ buttons: r,
25
+ gap: c = 8
26
+ }) => {
27
+ const o = He(), i = wt(), h = X(() => !(!s || o?.appCd === "CM"), [s, o?.appCd]), u = X(() => {
28
+ if (!h || !s || !i?.getButtonPermissions)
29
+ return /* @__PURE__ */ new Set();
30
+ const C = s.grpId.toUpperCase(), v = i.getButtonPermissions(C), S = /* @__PURE__ */ new Set();
31
+ return v.forEach((V) => {
32
+ const l = String(V?.btnId || "").trim();
33
+ l && S.add(l);
34
+ }), S;
35
+ }, [h, s, i?.getButtonPermissions]), D = X(() => !r || r.length === 0 ? null : r.filter((C) => C?.visible !== !1).map((C) => {
36
+ const v = !!C.disabled, S = h ? !u.has(C.id) : !1, V = v || S, l = /* @__PURE__ */ e(
37
+ qe,
38
+ {
39
+ type: C.type,
40
+ disabled: V,
41
+ loading: C.loading,
42
+ className: C.className || "bwg-btn",
43
+ style: C.style,
44
+ icon: C.icon,
45
+ onClick: C.onClick,
46
+ children: C.label
47
+ },
48
+ C.id
49
+ );
50
+ if (S) {
51
+ const M = /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
52
+ /* @__PURE__ */ e(
53
+ Rt,
54
+ {
55
+ style: { color: "#faad14", fontSize: 16 }
56
+ }
57
+ ),
58
+ /* @__PURE__ */ e(
59
+ "span",
60
+ {
61
+ style: { fontWeight: 600 },
62
+ children: `'${C.label}' 버튼에 대한 사용 권한이 없습니다.`
63
+ }
64
+ )
65
+ ] });
66
+ return /* @__PURE__ */ e(
67
+ Ke,
68
+ {
69
+ title: M,
70
+ content: /* @__PURE__ */ e(
71
+ "div",
72
+ {
73
+ style: {
74
+ display: "flex",
75
+ flexDirection: "column",
76
+ gap: 4,
77
+ paddingLeft: 24
78
+ },
79
+ children: /* @__PURE__ */ e("span", { style: { fontSize: 12 }, children: "관리자에게 문의하세요." })
80
+ }
81
+ ),
82
+ placement: "bottom",
83
+ styles: { body: { backgroundColor: "#fffbe6" } },
84
+ children: /* @__PURE__ */ e("span", { children: l })
85
+ },
86
+ C.id
87
+ );
88
+ }
89
+ return l;
90
+ }), [r, h, u, s]);
91
+ return /* @__PURE__ */ e(ne, { gap: c, children: D });
92
+ }, it = ft(Pr), bn = ({
93
+ grpId: s,
94
+ menuId: r,
95
+ btnEvent: c,
96
+ layout: o = "horizontal",
97
+ size: i = "middle",
98
+ style: h,
99
+ className: u,
100
+ onButtonClick: D
101
+ }) => {
102
+ He();
103
+ const C = wt(), [v, S] = F({}), V = X(() => {
104
+ if (!C?.getButtonPermissions)
105
+ return [];
106
+ const f = s.toUpperCase();
107
+ return C.getButtonPermissions(f).map((n) => ({
108
+ grpId: n.grpId,
109
+ btnId: n.btnId,
110
+ btnNm: n.btnNm,
111
+ btnSq: n.btnSq,
112
+ iconType: n.iconType,
113
+ iconVal: n.iconVal
114
+ }));
115
+ }, [C, s]), l = C?.isLoadingPermissions ?? !1, M = C?.permissionsError ?? null, I = async (f, N) => {
116
+ S((n) => ({
117
+ ...n,
118
+ [f]: { loading: !0 }
119
+ }));
120
+ try {
121
+ const n = c?.[f];
122
+ n ? await n() : console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${f}`), D && D(f, N, s);
123
+ } catch (n) {
124
+ console.error("버튼 이벤트 실행 실패:", n), qt.error("작업 중 오류가 발생했습니다.");
125
+ } finally {
126
+ S((n) => ({
127
+ ...n,
128
+ [f]: { loading: !1 }
129
+ }));
130
+ }
131
+ }, A = (f) => {
132
+ const N = v[f.btnId] || { loading: !1 };
133
+ return /* @__PURE__ */ m(
134
+ $,
135
+ {
136
+ size: i,
137
+ loading: N.loading,
138
+ onClick: () => I(f.btnId, f.btnNm),
139
+ className: "bwg-btn",
140
+ style: {
141
+ // 아이콘이 있는 경우 아이콘 스타일 적용
142
+ ...f.iconVal && {
143
+ display: "flex",
144
+ alignItems: "center",
145
+ gap: "4px"
146
+ }
147
+ },
148
+ children: [
149
+ f.iconVal && /* @__PURE__ */ m(ge, { children: [
150
+ f.iconType === "ANTD" && Ve[f.iconVal] && rr(Ve[f.iconVal], {
151
+ style: { fontSize: "14px" }
152
+ }),
153
+ f.iconType !== "ANTD" && /* @__PURE__ */ e(
154
+ "span",
155
+ {
156
+ className: f.iconVal,
157
+ style: {
158
+ fontSize: "14px"
159
+ }
160
+ }
161
+ )
162
+ ] }),
163
+ f.btnNm
164
+ ]
165
+ },
166
+ f.btnId
167
+ );
168
+ };
169
+ return l ? /* @__PURE__ */ e(
170
+ "div",
171
+ {
172
+ className: `bwg-button-group bwg-button-group-${o} ${u || ""}`,
173
+ style: h,
174
+ children: /* @__PURE__ */ e(
175
+ pe,
176
+ {
177
+ direction: o === "vertical" ? "vertical" : "horizontal",
178
+ size: i,
179
+ children: /* @__PURE__ */ e($, { loading: !0, size: i, children: "권한 조회 중..." })
180
+ }
181
+ )
182
+ }
183
+ ) : M ? /* @__PURE__ */ e(
184
+ "div",
185
+ {
186
+ className: `bwg-button-group bwg-button-group-${o} ${u || ""}`,
187
+ style: h,
188
+ children: /* @__PURE__ */ e(
189
+ Be,
190
+ {
191
+ message: "권한 오류",
192
+ description: M,
193
+ type: "error",
194
+ showIcon: !0,
195
+ style: { minHeight: "40px" }
196
+ }
197
+ )
198
+ }
199
+ ) : V.length === 0 ? /* @__PURE__ */ e(
200
+ "div",
201
+ {
202
+ className: `bwg-button-group bwg-button-group-${o} ${u || ""}`,
203
+ style: h,
204
+ children: /* @__PURE__ */ e(
205
+ Be,
206
+ {
207
+ message: "부여된 권한이 없습니다",
208
+ type: "warning",
209
+ showIcon: !0,
210
+ style: {
211
+ height: "20px",
212
+ display: "flex",
213
+ alignItems: "center",
214
+ margin: 0,
215
+ padding: "10px 10px"
216
+ }
217
+ }
218
+ )
219
+ }
220
+ ) : /* @__PURE__ */ e(
221
+ "div",
222
+ {
223
+ className: `bwg-button-group bwg-button-group-${o} ${u || ""}`,
224
+ style: h,
225
+ children: /* @__PURE__ */ e(ne, { gap: 3, children: V.map(A) })
226
+ }
227
+ );
228
+ }, vn = ({
229
+ content: s,
230
+ layout: r = "flex",
231
+ gap: c = 16,
232
+ minWidth: o = 120,
233
+ maxWidth: i = 300,
234
+ style: h,
235
+ className: u
236
+ }) => {
237
+ if (!(Array.isArray(s) && s.length > 0 && Array.isArray(s[0])))
238
+ return /* @__PURE__ */ e("div", { style: h, className: u, children: s });
239
+ const C = s.filter(
240
+ (M) => M && M.length > 0
241
+ ), v = X(() => {
242
+ const M = C[0];
243
+ if (!M || M.length === 0)
244
+ return { totalCols: 0, baseWidth: 0 };
245
+ let I = 0;
246
+ const A = [];
247
+ M.forEach((N) => {
248
+ const n = N, x = n?.props?.["data-colspan"] ? parseInt(String(n.props["data-colspan"])) : 1;
249
+ I += x, A.push(x);
250
+ });
251
+ const f = I > 0 ? 100 / I : 0;
252
+ return { totalCols: I, baseWidth: f, componentWidths: A };
253
+ }, [C]), S = (M, I, A) => {
254
+ const f = M, N = f?.props?.["data-colspan"] ? parseInt(String(f.props["data-colspan"])) : 1;
255
+ switch (r) {
256
+ case "equal":
257
+ return 100 / A;
258
+ case "auto":
259
+ return 100 / A;
260
+ case "grid":
261
+ return 100 / v.totalCols * N;
262
+ case "flex":
263
+ default:
264
+ const n = v.baseWidth * N;
265
+ return Math.max(o, Math.min(i, n));
266
+ }
267
+ }, V = (M) => {
268
+ if (!M || typeof M != "object") return M;
269
+ const I = M;
270
+ if (!I.props) return M;
271
+ const f = { ...I.props.style || {}, width: "100%" };
272
+ return nr(I, {
273
+ ...I.props,
274
+ style: f
275
+ });
276
+ }, l = (M, I) => {
277
+ if (!M || M.length === 0) return null;
278
+ const A = M.length;
279
+ return r === "grid" ? /* @__PURE__ */ e(
280
+ "div",
281
+ {
282
+ className: "erp-cmm-form",
283
+ style: {
284
+ display: "grid",
285
+ gridTemplateColumns: `repeat(${v.totalCols}, 1fr)`,
286
+ gap: `${c}px`,
287
+ width: "100%"
288
+ },
289
+ children: M.map((f, N) => {
290
+ const n = f?.props?.["data-colspan"] ? parseInt(String(f.props["data-colspan"])) : 1, x = V(f);
291
+ return /* @__PURE__ */ e(
292
+ "div",
293
+ {
294
+ style: {
295
+ gridColumn: `span ${n}`,
296
+ minWidth: `${o}px`
297
+ },
298
+ className: "form-component-wrapper",
299
+ children: x
300
+ },
301
+ `row-${I}-col-${N}`
302
+ );
303
+ })
304
+ },
305
+ `row-${I}`
306
+ ) : /* @__PURE__ */ e(
307
+ ne,
308
+ {
309
+ gap: c,
310
+ className: "erp-cmm-form",
311
+ wrap: r === "auto" ? "wrap" : "nowrap",
312
+ style: { width: "100%" },
313
+ children: M.map((f, N) => {
314
+ const n = S(f, N, A), x = V(f), b = r === "flex" ? {
315
+ width: `${n}px`,
316
+ minWidth: `${o}px`,
317
+ maxWidth: `${i}px`,
318
+ flexShrink: 0
319
+ } : {
320
+ width: `${n}%`,
321
+ minWidth: `${o}px`
322
+ };
323
+ return /* @__PURE__ */ e(
324
+ "div",
325
+ {
326
+ style: b,
327
+ className: "form-component-wrapper",
328
+ children: x
329
+ },
330
+ `row-${I}-col-${N}`
331
+ );
332
+ })
333
+ },
334
+ `row-${I}`
335
+ );
336
+ };
337
+ return /* @__PURE__ */ e(ne, { gap: "small", vertical: !0, style: h, className: u, children: C.map((M, I) => l(M, I + 1)) });
338
+ }, Sn = ({ children: s, className: r, style: c, ...o }) => {
339
+ const i = {
340
+ minHeight: s ? void 0 : "1px",
341
+ ...c
342
+ };
343
+ return /* @__PURE__ */ e(Qt, { ...o, className: `bwg-col ${r || ""}`.trim(), style: i, children: s || /* @__PURE__ */ e("span", { style: { display: "block" } }) });
344
+ }, bt = ({
345
+ children: s,
346
+ customTheme: r,
347
+ customComponentSize: c = "middle",
348
+ layout: o = "comfortable",
349
+ getPopupContainer: i
350
+ }) => {
351
+ const u = (() => {
352
+ const C = {
353
+ token: {
354
+ // 기본 색상 (GlobalConfigProvider와 동일하지만 우선순위가 높음)
355
+ colorPrimary: "#1890ff",
356
+ colorSuccess: "#52c41a",
357
+ colorWarning: "#faad14",
358
+ colorError: "#ff4d4f",
359
+ colorInfo: "#1890ff",
360
+ // 폰트
361
+ // fontFamily:
362
+ // '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',
363
+ fontFamily: '"Noto Sans KR", sans-serif',
364
+ fontSize: 14,
365
+ fontSizeHeading1: 30,
366
+ fontSizeHeading2: 20,
367
+ fontSizeHeading3: 18,
368
+ fontSizeHeading4: 16,
369
+ fontSizeHeading5: 14,
370
+ // 그림자
371
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
372
+ boxShadowSecondary: "0 2px 4px rgba(0, 0, 0, 0.12)"
373
+ },
374
+ algorithm: ut.defaultAlgorithm
375
+ };
376
+ switch (o) {
377
+ case "compact":
378
+ return {
379
+ ...C,
380
+ token: {
381
+ ...C.token,
382
+ padding: 8,
383
+ margin: 8,
384
+ borderRadius: 4,
385
+ fontSize: 12,
386
+ fontSizeHeading1: 30,
387
+ fontSizeHeading2: 20,
388
+ fontSizeHeading3: 18,
389
+ fontSizeHeading4: 16,
390
+ fontSizeHeading5: 14
391
+ }
392
+ };
393
+ case "spacious":
394
+ return {
395
+ ...C,
396
+ token: {
397
+ ...C.token,
398
+ padding: 24,
399
+ margin: 24,
400
+ borderRadius: 8,
401
+ fontSize: 16,
402
+ fontSizeHeading1: 44,
403
+ fontSizeHeading2: 36,
404
+ fontSizeHeading3: 28,
405
+ fontSizeHeading4: 24,
406
+ fontSizeHeading5: 20
407
+ }
408
+ };
409
+ default:
410
+ return {
411
+ ...C,
412
+ token: {
413
+ ...C.token,
414
+ padding: 16,
415
+ margin: 16,
416
+ borderRadius: 6,
417
+ fontSize: 14,
418
+ fontSizeHeading1: 30,
419
+ fontSizeHeading2: 20,
420
+ fontSizeHeading3: 18,
421
+ fontSizeHeading4: 16,
422
+ fontSizeHeading5: 14
423
+ }
424
+ };
425
+ }
426
+ })(), D = {
427
+ ...u,
428
+ ...r,
429
+ token: {
430
+ ...u.token,
431
+ ...r?.token
432
+ },
433
+ components: {
434
+ Checkbox: {
435
+ colorPrimary: "var(--check-primary)",
436
+ colorPrimaryBorder: "var(--check-primary)",
437
+ colorPrimaryHover: "var(--check-primary-active)",
438
+ colorText: "var(--text-primary)"
439
+ },
440
+ Radio: {
441
+ colorPrimary: "var(--check-primary)",
442
+ colorPrimaryActive: "var(--check-primary-active)",
443
+ colorPrimaryHover: "var(--check-primary-active)",
444
+ buttonSolidCheckedBg: "var(--button-solid)",
445
+ buttonSolidCheckedHoverBg: "var(--button-solid-hover)",
446
+ buttonSolidCheckedActiveBg: "var(--button-solid-hover)"
447
+ },
448
+ Tree: {
449
+ nodeHoverBg: "var(--tree-selected-bg)",
450
+ nodeHoverColor: "var(--primary-color)",
451
+ nodeSelectedBg: "var(--tree-selected-bg)",
452
+ nodeSelectedColor: "var(--primary-color)",
453
+ colorText: "var(--text-primary)"
454
+ },
455
+ Switch: {
456
+ colorPrimary: "var(--switch-primary)",
457
+ colorPrimaryHover: "var(--switch-primary)"
458
+ },
459
+ Tabs: {
460
+ inkBarColor: "var(--primary-color)",
461
+ itemSelectedColor: "var(--primary-color)",
462
+ itemHoverColor: "var(--button-solid-hover)",
463
+ itemActiveColor: "var(--button-solid-hover)",
464
+ itemColor: "var(--text-primary)",
465
+ horizontalItemGutter: 0,
466
+ horizontalItemPadding: "11px 24px"
467
+ },
468
+ Button: {
469
+ borderColorDisabled: "var(--border-color)",
470
+ defaultShadow: "none",
471
+ dangerShadow: "none",
472
+ iconGap: 4
473
+ },
474
+ // 혹시 customTheme 안에 components 가 있으면 합쳐주고 싶으면 이렇게:
475
+ ...r?.components ?? {}
476
+ }
477
+ };
478
+ return /* @__PURE__ */ e(
479
+ ee,
480
+ {
481
+ locale: Ct,
482
+ theme: D,
483
+ componentSize: c,
484
+ space: { size: c },
485
+ form: {
486
+ validateMessages: {
487
+ required: "${label}을(를) 입력해주세요.",
488
+ types: {
489
+ email: "${label}이(가) 유효한 이메일이 아닙니다.",
490
+ number: "${label}이(가) 유효한 숫자가 아닙니다."
491
+ },
492
+ number: {
493
+ range: "${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."
494
+ }
495
+ }
496
+ },
497
+ pagination: {
498
+ showSizeChanger: !0
499
+ },
500
+ getPopupContainer: i,
501
+ children: s
502
+ }
503
+ );
504
+ }, Mn = ({ children: s }) => {
505
+ const { activeDetailItem: r, openTabByMenuId: c } = Qe();
506
+ pr();
507
+ const { componentSize: o } = ze(), i = Z(() => {
508
+ console.log("handleMenuClick", r);
509
+ const u = r?.prntInfo?.menuId;
510
+ u && c(u, void 0, { skipRefreshModal: !0 });
511
+ }, [r?.prntInfo?.menuId, c]), h = X(() => ({
512
+ 0: "12px",
513
+ // 작게
514
+ 1: "14px",
515
+ // 보통 (기본값)
516
+ 2: "16px"
517
+ // 크게
518
+ })[o], [o]);
519
+ return /* @__PURE__ */ e(
520
+ "div",
521
+ {
522
+ className: "bwg-view main-view",
523
+ style: {
524
+ height: "100%",
525
+ display: "flex",
526
+ flexDirection: "column"
527
+ },
528
+ children: /* @__PURE__ */ e("div", { className: "bwgview-content", children: /* @__PURE__ */ m(
529
+ "div",
530
+ {
531
+ style: {
532
+ display: "flex",
533
+ flexDirection: "column",
534
+ height: "100%"
535
+ },
536
+ children: [
537
+ /* @__PURE__ */ e(
538
+ Yt,
539
+ {
540
+ style: { marginBottom: 10, fontSize: h },
541
+ separator: /* @__PURE__ */ e(
542
+ "svg",
543
+ {
544
+ xmlns: "http://www.w3.org/2000/svg",
545
+ width: "20",
546
+ height: "20",
547
+ viewBox: "0 0 16 16",
548
+ fill: "none",
549
+ children: /* @__PURE__ */ e(
550
+ "path",
551
+ {
552
+ d: "M6.66675 11.3333L10.0001 7.99996L6.66675 4.66663",
553
+ stroke: "#9A9A9A",
554
+ "stroke-linecap": "round",
555
+ "stroke-linejoin": "round"
556
+ }
557
+ )
558
+ }
559
+ ),
560
+ items: [
561
+ {
562
+ title: r?.prntInfo?.menuId ? /* @__PURE__ */ e(
563
+ "span",
564
+ {
565
+ onClick: i,
566
+ style: {
567
+ fontSize: h,
568
+ cursor: "pointer",
569
+ color: "#1890ff",
570
+ textDecoration: "none"
571
+ },
572
+ onMouseEnter: (u) => {
573
+ u.currentTarget.style.textDecoration = "underline";
574
+ },
575
+ onMouseLeave: (u) => {
576
+ u.currentTarget.style.textDecoration = "none";
577
+ },
578
+ children: r.prntInfo.menuNm
579
+ }
580
+ ) : /* @__PURE__ */ e("span", { style: { fontSize: h }, children: r?.prntInfo?.menuNm })
581
+ },
582
+ {
583
+ title: /* @__PURE__ */ e("span", { style: { fontSize: h, color: "#666" }, children: r?.viewLabel })
584
+ }
585
+ ]
586
+ }
587
+ ),
588
+ s
589
+ ]
590
+ }
591
+ ) })
592
+ }
593
+ );
594
+ }, Fr = 5, Tr = 0, Ee = ({
595
+ title: s,
596
+ icons: r,
597
+ tooltip: c,
598
+ iconVisible: o = !0,
599
+ paddingBottom: i,
600
+ marginBottom: h,
601
+ children: u
602
+ }) => {
603
+ const D = Ve.AppstoreTwoTone, { componentSize: C } = ze(), v = X(() => ({
604
+ 0: 5,
605
+ // 작게
606
+ 1: 4,
607
+ // 보통 (기본값)
608
+ 2: 3
609
+ // 크게
610
+ })[C], [C]);
611
+ X(() => r?.type === "antd" && r.icon && Ve[r.icon] || D, [r?.type, r?.icon]);
612
+ const S = (M, I) => (M ?? I).toString().padStart(2, "0"), V = `pb${S(
613
+ i,
614
+ Tr
615
+ )}`, l = `mb${S(
616
+ h,
617
+ Fr
618
+ )}`;
619
+ return /* @__PURE__ */ e(ne, { vertical: !0, style: { width: "100%" }, children: /* @__PURE__ */ m(
620
+ "div",
621
+ {
622
+ className: `bwg-title-box ${V} ${l}`,
623
+ style: { display: "flex", justifyContent: "space-between" },
624
+ children: [
625
+ /* @__PURE__ */ e("div", { className: "bwg-title-box-left", children: /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center" }, children: [
626
+ /* @__PURE__ */ e(de.Title, { level: v, children: /* @__PURE__ */ e("span", { children: s }) }),
627
+ c && /* @__PURE__ */ e(oe, { title: c.title, placement: c.placement, children: /* @__PURE__ */ e(Ve.QuestionCircleTwoTone, { style: { marginLeft: 5 } }) })
628
+ ] }) }),
629
+ /* @__PURE__ */ e("div", { className: "bwg-title-box-right", children: /* @__PURE__ */ e(ne, { gap: 6, children: u }) })
630
+ ]
631
+ }
632
+ ) });
633
+ }, { Panel: lt } = ht, vt = De(
634
+ ({ reqRows: s, subRows: r, border: c = !1, labelDisplay: o, header: i }, h) => {
635
+ const [u] = Le.useForm(), [D, C] = F("1"), [v, S] = F(void 0), { componentSize: V } = ze(), l = X(() => {
636
+ const A = {
637
+ 0: 12,
638
+ // 작게
639
+ 1: 14,
640
+ // 보통
641
+ 2: 16
642
+ // 크게
643
+ }, f = {
644
+ 0: "small",
645
+ 1: "middle",
646
+ 2: "large"
647
+ };
648
+ return {
649
+ fontSize: A[V],
650
+ componentSize: f[V]
651
+ };
652
+ }, [V]), M = () => o ? {
653
+ flex: o.md || o.lg || o.sm || "100px"
654
+ } : { flex: "100px" };
655
+ O(() => {
656
+ v && u.setFieldsValue(v);
657
+ }, [v, u]), Re(h, () => ({
658
+ getFormData: () => u.getFieldsValue(),
659
+ setFormData: (A) => {
660
+ u.setFieldsValue(A);
661
+ },
662
+ setDefaultValue: (A) => {
663
+ S(A), u.setFieldsValue(A);
664
+ },
665
+ resetForm: () => {
666
+ v ? u.setFieldsValue(v) : u.resetFields();
667
+ },
668
+ validateForm: async () => {
669
+ try {
670
+ return { success: !0, data: await u.validateFields() };
671
+ } catch (A) {
672
+ return { success: !1, error: A };
673
+ }
674
+ }
675
+ }));
676
+ const I = () => {
677
+ C(
678
+ (A) => A.includes("subRows") ? A.filter((f) => f !== "subRows") : [...A, "subRows"]
679
+ );
680
+ };
681
+ return /* @__PURE__ */ m(
682
+ "div",
683
+ {
684
+ style: c ? {
685
+ border: "1px solid #ddd",
686
+ padding: "10px 12px",
687
+ borderRadius: "8px",
688
+ marginBottom: "10px"
689
+ } : {},
690
+ children: [
691
+ i && /* @__PURE__ */ e(Ee, { title: i.title, children: i.buttons }),
692
+ /* @__PURE__ */ e(
693
+ ee,
694
+ {
695
+ componentSize: l.componentSize,
696
+ theme: {
697
+ token: {
698
+ fontSize: l.fontSize
699
+ },
700
+ components: {
701
+ Collapse: {}
702
+ }
703
+ },
704
+ children: /* @__PURE__ */ e(
705
+ Le,
706
+ {
707
+ form: u,
708
+ layout: "inline",
709
+ initialValues: v,
710
+ style: {
711
+ width: "100%",
712
+ fontSize: `${l.fontSize}px`
713
+ },
714
+ labelCol: M(),
715
+ labelAlign: "left",
716
+ children: /* @__PURE__ */ m("div", { style: { position: "relative", width: "100%" }, children: [
717
+ r && /* @__PURE__ */ e(
718
+ "div",
719
+ {
720
+ style: {
721
+ position: "absolute",
722
+ top: "15px",
723
+ left: "-9px",
724
+ zIndex: 10
725
+ },
726
+ children: D.includes("subRows") ? /* @__PURE__ */ e(oe, { title: "접기", children: /* @__PURE__ */ e("span", { className: "search-collapsed-arrow", onClick: I, children: /* @__PURE__ */ e(
727
+ "svg",
728
+ {
729
+ xmlns: "http://www.w3.org/2000/svg",
730
+ width: "9",
731
+ height: "6",
732
+ viewBox: "0 0 9 6",
733
+ fill: "none",
734
+ children: /* @__PURE__ */ e(
735
+ "path",
736
+ {
737
+ 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",
738
+ fill: "#AEB9C4"
739
+ }
740
+ )
741
+ }
742
+ ) }) }) : /* @__PURE__ */ e(oe, { title: "펼치기", children: /* @__PURE__ */ e("span", { className: "search-collapsed-arrow", onClick: I, children: /* @__PURE__ */ e(
743
+ "svg",
744
+ {
745
+ xmlns: "http://www.w3.org/2000/svg",
746
+ width: "9",
747
+ height: "6",
748
+ viewBox: "0 0 9 6",
749
+ fill: "none",
750
+ children: /* @__PURE__ */ e(
751
+ "path",
752
+ {
753
+ 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",
754
+ fill: "#AEB9C4"
755
+ }
756
+ )
757
+ }
758
+ ) }) })
759
+ }
760
+ ),
761
+ /* @__PURE__ */ m(
762
+ ht,
763
+ {
764
+ activeKey: [
765
+ "reqRows",
766
+ ...D.includes("subRows") ? ["subRows"] : []
767
+ ],
768
+ onChange: C,
769
+ className: "searchbox-collapse",
770
+ bordered: !1,
771
+ ghost: !0,
772
+ children: [
773
+ s && /* @__PURE__ */ e(
774
+ lt,
775
+ {
776
+ style: { padding: 0, margin: 0 },
777
+ header: void 0,
778
+ showArrow: !1,
779
+ collapsible: "disabled",
780
+ children: s
781
+ },
782
+ "reqRows"
783
+ ),
784
+ r && /* @__PURE__ */ e(
785
+ lt,
786
+ {
787
+ style: { padding: 0, margin: 0 },
788
+ header: void 0,
789
+ showArrow: !1,
790
+ collapsible: "icon",
791
+ children: r
792
+ },
793
+ "subRows"
794
+ )
795
+ ]
796
+ }
797
+ )
798
+ ] })
799
+ }
800
+ )
801
+ }
802
+ )
803
+ ]
804
+ }
805
+ );
806
+ }
807
+ ), An = ({
808
+ children: s,
809
+ showSearchBox: r,
810
+ showCloseButton: c = !0,
811
+ showEyesButton: o = !1,
812
+ shotSettingButton: i = !0,
813
+ styles: h,
814
+ ...u
815
+ }) => {
816
+ const [D, C] = F(!0), [v, S] = F(() => {
817
+ const N = u.placement;
818
+ return N === "left" || N === "right" || N === "top" || N === "bottom" ? N : "bottom";
819
+ }), [V, l] = F(!1), I = ((N) => {
820
+ const n = {
821
+ wrapper: {
822
+ ...u.width && { width: u.width },
823
+ ...u.height && { height: u.height },
824
+ margin: "0 auto"
825
+ },
826
+ content: {},
827
+ header: {
828
+ backgroundColor: "var(--drawer-header-bg)",
829
+ color: "var(--text-primary)"
830
+ }
831
+ };
832
+ switch (N) {
833
+ case "bottom":
834
+ return {
835
+ ...n,
836
+ wrapper: {
837
+ ...n.wrapper,
838
+ borderRadius: "30px 30px 0 0"
839
+ },
840
+ content: {
841
+ borderRadius: "30px 30px 0 0"
842
+ },
843
+ header: {
844
+ ...n.header,
845
+ borderRadius: "30px 30px 0 0"
846
+ }
847
+ };
848
+ case "top":
849
+ return {
850
+ ...n,
851
+ wrapper: {
852
+ ...n.wrapper,
853
+ borderRadius: "0 0 30px 30px"
854
+ },
855
+ content: {
856
+ borderRadius: "0 0 30px 30px"
857
+ },
858
+ header: {
859
+ ...n.header
860
+ }
861
+ };
862
+ case "left":
863
+ return {
864
+ ...n,
865
+ wrapper: {
866
+ ...n.wrapper,
867
+ borderRadius: "0 30px 0px 0"
868
+ },
869
+ content: {
870
+ borderRadius: "0 30px 0px 0"
871
+ },
872
+ header: {
873
+ ...n.header,
874
+ borderRadius: "0 30px 0 0"
875
+ }
876
+ };
877
+ case "right":
878
+ return {
879
+ ...n,
880
+ wrapper: {
881
+ ...n.wrapper,
882
+ borderRadius: "30px 0 0 0"
883
+ },
884
+ content: {
885
+ borderRadius: "30px 0 0 0"
886
+ },
887
+ header: {
888
+ ...n.header,
889
+ borderRadius: "30px 0 0 0"
890
+ }
891
+ };
892
+ default:
893
+ return n;
894
+ }
895
+ })(v), A = {
896
+ wrapper: { ...I?.wrapper, ...h?.wrapper },
897
+ content: { ...I?.content, ...h?.content },
898
+ header: { ...I?.header, ...h?.header }
899
+ };
900
+ return /* @__PURE__ */ e(
901
+ Zt,
902
+ {
903
+ className: "main-drawer",
904
+ footer: !0,
905
+ ...u,
906
+ placement: v,
907
+ styles: A,
908
+ maskClosable: !1,
909
+ closable: !1,
910
+ mask: D,
911
+ extra: /* @__PURE__ */ e(pe, { size: "small", align: "center", children: (() => {
912
+ const N = [];
913
+ if (i) {
914
+ const n = [
915
+ { key: "top", label: "상단", icon: /* @__PURE__ */ e(Pt, {}) },
916
+ { key: "right", label: "우측", icon: /* @__PURE__ */ e(Ft, {}) },
917
+ { key: "bottom", label: "하단", icon: /* @__PURE__ */ e(Tt, {}) },
918
+ { key: "left", label: "좌측", icon: /* @__PURE__ */ e(Ht, {}) }
919
+ ], x = /* @__PURE__ */ e(pe.Compact, { children: n.map((b) => /* @__PURE__ */ e(
920
+ $,
921
+ {
922
+ type: v === b.key ? "primary" : "default",
923
+ size: "small",
924
+ onClick: () => {
925
+ S(
926
+ b.key
927
+ ), l(!1);
928
+ },
929
+ icon: b.icon
930
+ },
931
+ b.key
932
+ )) });
933
+ N.push(
934
+ /* @__PURE__ */ e(
935
+ Ke,
936
+ {
937
+ content: x,
938
+ trigger: "click",
939
+ placement: "left",
940
+ open: V,
941
+ onOpenChange: l,
942
+ children: /* @__PURE__ */ e(oe, { placement: "bottom", title: "위치변경", zIndex: 2100, children: /* @__PURE__ */ e($, { icon: /* @__PURE__ */ e(dt, {}), type: "text", size: "middle" }) })
943
+ },
944
+ "shotSetting"
945
+ )
946
+ );
947
+ }
948
+ return o && N.push(
949
+ /* @__PURE__ */ e(
950
+ oe,
951
+ {
952
+ placement: "bottom",
953
+ title: D ? "배경 보기" : "배경 숨기기",
954
+ zIndex: 2100,
955
+ children: /* @__PURE__ */ e(
956
+ $,
957
+ {
958
+ icon: /* @__PURE__ */ e(zt, {}),
959
+ type: "text",
960
+ size: "middle",
961
+ onClick: () => C(!D)
962
+ }
963
+ )
964
+ },
965
+ "eyes"
966
+ )
967
+ ), u.extra && N.push(
968
+ /* @__PURE__ */ e("div", { style: { margin: "0 8px" }, children: u.extra }, "extra")
969
+ ), c && N.push(
970
+ /* @__PURE__ */ e(oe, { placement: "bottom", title: "닫기", zIndex: 2100, children: /* @__PURE__ */ e(
971
+ $,
972
+ {
973
+ icon: /* @__PURE__ */ e(Ge, {}),
974
+ onClick: u.onClose,
975
+ type: "text",
976
+ size: "middle"
977
+ }
978
+ ) }, "close")
979
+ ), N;
980
+ })() }),
981
+ afterOpenChange: (N) => {
982
+ N || (C(!0), S(
983
+ u.placement
984
+ )), u.afterOpenChange?.(N);
985
+ },
986
+ destroyOnHidden: !0,
987
+ children: r ? /* @__PURE__ */ m(be, { type: "vertical", children: [
988
+ /* @__PURE__ */ m(
989
+ ne,
990
+ {
991
+ justify: "space-between",
992
+ align: "center",
993
+ style: { width: "100%" },
994
+ children: [
995
+ /* @__PURE__ */ e("div", { children: r.title }),
996
+ /* @__PURE__ */ e(ne, { gap: 2, children: r.extra })
997
+ ]
998
+ }
999
+ ),
1000
+ /* @__PURE__ */ e(vt, { ...r.searchBox }),
1001
+ /* @__PURE__ */ e(Oe, {}),
1002
+ s
1003
+ ] }) : s
1004
+ }
1005
+ );
1006
+ }, Ye = ({
1007
+ width: s = "100%",
1008
+ height: r = "100%",
1009
+ boxAlign: c,
1010
+ display: o = "show",
1011
+ overflow: i,
1012
+ style: h,
1013
+ className: u,
1014
+ border: D = !0,
1015
+ children: C,
1016
+ ref: v
1017
+ }) => /* @__PURE__ */ e(
1018
+ "div",
1019
+ {
1020
+ style: {
1021
+ width: s,
1022
+ height: r,
1023
+ display: o === "show" ? "" : o,
1024
+ overflowX: i?.x,
1025
+ overflowY: i?.y,
1026
+ ...h
1027
+ },
1028
+ className: `bwgview-content-box ${c ? `content-box-${c}` : ""} ${u || ""} ${D ? "" : "none-box-st"}`,
1029
+ ref: v,
1030
+ children: C
1031
+ }
1032
+ ), St = Je?.default ?? Je;
1033
+ try {
1034
+ kt.register("modules/imageResize", St);
1035
+ } catch (s) {
1036
+ console.warn("quill-image-resize-module-react 로드 실패:", s);
1037
+ }
1038
+ const Fe = (s) => mr.sanitize(s ?? "", {
1039
+ ALLOWED_TAGS: [
1040
+ "p",
1041
+ "br",
1042
+ "div",
1043
+ "span",
1044
+ "strong",
1045
+ "b",
1046
+ "em",
1047
+ "i",
1048
+ "u",
1049
+ "s",
1050
+ "blockquote",
1051
+ "pre",
1052
+ "code",
1053
+ "ul",
1054
+ "ol",
1055
+ "li",
1056
+ "h1",
1057
+ "h2",
1058
+ "h3",
1059
+ "h4",
1060
+ "h5",
1061
+ "h6",
1062
+ "a",
1063
+ "img"
1064
+ ],
1065
+ ALLOWED_ATTR: [
1066
+ "style",
1067
+ "class",
1068
+ "href",
1069
+ "target",
1070
+ "rel",
1071
+ "src",
1072
+ "alt",
1073
+ "width",
1074
+ "height",
1075
+ "data-*",
1076
+ "align"
1077
+ ],
1078
+ ALLOWED_URI_REGEXP: /^(?:(?:https?|data|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
1079
+ KEEP_CONTENT: !0,
1080
+ // ← here (기존 false)
1081
+ RETURN_TRUSTED_TYPE: !1
1082
+ }), Te = De(
1083
+ ({
1084
+ border: s = !0,
1085
+ editorProps: r,
1086
+ value: c,
1087
+ defaultValue: o,
1088
+ onChange: i,
1089
+ onBlur: h,
1090
+ disabled: u,
1091
+ placeholder: D
1092
+ }, C) => {
1093
+ const {
1094
+ isEditing: v = !0,
1095
+ title: S,
1096
+ containerHeight: V = "100%"
1097
+ } = r || {}, l = ce(null), M = X(() => {
1098
+ const b = {
1099
+ toolbar: v ? [
1100
+ [{ header: [1, 2, 3, 4, 5, 6, !1] }],
1101
+ ["bold", "italic", "underline", "strike"],
1102
+ [{ color: [] }, { background: [] }],
1103
+ [{ list: "ordered" }, { list: "bullet" }],
1104
+ [{ indent: "-1" }, { indent: "+1" }],
1105
+ [{ align: [] }],
1106
+ ["link", "image"],
1107
+ ["clean"]
1108
+ ] : !1
1109
+ };
1110
+ return St ? {
1111
+ ...b,
1112
+ imageResize: {
1113
+ parchment: kt.import("parchment"),
1114
+ modules: ["Resize", "DisplaySize", "Toolbar"],
1115
+ displayStyles: {
1116
+ backgroundColor: "black",
1117
+ border: "none",
1118
+ color: "white"
1119
+ }
1120
+ }
1121
+ } : b;
1122
+ }, [v]), I = X(
1123
+ () => [
1124
+ "header",
1125
+ "bold",
1126
+ "italic",
1127
+ "underline",
1128
+ "strike",
1129
+ "color",
1130
+ "background",
1131
+ "list",
1132
+ "bullet",
1133
+ "indent",
1134
+ "align",
1135
+ "link",
1136
+ "image",
1137
+ // ↓ width/height format을 Delta에 실을 때 대비 (옵션, 아래 설명 참조)
1138
+ "width",
1139
+ "height"
1140
+ ],
1141
+ []
1142
+ ), A = c !== void 0, [f, N] = F(o ?? ""), n = A ? c : f, x = Z(
1143
+ (b, E, B, q) => {
1144
+ const w = Fe(b ?? "");
1145
+ A || N(w), i?.(w, E, B, q);
1146
+ },
1147
+ [A, i]
1148
+ );
1149
+ return Re(C, () => ({
1150
+ getHTML: () => n ?? "",
1151
+ getText: () => l.current?.getEditor()?.getText() ?? "",
1152
+ insertHTML: (b) => {
1153
+ const E = l.current?.getEditor();
1154
+ if (!E) return;
1155
+ const B = E.getSelection(!0), q = Fe(b ?? "");
1156
+ E.clipboard.dangerouslyPasteHTML(
1157
+ B ? B.index : E.getLength(),
1158
+ q
1159
+ );
1160
+ },
1161
+ insertImage: (b, E) => {
1162
+ const B = l.current?.getEditor();
1163
+ if (!B) return;
1164
+ const q = B.getSelection(!0), w = typeof b == "string" ? b : "";
1165
+ B.insertEmbed(
1166
+ q ? q.index : B.getLength(),
1167
+ "image",
1168
+ w,
1169
+ "user"
1170
+ );
1171
+ },
1172
+ getQuill: () => l.current?.getEditor?.() ?? null
1173
+ })), /* @__PURE__ */ e(
1174
+ Ye,
1175
+ {
1176
+ border: s,
1177
+ style: {
1178
+ opacity: u ? 0.6 : 1,
1179
+ pointerEvents: u ? "none" : "auto",
1180
+ height: typeof V == "number" ? `${V}px` : V,
1181
+ minHeight: 0
1182
+ },
1183
+ children: /* @__PURE__ */ m("div", { className: "bwg-editor-wrap", style: {
1184
+ width: "100%",
1185
+ height: "100%",
1186
+ display: "flex",
1187
+ flexDirection: "column"
1188
+ }, children: [
1189
+ S && /* @__PURE__ */ e(Ee, { ...S, paddingBottom: 10 }),
1190
+ /* @__PURE__ */ e(
1191
+ fr,
1192
+ {
1193
+ ref: l,
1194
+ theme: v ? "snow" : "bubble",
1195
+ readOnly: !v,
1196
+ value: n,
1197
+ onChange: x,
1198
+ onBlur: h,
1199
+ modules: M,
1200
+ formats: I,
1201
+ style: { width: "100%", display: "flex", flexDirection: "column", minHeight: 0, flex: "1" },
1202
+ placeholder: D
1203
+ },
1204
+ v ? "snow" : "bubble"
1205
+ )
1206
+ ] })
1207
+ }
1208
+ );
1209
+ }
1210
+ ), Hr = (s, r, c, o) => Fe(s ?? ""), Er = ({
1211
+ itemProps: s,
1212
+ ...r
1213
+ }) => {
1214
+ const { rules: c, shouldUpdate: o, dependencies: i, noStyle: h, ...u } = s;
1215
+ return /* @__PURE__ */ e(
1216
+ Le.Item,
1217
+ {
1218
+ valuePropName: "value",
1219
+ trigger: "onChange",
1220
+ getValueFromEvent: Hr,
1221
+ normalize: (D) => D ?? "",
1222
+ rules: c,
1223
+ shouldUpdate: o,
1224
+ dependencies: i,
1225
+ noStyle: h,
1226
+ ...u,
1227
+ children: /* @__PURE__ */ e(Te, { ...r })
1228
+ }
1229
+ );
1230
+ }, _r = (s) => {
1231
+ const { itemProps: r, onChange: c, editorProps: o, ...i } = s, h = Le.useFormInstance();
1232
+ if (r?.name != null) {
1233
+ const u = r.name;
1234
+ return /* @__PURE__ */ m(ge, { children: [
1235
+ /* @__PURE__ */ e(
1236
+ Le.Item,
1237
+ {
1238
+ hidden: !0,
1239
+ name: u,
1240
+ rules: r.rules,
1241
+ normalize: (D) => D ?? "",
1242
+ children: /* @__PURE__ */ e("input", { type: "hidden" })
1243
+ }
1244
+ ),
1245
+ /* @__PURE__ */ e(
1246
+ Te,
1247
+ {
1248
+ ...i,
1249
+ editorProps: o,
1250
+ value: h.getFieldValue(u) ?? "",
1251
+ onChange: (D, C, v, S) => {
1252
+ const V = Fe(D ?? "");
1253
+ h.setFieldValue(u, V), c?.(V, C, v, S);
1254
+ },
1255
+ onBlur: () => {
1256
+ h.validateFields([u]).catch(() => {
1257
+ });
1258
+ }
1259
+ }
1260
+ )
1261
+ ] });
1262
+ }
1263
+ return /* @__PURE__ */ e(Te, { ...s });
1264
+ }, In = Object.assign(_r, {
1265
+ FormItem: Er,
1266
+ Core: Te
1267
+ }), Mt = De(
1268
+ ({
1269
+ currentPage: s,
1270
+ totalPages: r,
1271
+ pageSize: c = 10,
1272
+ totalData: o,
1273
+ onPageChange: i,
1274
+ pageSizeOptions: h = [10, 20, 50, 100],
1275
+ gridRef: u,
1276
+ mode: D = "client",
1277
+ onServerPageChange: C
1278
+ }, v) => {
1279
+ const [S, V] = F(c), [l, M] = F(1), [I, A] = F(c), [f, N] = F(0);
1280
+ O(() => {
1281
+ V(c);
1282
+ }, [c]), O(() => {
1283
+ V(c);
1284
+ }, []), Re(
1285
+ v,
1286
+ () => ({
1287
+ currentPage: l,
1288
+ pageSize: I,
1289
+ totalData: f,
1290
+ totalPages: Math.ceil(f / I),
1291
+ setPage: (k) => {
1292
+ M(k), C?.(k, I);
1293
+ },
1294
+ setPageSize: (k) => {
1295
+ A(k), M(1), C?.(1, k);
1296
+ },
1297
+ setTotalData: (k) => {
1298
+ N(k);
1299
+ },
1300
+ reset: () => {
1301
+ M(1), A(c), N(0);
1302
+ }
1303
+ }),
1304
+ [
1305
+ l,
1306
+ I,
1307
+ f,
1308
+ C,
1309
+ c
1310
+ ]
1311
+ );
1312
+ const n = D === "client", x = n ? (s || 0) + 1 : l, b = n ? (r || 0) > 0 : f > 0, B = n ? b ? Math.ceil((o || 0) / S) : 0 : Math.ceil(f / I), q = n ? b && o || 0 : f, w = Math.min(
1313
+ x,
1314
+ B || 1
1315
+ ), L = `${S}-${B}-${w}`, T = (k) => {
1316
+ n ? i?.(k - 1) : (M(k), C?.(k, I));
1317
+ }, Y = (k) => {
1318
+ if (n) {
1319
+ V(k);
1320
+ try {
1321
+ u?.current?.gridView ? (u.current.gridView.setPaging(!0, k), u.current.gridView.setPage(0)) : i?.(0);
1322
+ } catch (H) {
1323
+ console.warn("페이지 사이즈 변경 중 오류:", H), i?.(0);
1324
+ }
1325
+ } else
1326
+ A(k), M(1), C?.(1, k);
1327
+ };
1328
+ return /* @__PURE__ */ m(
1329
+ "div",
1330
+ {
1331
+ className: "bwg-pagination-container",
1332
+ style: {
1333
+ padding: "10px",
1334
+ display: "flex",
1335
+ justifyContent: "space-between",
1336
+ alignItems: "center",
1337
+ borderTop: "1px solid #dddddd",
1338
+ position: "relative"
1339
+ },
1340
+ children: [
1341
+ /* @__PURE__ */ m(
1342
+ "div",
1343
+ {
1344
+ style: {
1345
+ display: "flex",
1346
+ alignItems: "center",
1347
+ gap: "8px"
1348
+ },
1349
+ children: [
1350
+ /* @__PURE__ */ e("span", { style: { fontSize: "12px", color: "#333333" }, children: "페이지당" }),
1351
+ /* @__PURE__ */ e(
1352
+ "select",
1353
+ {
1354
+ value: n ? S : I,
1355
+ onChange: (k) => Y(Number(k.target.value)),
1356
+ disabled: !b,
1357
+ style: {
1358
+ padding: "4px 8px",
1359
+ border: "1px solid #d9d9d9",
1360
+ borderRadius: "6px",
1361
+ fontSize: "12px",
1362
+ color: "#333333",
1363
+ opacity: b ? 1 : 0.5
1364
+ },
1365
+ children: h.map((k) => /* @__PURE__ */ m("option", { value: k, children: [
1366
+ k,
1367
+ "개"
1368
+ ] }, k))
1369
+ }
1370
+ ),
1371
+ /* @__PURE__ */ m(
1372
+ "span",
1373
+ {
1374
+ style: {
1375
+ fontSize: "12px",
1376
+ color: "#666",
1377
+ opacity: b ? 1 : 0.5
1378
+ },
1379
+ children: [
1380
+ "/ 총 ",
1381
+ q,
1382
+ "개"
1383
+ ]
1384
+ }
1385
+ )
1386
+ ]
1387
+ }
1388
+ ),
1389
+ /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: /* @__PURE__ */ m(
1390
+ ee,
1391
+ {
1392
+ theme: {
1393
+ components: {
1394
+ Button: {
1395
+ defaultBorderColor: "#e8e8e8",
1396
+ defaultHoverBorderColor: "var(--primary-color)",
1397
+ defaultHoverColor: "var(--text-primary)",
1398
+ contentFontSize: 13,
1399
+ defaultColor: "var(--text-primary)",
1400
+ paddingInline: 0
1401
+ }
1402
+ }
1403
+ },
1404
+ children: [
1405
+ /* @__PURE__ */ m(
1406
+ ee,
1407
+ {
1408
+ theme: {
1409
+ components: {
1410
+ Button: {
1411
+ defaultColor: "#999999",
1412
+ defaultHoverColor: "var(--text-primary)"
1413
+ }
1414
+ }
1415
+ },
1416
+ children: [
1417
+ /* @__PURE__ */ e(
1418
+ $,
1419
+ {
1420
+ onClick: () => T(1),
1421
+ disabled: !b || w === 1,
1422
+ style: {
1423
+ width: "26px",
1424
+ height: "26px",
1425
+ border: 0,
1426
+ background: !b || w === 1 ? "#f1f1f1" : "white",
1427
+ cursor: !b || w === 1 ? "not-allowed" : "pointer",
1428
+ opacity: b ? 1 : 0.5
1429
+ },
1430
+ icon: /* @__PURE__ */ m(
1431
+ "svg",
1432
+ {
1433
+ xmlns: "http://www.w3.org/2000/svg",
1434
+ width: "22",
1435
+ height: "22",
1436
+ viewBox: "0 0 22 22",
1437
+ fill: "none",
1438
+ children: [
1439
+ /* @__PURE__ */ e(
1440
+ "path",
1441
+ {
1442
+ d: "M12 17L7 12L12 7",
1443
+ stroke: "currentColor",
1444
+ "stroke-width": "1.5",
1445
+ "stroke-linecap": "round",
1446
+ "stroke-linejoin": "round"
1447
+ }
1448
+ ),
1449
+ /* @__PURE__ */ e(
1450
+ "path",
1451
+ {
1452
+ d: "M17 17L12 12L17 7",
1453
+ stroke: "currentColor",
1454
+ "stroke-width": "1.5",
1455
+ "stroke-linecap": "round",
1456
+ "stroke-linejoin": "round"
1457
+ }
1458
+ )
1459
+ ]
1460
+ }
1461
+ )
1462
+ }
1463
+ ),
1464
+ /* @__PURE__ */ e(
1465
+ $,
1466
+ {
1467
+ onClick: () => T(w - 1),
1468
+ disabled: !b || w === 1,
1469
+ style: {
1470
+ width: "26px",
1471
+ height: "26px",
1472
+ border: 0,
1473
+ background: !b || w === 1 ? "#f1f1f1" : "white",
1474
+ cursor: !b || w === 1 ? "not-allowed" : "pointer",
1475
+ opacity: b ? 1 : 0.5
1476
+ },
1477
+ icon: /* @__PURE__ */ e(
1478
+ "svg",
1479
+ {
1480
+ xmlns: "http://www.w3.org/2000/svg",
1481
+ width: "22",
1482
+ height: "22",
1483
+ viewBox: "0 0 22 22",
1484
+ fill: "none",
1485
+ children: /* @__PURE__ */ e(
1486
+ "path",
1487
+ {
1488
+ d: "M14 17L9 12L14 7",
1489
+ stroke: "currentColor",
1490
+ "stroke-width": "1.5",
1491
+ "stroke-linecap": "round",
1492
+ "stroke-linejoin": "round"
1493
+ }
1494
+ )
1495
+ }
1496
+ )
1497
+ }
1498
+ )
1499
+ ]
1500
+ }
1501
+ ),
1502
+ /* @__PURE__ */ e(
1503
+ "div",
1504
+ {
1505
+ style: { display: "flex", alignItems: "center", gap: 6 },
1506
+ children: (() => {
1507
+ if (!b || B === 0)
1508
+ return /* @__PURE__ */ e(
1509
+ $,
1510
+ {
1511
+ disabled: !0,
1512
+ style: {
1513
+ width: "26px",
1514
+ height: "26px"
1515
+ },
1516
+ children: "1"
1517
+ }
1518
+ );
1519
+ const k = 5;
1520
+ let H = 1, K = Math.min(k, B);
1521
+ w > 3 && B > k && (H = Math.max(1, w - 2), K = Math.min(
1522
+ B,
1523
+ H + k - 1
1524
+ ), K === B && (H = Math.max(1, K - k + 1)));
1525
+ const J = [];
1526
+ for (let W = H; W <= K; W++)
1527
+ J.push(
1528
+ /* @__PURE__ */ e(
1529
+ $,
1530
+ {
1531
+ onClick: () => T(W),
1532
+ style: {
1533
+ width: "26px",
1534
+ height: "26px",
1535
+ background: w === W ? "var(--primary-color)" : "#ffffff",
1536
+ color: w === W ? "#ffffff" : "#333333",
1537
+ cursor: "pointer"
1538
+ },
1539
+ children: W
1540
+ },
1541
+ W
1542
+ )
1543
+ );
1544
+ return J;
1545
+ })()
1546
+ },
1547
+ L
1548
+ ),
1549
+ /* @__PURE__ */ m(
1550
+ ee,
1551
+ {
1552
+ theme: {
1553
+ components: {
1554
+ Button: {
1555
+ defaultColor: "#999999",
1556
+ defaultHoverColor: "var(--text-primary)"
1557
+ }
1558
+ }
1559
+ },
1560
+ children: [
1561
+ /* @__PURE__ */ e(
1562
+ $,
1563
+ {
1564
+ onClick: () => T(w + 1),
1565
+ disabled: !b || w >= B,
1566
+ style: {
1567
+ width: "26px",
1568
+ height: "26px",
1569
+ border: 0,
1570
+ background: !b || w >= B ? "#f1f1f1" : "white",
1571
+ cursor: !b || w >= B ? "not-allowed" : "pointer",
1572
+ opacity: b ? 1 : 0.5
1573
+ },
1574
+ icon: /* @__PURE__ */ e(
1575
+ "svg",
1576
+ {
1577
+ xmlns: "http://www.w3.org/2000/svg",
1578
+ width: "22",
1579
+ height: "22",
1580
+ viewBox: "0 0 22 22",
1581
+ fill: "none",
1582
+ children: /* @__PURE__ */ e(
1583
+ "path",
1584
+ {
1585
+ d: "M10 17L15 12L10 7",
1586
+ stroke: "currentColor",
1587
+ "stroke-width": "1.5",
1588
+ "stroke-linecap": "round",
1589
+ "stroke-linejoin": "round"
1590
+ }
1591
+ )
1592
+ }
1593
+ )
1594
+ }
1595
+ ),
1596
+ /* @__PURE__ */ e(
1597
+ $,
1598
+ {
1599
+ onClick: () => T(B),
1600
+ disabled: !b || w >= B,
1601
+ style: {
1602
+ width: "26px",
1603
+ height: "26px",
1604
+ border: 0,
1605
+ background: !b || w >= B ? "#f1f1f1" : "white",
1606
+ cursor: !b || w >= B ? "not-allowed" : "pointer",
1607
+ opacity: b ? 1 : 0.5
1608
+ },
1609
+ icon: /* @__PURE__ */ m(
1610
+ "svg",
1611
+ {
1612
+ xmlns: "http://www.w3.org/2000/svg",
1613
+ width: "22",
1614
+ height: "22",
1615
+ viewBox: "0 0 22 22",
1616
+ fill: "none",
1617
+ children: [
1618
+ /* @__PURE__ */ e(
1619
+ "path",
1620
+ {
1621
+ d: "M12 17L17 12L12 7",
1622
+ stroke: "currentColor",
1623
+ "stroke-width": "1.5",
1624
+ "stroke-linecap": "round",
1625
+ "stroke-linejoin": "round"
1626
+ }
1627
+ ),
1628
+ /* @__PURE__ */ e(
1629
+ "path",
1630
+ {
1631
+ d: "M7 17L12 12L7 7",
1632
+ stroke: "currentColor",
1633
+ "stroke-width": "1.5",
1634
+ "stroke-linecap": "round",
1635
+ "stroke-linejoin": "round"
1636
+ }
1637
+ )
1638
+ ]
1639
+ }
1640
+ )
1641
+ }
1642
+ )
1643
+ ]
1644
+ }
1645
+ )
1646
+ ]
1647
+ }
1648
+ ) })
1649
+ ]
1650
+ }
1651
+ );
1652
+ }
1653
+ );
1654
+ Mt.displayName = "BwgPagination";
1655
+ const $r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC", jr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC";
1656
+ let je = null;
1657
+ const Gr = [
1658
+ { label: "엑셀다운로드", tag: "excel" },
1659
+ { label: "엑셀(제목포함)", tag: "withTitleExcel" },
1660
+ { label: "-" },
1661
+ { label: "필터", type: "check", checked: !1, tag: "filter" },
1662
+ // { label: "필터초기화", tag: "initFilter" },
1663
+ { label: "열고정", tag: "fixedCol" },
1664
+ { label: "행고정", tag: "fixedRow" },
1665
+ { label: "고정해제", tag: "fixedCancel" },
1666
+ { label: "-" },
1667
+ { label: "숨기기", tag: "hide" },
1668
+ { label: "숨기기해제", tag: "hideClear" },
1669
+ { label: "레이아웃 초기화", tag: "initLayout" }
1670
+ ], Or = [
1671
+ { label: "엑셀다운로드", tag: "excel" },
1672
+ { label: "엑셀(들여쓰기 표시)", tag: "showIndentExcel" },
1673
+ { label: "엑셀(제목포함)", tag: "withTitleExcel" },
1674
+ { label: "-" },
1675
+ { label: "필터", type: "check", checked: !1, tag: "filter" },
1676
+ // { label: "필터초기화", tag: "initFilter" },
1677
+ { label: "열고정", tag: "fixedCol" },
1678
+ { label: "행고정", tag: "fixedRow" },
1679
+ { label: "고정해제", tag: "fixedCancel" },
1680
+ { label: "-" },
1681
+ { label: "숨기기", tag: "hide" },
1682
+ { label: "숨기기해제", tag: "hideClear" },
1683
+ { label: "레이아웃 초기화", tag: "initLayout" }
1684
+ ], Wr = ({ children: s }) => {
1685
+ const [r, c] = F(!1), [o, i] = F(null);
1686
+ return r ? /* @__PURE__ */ e(
1687
+ "div",
1688
+ {
1689
+ style: {
1690
+ padding: "20px",
1691
+ border: "1px solid #ff4d4f",
1692
+ borderRadius: "6px",
1693
+ backgroundColor: "#fff2f0",
1694
+ margin: "10px"
1695
+ },
1696
+ children: /* @__PURE__ */ e(
1697
+ Be,
1698
+ {
1699
+ message: "리얼그리드 로드 실패",
1700
+ description: /* @__PURE__ */ m("div", { children: [
1701
+ /* @__PURE__ */ e("p", { children: "리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다." }),
1702
+ /* @__PURE__ */ m("p", { style: { fontSize: "12px", color: "#666", marginTop: "8px" }, children: [
1703
+ "오류: ",
1704
+ o?.message || "알 수 없는 오류"
1705
+ ] }),
1706
+ /* @__PURE__ */ e(
1707
+ $,
1708
+ {
1709
+ type: "primary",
1710
+ size: "small",
1711
+ style: { marginTop: "8px" },
1712
+ onClick: () => {
1713
+ c(!1), i(null), window.location.reload();
1714
+ },
1715
+ children: "다시 시도"
1716
+ }
1717
+ )
1718
+ ] }),
1719
+ type: "error",
1720
+ showIcon: !0
1721
+ }
1722
+ )
1723
+ }
1724
+ ) : /* @__PURE__ */ e(
1725
+ Ur,
1726
+ {
1727
+ onError: (h) => {
1728
+ console.error("BwgGrid 에러:", h), i(h), c(!0);
1729
+ },
1730
+ children: s
1731
+ }
1732
+ );
1733
+ };
1734
+ class Ur extends or {
1735
+ constructor(r) {
1736
+ super(r), this.state = { hasError: !1 };
1737
+ }
1738
+ static getDerivedStateFromError(r) {
1739
+ return { hasError: !0 };
1740
+ }
1741
+ componentDidCatch(r, c) {
1742
+ this.props.onError(r);
1743
+ }
1744
+ render() {
1745
+ return this.state.hasError ? null : this.props.children;
1746
+ }
1747
+ }
1748
+ const Kr = De(
1749
+ ({
1750
+ type: s = "nrml",
1751
+ gridDivStyle: r,
1752
+ gridDivClassName: c,
1753
+ gridColumns: o,
1754
+ gridOptions: i,
1755
+ gridEvents: h,
1756
+ bindRef: u,
1757
+ gridContext: D,
1758
+ renderers: C,
1759
+ gridInitCallback: v,
1760
+ gridId: S
1761
+ }, V) => {
1762
+ const l = ce(null), M = ce(/* @__PURE__ */ new Map()), I = ce(null), { gridSize: A } = ze(), f = ir(), n = He()?.menuId || "", x = ce(
1763
+ `${n || "NO_MENU"}__${S || "NO_GRID"}__${wr(16)}`
1764
+ ), b = (t, d, g, p) => {
1765
+ let a = [], y = [];
1766
+ const z = "treeNode";
1767
+ for (let j in t) {
1768
+ let _ = t[j];
1769
+ a[_[g]] = t[j];
1770
+ let Q = a[_[d]];
1771
+ if (Q == null || Q == "-") {
1772
+ y.push(_);
1773
+ continue;
1774
+ }
1775
+ Q[z] == null && (Q[z] = []), Q[z].push(_);
1776
+ }
1777
+ return y;
1778
+ }, E = Z((t) => {
1779
+ const d = (p) => {
1780
+ const a = [];
1781
+ return p.forEach((y) => {
1782
+ y.children && y.children.length > 0 ? a.push(...d(y.children)) : a.push(y);
1783
+ }), a;
1784
+ };
1785
+ return d(t).map((p) => ({
1786
+ fieldName: p.fieldName,
1787
+ dataType: p.dataType || "text"
1788
+ }));
1789
+ }, []), B = Z((t) => {
1790
+ const d = (p) => {
1791
+ const a = [];
1792
+ return p.forEach((y) => {
1793
+ y.children && y.children.length > 0 ? a.push(...d(y.children)) : a.push(y);
1794
+ }), a;
1795
+ };
1796
+ return d(t).map((p) => ({
1797
+ ...p,
1798
+ header: {
1799
+ ...p.header,
1800
+ template: p.required ? `<img src='${jr}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} ` : p.editable ? `<img src='${$r}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} ` : "${headerText}",
1801
+ values: { headerText: p.header?.text ?? "" },
1802
+ text: p.header?.text || ""
1803
+ },
1804
+ styleName: p.dataType === "number" ? "right" : p.styleName || "center"
1805
+ }));
1806
+ }, []);
1807
+ Re(
1808
+ V,
1809
+ () => ({
1810
+ /**
1811
+ * 데이터 리스트 삽입
1812
+ * @param dataList rowDataList
1813
+ * @param option
1814
+ * @returns
1815
+ */
1816
+ addAllData(t, d) {
1817
+ const g = l.current?.gridView.getCurrent().dataRow;
1818
+ if (l.current?.dataProvider instanceof rt) {
1819
+ l.current.dataProvider.clearRows();
1820
+ try {
1821
+ l.current?.gridView.showLoading(), l.current.dataProvider.setRows(t);
1822
+ } catch (p) {
1823
+ console.error("fillJsonData 오류:", p);
1824
+ } finally {
1825
+ l.current?.gridView.closeLoading();
1826
+ }
1827
+ }
1828
+ if (l.current?.dataProvider instanceof nt) {
1829
+ if (l.current.dataProvider.clearRows(), d?.treeOption?.dataField == null || d?.treeOption?.parentField == null)
1830
+ return;
1831
+ const p = {
1832
+ rows: "treeNode"
1833
+ };
1834
+ try {
1835
+ l.current?.gridView.showLoading();
1836
+ let a = b(
1837
+ t,
1838
+ d.treeOption?.parentField,
1839
+ d.treeOption?.dataField
1840
+ );
1841
+ l.current.dataProvider.fillJsonData(
1842
+ { treeNode: a },
1843
+ p
1844
+ ), d.treeOption.isExpand && l.current.gridView?.expandAll();
1845
+ } catch (a) {
1846
+ console.error("fillJsonData 오류:", a);
1847
+ } finally {
1848
+ l.current?.gridView.closeLoading();
1849
+ }
1850
+ }
1851
+ d?.isCurrent ? l.current?.gridView.setCurrent({ dataRow: g }) : l.current?.gridView.setCurrent({ dataRow: 0 });
1852
+ },
1853
+ /**
1854
+ * 그리드 변경상태 체크
1855
+ * @returns 변경상태 여부 (true: 변경상태 있음, false: 변경상태 없음)
1856
+ */
1857
+ isUpdate: () => {
1858
+ const t = l.current?.dataProvider?.getAllStateRows();
1859
+ if (!t) return !1;
1860
+ const d = (t.created?.length ?? 0) > 0, g = (t.updated?.length ?? 0) > 0, p = (t.deleted?.length ?? 0) > 0;
1861
+ return d || g || p;
1862
+ },
1863
+ /**
1864
+ * 그리드 인스턴스 직접 접근
1865
+ * @returns 그리드 인스턴스
1866
+ */
1867
+ getGridInstance: () => l.current,
1868
+ /** 현재 선택된 행 번호 반환 */
1869
+ getCurrentRow: () => l.current?.gridView.getCurrent().dataRow ?? -1,
1870
+ /** 현재 선택된 행 인덱스 반환 */
1871
+ getCurrentIndex: () => l.current?.gridView.getCurrent().itemIndex ?? -1,
1872
+ gridExcelDown(t) {
1873
+ l.current?.gridView.exportGrid({
1874
+ /**
1875
+ * 기본값 설정
1876
+ */
1877
+ type: "excel",
1878
+ // 문서타입
1879
+ target: "local",
1880
+ // 문서 저장 경로 (remote, local)
1881
+ allItems: !1,
1882
+ // 감춰진 모든 행을 출력할 것 인지의 여부
1883
+ lookupDisplay: !0,
1884
+ // lookupDisplay 값을 표시된 값으로의 저장 여부
1885
+ showProgress: !0,
1886
+ // Export시 프로그래스 바 표시 여부
1887
+ progressMessage: "엑셀 Export 중 입니다.",
1888
+ // Export시 프로그래스 바에 표시될 메시지를 지정
1889
+ applyDynamicStyles: !1,
1890
+ // DynamicStyles을 적용하여 Export할 것인지를 지정
1891
+ separateRows: !0,
1892
+ // true로 지정하면 export시 병합을 해제한 상태로 excel에 표시됩니다.
1893
+ indenting: !!t?.indenting,
1894
+ // 행 그룹핑 및 트리 그리드 자료를 export 시 들여쓰기 여부를 지정한다.
1895
+ header: "default",
1896
+ // header
1897
+ footer: "default",
1898
+ // footer
1899
+ sheetName: "",
1900
+ fileName: t?.fileName || "sample.xlsx",
1901
+ // export 시 저장된 파일 이름
1902
+ /**
1903
+ * Option 덮어쓰기
1904
+ */
1905
+ ...t
1906
+ });
1907
+ },
1908
+ /**
1909
+ * 수정된 그리드 데이터 반환
1910
+ * @returns 수정된 그리드 데이터
1911
+ */
1912
+ getGridSaveData: () => {
1913
+ const t = l.current?.dataProvider?.getAllStateRows();
1914
+ if (t === void 0)
1915
+ return [{}];
1916
+ let d = [];
1917
+ if (t.created !== void 0 && t.created.length > 0)
1918
+ for (const g in t.created) {
1919
+ let p = l.current?.dataProvider?.getJsonRow(
1920
+ t.created[g]
1921
+ );
1922
+ p = { ...p, iudFlag: "I" }, d.push(p);
1923
+ }
1924
+ if (t.updated !== void 0 && t.updated.length > 0)
1925
+ for (const g in t.updated) {
1926
+ let p = l.current?.dataProvider?.getJsonRow(
1927
+ t.updated[g]
1928
+ );
1929
+ p = { ...p, iudFlag: "U" }, d.push(p);
1930
+ }
1931
+ if (t.deleted !== void 0 && t.deleted.length > 0)
1932
+ for (const g in t.deleted) {
1933
+ let p = l.current?.dataProvider?.getJsonRow(
1934
+ t.deleted[g]
1935
+ );
1936
+ p = { ...p, iudFlag: "D" }, d.push(p);
1937
+ }
1938
+ return d;
1939
+ },
1940
+ /**
1941
+ * Grid의 체크된 행들의 상태값을 삭제로 반환
1942
+ * 체크된 행이 삭제상태일경우 이전상태로 변환
1943
+ */
1944
+ deleteGridData: () => {
1945
+ const t = l.current?.gridView, d = l.current?.dataProvider;
1946
+ if (!t || !d) return;
1947
+ const g = t.getCheckedItems();
1948
+ if (!g || g.length === 0) return;
1949
+ let p = g.map((a) => {
1950
+ const y = t.getDataRow(a);
1951
+ if (y < 0) return null;
1952
+ const z = d.getRowState(y);
1953
+ return { item: a, rowIdx: y, currentState: z };
1954
+ }).filter(
1955
+ (a) => a !== null
1956
+ );
1957
+ p = p.sort((a, y) => y.rowIdx - a.rowIdx), p.forEach(({ item: a, rowIdx: y, currentState: z }) => {
1958
+ if (z === ye.DELETED) {
1959
+ const j = M.current.get(a) ?? ye.NONE;
1960
+ d.setRowState(y, j), M.current.delete(a);
1961
+ } else z === ye.CREATED ? d.removeRow(y) : z === ye.CREATE_AND_DELETED ? d.setRowState(y, ye.CREATED) : (M.current.set(
1962
+ a,
1963
+ z ?? ye.NONE
1964
+ ), d.setRowState(y, ye.DELETED));
1965
+ }), t.checkAll(!1);
1966
+ },
1967
+ /** */
1968
+ _oriRowState: [{}],
1969
+ /** 데이터 프로바이더 직접 접근 */
1970
+ dp: s == "tree" ? l.current?.dataProvider : l.current?.dataProvider ?? null,
1971
+ /** 그리드 뷰 직접 접근 */
1972
+ vw: s == "tree" ? l.current?.gridView : l.current?.gridView ?? null
1973
+ })
1974
+ );
1975
+ const q = Z(
1976
+ (t, d, g) => {
1977
+ if (u !== void 0 && g >= 0) {
1978
+ let p = t.getDataSource().getJsonRow(g);
1979
+ u?.current?.setFieldsValue(p);
1980
+ } else u !== void 0 && g < 0 && u?.current?.resetFields();
1981
+ t.setCurrent({ dataRow: 0 }), h?.onCurrentRowChanged && h?.onCurrentRowChanged(t, d, g);
1982
+ },
1983
+ [u, h]
1984
+ ), w = Z(
1985
+ (t, d, g) => {
1986
+ const p = d.fieldName ?? "";
1987
+ u?.current?.getFieldInstance(p) && u?.current.setFieldValue(p, g), h?.onEditChange && h?.onEditChange(t, d, g);
1988
+ },
1989
+ [u, h]
1990
+ ), L = Z(
1991
+ (t, d, g) => {
1992
+ const p = t.getOrgFieldName(g), a = t.getValue(d, g);
1993
+ u?.current?.setFieldValue(p, a);
1994
+ },
1995
+ [u]
1996
+ ), T = Z(
1997
+ (t, d, g) => {
1998
+ console.log("@@ handleItemChecked", d, g), t.setCurrent({ dataRow: d }), h?.onItemChecked && h?.onItemChecked(t, d, g);
1999
+ },
2000
+ [h]
2001
+ ), Y = Z(
2002
+ (t, d, g, p) => {
2003
+ const a = t.getColumn(p).name ?? "", y = t.getValue(d, p);
2004
+ u?.current?.getFieldInstance(a) && u?.current.setFieldValue(a, y), h?.onCellEdited && h?.onCellEdited(t, d, g, p);
2005
+ },
2006
+ [u, h]
2007
+ ), k = Z(
2008
+ (t, d, g, p) => {
2009
+ if (typeof d.dataRow == "number" && d.dataRow != -1) {
2010
+ var a = t.getDataSource().getRowState(d.dataRow);
2011
+ if (a == "deleted" || a == "createAndDeleted")
2012
+ return !1;
2013
+ }
2014
+ return h?.onShowEditor != null && h?.onShowEditor(t, d, g, p), !0;
2015
+ },
2016
+ [u, h]
2017
+ ), H = Z(
2018
+ (t) => {
2019
+ if (!l.current) return;
2020
+ const d = l.current.gridView, g = d.getDataSource();
2021
+ if (i?.container?.page) {
2022
+ const p = d.getPage(), a = d.getPageCount(), y = g.getRowCount();
2023
+ R({
2024
+ currentPage: p,
2025
+ totalPages: a,
2026
+ totalData: y
2027
+ });
2028
+ }
2029
+ },
2030
+ [i?.container?.page]
2031
+ ), K = Z(() => {
2032
+ if (!l.current) return;
2033
+ const t = l.current.gridView, d = t.getDataSource();
2034
+ __SYS_CD__;
2035
+ const g = ["onKeyDown"], p = ["onRowInserted"];
2036
+ Object.keys(h ?? {}).map((a) => {
2037
+ g.includes(a) ? t[a + "Add"] = h?.[a] : t[a] = h?.[a], p.includes(a) ? d[a + "Add"] = h?.[a] : d[a] = h?.[a];
2038
+ }), d instanceof rt && (d.onRowInserted = (a, y) => {
2039
+ y < 0 || (setTimeout(function() {
2040
+ t?.setCurrent({ dataRow: y });
2041
+ }, 1), a.onRowInsertedAdd !== void 0 && a.onRowInsertedAdd(a, y));
2042
+ }), t.onKeyDown = function(a, y) {
2043
+ if (y.code == "Space") {
2044
+ let z = a.getSelectedItems(!0);
2045
+ for (const j in z)
2046
+ a.isCheckable(z[j]) && (a.isCheckedItem(z[j]) ? a.checkItem(z[j], !1, !1) : a.checkItem(z[j], !0, !1));
2047
+ }
2048
+ return a.onKeyDownAdd !== void 0 && a.onKeyDownAdd(a, y), !0;
2049
+ }, l.current.gridView.onCurrentRowChanged = q, l.current.gridView.onEditChange = w, l.current.gridView.getDataSource().onValueChanged = L, l.current.gridView.onItemChecked = T, l.current.gridView.onCellEdited = Y, l.current.gridView.onShowEditor = k, l.current.gridView.onDataLoadComplated = H, l.current.gridView.onLayoutPropertyChanged = function(a, y, z, j, _) {
2050
+ const Q = y?.column || "알 수 없음";
2051
+ console.log("🔵 [BwgGrid] 레이아웃 속성 변경 감지:", {
2052
+ columnName: Q,
2053
+ property: z,
2054
+ oldValue: j,
2055
+ newValue: _,
2056
+ layout: y
2057
+ }), z === "visible" && console.log(`📌 컬럼 "${Q}" ${_ ? "표시" : "숨김"}`), (z === "order" || z === "index") && console.log(
2058
+ `📌 컬럼 "${Q}" 위치 변경: ${j} → ${_}`
2059
+ ), h?.onLayoutPropertyChanged && h.onLayoutPropertyChanged(
2060
+ a,
2061
+ y,
2062
+ z,
2063
+ j,
2064
+ _
2065
+ );
2066
+ };
2067
+ }, [
2068
+ q,
2069
+ w,
2070
+ L,
2071
+ Y,
2072
+ k,
2073
+ H,
2074
+ S,
2075
+ n
2076
+ ]), J = Z(
2077
+ (t) => {
2078
+ if (!t) return;
2079
+ const d = S, g = n, p = __SYS_CD__;
2080
+ try {
2081
+ t.gridView.setSortingOptions({
2082
+ enabled: !0
2083
+ }), t.gridView.sortMode = vr.EXPLICIT, t.gridView.editorOptions.viewGridInside = !0, t.gridView instanceof ot && t.gridView.setTreeOptions({
2084
+ expandWhenSetData: Mr.REMAIN_AND_EXPAND,
2085
+ expanderIconStyle: Sr.SQUARE,
2086
+ iconVisible: !1,
2087
+ lineVisible: !0
2088
+ }), t.dataProvider.setOptions({
2089
+ deleteCreated: !0,
2090
+ softDeleting: !0
2091
+ });
2092
+ const a = () => i?.display?.rowHeight !== void 0 ? i.display.rowHeight : {
2093
+ 0: 25,
2094
+ // 작게
2095
+ 1: 30,
2096
+ // 보통
2097
+ 2: 43
2098
+ // 크게
2099
+ }[A];
2100
+ t.gridView.setDisplayOptions({
2101
+ // 고정옵션
2102
+ showEmptyMessage: !0,
2103
+ emptyMessage: "조회된 데이터가 존재하지 않습니다.",
2104
+ // 커스텀 포커스 스타일
2105
+ useFocusClass: !0,
2106
+ // 커스터마이징 옵션
2107
+ minRowHeight: i?.display?.minRowHeight || 25,
2108
+ maxRowHeight: i?.display?.maxRowHeight || 100,
2109
+ rowHeight: a(),
2110
+ rowChangeDelay: i?.display?.rowChangeDelay || 0,
2111
+ selectionStyle: i?.display?.selectionStyle || Ir.ROWS,
2112
+ fitStyle: i?.display?.fitStyle || Ar.FILL,
2113
+ useAlternateRowStyle: i?.display?.useAlternateRowStyle || !1
2114
+ }), t.gridView.setEditOptions({
2115
+ // 고정옵션
2116
+ commitWhenExitLast: !0,
2117
+ columnEditableFirst: !1,
2118
+ commitByCell: !0,
2119
+ commitWhenLeave: !0,
2120
+ crossWhenExitLast: !0,
2121
+ confirmWhenDelete: !1,
2122
+ deletable: !1,
2123
+ revertable: !1,
2124
+ showOnlyValidationMessage: !0,
2125
+ // 커스터마이징 옵션
2126
+ editable: i?.edit?.editable || !1,
2127
+ validateOnEdited: i?.edit?.validateOnEdited || !1
2128
+ }), t.gridView.setCopyOptions({
2129
+ singleMode: i?.copy?.singleMode || !1
2130
+ }), t.gridView.setPasteOptions({
2131
+ selectBlockPaste: !0,
2132
+ checkReadOnly: !0,
2133
+ throwValidationError: !1
2134
+ }), t.gridView.header.height = i?.header?.height || 43, t.gridView.header.styleName = i?.header?.styleName || "bwgGridHeader", i?.container?.radio ? t.gridView.setCheckBar({
2135
+ exclusive: i?.container?.radio || !1
2136
+ }) : t.gridView.setCheckBar({
2137
+ visible: i?.container?.check || !1,
2138
+ showAll: i?.container?.checkAll || !1
2139
+ }), t.gridView.setStateBar({
2140
+ visible: i?.container?.state || !1
2141
+ }), t.gridView.rowIndicator.visible = i?.container?.indicator || !1, t.gridView instanceof Vr && (t.gridView.groupPanel.visible = i?.container?.panel || !1), t.gridView.setFooters({
2142
+ visible: i?.container?.footer || !1
2143
+ }), t.gridView.setHeader({
2144
+ visible: i?.container?.header || !0,
2145
+ showTooltip: i?.container?.headerShowTooltip || !1
2146
+ }), t.gridView.formatOptions.numberFormat = "#,##0";
2147
+ } catch (a) {
2148
+ console.log("그리드 옵션 설정 중 오류:", a);
2149
+ }
2150
+ try {
2151
+ t.gridView instanceof ot ? t.gridView.setContextMenu(Or) : t.gridView.setContextMenu(Gr), t.gridView.onContextMenuItemClicked = function(a, y, z) {
2152
+ if (!(!z || !z.column)) {
2153
+ if (y.tag == "excel")
2154
+ re(
2155
+ a,
2156
+ {
2157
+ isTitle: !1
2158
+ },
2159
+ D?.excel
2160
+ );
2161
+ else if (y.tag == "showIndentExcel")
2162
+ re(
2163
+ a,
2164
+ {
2165
+ isTitle: !1,
2166
+ treeBlank: !0
2167
+ },
2168
+ D?.excel
2169
+ );
2170
+ else if (y.tag == "withTitleExcel")
2171
+ re(
2172
+ a,
2173
+ {
2174
+ isTitle: !0,
2175
+ treeBlank: !1
2176
+ },
2177
+ D?.excel
2178
+ );
2179
+ else if (y.tag == "filter")
2180
+ te(a, y);
2181
+ else if (y.tag == "fixedCol") {
2182
+ let _ = (a.layoutByColumn(z.column) || a.layoutByName(z.column))?.root?.vindex + 1;
2183
+ _ > 0 && a.setFixedOptions({ colCount: _ });
2184
+ } else if (y.tag == "fixedRow")
2185
+ a.setFixedOptions({ rowCount: (z.itemIndex || 0) + 1 });
2186
+ else if (y.tag == "fixedCancel")
2187
+ a.setFixedOptions({ colCount: 0, rowCount: 0 });
2188
+ else if (y.tag == "hide")
2189
+ a.layoutByName(z.column).visible = !1, a._hideCols || (a._hideCols = []), a._hideCols[a._hideCols.length] = z.column;
2190
+ else if (y.tag == "hideClear") {
2191
+ if (a._hideCols && a._hideCols.length > 0) {
2192
+ for (var j = 0; j < a._hideCols.length; j++)
2193
+ a.layoutByName(a._hideCols[j]).visible = !0;
2194
+ a._hideCols = [];
2195
+ }
2196
+ } else if (y.tag == "initLayout") {
2197
+ if (d && g)
2198
+ try {
2199
+ et(p, g, d);
2200
+ } catch (_) {
2201
+ console.warn("[BwgGrid] 레이아웃 삭제 실패:", _);
2202
+ }
2203
+ if (o) {
2204
+ a.setColumns(o);
2205
+ const _ = o.filter((Q) => Q.visible !== !1).map((Q) => Q.fieldName || Q.name);
2206
+ _.length > 0 && a.setColumnLayout(_);
2207
+ }
2208
+ }
2209
+ }
2210
+ };
2211
+ } catch (a) {
2212
+ console.log("컨텍스트 설정 중 오류:", a);
2213
+ }
2214
+ },
2215
+ [i, A, S, n]
2216
+ ), W = (t) => {
2217
+ if (!(!C || C.length === 0))
2218
+ try {
2219
+ C.forEach((d) => {
2220
+ const { name: g, renderer: p } = d;
2221
+ if (g && p) {
2222
+ const a = typeof p == "function" ? new p() : p;
2223
+ t.gridView.registerCustomRenderer(g, a);
2224
+ }
2225
+ });
2226
+ } catch (d) {
2227
+ console.error("커스텀 렌더러 초기화 중 오류:", d);
2228
+ }
2229
+ }, ie = (t) => {
2230
+ t.onPageChanged = (d, g) => {
2231
+ R((p) => ({
2232
+ ...p,
2233
+ currentPage: g
2234
+ }));
2235
+ }, t.onPageCountChanged = (d, g) => {
2236
+ R((p) => ({
2237
+ ...p,
2238
+ totalPages: g
2239
+ }));
2240
+ };
2241
+ }, ue = (t) => {
2242
+ l.current?.gridView && l.current.gridView.setPage(t);
2243
+ }, P = (t) => {
2244
+ if (i?.layout?.colspan && i.layout.colspan.length > 0 && i?.layout?.colspan.forEach(
2245
+ (d) => {
2246
+ const g = t.gridView.layoutByColumn(
2247
+ d.fieldName
2248
+ );
2249
+ if (g) {
2250
+ const p = d.span;
2251
+ g.spanCallback = function(a, y, z) {
2252
+ return p;
2253
+ };
2254
+ }
2255
+ }
2256
+ ), o && o.length > 0 && o.some(
2257
+ (g) => g.children && g.children.length > 0
2258
+ ))
2259
+ try {
2260
+ (() => {
2261
+ const p = JSON.parse(JSON.stringify(o)), a = [], y = (z) => {
2262
+ const j = [];
2263
+ return z.children.map((_) => {
2264
+ if (_.children && _.children.length > 0) {
2265
+ const Q = y(_), se = _.header?.text || _.fieldName, ke = t.gridView.getColumnProperty(
2266
+ _.fieldName,
2267
+ "header"
2268
+ );
2269
+ delete _.children, delete _.header;
2270
+ let Dt = {
2271
+ name: _.fieldName,
2272
+ header: {
2273
+ text: ke?.text || se,
2274
+ template: ke?.template,
2275
+ values: ke?.values,
2276
+ visible: ke?.visible ?? !0
2277
+ },
2278
+ items: Q,
2279
+ ..._
2280
+ };
2281
+ j.push(Dt);
2282
+ } else
2283
+ j.push(_.fieldName);
2284
+ }), j;
2285
+ };
2286
+ p.map((z) => {
2287
+ if (z.children && z.children.length > 0) {
2288
+ const j = y(z), _ = z.header?.text || z.fieldName, Q = z.header?.visible ?? !0, se = t.gridView.getColumnProperty(
2289
+ z.fieldName,
2290
+ "header"
2291
+ );
2292
+ delete z.children, delete z.header;
2293
+ const ke = {
2294
+ name: z.fieldName,
2295
+ header: {
2296
+ text: se?.text || _,
2297
+ template: se?.template,
2298
+ values: se?.values,
2299
+ visible: se?.visible || Q
2300
+ },
2301
+ items: j,
2302
+ ...z
2303
+ };
2304
+ a.push(ke);
2305
+ } else
2306
+ a.push(z.fieldName);
2307
+ }), console.log("Final Layout!!", a), t.gridView.setColumnLayout(a);
2308
+ })();
2309
+ } catch (g) {
2310
+ console.error("컬럼 레이아웃 설정 오류:", g);
2311
+ }
2312
+ }, U = () => {
2313
+ if (l.current) {
2314
+ if (s === "nrml") {
2315
+ const t = l.current;
2316
+ if (J(t), W(t), o && o.length > 0) {
2317
+ const d = E(o), g = B(o);
2318
+ t.gridView.getDataSource().setFields(d), t.gridView.setColumns(g);
2319
+ }
2320
+ if (P(t), i?.container?.page) {
2321
+ const d = i?.pagingOption?.pageSize || 10;
2322
+ t.gridView.setPaging(!0, d), ie(t.gridView);
2323
+ }
2324
+ } else {
2325
+ const t = l.current;
2326
+ if (J(t), W(t), o && o.length > 0) {
2327
+ const d = E(o), g = B(o);
2328
+ t.gridView.getDataSource().setFields(d), t.gridView.setColumns(g);
2329
+ }
2330
+ P(l.current);
2331
+ }
2332
+ setTimeout(() => {
2333
+ if (v) {
2334
+ const t = typeof V == "object" && V !== null ? V.current : null;
2335
+ v(t);
2336
+ }
2337
+ }, 0);
2338
+ }
2339
+ }, re = (t, d, g) => {
2340
+ const p = t.getDataSource();
2341
+ let a = g?.footer == null ? "default" : g.footer;
2342
+ p.getRowCount() < 1 && (a = "hidden");
2343
+ let y = {
2344
+ type: "excel",
2345
+ // 문서타입
2346
+ target: "local",
2347
+ // 문서 저장 경로 (remote, local)
2348
+ allItems: !1,
2349
+ // 감춰진 모든 행을 출력할 것 인지의 여부
2350
+ lookupDisplay: !0,
2351
+ // lookupDisplay 값을 표시된 값으로의 저장 여부
2352
+ compatibility: !0,
2353
+ // 2007 호환 여부를 지정
2354
+ showProgress: !0,
2355
+ // Export시 프로그래스 바 표시 여부
2356
+ progressMessage: "엑셀 Export 중 입니다.",
2357
+ // Export시 프로그래스 바에 표시될 메시지를 지정
2358
+ applyDynamicStyles: !1,
2359
+ // DynamicStyles을 적용하여 Export할 것인지를 지정
2360
+ separateRows: !0,
2361
+ // true로 지정하면 export시 병합을 해제한 상태로 excel에 표시됩니다.
2362
+ indenting: !!d?.treeBlank,
2363
+ // 행 그룹핑 및 트리 그리드 자료를 export 시 들여쓰기 여부를 지정한다.
2364
+ footer: a,
2365
+ // footer
2366
+ sheetName: "",
2367
+ documentTitle: {},
2368
+ // 제목
2369
+ documentSubtitle: {},
2370
+ // 부제
2371
+ documentTail: {},
2372
+ // 꼬릿말
2373
+ fileName: g?.fileName || "sample.xlsx"
2374
+ // export 시 저장된 파일 이름
2375
+ };
2376
+ p instanceof nt && (y.indenting = !!d?.treeBlank), g?.isCellMerge == !0 && (y.separateRows = !1), xe(g?.sheetName) == !1 && (y.sheetName = g?.sheetName), d?.isTitle && (y.documentTitle = {
2377
+ message: yr(g?.mainTitle, "No Title"),
2378
+ visible: !0,
2379
+ /*
2380
+ * @RealGrid2 deprecated -> styleName 으로 변경
2381
+ */
2382
+ // styles: {fontSize: 15,fontBold: true,textAlignment: "center",lineAlignment: "center"},
2383
+ styleName: "documentStyle",
2384
+ spaceTop: 1,
2385
+ spaceBottom: 0,
2386
+ height: 43
2387
+ }, xe(g?.subTitle) == !1 && (y.documentSubtitle = {
2388
+ message: g?.subTitle,
2389
+ visible: !0,
2390
+ /*
2391
+ * @RealGrid2 deprecated -> styleName 으로
2392
+ */
2393
+ // styles: {textAlignment: "center"},
2394
+ styleName: "center",
2395
+ height: 20
2396
+ }), xe(g?.tailTitle) == !1 && (y.documentTail = {
2397
+ message: g?.tailTitle,
2398
+ visible: !0,
2399
+ /*
2400
+ * @RealGrid2 deprecated -> styleName 으로 변경
2401
+ */
2402
+ // styles: {fontSize: 12,fontBold: true,textAlignment: "center"}
2403
+ styleName: "documentStyle"
2404
+ })), t.exportGrid(y);
2405
+ }, te = (t, d) => {
2406
+ const g = t.getDataSource(), p = g.getOrgFieldNames();
2407
+ if (d.checked)
2408
+ for (var a = 0; a < p.length; a++) {
2409
+ let z = [], j = g.getDistinctValues(p[a]) ?? [];
2410
+ if (j.length == 0) continue;
2411
+ let _ = t.columnByName(p[a]);
2412
+ for (var y = 0; y < j.length; y++) {
2413
+ if (j[y] == null) continue;
2414
+ let Q = _.values != null && _.values.indexOf(j[y]) != -1 ? _?.labels?.[_.values.indexOf(j[y])] : j[y];
2415
+ xe(Q) && (xe(j[y]) ? Q = " " : Q = j[y]);
2416
+ let se = "";
2417
+ j[y] == null ? se = "value=" + j[y] : se = "value='" + j[y] + "'", z.push({ name: Q, criteria: se });
2418
+ }
2419
+ t.setColumnFilters(p[a], z);
2420
+ }
2421
+ else
2422
+ for (var a = 0; a < p.length; a++)
2423
+ t.clearColumnFilters(p[a]), t.activateAllColumnFilters(p[a], !1), t.clearColumnFilters(p[a]);
2424
+ };
2425
+ O(() => {
2426
+ if (!l.current?.gridView) return;
2427
+ const t = () => ({
2428
+ 0: 25,
2429
+ // 작게
2430
+ 1: 30,
2431
+ // 보통
2432
+ 2: 43
2433
+ // 크게
2434
+ })[A], d = () => ({
2435
+ 0: 12,
2436
+ // 작게
2437
+ 1: 13,
2438
+ // 보통
2439
+ 2: 14
2440
+ // 크게
2441
+ })[A];
2442
+ l.current.gridView.setDisplayOptions({
2443
+ rowHeight: t()
2444
+ }), I.current && I.current.style.setProperty(
2445
+ "--bwg-grid-font-size",
2446
+ `${d()}px`
2447
+ );
2448
+ }, [A, i?.display?.rowHeight]), O(() => {
2449
+ if (l.current && l.current.gridView)
2450
+ if (s === "nrml") {
2451
+ const t = l.current;
2452
+ J(t);
2453
+ } else {
2454
+ const t = l.current;
2455
+ J(t);
2456
+ }
2457
+ }, [s, i, J]), O(() => {
2458
+ !l.current || !o || o.length === 0 || U();
2459
+ }, [o]), O(() => {
2460
+ l.current && K();
2461
+ }, [h, K]), O(() => {
2462
+ if (!(!S || !n || !l.current?.gridView || !o || o.length === 0))
2463
+ try {
2464
+ const t = Cr(__SYS_CD__, n, S);
2465
+ if (t) {
2466
+ const d = Array.isArray(t) ? t : t.layout || t;
2467
+ d && (l.current.gridView.setColumnLayout(d), console.log(
2468
+ `[BwgGrid] 저장된 레이아웃 로드 완료: ${__SYS_CD__}/${n}/${S}`
2469
+ ));
2470
+ }
2471
+ } catch (t) {
2472
+ console.warn("[BwgGrid] 레이아웃 로드 실패:", t);
2473
+ }
2474
+ }, [S, n]), O(() => {
2475
+ const t = (d) => {
2476
+ const g = d.ctrlKey || d.metaKey;
2477
+ je === x.current && (g && (d.key === "f" || d.key === "F") && (d.preventDefault(), he((p) => p && !1), Se(""), me((p) => !p)), g && (d.key === "g" || d.key === "G") && (d.preventDefault(), me((p) => p && !1), he((p) => !p)));
2478
+ };
2479
+ return window.addEventListener("keydown", t, { capture: !0 }), () => {
2480
+ window.removeEventListener("keydown", t, !0);
2481
+ };
2482
+ }, []);
2483
+ const [le, me] = F(!1), [ve, Se] = F(""), Pe = ce(null), [Me, he] = F(!1), [Ce, R] = F({
2484
+ currentPage: 0,
2485
+ totalPages: 0,
2486
+ totalData: 0
2487
+ });
2488
+ O(() => {
2489
+ R({
2490
+ currentPage: 0,
2491
+ totalPages: 0,
2492
+ totalData: 0
2493
+ });
2494
+ }, []), O(() => {
2495
+ le && setTimeout(() => {
2496
+ Pe.current?.focus?.();
2497
+ }, 0);
2498
+ }, [le]), O(() => () => {
2499
+ if (l.current)
2500
+ try {
2501
+ const t = l.current;
2502
+ t.gridView && (t.gridView.onDataLoadComplated = void 0, t.gridView.onCurrentRowChanged = void 0, t.gridView.onCellClicked = void 0, t.gridView.onCellDblClicked = void 0, t.gridView.onEditRowChanged = void 0, t.gridView.onItemChecked = void 0, t.gridView.onItemAllChecked = void 0, t.gridView.onColumnCheckedChanged = void 0, t.gridView.onCellButtonClicked = void 0, t.gridView.onEditChange = void 0, t.gridView.onCellEdited = void 0, t.gridView.onKeyUp = void 0, t.gridView.onKeyDown = void 0, t.gridView.onWheel = void 0, t.gridView.onValidateColumn = void 0, t.gridView.onValidateRow = void 0, t.gridView.onValidationFail = void 0, t.gridView.onRowInserting = void 0, t.gridView.onCellItemClicked = void 0, t.gridView.onShowEditor = void 0, t.gridView.onLayoutPropertyChanged = void 0, t.gridView.getDataSource() && (t.gridView.getDataSource().clearRows(), t.gridView.getDataSource().setFields([])), t.gridView.getDataSource().clearRows());
2503
+ } catch (t) {
2504
+ console.warn("⚠️ BwgGrid cleanup error:", t);
2505
+ }
2506
+ }, []);
2507
+ const G = Z(() => {
2508
+ const t = ve;
2509
+ console.log("@@ handleSearchEnter:", t);
2510
+ const d = l.current?.gridView;
2511
+ if (!d) return;
2512
+ if (d.isFiltered()) {
2513
+ console.log(
2514
+ "EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오."
2515
+ );
2516
+ return;
2517
+ }
2518
+ if (d.commit(), xe(t)) return;
2519
+ const g = d.getCurrent().itemIndex ?? -1;
2520
+ if (g < 0) return;
2521
+ const p = {
2522
+ value: t,
2523
+ startIndex: g + 1,
2524
+ wrap: !0,
2525
+ caseSensitive: !1,
2526
+ partialMatch: !0
2527
+ }, a = d.searchCell(p);
2528
+ d.setCurrent(a);
2529
+ }, [ve]), ae = Z((t) => {
2530
+ t.key === "Escape" && (t.preventDefault(), me(!1));
2531
+ }, []), fe = Z(() => {
2532
+ Se(""), me(!le);
2533
+ }, [le]), _e = Z(() => {
2534
+ he(!Me);
2535
+ }, [Me]), Vt = Z((t) => {
2536
+ t.key === "Escape" && (t.preventDefault(), he(!1));
2537
+ }, []), Nt = Z(() => {
2538
+ if (!S || !n || !l.current?.gridView) {
2539
+ console.warn(
2540
+ "[BwgGrid] 레이아웃 저장 실패: gridId 또는 menuId가 없습니다."
2541
+ );
2542
+ return;
2543
+ }
2544
+ try {
2545
+ const d = l.current.gridView.saveColumnLayout();
2546
+ d && (kr(__SYS_CD__, n, S, d), he(!1));
2547
+ } catch (t) {
2548
+ console.warn("[BwgGrid] 레이아웃 저장 실패:", t);
2549
+ }
2550
+ }, [S, n]), Bt = Z(() => {
2551
+ if (!S || !n || !l.current?.gridView) {
2552
+ console.warn(
2553
+ "[BwgGrid] 레이아웃 초기화 실패: gridId 또는 menuId가 없습니다."
2554
+ );
2555
+ return;
2556
+ }
2557
+ try {
2558
+ if (et(__SYS_CD__, n, S), o) {
2559
+ const t = B(o);
2560
+ l.current.gridView.setColumns(t);
2561
+ const d = o.filter((g) => g.visible !== !1).map((g) => g.fieldName || g.name);
2562
+ d.length > 0 && l.current.gridView.setColumnLayout(d);
2563
+ }
2564
+ console.log(
2565
+ `[BwgGrid] 레이아웃 초기화 완료: ${__SYS_CD__}/${n}/${S}`
2566
+ ), he(!1);
2567
+ } catch (t) {
2568
+ console.warn("[BwgGrid] 레이아웃 초기화 실패:", t);
2569
+ }
2570
+ }, [S, n, o, B]), Ae = {
2571
+ searchEnter: G,
2572
+ handleCloseKeyword: ae,
2573
+ handleSearch: fe,
2574
+ handleLayoutManager: _e,
2575
+ handleCloseLayoutManager: Vt,
2576
+ handleSaveLayout: Nt,
2577
+ handleResetLayout: Bt
2578
+ }, Ze = X(() => ({
2579
+ 0: 12,
2580
+ // 작게
2581
+ 1: 13,
2582
+ // 보통
2583
+ 2: 14
2584
+ // 크게
2585
+ })[A], [A]), Lt = X(
2586
+ () => ({
2587
+ ...r,
2588
+ position: "relative",
2589
+ width: r?.width || "100%",
2590
+ height: r?.height || "100%",
2591
+ // CSS 변수로 RealGrid 폰트 사이즈 제어
2592
+ "--bwg-grid-font-size": `${Ze}px`
2593
+ }),
2594
+ [r, Ze]
2595
+ );
2596
+ return /* @__PURE__ */ m(Wr, { children: [
2597
+ /* @__PURE__ */ m(
2598
+ "div",
2599
+ {
2600
+ ref: I,
2601
+ style: Lt,
2602
+ className: c,
2603
+ onClick: () => {
2604
+ je = x.current;
2605
+ },
2606
+ onFocusCapture: () => {
2607
+ je = x.current;
2608
+ },
2609
+ children: [
2610
+ le && /* @__PURE__ */ e(
2611
+ "div",
2612
+ {
2613
+ className: "grid-search-box",
2614
+ style: {
2615
+ "--search-button-size": `${f.buttonSize}px`,
2616
+ "--search-button-font-size": `${f.fontSize}px`,
2617
+ "--search-box-width": `${f.width}px`
2618
+ },
2619
+ children: /* @__PURE__ */ e(
2620
+ ee,
2621
+ {
2622
+ componentSize: f.componentSize,
2623
+ theme: {
2624
+ token: {
2625
+ fontSize: f.fontSize
2626
+ }
2627
+ },
2628
+ children: /* @__PURE__ */ m(ne, { gap: 3, children: [
2629
+ /* @__PURE__ */ e(
2630
+ pt,
2631
+ {
2632
+ ref: Pe,
2633
+ value: ve,
2634
+ name: "srchField",
2635
+ autoComplete: "off",
2636
+ placeholder: "검색어를 입력하세요.",
2637
+ onKeyUp: (t) => Ae.handleCloseKeyword(t),
2638
+ onChange: (t) => Se(t.target.value),
2639
+ onPressEnter: () => Ae.searchEnter()
2640
+ }
2641
+ ),
2642
+ /* @__PURE__ */ e(
2643
+ $,
2644
+ {
2645
+ variant: "solid",
2646
+ icon: /* @__PURE__ */ e(Ge, {}),
2647
+ onClick: () => me(!1)
2648
+ }
2649
+ )
2650
+ ] })
2651
+ }
2652
+ )
2653
+ }
2654
+ ),
2655
+ Me && /* @__PURE__ */ e(
2656
+ "div",
2657
+ {
2658
+ className: "grid-layout-manager-box",
2659
+ style: {
2660
+ "--search-button-size": `${f.buttonSize}px`,
2661
+ "--search-button-font-size": `${f.fontSize}px`,
2662
+ "--search-box-width": `${f.width}px`
2663
+ },
2664
+ onKeyUp: (t) => Ae.handleCloseLayoutManager(t),
2665
+ children: /* @__PURE__ */ e(
2666
+ ee,
2667
+ {
2668
+ componentSize: f.componentSize,
2669
+ theme: {
2670
+ token: {
2671
+ fontSize: f.fontSize
2672
+ }
2673
+ },
2674
+ children: /* @__PURE__ */ m(ne, { vertical: !0, gap: 10, children: [
2675
+ /* @__PURE__ */ m(ne, { gap: 6, style: { width: "100%", position: "relative" }, children: [
2676
+ /* @__PURE__ */ e(
2677
+ $,
2678
+ {
2679
+ className: "bwg-btn",
2680
+ icon: /* @__PURE__ */ e(
2681
+ "svg",
2682
+ {
2683
+ xmlns: "http://www.w3.org/2000/svg",
2684
+ width: "18",
2685
+ height: "18",
2686
+ viewBox: "0 0 18 18",
2687
+ fill: "none",
2688
+ children: /* @__PURE__ */ e(
2689
+ "path",
2690
+ {
2691
+ d: "M11.25 15V11.25H6.75V15M13.5 15H4.5C3.67157 15 3 14.3284 3 13.5V4.5C3 3.67157 3.67157 3 4.5 3H10.6287C11.0265 3 11.408 3.15804 11.6893 3.43934L14.5607 6.31066C14.842 6.59197 15 6.9735 15 7.37132V13.5C15 14.3284 14.3284 15 13.5 15Z",
2692
+ stroke: "currentColor",
2693
+ "stroke-linecap": "round",
2694
+ "stroke-linejoin": "round"
2695
+ }
2696
+ )
2697
+ }
2698
+ ),
2699
+ onClick: Ae.handleSaveLayout,
2700
+ disabled: !S || !n,
2701
+ children: "레이아웃 저장"
2702
+ }
2703
+ ),
2704
+ /* @__PURE__ */ e(
2705
+ $,
2706
+ {
2707
+ className: "bwg-btn",
2708
+ icon: /* @__PURE__ */ m(
2709
+ "svg",
2710
+ {
2711
+ xmlns: "http://www.w3.org/2000/svg",
2712
+ width: "18",
2713
+ height: "18",
2714
+ viewBox: "0 0 18 18",
2715
+ fill: "none",
2716
+ children: [
2717
+ /* @__PURE__ */ e("g", { "clip-path": "url(#clip0_1427_1188)", children: /* @__PURE__ */ e(
2718
+ "path",
2719
+ {
2720
+ d: "M14.7003 11.34C14.2603 12.58 13.4403 13.64 12.3503 14.36C11.2603 15.09 9.96032 15.44 8.66032 15.36C7.35032 15.28 6.11032 14.79 5.11032 13.94C4.11032 13.09 3.41032 11.95 3.12032 10.67C2.83032 9.39 2.96032 8.06 3.50032 6.86C4.04032 5.66 4.94032 4.68 6.09032 4.04C7.24032 3.41 8.56032 3.16 9.85032 3.35C12.0403 3.66 13.4903 5.24 15.0503 6.65M15.0403 2.63V6.65H11.0103",
2721
+ stroke: "currentColor",
2722
+ "stroke-linecap": "round",
2723
+ "stroke-linejoin": "round"
2724
+ }
2725
+ ) }),
2726
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_1427_1188", children: /* @__PURE__ */ e("rect", { width: "18", height: "18", fill: "white" }) }) })
2727
+ ]
2728
+ }
2729
+ ),
2730
+ onClick: Ae.handleResetLayout,
2731
+ disabled: !S || !n,
2732
+ children: "레이아웃 초기화"
2733
+ }
2734
+ ),
2735
+ /* @__PURE__ */ e(
2736
+ "div",
2737
+ {
2738
+ style: {
2739
+ position: "absolute",
2740
+ right: 0
2741
+ },
2742
+ children: /* @__PURE__ */ e(
2743
+ $,
2744
+ {
2745
+ type: "text",
2746
+ icon: /* @__PURE__ */ e(Ge, {}),
2747
+ style: {
2748
+ width: 30,
2749
+ height: 30
2750
+ },
2751
+ onClick: () => he(!1)
2752
+ }
2753
+ )
2754
+ }
2755
+ )
2756
+ ] }),
2757
+ (!S || !n) && /* @__PURE__ */ e(
2758
+ Be,
2759
+ {
2760
+ message: "그리드 설정정보가 완료되지 않았습니다. 관리자에게 문의하십시오",
2761
+ type: "warning",
2762
+ showIcon: !0,
2763
+ style: {
2764
+ fontSize: f.fontSize,
2765
+ border: 0,
2766
+ background: Ue.site.yellow01,
2767
+ color: "var(--text-primary)",
2768
+ padding: "4px 10px",
2769
+ borderRadius: 4
2770
+ }
2771
+ }
2772
+ )
2773
+ ] })
2774
+ }
2775
+ )
2776
+ }
2777
+ ),
2778
+ s === "nrml" ? /* @__PURE__ */ e(
2779
+ Nr,
2780
+ {
2781
+ ref: l,
2782
+ autoGenerateField: !0,
2783
+ onInitialized: U
2784
+ }
2785
+ ) : /* @__PURE__ */ e(
2786
+ Br,
2787
+ {
2788
+ ref: l,
2789
+ autoGenerateField: !1,
2790
+ onInitialized: U
2791
+ }
2792
+ )
2793
+ ]
2794
+ }
2795
+ ),
2796
+ i?.container?.page && /* @__PURE__ */ e(
2797
+ Mt,
2798
+ {
2799
+ currentPage: Ce.currentPage,
2800
+ totalPages: Ce.totalPages,
2801
+ pageSize: i?.pagingOption?.pageSize,
2802
+ totalData: Ce.totalData,
2803
+ onPageChange: ue,
2804
+ pageSizeOptions: i?.pagingOption?.pageSizeOptions,
2805
+ gridRef: l
2806
+ }
2807
+ )
2808
+ ] });
2809
+ }
2810
+ ), Vn = Kr, Nn = ft(
2811
+ ({ title: s, border: r, children: c, titleChildren: o }) => {
2812
+ const i = X(
2813
+ () => ({
2814
+ components: {
2815
+ Form: {
2816
+ labelColor: "#9A9A9A"
2817
+ },
2818
+ Select: {
2819
+ colorTextDisabled: "#000"
2820
+ }
2821
+ }
2822
+ }),
2823
+ []
2824
+ );
2825
+ return /* @__PURE__ */ m(be, { type: "vertical", children: [
2826
+ /* @__PURE__ */ e(
2827
+ Ee,
2828
+ {
2829
+ title: s,
2830
+ icons: { type: "antd", icon: "InfoCircleTwoTone" },
2831
+ children: o
2832
+ }
2833
+ ),
2834
+ /* @__PURE__ */ e(Ye, { border: !1, children: /* @__PURE__ */ e(ee, { theme: i, children: c }) })
2835
+ ] });
2836
+ }
2837
+ ), be = ({
2838
+ type: s = "horizontal",
2839
+ layoutAlign: r = "left",
2840
+ verticalAlign: c,
2841
+ className: o,
2842
+ style: i,
2843
+ children: h
2844
+ }) => /* @__PURE__ */ e(
2845
+ "div",
2846
+ {
2847
+ style: i,
2848
+ className: `bwgview-content-layout ${s == "horizontal" ? "hz-layout" : "vt-layout"} layout-${r} ${c && `vertical-${c}`} ${o || ""}`,
2849
+ children: h
2850
+ }
2851
+ ), at = (s, r) => {
2852
+ const c = window.innerWidth, o = window.innerHeight, i = Math.min(Math.max(s.x, 0), Math.max(0, c - r.width)), h = Math.min(Math.max(s.y, 0), Math.max(0, o - r.height));
2853
+ return { x: Math.round(i), y: Math.round(h) };
2854
+ }, Bn = ({
2855
+ children: s,
2856
+ open: r,
2857
+ onCancel: c,
2858
+ maskClosable: o = !1,
2859
+ keyboard: i = !1,
2860
+ width: h = 520,
2861
+ height: u = 400,
2862
+ title: D,
2863
+ buttons: C,
2864
+ zIndex: v = 1e3,
2865
+ ...S
2866
+ }) => {
2867
+ const V = ce(null), l = typeof h == "number" ? h : 520, M = typeof u == "number" ? u : 400, [I, A] = F(l), [f, N] = F(M), n = X(() => {
2868
+ const L = Math.max(0, (window.innerWidth - l) / 2), T = Math.max(0, (window.innerHeight - M) / 2);
2869
+ return { x: Math.round(L), y: Math.round(T) };
2870
+ }, [l, M]), [x, b] = F(n);
2871
+ O(() => {
2872
+ typeof h == "number" && A(h), typeof u == "number" && N(u);
2873
+ }, [h, u]);
2874
+ const E = (L, T) => {
2875
+ const Y = at(
2876
+ { x: T.x, y: T.y },
2877
+ { width: I, height: f }
2878
+ );
2879
+ b(Y);
2880
+ }, B = (L, T, Y, k, H) => {
2881
+ const K = {
2882
+ width: Math.round(parseInt(Y.style.width, 10)),
2883
+ height: Math.round(parseInt(Y.style.height, 10))
2884
+ }, J = at(H, K);
2885
+ A(K.width), N(K.height), b(J);
2886
+ }, q = () => V.current ?? document.body;
2887
+ return O(() => {
2888
+ if (!r || !i) return;
2889
+ const L = (T) => {
2890
+ T.key === "Escape" && (T.stopPropagation(), T.preventDefault(), c?.(T));
2891
+ };
2892
+ return window.addEventListener("keydown", L, !0), () => {
2893
+ window.removeEventListener("keydown", L, !0);
2894
+ };
2895
+ }, [r, i, c]), r ? /* @__PURE__ */ m(
2896
+ "div",
2897
+ {
2898
+ style: {
2899
+ position: "fixed",
2900
+ inset: 0,
2901
+ zIndex: v
2902
+ },
2903
+ onKeyDown: (L) => {
2904
+ L.key === "Escape" && i && (L.stopPropagation(), L.preventDefault(), c?.(L));
2905
+ },
2906
+ tabIndex: -1,
2907
+ children: [
2908
+ /* @__PURE__ */ e(
2909
+ "div",
2910
+ {
2911
+ onClick: o ? (L) => c?.(L) : void 0,
2912
+ style: {
2913
+ position: "absolute",
2914
+ inset: 0,
2915
+ backgroundColor: "rgba(0,0,0,0.45)",
2916
+ zIndex: 0
2917
+ }
2918
+ }
2919
+ ),
2920
+ /* @__PURE__ */ m(
2921
+ xt,
2922
+ {
2923
+ className: "bwg-modal",
2924
+ size: { width: I, height: f },
2925
+ position: x,
2926
+ bounds: "window",
2927
+ minWidth: 400,
2928
+ minHeight: 300,
2929
+ onDragStop: E,
2930
+ onResizeStop: B,
2931
+ dragHandleClassName: "drag-handle",
2932
+ cancel: ".rnd-cancel",
2933
+ enableUserSelectHack: !1,
2934
+ style: {
2935
+ backgroundColor: "white",
2936
+ borderRadius: 8,
2937
+ boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
2938
+ overflow: "visible",
2939
+ position: "absolute",
2940
+ zIndex: 1
2941
+ },
2942
+ children: [
2943
+ /* @__PURE__ */ e(
2944
+ "div",
2945
+ {
2946
+ className: "bwg-modal-content",
2947
+ style: { overflow: "hidden", borderRadius: 8, height: "100%" },
2948
+ children: /* @__PURE__ */ e(bt, { getPopupContainer: q, children: /* @__PURE__ */ e(be, { style: { height: "100%" }, children: /* @__PURE__ */ m(Ye, { className: "w100", children: [
2949
+ /* @__PURE__ */ e("div", { className: "drag-handle", children: /* @__PURE__ */ e(Ee, { title: D || "", icons: { type: "antd" }, children: /* @__PURE__ */ m(
2950
+ "div",
2951
+ {
2952
+ style: { display: "flex", gap: 6, alignItems: "center" },
2953
+ children: [
2954
+ C,
2955
+ /* @__PURE__ */ e(
2956
+ qe,
2957
+ {
2958
+ type: "default",
2959
+ className: "bwg-btn",
2960
+ onClick: (L) => {
2961
+ L.stopPropagation(), c?.(L);
2962
+ },
2963
+ children: "닫기"
2964
+ }
2965
+ )
2966
+ ]
2967
+ }
2968
+ ) }) }),
2969
+ /* @__PURE__ */ e(
2970
+ "div",
2971
+ {
2972
+ className: "rnd-cancel",
2973
+ style: { height: "calc(100% - 60px)", overflow: "auto" },
2974
+ children: s
2975
+ }
2976
+ )
2977
+ ] }) }) })
2978
+ }
2979
+ ),
2980
+ /* @__PURE__ */ e(
2981
+ "div",
2982
+ {
2983
+ ref: V,
2984
+ className: "bwg-modal-portal-root",
2985
+ style: { position: "relative" }
2986
+ }
2987
+ )
2988
+ ]
2989
+ }
2990
+ )
2991
+ ]
2992
+ }
2993
+ ) : null;
2994
+ }, st = (s, r) => {
2995
+ const c = window.innerWidth, o = window.innerHeight, i = Math.min(Math.max(s.x, 0), Math.max(0, c - r.width)), h = Math.min(Math.max(s.y, 0), Math.max(0, o - r.height));
2996
+ return { x: Math.round(i), y: Math.round(h) };
2997
+ }, qr = ({ buttons: s, onClose: r }) => {
2998
+ const c = (s || []).filter((o) => o?.visible !== !1);
2999
+ return c.length === 0 ? /* @__PURE__ */ e($, { type: "default", className: "bwg-btn popup-btn", onClick: r, children: "닫기" }) : /* @__PURE__ */ m("div", { style: { display: "flex", gap: 6 }, children: [
3000
+ c.map((o) => /* @__PURE__ */ e(
3001
+ $,
3002
+ {
3003
+ type: o.type,
3004
+ disabled: !!o.disabled,
3005
+ loading: o.loading,
3006
+ className: o.className || "bwg-btn popup-btn",
3007
+ style: o.style,
3008
+ icon: o.icon,
3009
+ onClick: o.onClick,
3010
+ children: o.label
3011
+ },
3012
+ o.id
3013
+ )),
3014
+ /* @__PURE__ */ e($, { type: "default", className: "bwg-btn popup-btn", onClick: r, children: "닫기" })
3015
+ ] });
3016
+ }, Ln = ({
3017
+ popup: s,
3018
+ popupEvent: r,
3019
+ onClose: c,
3020
+ children: o,
3021
+ buttons: i
3022
+ }) => {
3023
+ const h = ce(null), u = s?.popupTitle || "팝업", D = s?.width || 800, C = s?.height || 600, [v, S] = F(D), [V, l] = F(C), M = X(() => {
3024
+ const b = Math.max(0, (window.innerWidth - D) / 2), E = Math.max(0, (window.innerHeight - C) / 2);
3025
+ return { x: Math.round(b), y: Math.round(E) };
3026
+ }, [D, C]), [I, A] = F(M), f = (b, E) => {
3027
+ const B = st(
3028
+ { x: E.x, y: E.y },
3029
+ { width: v, height: V }
3030
+ );
3031
+ A(B);
3032
+ }, N = (b, E, B, q, w) => {
3033
+ const L = {
3034
+ width: Math.round(parseInt(B.style.width, 10)),
3035
+ height: Math.round(parseInt(B.style.height, 10))
3036
+ }, T = st(w, L);
3037
+ S(L.width), l(L.height), A(T);
3038
+ }, n = () => h.current ?? document.body, x = typeof s?.zIndex == "number" ? s.zIndex : 3e3;
3039
+ return /* @__PURE__ */ m(
3040
+ "div",
3041
+ {
3042
+ style: {
3043
+ position: "fixed",
3044
+ inset: 0,
3045
+ zIndex: x
3046
+ },
3047
+ children: [
3048
+ /* @__PURE__ */ e(
3049
+ "div",
3050
+ {
3051
+ onClick: c,
3052
+ style: {
3053
+ position: "absolute",
3054
+ inset: 0,
3055
+ backgroundColor: "rgba(0,0,0,0.3)",
3056
+ zIndex: 0
3057
+ }
3058
+ }
3059
+ ),
3060
+ /* @__PURE__ */ m(
3061
+ xt,
3062
+ {
3063
+ className: "bwg-popup",
3064
+ size: { width: v, height: V },
3065
+ position: I,
3066
+ bounds: "window",
3067
+ minWidth: 400,
3068
+ minHeight: 300,
3069
+ onDragStop: f,
3070
+ onResizeStop: N,
3071
+ dragHandleClassName: "drag-handle",
3072
+ cancel: ".rnd-cancel",
3073
+ enableUserSelectHack: !1,
3074
+ style: {
3075
+ backgroundColor: "white",
3076
+ borderRadius: 20,
3077
+ boxShadow: "0 4px 15px rgba(0,0,0,0.25)",
3078
+ // 포털이 잘리지 않도록 Rnd는 visible
3079
+ overflow: "visible",
3080
+ position: "absolute",
3081
+ zIndex: 1
3082
+ // 마스크(0)보다 위 (전체 컨테이너 3000 기준)
3083
+ },
3084
+ children: [
3085
+ /* @__PURE__ */ e(
3086
+ "div",
3087
+ {
3088
+ className: "bwg-popup-content",
3089
+ style: { overflow: "hidden", borderRadius: 20, height: "100%" },
3090
+ children: /* @__PURE__ */ e(
3091
+ bt,
3092
+ {
3093
+ getPopupContainer: n,
3094
+ children: /* @__PURE__ */ e(be, { type: "vertical", children: /* @__PURE__ */ e(
3095
+ gt,
3096
+ {
3097
+ className: "popup-drag-container",
3098
+ title: /* @__PURE__ */ e(
3099
+ "div",
3100
+ {
3101
+ className: "drag-handle",
3102
+ style: { display: "flex", alignItems: "center", gap: 8 },
3103
+ children: u
3104
+ }
3105
+ ),
3106
+ style: { width: "100%", height: "100%" },
3107
+ styles: {
3108
+ body: {
3109
+ height: "calc(100% - 77px)",
3110
+ padding: 20,
3111
+ overflow: "auto"
3112
+ // 본문 스크롤은 여기서만
3113
+ }
3114
+ },
3115
+ extra: /* @__PURE__ */ e(
3116
+ qr,
3117
+ {
3118
+ buttons: i,
3119
+ onClose: () => s?.close?.() || c?.()
3120
+ }
3121
+ ),
3122
+ children: /* @__PURE__ */ e("div", { className: "rnd-cancel", style: { height: "100%" }, children: /* @__PURE__ */ e(lr, { children: o }) })
3123
+ }
3124
+ ) })
3125
+ }
3126
+ )
3127
+ }
3128
+ ),
3129
+ /* @__PURE__ */ e(
3130
+ "div",
3131
+ {
3132
+ ref: h,
3133
+ className: "bwg-popup-portal-root",
3134
+ style: { position: "relative" }
3135
+ }
3136
+ )
3137
+ ]
3138
+ }
3139
+ )
3140
+ ]
3141
+ }
3142
+ );
3143
+ }, Dn = ({
3144
+ children: s,
3145
+ className: r,
3146
+ style: c,
3147
+ marginBottom: o = 8,
3148
+ gutter: i = [16, 8],
3149
+ ...h
3150
+ }) => /* @__PURE__ */ e(
3151
+ Xt,
3152
+ {
3153
+ ...h,
3154
+ gutter: i,
3155
+ className: `bwg-row ${r}`,
3156
+ style: { marginBottom: `${o}px`, ...c },
3157
+ children: s
3158
+ }
3159
+ ), Rn = ({ children: s }) => /* @__PURE__ */ e(
3160
+ "div",
3161
+ {
3162
+ style: {
3163
+ height: "100%",
3164
+ padding: "20px 30px 26px"
3165
+ },
3166
+ children: /* @__PURE__ */ e(
3167
+ "div",
3168
+ {
3169
+ style: {
3170
+ width: "100%",
3171
+ height: "100%",
3172
+ border: "1px solid #ddd",
3173
+ borderRadius: "15px",
3174
+ background: "#fff"
3175
+ },
3176
+ children: s
3177
+ }
3178
+ )
3179
+ }
3180
+ ), zn = ({
3181
+ rowKey: s = "id",
3182
+ columns: r,
3183
+ dataSource: c,
3184
+ loading: o = !1,
3185
+ rowSelection: i,
3186
+ size: h = "middle",
3187
+ pagination: u = !1,
3188
+ ...D
3189
+ }) => /* @__PURE__ */ e(
3190
+ Jt,
3191
+ {
3192
+ rowKey: s,
3193
+ columns: r,
3194
+ dataSource: c,
3195
+ loading: o,
3196
+ rowSelection: i,
3197
+ size: h,
3198
+ pagination: u,
3199
+ bordered: !0,
3200
+ scroll: { x: "max-content" },
3201
+ locale: {
3202
+ emptyText: "데이터가 없습니다."
3203
+ },
3204
+ ...D
3205
+ }
3206
+ ), Pn = (s) => {
3207
+ const { type: r = "card", animated: c = !0, ...o } = s;
3208
+ return /* @__PURE__ */ e(er, { type: r, animated: c, ...o });
3209
+ }, At = (s, r, c = null) => {
3210
+ for (let o = 0; o < s.length; o++) {
3211
+ const i = s[o];
3212
+ if (i.key === r)
3213
+ return { node: i, ctx: { parent: c, index: o, siblings: s } };
3214
+ if (i.children?.length) {
3215
+ const h = At(i.children, r, i);
3216
+ if (h.node) return h;
3217
+ }
3218
+ }
3219
+ return { node: null, ctx: null };
3220
+ }, It = (s, r) => {
3221
+ if (!s.children) return !1;
3222
+ for (const c of s.children)
3223
+ if (c.key === r || It(c, r)) return !0;
3224
+ return !1;
3225
+ };
3226
+ function Qr({ open: s, onClose: r }) {
3227
+ const {
3228
+ nodes: c,
3229
+ rootIds: o,
3230
+ addFolder: i,
3231
+ editFolder: h,
3232
+ removeFolder: u,
3233
+ removeMenu: D,
3234
+ moveNode: C
3235
+ } = Ne(), v = ce(null), [S, V] = F([]), [l, M] = F([]), [I, A] = F(""), [f, N] = F("ADD"), [n, x] = F(!1), [b, E] = F("");
3236
+ O(() => {
3237
+ s && M(o);
3238
+ }, [s]), O(() => {
3239
+ const w = B(c, o);
3240
+ V(w);
3241
+ }, [c]), O(() => {
3242
+ n && b && (v.current.setFieldValue("prntBkmkId", b), v.current.setFieldValue(
3243
+ "prntBkmkNm",
3244
+ c[b]?.bkmkNm ?? "-"
3245
+ )), n && f === "EDIT" && (v.current.setFieldValue("bkmkId", b), v.current.setFieldValue(
3246
+ "bkmkNm",
3247
+ c[b]?.bkmkNm
3248
+ )), !n && f == "ADD" && M((w) => [...w, b]), !n && v.current && (E("-"), v.current.resetFields());
3249
+ }, [n, f, b, c]);
3250
+ const B = (w, L) => {
3251
+ const T = (Y, k = "-") => {
3252
+ const H = w[Y];
3253
+ if (!H) return null;
3254
+ const K = {
3255
+ key: H.bkmkId,
3256
+ type: H.type,
3257
+ // 'F' | 'M'
3258
+ title: H.type === "F" ? H.bkmkNm : H.menuNm ? `${H.menuNm} (${H.menuId})` : H.menuId,
3259
+ parentId: k,
3260
+ sortOrdr: H.sortOrdr ?? 0
3261
+ };
3262
+ if (H.type === "F") {
3263
+ const W = (H.children ?? []).map((ie) => T(ie, H.bkmkId)).filter(Boolean);
3264
+ return { ...K, children: W };
3265
+ }
3266
+ return K;
3267
+ };
3268
+ return L.map((Y) => T(Y, "-")).filter(Boolean);
3269
+ }, q = () => {
3270
+ if (N("ADD"), !I) {
3271
+ E("-"), x(!0);
3272
+ return;
3273
+ }
3274
+ const w = c[I];
3275
+ if (!w) {
3276
+ E("-"), x(!0);
3277
+ return;
3278
+ }
3279
+ w.type === "F" ? E(w.bkmkId) : E(w.prntBkmkId), x(!0);
3280
+ };
3281
+ return /* @__PURE__ */ m(
3282
+ ee,
3283
+ {
3284
+ theme: {
3285
+ components: {
3286
+ Modal: {
3287
+ wireframe: !0
3288
+ },
3289
+ Button: {
3290
+ defaultColor: "var(--text-secondary)",
3291
+ defaultHoverColor: "var(--primary-color)",
3292
+ defaultHoverBorderColor: "var(--primary-color)",
3293
+ controlHeight: 30,
3294
+ fontSize: 13,
3295
+ borderRadius: "var(--border-radius-sm)"
3296
+ }
3297
+ }
3298
+ },
3299
+ children: [
3300
+ /* @__PURE__ */ m(
3301
+ we,
3302
+ {
3303
+ open: s,
3304
+ okButtonProps: { style: { display: "none" } },
3305
+ cancelText: "닫기",
3306
+ width: 560,
3307
+ style: { zIndex: 1001 },
3308
+ styles: { body: { paddingTop: 12, paddingBottom: 12 } },
3309
+ title: /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ e(de.Text, { style: { fontSize: 18 }, children: "북마크 관리" }) }),
3310
+ onCancel: r,
3311
+ children: [
3312
+ /* @__PURE__ */ m(
3313
+ "div",
3314
+ {
3315
+ style: {
3316
+ width: "100%",
3317
+ display: "flex",
3318
+ justifyContent: "space-between",
3319
+ marginBottom: 10
3320
+ },
3321
+ children: [
3322
+ /* @__PURE__ */ e(
3323
+ $,
3324
+ {
3325
+ type: "primary",
3326
+ variant: "solid",
3327
+ className: "bwg-btn",
3328
+ icon: /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
3329
+ /* @__PURE__ */ m("g", { "clip-path": "url(#clip0_1298_1781)", children: [
3330
+ /* @__PURE__ */ e("path", { d: "M9.3002 14.26H13.5702C14.4002 14.26 15.0702 13.59 15.0702 12.76V7.45999C15.0702 6.89999 14.6102 6.43999 14.0502 6.43999H8.8302L7.7102 3.48999H4.1702C3.6402 3.48999 3.2002 3.92999 3.2002 4.45999V8.10999", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }),
3331
+ /* @__PURE__ */ e("path", { d: "M8.18018 4.58997H14.0502C14.6102 4.58997 15.0702 5.04997 15.0702 5.60997V8.25997", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }),
3332
+ /* @__PURE__ */ e("path", { d: "M5.43018 9.52002V14.52", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }),
3333
+ /* @__PURE__ */ e("path", { d: "M7.93018 12.01H2.93018", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" })
3334
+ ] }),
3335
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_1298_1781", children: /* @__PURE__ */ e("rect", { width: "18", height: "18", fill: "white" }) }) })
3336
+ ] }),
3337
+ style: { padding: "0 10px", boxShadow: "none" },
3338
+ onClick: q,
3339
+ children: "새 폴더"
3340
+ }
3341
+ ),
3342
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ m(
3343
+ ee,
3344
+ {
3345
+ theme: {
3346
+ components: {
3347
+ Button: {
3348
+ defaultHoverColor: "#333333",
3349
+ defaultHoverBorderColor: "#d9d9d9",
3350
+ defaultHoverBg: "#f1f1f1",
3351
+ defaultActiveColor: "#777777",
3352
+ defaultActiveBorderColor: "#d9d9d9",
3353
+ contentFontSize: 13,
3354
+ defaultColor: "#777777"
3355
+ }
3356
+ }
3357
+ },
3358
+ children: [
3359
+ /* @__PURE__ */ e(oe, { title: "펼치기", children: /* @__PURE__ */ e(
3360
+ $,
3361
+ {
3362
+ icon: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2.6665 8H13.3332M7.99984 2.66667V13.3333", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }),
3363
+ size: "small",
3364
+ style: { width: 28, height: 28 },
3365
+ onClick: () => {
3366
+ const w = Object.values(c).filter((L) => L.type === "F").map((L) => L.bkmkId);
3367
+ M(w);
3368
+ }
3369
+ }
3370
+ ) }),
3371
+ /* @__PURE__ */ e(oe, { title: "접기", children: /* @__PURE__ */ e(
3372
+ $,
3373
+ {
3374
+ icon: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2.6665 8H13.3332", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }),
3375
+ size: "small",
3376
+ style: { width: 28, height: 28, marginLeft: 5 },
3377
+ onClick: () => M([])
3378
+ }
3379
+ ) })
3380
+ ]
3381
+ }
3382
+ ) })
3383
+ ]
3384
+ }
3385
+ ),
3386
+ /* @__PURE__ */ m(
3387
+ "div",
3388
+ {
3389
+ style: {
3390
+ maxHeight: 420,
3391
+ height: 350,
3392
+ overflow: "auto",
3393
+ border: "1px solid #e0e0e0",
3394
+ borderRadius: 8,
3395
+ padding: 10
3396
+ },
3397
+ children: [
3398
+ S.length == 0 && /* @__PURE__ */ e(
3399
+ We,
3400
+ {
3401
+ description: /* @__PURE__ */ m(de.Text, { type: "secondary", style: { fontSize: 13 }, children: [
3402
+ "아직 저장된 북마크가 없습니다.",
3403
+ /* @__PURE__ */ e("br", {}),
3404
+ "새로운 폴더를 생성해보세요."
3405
+ ] })
3406
+ }
3407
+ ),
3408
+ /* @__PURE__ */ e(
3409
+ mt,
3410
+ {
3411
+ blockNode: !0,
3412
+ draggable: !0,
3413
+ allowDrop: ({ dropNode: w, dropPosition: L }) => {
3414
+ const T = w.type === "F";
3415
+ return L === 0 ? T : !0;
3416
+ },
3417
+ onDrop: (w) => {
3418
+ const {
3419
+ dragNode: L,
3420
+ node: T,
3421
+ dropPosition: Y,
3422
+ dropToGap: k
3423
+ } = w;
3424
+ if (L.key === T.key || It(L, T.key)) return;
3425
+ let H, K;
3426
+ if (k) {
3427
+ const W = At(S, T.key).ctx, ie = W.index;
3428
+ H = W.parent ? W.parent.key : "-", K = Y > 0 ? ie + 1 : ie;
3429
+ } else {
3430
+ if (T.type !== "F") return;
3431
+ const W = T.children || [];
3432
+ H = T.key, K = W.length;
3433
+ }
3434
+ const J = tt();
3435
+ if (L.type === "F")
3436
+ C({
3437
+ bkmkId: L.key,
3438
+ newPrntBkmkId: H,
3439
+ sortOrdr: K,
3440
+ userId: J
3441
+ }).catch(() => {
3442
+ we.error({
3443
+ title: "이동 실패",
3444
+ content: "폴더 이동 중 오류가 발생했어요."
3445
+ });
3446
+ });
3447
+ else {
3448
+ if (H === "-") {
3449
+ we.warning({
3450
+ title: "이동 불가",
3451
+ content: "메뉴는 최상위로 이동할 수 없어요."
3452
+ });
3453
+ return;
3454
+ }
3455
+ C({
3456
+ bkmkId: L.key,
3457
+ newPrntBkmkId: H,
3458
+ sortOrdr: K,
3459
+ userId: J
3460
+ }).catch(() => {
3461
+ we.error({
3462
+ title: "이동 실패",
3463
+ content: "메뉴 이동 중 오류가 발생했어요."
3464
+ });
3465
+ });
3466
+ }
3467
+ k === !1 && M(
3468
+ (W) => Array.from(/* @__PURE__ */ new Set([...W, T.key]))
3469
+ );
3470
+ },
3471
+ showLine: !0,
3472
+ treeData: S,
3473
+ selectedKeys: [I],
3474
+ expandedKeys: l,
3475
+ onExpand: M,
3476
+ onSelect: (w) => A(w[0]),
3477
+ titleRender: (w) => /* @__PURE__ */ m(
3478
+ "div",
3479
+ {
3480
+ style: {
3481
+ display: "flex",
3482
+ alignItems: "center",
3483
+ justifyContent: "space-between",
3484
+ gap: 8
3485
+ },
3486
+ children: [
3487
+ /* @__PURE__ */ m("span", { children: [
3488
+ w.type === "F" ? "📁" : "📄",
3489
+ " ",
3490
+ w.title,
3491
+ w.isNew ? /* @__PURE__ */ e(
3492
+ Ie,
3493
+ {
3494
+ color: "gold",
3495
+ style: {
3496
+ marginLeft: 4,
3497
+ fontSize: "10px",
3498
+ height: "16px",
3499
+ lineHeight: "16px",
3500
+ padding: "0 5px"
3501
+ },
3502
+ children: "N"
3503
+ }
3504
+ ) : null
3505
+ ] }),
3506
+ /* @__PURE__ */ m("span", { style: { display: "inline-flex", gap: 8 }, children: [
3507
+ w.type === "F" && /* @__PURE__ */ m(ge, { children: [
3508
+ /* @__PURE__ */ e(
3509
+ ct,
3510
+ {
3511
+ style: { opacity: 0.8 },
3512
+ onClick: () => {
3513
+ N("ADD"), E(w.key), x(!0);
3514
+ }
3515
+ }
3516
+ ),
3517
+ /* @__PURE__ */ e(
3518
+ Et,
3519
+ {
3520
+ style: { opacity: 0.8 },
3521
+ onClick: () => {
3522
+ N("EDIT"), E(w.key), x(!0);
3523
+ }
3524
+ }
3525
+ )
3526
+ ] }),
3527
+ /* @__PURE__ */ e(
3528
+ _t,
3529
+ {
3530
+ style: { cursor: "pointer", opacity: 0.5 },
3531
+ onClick: () => {
3532
+ w.type === "F" ? we.confirm({
3533
+ title: "삭제 안내",
3534
+ content: "폴더를 삭제하면 하위 폴더와 메뉴도 모두 삭제됩니다. 삭제하시겠습니까?",
3535
+ centered: !0,
3536
+ onOk: () => u(w.key)
3537
+ }) : we.confirm({
3538
+ title: "삭제 안내",
3539
+ centered: !0,
3540
+ content: "메뉴를 삭제하시겠습니까?",
3541
+ onOk: () => D(w.key)
3542
+ });
3543
+ }
3544
+ }
3545
+ )
3546
+ ] })
3547
+ ]
3548
+ }
3549
+ )
3550
+ }
3551
+ )
3552
+ ]
3553
+ }
3554
+ )
3555
+ ]
3556
+ }
3557
+ ),
3558
+ /* @__PURE__ */ e(
3559
+ ee,
3560
+ {
3561
+ theme: {
3562
+ components: {
3563
+ Modal: {
3564
+ titleColor: f === "ADD" ? "var(--primary-color)" : "#ff6767",
3565
+ headerBg: f === "ADD" ? "var(--drawer-header-bg)" : "#fff0f0",
3566
+ titleFontSize: 18
3567
+ },
3568
+ Button: {
3569
+ defaultColor: "var(--text-secondary)",
3570
+ defaultHoverColor: "var(--primary-color)",
3571
+ defaultHoverBorderColor: "var(--primary-color)",
3572
+ controlHeight: 30,
3573
+ fontSize: 13,
3574
+ borderRadius: "var(--border-radius-sm)"
3575
+ }
3576
+ }
3577
+ },
3578
+ children: /* @__PURE__ */ e(
3579
+ we,
3580
+ {
3581
+ title: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ m(de.Text, { style: { fontSize: 16, display: "flex", alignItems: "center", gap: 6 }, children: [
3582
+ f === "ADD" ? /* @__PURE__ */ e("span", { className: "bookmark-folder-modal-icon ico-new-folder" }) : /* @__PURE__ */ e("span", { className: "bookmark-folder-modal-icon ico-edit-folder" }),
3583
+ "폴더",
3584
+ f === "ADD" ? " 추가" : "명 수정"
3585
+ ] }) }),
3586
+ open: n,
3587
+ okText: "저장",
3588
+ onOk: () => {
3589
+ const w = v.current.getFieldValue("bkmkNm"), L = tt();
3590
+ if (f === "ADD") {
3591
+ const T = __SYS_CD__ ?? "KH", Y = v.current.getFieldValue("prntBkmkId");
3592
+ i(w, Y, T, L).then(() => {
3593
+ x(!1);
3594
+ });
3595
+ } else {
3596
+ const T = v.current.getFieldValue("bkmkId");
3597
+ h(T, L, w).then(() => {
3598
+ x(!1);
3599
+ });
3600
+ }
3601
+ },
3602
+ centered: !0,
3603
+ width: 400,
3604
+ onCancel: () => x(!1),
3605
+ okButtonProps: {
3606
+ className: "bwg-btn"
3607
+ },
3608
+ cancelButtonProps: {
3609
+ className: "bwg-btn"
3610
+ },
3611
+ styles: {
3612
+ body: {
3613
+ padding: 20
3614
+ }
3615
+ },
3616
+ children: /* @__PURE__ */ m(hr, { ref: v, style: { padding: 0 }, children: [
3617
+ /* @__PURE__ */ e(
3618
+ $e,
3619
+ {
3620
+ itemProps: {
3621
+ name: f === "EDIT" ? "bkmkId" : "prntBkmkId",
3622
+ hidden: !0
3623
+ }
3624
+ }
3625
+ ),
3626
+ /* @__PURE__ */ e(
3627
+ $e,
3628
+ {
3629
+ itemProps: {
3630
+ label: "상위 폴더명",
3631
+ name: "prntBkmkNm",
3632
+ hidden: b === "-" || f === "EDIT"
3633
+ },
3634
+ inputProps: {
3635
+ disabled: !0
3636
+ }
3637
+ }
3638
+ ),
3639
+ /* @__PURE__ */ e(
3640
+ $e,
3641
+ {
3642
+ itemProps: {
3643
+ label: "폴더명",
3644
+ name: "bkmkNm"
3645
+ }
3646
+ }
3647
+ )
3648
+ ] })
3649
+ }
3650
+ )
3651
+ }
3652
+ )
3653
+ ]
3654
+ }
3655
+ );
3656
+ }
3657
+ function Yr({ triggerIcon: s }) {
3658
+ const [r, c] = F(!1), [o, i] = F(""), [h, u] = F(null), [D, C] = F([]), [v, S] = F([]), [V, l] = F(!1), [M, I] = F(!1), [A, f] = F(!1), [N, n] = F(null);
3659
+ Ne((P) => P.treeNodes);
3660
+ const {
3661
+ nodes: x,
3662
+ getPrntBkmkIdByMenuId: b,
3663
+ // 🔁 getPrntFoldIdByMenuId → getPrntBkmkIdByMenuId
3664
+ getNodeByMenuId: E,
3665
+ isMenuBookmarked: B,
3666
+ removeMenuByMenuId: q,
3667
+ addMenuToFolder: w,
3668
+ convertToAntTreeData: L
3669
+ } = Ne(), T = Ne((P) => P.rootIds), Y = X(
3670
+ () => L(
3671
+ x,
3672
+ T,
3673
+ o,
3674
+ !0
3675
+ ),
3676
+ [x, T, o]
3677
+ ), k = Qe(
3678
+ (P) => P.activeMenuItem ?? { menuId: "", menuNm: "" }
3679
+ ), H = X(() => {
3680
+ if (!k?.menuId) return "";
3681
+ const P = E(k.menuId);
3682
+ if (!P) return "";
3683
+ if (P.fullPath) return P.fullPath;
3684
+ const U = (re) => {
3685
+ const te = x[re];
3686
+ if (!te) return "";
3687
+ if (te.prntBkmkId === "-")
3688
+ return `${te.bkmkNm || k?.menuNm}`;
3689
+ const le = U(te.prntBkmkId);
3690
+ return le ? `${le} > ${te.bkmkNm || k?.menuNm}` : te.bkmkNm || k?.menuNm;
3691
+ };
3692
+ return console.log("bookmarkNode ::::: ", P), console.log(U(P.bkmkId)), U(P.bkmkId);
3693
+ }, [k?.menuId, E, x]);
3694
+ O(() => {
3695
+ r && k?.menuId && B(k.menuId) ? S([b(k.menuId)]) : r && k?.menuId && !B(k.menuId) ? S(T) : (S([]), C([]), n(null), f(!1));
3696
+ }, [r, k?.menuId, B, b]), O(() => {
3697
+ if (!A || !k?.menuId) return;
3698
+ const P = b(k.menuId);
3699
+ !P || !x[P] || (i(""), C([P]), n(P));
3700
+ }, [A, k?.menuId, x, b]);
3701
+ const K = (P, U) => {
3702
+ w(P, U).then((re) => {
3703
+ console.log("AddMenuToFolder ::::: ", re), re || S((te) => te.includes(P) ? te : [...te, P]);
3704
+ });
3705
+ }, J = (P) => {
3706
+ q(P);
3707
+ }, W = async (P) => {
3708
+ k?.menuId && (await q(k.menuId), await w(P, k), f(!1), n(null), S(
3709
+ (U) => U.includes(P) ? U : [...U, P]
3710
+ ));
3711
+ }, ie = () => /* @__PURE__ */ m("div", { className: "bookmark-popover-wrap", style: { width: 360 }, children: [
3712
+ /* @__PURE__ */ e("div", { style: { padding: "20px 20px 15px", borderBottom: "1px solid #eeeeee" }, children: /* @__PURE__ */ m(pe, { direction: "vertical", style: { width: "100%", rowGap: 10 }, children: [
3713
+ /* @__PURE__ */ m(de.Text, { style: { fontSize: 18, display: "flex", alignItems: "center", gap: 6 }, children: [
3714
+ /* @__PURE__ */ e(
3715
+ $,
3716
+ {
3717
+ type: "text",
3718
+ icon: /* @__PURE__ */ e($t, {}),
3719
+ onClick: () => f(!1),
3720
+ style: { width: 26, height: 26 }
3721
+ }
3722
+ ),
3723
+ "폴더 변경"
3724
+ ] }),
3725
+ k && /* @__PURE__ */ m(de.Text, { type: "secondary", style: { display: "inline-block", width: "100%", color: "#555555", fontWeight: "400", background: "#f0eff4", padding: "3px 10px", borderRadius: 6 }, children: [
3726
+ "현재 화면: ",
3727
+ /* @__PURE__ */ e("b", { children: k.menuNm }),
3728
+ " ",
3729
+ /* @__PURE__ */ m("span", { style: { color: "#939393" }, children: [
3730
+ "(",
3731
+ k.menuId,
3732
+ ")"
3733
+ ] })
3734
+ ] })
3735
+ ] }) }),
3736
+ ue(),
3737
+ /* @__PURE__ */ m(
3738
+ "div",
3739
+ {
3740
+ style: {
3741
+ padding: "15px 20px",
3742
+ borderTop: "1px solid #eeeeee",
3743
+ display: "flex",
3744
+ justifyContent: "flex-end",
3745
+ gap: 8
3746
+ },
3747
+ children: [
3748
+ /* @__PURE__ */ e(
3749
+ $,
3750
+ {
3751
+ type: "default",
3752
+ className: "bwg-btn",
3753
+ onClick: () => {
3754
+ f(!1), n(null);
3755
+ },
3756
+ children: "취소"
3757
+ }
3758
+ ),
3759
+ /* @__PURE__ */ e(
3760
+ $,
3761
+ {
3762
+ type: "primary",
3763
+ className: "bwg-btn",
3764
+ disabled: !N,
3765
+ onClick: () => N && W(String(N)),
3766
+ children: "이동"
3767
+ }
3768
+ )
3769
+ ]
3770
+ }
3771
+ )
3772
+ ] }), ue = () => /* @__PURE__ */ m("div", { style: { maxHeight: 360, overflow: "auto", padding: "15px 20px 20px" }, children: [
3773
+ /* @__PURE__ */ m(
3774
+ pe,
3775
+ {
3776
+ style: {
3777
+ width: "100%",
3778
+ marginBottom: 12,
3779
+ display: "flex",
3780
+ justifyContent: "space-between",
3781
+ columnGap: 10
3782
+ },
3783
+ children: [
3784
+ /* @__PURE__ */ e(
3785
+ pt,
3786
+ {
3787
+ placeholder: "검색(폴더명)",
3788
+ prefix: /* @__PURE__ */ e(jt, {}),
3789
+ allowClear: !0,
3790
+ value: o,
3791
+ onChange: (P) => i(P.target.value),
3792
+ style: { width: "250px", height: 28 }
3793
+ }
3794
+ ),
3795
+ /* @__PURE__ */ e(
3796
+ ee,
3797
+ {
3798
+ theme: {
3799
+ components: {
3800
+ Button: {
3801
+ defaultHoverColor: "#333333",
3802
+ defaultHoverBorderColor: "#d9d9d9",
3803
+ defaultHoverBg: "#f1f1f1",
3804
+ defaultActiveColor: "#777777",
3805
+ defaultActiveBorderColor: "#d9d9d9",
3806
+ contentFontSize: 13,
3807
+ defaultColor: "#777777"
3808
+ }
3809
+ }
3810
+ },
3811
+ children: /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", gap: 5 }, children: [
3812
+ /* @__PURE__ */ e(
3813
+ $,
3814
+ {
3815
+ icon: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2.6665 8H13.3332M7.99984 2.66667V13.3333", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }),
3816
+ size: "small",
3817
+ style: { width: 28, height: 28 },
3818
+ onClick: () => {
3819
+ const P = Object.values(x).filter((U) => U.type === "F").map((U) => U.bkmkId);
3820
+ S(P);
3821
+ },
3822
+ title: "모두 확장"
3823
+ }
3824
+ ),
3825
+ /* @__PURE__ */ e(
3826
+ $,
3827
+ {
3828
+ icon: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2.6665 8H13.3332", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }),
3829
+ size: "small",
3830
+ style: { width: 28, height: 28 },
3831
+ onClick: () => S([]),
3832
+ title: "모두 축소"
3833
+ }
3834
+ )
3835
+ ] })
3836
+ }
3837
+ )
3838
+ ]
3839
+ }
3840
+ ),
3841
+ Y.length === 0 ? /* @__PURE__ */ e(
3842
+ We,
3843
+ {
3844
+ description: /* @__PURE__ */ m(de.Text, { type: "secondary", style: { fontSize: 13 }, children: [
3845
+ "아직 저장된 북마크가 없습니다.",
3846
+ /* @__PURE__ */ e("br", {}),
3847
+ "새로운 폴더를 만들어 시작해보세요."
3848
+ ] }),
3849
+ image: We.PRESENTED_IMAGE_SIMPLE
3850
+ }
3851
+ ) : /* @__PURE__ */ e(
3852
+ mt,
3853
+ {
3854
+ blockNode: !0,
3855
+ showLine: !0,
3856
+ treeData: Y,
3857
+ selectedKeys: D,
3858
+ expandedKeys: v,
3859
+ onExpand: S,
3860
+ onSelect: (P) => {
3861
+ C(P), n(P[0]);
3862
+ },
3863
+ autoExpandParent: !0,
3864
+ titleRender: (P) => {
3865
+ const U = String(P.key), re = h === U;
3866
+ return /* @__PURE__ */ m(
3867
+ "div",
3868
+ {
3869
+ onMouseEnter: () => u(U),
3870
+ onMouseLeave: () => u(null),
3871
+ style: {
3872
+ display: "flex",
3873
+ alignItems: "center",
3874
+ justifyContent: "space-between",
3875
+ gap: 8
3876
+ },
3877
+ children: [
3878
+ /* @__PURE__ */ e("div", { children: P.title }),
3879
+ !B(k?.menuId) && k && re && /* @__PURE__ */ e(
3880
+ ee,
3881
+ {
3882
+ theme: {
3883
+ components: {
3884
+ Button: {
3885
+ defaultColor: "rgba(0,0,0,0.5)",
3886
+ defaultHoverColor: "rgba(0,0,0,0.8)"
3887
+ }
3888
+ }
3889
+ },
3890
+ children: /* @__PURE__ */ e(
3891
+ $,
3892
+ {
3893
+ size: "small",
3894
+ type: "link",
3895
+ onClick: (te) => {
3896
+ te.stopPropagation(), K(U, k);
3897
+ },
3898
+ style: {
3899
+ color: "rgba(0,0,0,0.5)"
3900
+ },
3901
+ children: "+ 현재화면 추가"
3902
+ }
3903
+ )
3904
+ }
3905
+ )
3906
+ ]
3907
+ }
3908
+ );
3909
+ }
3910
+ }
3911
+ )
3912
+ ] });
3913
+ return /* @__PURE__ */ m(ge, { children: [
3914
+ /* @__PURE__ */ e(
3915
+ Ke,
3916
+ {
3917
+ open: r && !V,
3918
+ onOpenChange: c,
3919
+ trigger: "click",
3920
+ placement: "bottomLeft",
3921
+ styles: {
3922
+ body: {
3923
+ padding: 0,
3924
+ borderRadius: 12,
3925
+ boxShadow: "0 12px 32px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.2)",
3926
+ background: "#ffffff",
3927
+ zIndex: 1e3
3928
+ }
3929
+ },
3930
+ content: A ? ie() : /* @__PURE__ */ m("div", { style: { width: 360 }, children: [
3931
+ /* @__PURE__ */ e("div", { style: { padding: "20px 20px 15px", borderBottom: "1px solid #eeeeee" }, children: /* @__PURE__ */ m(pe, { direction: "vertical", style: { width: "100%", rowGap: 10 }, children: [
3932
+ /* @__PURE__ */ m(de.Text, { style: { fontSize: 18, display: "flex", alignItems: "center", gap: 6 }, children: [
3933
+ /* @__PURE__ */ e("span", { className: `bookmark-title-icon ${B(k?.menuId) ? "saved" : "add"}` }),
3934
+ "북마크",
3935
+ " ",
3936
+ B(k?.menuId) ? "저장됨" : "추가"
3937
+ ] }),
3938
+ k && /* @__PURE__ */ m(de.Text, { type: "secondary", style: { display: "inline-block", width: "100%", color: "#555555", fontWeight: "400", background: "#f0eff4", padding: "3px 10px", borderRadius: 6 }, children: [
3939
+ "현재 화면: ",
3940
+ /* @__PURE__ */ e("b", { children: k.menuNm }),
3941
+ " ",
3942
+ /* @__PURE__ */ m("span", { style: { color: "#939393" }, children: [
3943
+ "(",
3944
+ k.menuId,
3945
+ ")"
3946
+ ] })
3947
+ ] })
3948
+ ] }) }),
3949
+ B(k?.menuId) ? /* @__PURE__ */ m(
3950
+ "div",
3951
+ {
3952
+ style: {
3953
+ padding: "10px 12px",
3954
+ margin: "15px 20px",
3955
+ borderRadius: 8,
3956
+ backgroundColor: "#f7f6fB"
3957
+ },
3958
+ children: [
3959
+ /* @__PURE__ */ e(de.Text, { type: "secondary", style: { fontSize: 13 }, children: "저장 위치" }),
3960
+ /* @__PURE__ */ e("div", { style: { marginTop: 4 }, children: `📁 > ${H}` || "알 수 없음" })
3961
+ ]
3962
+ }
3963
+ ) : (
3964
+ // 북마크 Tree
3965
+ ue()
3966
+ ),
3967
+ /* @__PURE__ */ m(
3968
+ be,
3969
+ {
3970
+ style: { padding: "15px 20px", borderTop: "1px solid #eeeeee" },
3971
+ layoutAlign: "right",
3972
+ children: [
3973
+ k && !B(k.menuId) ? /* @__PURE__ */ e(
3974
+ $,
3975
+ {
3976
+ style: {
3977
+ padding: "0 10px"
3978
+ },
3979
+ type: "primary",
3980
+ className: "bwg-btn",
3981
+ icon: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 9H15M9 3V15", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }),
3982
+ onClick: () => {
3983
+ const P = String(D[0]);
3984
+ let U = "-";
3985
+ P && x[P] && (U = x[P].type == "M" ? x[P].prntBkmkId : P), K(U, k);
3986
+ },
3987
+ children: "추가"
3988
+ }
3989
+ ) : /* @__PURE__ */ m(be, { layoutAlign: "between", children: [
3990
+ /* @__PURE__ */ e(
3991
+ $,
3992
+ {
3993
+ type: "default",
3994
+ className: "bwg-btn",
3995
+ style: {
3996
+ padding: "0 10px"
3997
+ },
3998
+ icon: /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
3999
+ /* @__PURE__ */ m("g", { "clip-path": "url(#clip0_1289_1745)", children: [
4000
+ /* @__PURE__ */ e("path", { d: "M13.9198 6.57H8.69982L7.57982 3.62H4.03982C3.50982 3.62 3.06982 4.06 3.06982 4.59V12.89C3.06982 13.72 3.73982 14.39 4.56982 14.39H13.4398C14.2698 14.39 14.9398 13.72 14.9398 12.89V7.59C14.9398 7.03 14.4798 6.57 13.9198 6.57Z", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }),
4001
+ /* @__PURE__ */ e("path", { d: "M8.0498 4.72H13.9198C14.4798 4.72 14.9398 5.18 14.9398 5.74V8.39", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" })
4002
+ ] }),
4003
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_1289_1745", children: /* @__PURE__ */ e("rect", { width: "18", height: "18", fill: "white" }) }) })
4004
+ ] }),
4005
+ onClick: () => f(!0),
4006
+ children: "폴더 변경"
4007
+ }
4008
+ ),
4009
+ /* @__PURE__ */ e(
4010
+ $,
4011
+ {
4012
+ type: "default",
4013
+ className: "bwg-btn",
4014
+ style: {
4015
+ padding: "0 10px"
4016
+ },
4017
+ color: "danger",
4018
+ variant: "solid",
4019
+ icon: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: /* @__PURE__ */ e("path", { d: "M7.5 7.5V12M10.5 7.5V12M13.5 4.5V13.5C13.5 14.3284 12.8284 15 12 15H6C5.17157 15 4.5 14.3284 4.5 13.5V4.5M3 4.5H15M11.25 4.5V3.75C11.25 2.92157 10.5784 2.25 9.75 2.25H8.25C7.42157 2.25 6.75 2.92157 6.75 3.75V4.5", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }),
4020
+ onClick: () => J(k.menuId),
4021
+ children: "삭제"
4022
+ }
4023
+ )
4024
+ ] }),
4025
+ /* @__PURE__ */ e(
4026
+ $,
4027
+ {
4028
+ type: "default",
4029
+ className: "bwg-btn",
4030
+ style: { padding: "0 10px", marginLeft: 5 },
4031
+ icon: /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
4032
+ /* @__PURE__ */ e("path", { d: "M8.25 2.25H9.75C10.1642 2.25 10.5 2.58579 10.5 3V3.42659C10.5 3.74744 10.7153 4.02619 11.0117 4.14921C11.3081 4.27229 11.6532 4.22538 11.8802 3.99842L12.182 3.69668C12.4748 3.40379 12.9497 3.40379 13.2426 3.69668L14.3033 4.75734C14.5962 5.05023 14.5962 5.52511 14.3033 5.818L14.0016 6.1197C13.7746 6.34667 13.7277 6.69185 13.8508 6.98831C13.9738 7.28465 14.2526 7.5 14.5734 7.5L15 7.5C15.4142 7.5 15.75 7.83579 15.75 8.25V9.75C15.75 10.1642 15.4142 10.5 15 10.5H14.5734C14.2526 10.5 13.9738 10.7153 13.8508 11.0117C13.7277 11.3081 13.7746 11.6533 14.0016 11.8803L14.3033 12.182C14.5962 12.4749 14.5962 12.9497 14.3033 13.2426L13.2426 14.3033C12.9497 14.5962 12.4749 14.5962 12.182 14.3033L11.8803 14.0016C11.6533 13.7746 11.3081 13.7277 11.0117 13.8508C10.7153 13.9738 10.5 14.2526 10.5 14.5734V15C10.5 15.4142 10.1642 15.75 9.75 15.75H8.25C7.83579 15.75 7.5 15.4142 7.5 15V14.5734C7.5 14.2526 7.28465 13.9738 6.98831 13.8508C6.69185 13.7277 6.34667 13.7746 6.1197 14.0016L5.81799 14.3033C5.5251 14.5962 5.05022 14.5962 4.75733 14.3033L3.69667 13.2426C3.40378 12.9497 3.40378 12.4749 3.69667 12.182L3.99842 11.8802C4.22538 11.6532 4.27229 11.3081 4.14921 11.0117C4.02619 10.7153 3.74744 10.5 3.42659 10.5H3C2.58579 10.5 2.25 10.1642 2.25 9.75V8.25C2.25 7.83579 2.58579 7.5 3 7.5L3.42657 7.5C3.74743 7.5 4.02619 7.28466 4.14922 6.98832C4.2723 6.69188 4.22539 6.34671 3.99842 6.11975L3.69668 5.818C3.40379 5.52511 3.40379 5.05024 3.69668 4.75734L4.75734 3.69668C5.05023 3.40379 5.52511 3.40379 5.818 3.69668L6.11974 3.99842C6.34671 4.22539 6.69187 4.2723 6.98832 4.14922C7.28466 4.02619 7.5 3.74743 7.5 3.42657V3C7.5 2.58579 7.83579 2.25 8.25 2.25Z", stroke: "currentColor" }),
4033
+ /* @__PURE__ */ e("path", { d: "M10.5 9C10.5 9.82843 9.82843 10.5 9 10.5C8.17157 10.5 7.5 9.82843 7.5 9C7.5 8.17157 8.17157 7.5 9 7.5C9.82843 7.5 10.5 8.17157 10.5 9Z", stroke: "currentColor" })
4034
+ ] }),
4035
+ onClick: () => {
4036
+ I(r), l(!0);
4037
+ },
4038
+ children: "관리"
4039
+ }
4040
+ )
4041
+ ]
4042
+ }
4043
+ )
4044
+ ] }),
4045
+ children: /* @__PURE__ */ e(
4046
+ "span",
4047
+ {
4048
+ style: {
4049
+ cursor: "pointer",
4050
+ display: "inline-flex",
4051
+ alignItems: "center"
4052
+ },
4053
+ children: s
4054
+ }
4055
+ )
4056
+ }
4057
+ ),
4058
+ /* @__PURE__ */ e(
4059
+ Qr,
4060
+ {
4061
+ open: V,
4062
+ onClose: () => {
4063
+ l(!1), M && c(!0);
4064
+ }
4065
+ }
4066
+ )
4067
+ ] });
4068
+ }
4069
+ const Zr = (s) => {
4070
+ const { searchBoxRef: r } = yt();
4071
+ return /* @__PURE__ */ e(vt, { ref: r, ...s });
4072
+ }, Xr = De(
4073
+ ({
4074
+ children: s,
4075
+ searchBox: r,
4076
+ title: c,
4077
+ preRenderEvents: o = [],
4078
+ postRenderEvents: i = [],
4079
+ loading: h = !1,
4080
+ error: u = null,
4081
+ grantEvent: D = {},
4082
+ customEvent: C = {},
4083
+ buttons: v
4084
+ }, S) => {
4085
+ const { user: V, spacingSize: l } = ze(), { activeMenuId: M } = Qe(), I = He(), { loadFavoritesIfNeeded: A, isMenuBookmarked: f } = Ne(), { loading: N } = gr(), n = I?.menuId, x = I?.menuItem || null, {
4086
+ resetForm: b,
4087
+ setDefaultValue: E,
4088
+ searchBoxRef: B
4089
+ } = yt(), q = ar();
4090
+ Re(
4091
+ S,
4092
+ () => ({
4093
+ menuId: n
4094
+ }),
4095
+ [n]
4096
+ );
4097
+ const [w, L] = F({
4098
+ isInitialized: !1,
4099
+ isReady: !1,
4100
+ error: null,
4101
+ loading: !0,
4102
+ preRenderComplete: !1,
4103
+ postRenderComplete: !1
4104
+ }), { openCorePopup: T } = sr(), Y = async () => {
4105
+ if (o.length === 0) {
4106
+ L((R) => ({ ...R, preRenderComplete: !0 }));
4107
+ return;
4108
+ }
4109
+ try {
4110
+ for (const R of o)
4111
+ await R();
4112
+ L((R) => ({ ...R, preRenderComplete: !0 }));
4113
+ } catch (R) {
4114
+ L((G) => ({
4115
+ ...G,
4116
+ error: R instanceof Error ? R.message : "사전 렌더링 실패",
4117
+ preRenderComplete: !0
4118
+ }));
4119
+ }
4120
+ }, k = async () => {
4121
+ if (i.length === 0) {
4122
+ L((R) => ({ ...R, postRenderComplete: !0 }));
4123
+ return;
4124
+ }
4125
+ try {
4126
+ for (const R of i)
4127
+ await R();
4128
+ L((R) => ({ ...R, postRenderComplete: !0 }));
4129
+ } catch (R) {
4130
+ L((G) => ({
4131
+ ...G,
4132
+ error: R instanceof Error ? R.message : "사후 렌더링 실패",
4133
+ postRenderComplete: !0
4134
+ }));
4135
+ }
4136
+ };
4137
+ O(() => {
4138
+ if (w.isInitialized)
4139
+ return;
4140
+ (async () => {
4141
+ try {
4142
+ await Y(), L((G) => ({
4143
+ ...G,
4144
+ isInitialized: !0,
4145
+ loading: !1
4146
+ }));
4147
+ } catch (G) {
4148
+ console.error("BwgView 초기화 실패:", G), L((ae) => ({
4149
+ ...ae,
4150
+ isInitialized: !0,
4151
+ loading: !1
4152
+ }));
4153
+ }
4154
+ })();
4155
+ }, []), O(() => {
4156
+ V?.userId && A(V.userId);
4157
+ }, [A, V?.userId]);
4158
+ const H = X(() => M === n, [M, n]), K = dr("AUTH_BTNS"), [J, W] = F({}), [ie, ue] = F(!1), [P, U] = F(
4159
+ null
4160
+ ), re = Z(async () => {
4161
+ if (!H || !n || !K) {
4162
+ W({}), ue(!1);
4163
+ return;
4164
+ }
4165
+ if (x?.appCd === "CM") {
4166
+ W({}), ue(!1);
4167
+ return;
4168
+ }
4169
+ try {
4170
+ ue(!0), U(null);
4171
+ const R = await xr(
4172
+ K,
4173
+ {
4174
+ crprCd: V?.crprCd,
4175
+ userId: V?.userId,
4176
+ menuId: n,
4177
+ sysCd: __SYS_CD__
4178
+ },
4179
+ {}
4180
+ );
4181
+ if (R?.data && Array.isArray(R.data)) {
4182
+ const G = {};
4183
+ R.data.forEach((ae) => {
4184
+ const fe = ae.grpId?.toUpperCase() || "DEFAULT";
4185
+ G[fe] || (G[fe] = []), G[fe].push(ae);
4186
+ }), Object.keys(G).forEach((ae) => {
4187
+ G[ae].sort((fe, _e) => fe.btnSq - _e.btnSq);
4188
+ }), W(G);
4189
+ } else
4190
+ W({});
4191
+ } catch (R) {
4192
+ console.error("버튼 권한 조회 실패:", R), U("버튼 권한을 조회하는 중 오류가 발생했습니다."), W({});
4193
+ } finally {
4194
+ ue(!1);
4195
+ }
4196
+ }, [
4197
+ H,
4198
+ n,
4199
+ K,
4200
+ V?.crprCd,
4201
+ V?.userId,
4202
+ x?.appCd
4203
+ ]), te = Z(
4204
+ (R) => {
4205
+ if (x?.appCd === "CM")
4206
+ return [];
4207
+ const G = R.toUpperCase();
4208
+ return J[G] || [];
4209
+ },
4210
+ [J, x?.appCd]
4211
+ );
4212
+ O(() => {
4213
+ re();
4214
+ }, [re]);
4215
+ const le = X(() => H && n ? { menuId: n, grpId: "CUSTOM" } : !1, [H, n]), me = X(() => H && n ? { menuId: n, grpId: "DEFAULT" } : !1, [H, n]);
4216
+ O(() => {
4217
+ w.isInitialized && w.preRenderComplete && !w.isReady && setTimeout(async () => {
4218
+ await k(), L((G) => ({ ...G, isReady: !0 }));
4219
+ }, 100);
4220
+ }, [w.isInitialized, w.preRenderComplete, w.isReady]), O(() => {
4221
+ u && L((R) => ({ ...R, error: u }));
4222
+ }, [u]), O(() => {
4223
+ r && r.defaultValue && B?.current && E(r.defaultValue);
4224
+ }, [r, B, E]), O(() => {
4225
+ if (!r) return;
4226
+ const R = (G) => {
4227
+ G.ctrlKey && (G.key === "d" || G.key === "D") && (G.preventDefault(), G.stopPropagation(), b()), G.ctrlKey && G.key === "s" && (G.preventDefault(), G.stopPropagation(), v?.grant?.find((ae) => ae.id === "search")?.onClick?.());
4228
+ };
4229
+ return window.addEventListener("keydown", R), () => {
4230
+ window.removeEventListener("keydown", R);
4231
+ };
4232
+ }, [r, b]);
4233
+ const ve = () => /* @__PURE__ */ m("div", { className: "bwgview-header-container", children: [
4234
+ /* @__PURE__ */ m("div", { className: "bwgview-header", children: [
4235
+ /* @__PURE__ */ e("div", { className: "bwgview-header-left", children: Ce.LEFT }),
4236
+ /* @__PURE__ */ e("div", { className: "bwgview-header-right", children: Ce.RIGHT })
4237
+ ] }),
4238
+ r && /* @__PURE__ */ e(
4239
+ Zr,
4240
+ {
4241
+ reqRows: r.reqRows,
4242
+ subRows: r.subRows,
4243
+ border: r.border,
4244
+ labelDisplay: r.labelDisplay,
4245
+ header: r.header
4246
+ }
4247
+ )
4248
+ ] });
4249
+ if (O(() => {
4250
+ }, [V, x]), w.error || u)
4251
+ return /* @__PURE__ */ e("div", { style: { padding: "24px" }, children: /* @__PURE__ */ e(
4252
+ Be,
4253
+ {
4254
+ message: "오류 발생",
4255
+ description: w.error || u,
4256
+ type: "error",
4257
+ showIcon: !0
4258
+ }
4259
+ ) });
4260
+ const Se = () => /* @__PURE__ */ e(
4261
+ "svg",
4262
+ {
4263
+ xmlns: "http://www.w3.org/2000/svg",
4264
+ viewBox: "0 0 21 20",
4265
+ width: "1em",
4266
+ height: "1em",
4267
+ fill: "none",
4268
+ children: /* @__PURE__ */ e(
4269
+ "path",
4270
+ {
4271
+ 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",
4272
+ fill: "currentColor",
4273
+ stroke: "currentColor",
4274
+ strokeWidth: "1.5",
4275
+ strokeMiterlimit: "10"
4276
+ }
4277
+ )
4278
+ }
4279
+ ), Pe = () => /* @__PURE__ */ e(
4280
+ "svg",
4281
+ {
4282
+ xmlns: "http://www.w3.org/2000/svg",
4283
+ viewBox: "0 0 21 20",
4284
+ width: "1em",
4285
+ height: "1em",
4286
+ fill: "none",
4287
+ children: /* @__PURE__ */ e(
4288
+ "path",
4289
+ {
4290
+ 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",
4291
+ stroke: "currentColor",
4292
+ strokeWidth: "1.5",
4293
+ strokeMiterlimit: "10",
4294
+ fill: "none"
4295
+ }
4296
+ )
4297
+ }
4298
+ ), Me = (R) => /* @__PURE__ */ e(Xe, { component: Se, ...R }), he = (R) => /* @__PURE__ */ e(Xe, { component: Pe, ...R }), Ce = {
4299
+ LEFT: /* @__PURE__ */ e("div", { className: "bwgview-header-left", children: /* @__PURE__ */ m(
4300
+ ee,
4301
+ {
4302
+ theme: {
4303
+ components: {
4304
+ Tag: {
4305
+ controlHeight: 28,
4306
+ controlHeightLG: 28,
4307
+ controlHeightSM: 28,
4308
+ controlHeightXS: 28
4309
+ }
4310
+ }
4311
+ },
4312
+ children: [
4313
+ /* @__PURE__ */ m(pe, { children: [
4314
+ x && /* @__PURE__ */ e(
4315
+ Yr,
4316
+ {
4317
+ triggerIcon: f(x.menuId) ? /* @__PURE__ */ e(
4318
+ Me,
4319
+ {
4320
+ className: "bookmark-icon",
4321
+ style: { color: "#faad14" }
4322
+ }
4323
+ ) : /* @__PURE__ */ e(he, { className: "bookmark-icon" })
4324
+ }
4325
+ ),
4326
+ /* @__PURE__ */ m(pe.Compact, { style: { alignItems: "center" }, children: [
4327
+ /* @__PURE__ */ e("span", { className: "pageMenuNm", children: (() => {
4328
+ let R = "";
4329
+ return c?.useMenuTitle && x ? R = x.menuNm : c?.text ? R = c.text : x && (R = x.menuPrntId === "CM00" ? x.menuNm.substring(
4330
+ x.menuNm.indexOf(" ") + 1
4331
+ ) : x.menuNm), c?.prefix && (R = `${c.prefix} ${R}`), c?.suffix && (R = `${R} ${c.suffix}`), R;
4332
+ })() }),
4333
+ x?.menuNo && /* @__PURE__ */ e(Ie, { className: "page-num-tag", children: x?.menuNo }),
4334
+ /* @__PURE__ */ e(oe, { title: "도움말", color: "geekblue", children: /* @__PURE__ */ e(
4335
+ $,
4336
+ {
4337
+ variant: "text",
4338
+ type: "text",
4339
+ className: "menu-help-btn",
4340
+ icon: /* @__PURE__ */ e(Gt, { twoToneColor: "orange" })
4341
+ }
4342
+ ) }),
4343
+ /* @__PURE__ */ e(oe, { title: "게시판", color: "geekblue", children: /* @__PURE__ */ e(
4344
+ $,
4345
+ {
4346
+ variant: "text",
4347
+ type: "text",
4348
+ onClick: () => T("CORE_REPORT"),
4349
+ icon: /* @__PURE__ */ e(Ot, { style: { color: "#1890ff" } })
4350
+ }
4351
+ ) })
4352
+ ] })
4353
+ ] }),
4354
+ x?.prgrId && br && /* @__PURE__ */ e(
4355
+ Ie,
4356
+ {
4357
+ style: {
4358
+ marginLeft: 8,
4359
+ fontSize: 13,
4360
+ fontWeight: 500,
4361
+ display: "flex"
4362
+ },
4363
+ children: /* @__PURE__ */ e(
4364
+ Lr,
4365
+ {
4366
+ copyable: !0,
4367
+ style: {
4368
+ display: "inherit",
4369
+ justifyContent: "center",
4370
+ alignItems: "center",
4371
+ marginBottom: 0
4372
+ },
4373
+ children: x?.prgrId
4374
+ }
4375
+ )
4376
+ }
4377
+ )
4378
+ ]
4379
+ }
4380
+ ) }),
4381
+ RIGHT: /* @__PURE__ */ e("div", { className: "bwgview-header-right", children: /* @__PURE__ */ e(
4382
+ ee,
4383
+ {
4384
+ theme: {
4385
+ components: {
4386
+ Space: {
4387
+ padding: 8
4388
+ },
4389
+ Divider: {
4390
+ verticalMarginInline: 0
4391
+ }
4392
+ }
4393
+ },
4394
+ children: /* @__PURE__ */ m(pe, { children: [
4395
+ v?.custom && v.custom.length > 0 && /* @__PURE__ */ m(ge, { children: [
4396
+ /* @__PURE__ */ e(ne, { gap: 8, children: /* @__PURE__ */ e(
4397
+ it,
4398
+ {
4399
+ checkAuth: le,
4400
+ buttons: v.custom,
4401
+ gap: 8
4402
+ }
4403
+ ) }),
4404
+ /* @__PURE__ */ e(Oe, { type: "vertical" })
4405
+ ] }),
4406
+ /* @__PURE__ */ e(ne, { gap: 8, className: "permission-buttons", children: /* @__PURE__ */ e(
4407
+ it,
4408
+ {
4409
+ checkAuth: me,
4410
+ buttons: v?.grant || [],
4411
+ gap: 8
4412
+ }
4413
+ ) }),
4414
+ r && /* @__PURE__ */ m(ge, { children: [
4415
+ /* @__PURE__ */ e(Oe, { type: "vertical" }),
4416
+ /* @__PURE__ */ e(
4417
+ oe,
4418
+ {
4419
+ placement: "bottom",
4420
+ color: Ue.default.gray05,
4421
+ title: /* @__PURE__ */ m(ge, { children: [
4422
+ "검색영역 초기화",
4423
+ /* @__PURE__ */ e("br", {}),
4424
+ "단축키 : ",
4425
+ /* @__PURE__ */ e(Ie, { children: "Ctrl" }),
4426
+ " + ",
4427
+ /* @__PURE__ */ e(Ie, { children: "D" })
4428
+ ] }),
4429
+ children: /* @__PURE__ */ e(
4430
+ qe,
4431
+ {
4432
+ icon: /* @__PURE__ */ e(
4433
+ Wt,
4434
+ {
4435
+ style: { color: Ue.site.purple05 }
4436
+ }
4437
+ ),
4438
+ onClick: () => {
4439
+ b();
4440
+ }
4441
+ }
4442
+ )
4443
+ }
4444
+ )
4445
+ ] })
4446
+ ] })
4447
+ }
4448
+ ) })
4449
+ };
4450
+ return /* @__PURE__ */ e(
4451
+ cr,
4452
+ {
4453
+ buttonPermissions: J,
4454
+ isLoadingPermissions: ie,
4455
+ permissionsError: P,
4456
+ refreshPermissions: re,
4457
+ getButtonPermissions: te,
4458
+ children: /* @__PURE__ */ m(
4459
+ "div",
4460
+ {
4461
+ className: "bwg-view main-view",
4462
+ style: {
4463
+ height: "100%",
4464
+ display: "flex",
4465
+ flexDirection: "column",
4466
+ gap: l === 0 ? 8 : l === 1 ? 14 : 20,
4467
+ padding: l === 0 ? "8px 12px" : l === 1 ? "14px 20px" : "20px 30px 26px"
4468
+ },
4469
+ children: [
4470
+ ve(),
4471
+ /* @__PURE__ */ e("div", { className: "bwgview-content", children: /* @__PURE__ */ m("div", { className: "bwgview-content", children: [
4472
+ /* @__PURE__ */ e(
4473
+ ee,
4474
+ {
4475
+ componentSize: q.componentSize,
4476
+ theme: {
4477
+ token: {
4478
+ fontSize: q.fontSize
4479
+ }
4480
+ },
4481
+ children: /* @__PURE__ */ e(
4482
+ "div",
4483
+ {
4484
+ style: {
4485
+ display: "flex",
4486
+ flexDirection: "column",
4487
+ height: "100%",
4488
+ fontSize: `${q.fontSize}px`
4489
+ },
4490
+ children: s
4491
+ }
4492
+ )
4493
+ }
4494
+ ),
4495
+ (w.loading || h || N) && /* @__PURE__ */ e(
4496
+ Dr,
4497
+ {
4498
+ dimStyle: "light",
4499
+ text: N ? "처리 중..." : "화면 로드 중..."
4500
+ }
4501
+ )
4502
+ ] }) })
4503
+ ]
4504
+ }
4505
+ )
4506
+ }
4507
+ );
4508
+ }
4509
+ );
4510
+ Xr.displayName = "BwgView";
4511
+ const Fn = ({
4512
+ children: s,
4513
+ customTheme: r,
4514
+ customComponentSize: c = "middle"
4515
+ }) => {
4516
+ const o = {
4517
+ token: {
4518
+ // 색상 토큰
4519
+ colorPrimary: "#1890ff",
4520
+ colorSuccess: "#52c41a",
4521
+ colorWarning: "#faad14",
4522
+ colorError: "#ff4d4f",
4523
+ colorInfo: "#1890ff",
4524
+ // 폰트 토큰
4525
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',
4526
+ fontSize: 14,
4527
+ fontSizeHeading1: 38,
4528
+ fontSizeHeading2: 30,
4529
+ fontSizeHeading3: 24,
4530
+ fontSizeHeading4: 20,
4531
+ fontSizeHeading5: 16,
4532
+ // 간격 토큰
4533
+ padding: 16,
4534
+ margin: 16,
4535
+ borderRadius: 6,
4536
+ // 그림자 토큰
4537
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
4538
+ boxShadowSecondary: "0 2px 4px rgba(0, 0, 0, 0.12)"
4539
+ },
4540
+ algorithm: ut.defaultAlgorithm
4541
+ }, i = {
4542
+ ...o,
4543
+ ...r,
4544
+ token: {
4545
+ ...o.token,
4546
+ ...r?.token
4547
+ }
4548
+ };
4549
+ return /* @__PURE__ */ e(
4550
+ ee,
4551
+ {
4552
+ locale: Ct,
4553
+ theme: i,
4554
+ componentSize: c,
4555
+ space: { size: c },
4556
+ form: {
4557
+ validateMessages: {
4558
+ required: "${label}을(를) 입력해주세요.",
4559
+ types: {
4560
+ email: "${label}이(가) 유효한 이메일이 아닙니다.",
4561
+ number: "${label}이(가) 유효한 숫자가 아닙니다."
4562
+ },
4563
+ number: {
4564
+ range: "${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."
4565
+ }
4566
+ }
4567
+ },
4568
+ pagination: {
4569
+ showSizeChanger: !0
4570
+ },
4571
+ children: s
4572
+ }
4573
+ );
4574
+ }, Jr = "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", en = "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", tn = "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", Tn = ({ children: s }) => {
4575
+ const [r, c] = F({ x: 0, y: 0 }), [o, i] = F(!1), [h, u] = F({ x: 0, y: 0 }), [D, C] = F(!1), [v, S] = F(!0), V = ce(null), l = [
4576
+ {
4577
+ id: "overtime",
4578
+ title: "시간 외 근무신청",
4579
+ // icon: <ClockCircleOutlined />,
4580
+ icon: /* @__PURE__ */ e(
4581
+ "img",
4582
+ {
4583
+ src: tn,
4584
+ alt: "시간외근무신청",
4585
+ className: "quick-overtime"
4586
+ }
4587
+ ),
4588
+ color: "#722ed1",
4589
+ onClick: () => {
4590
+ console.log("시간 외 근무 신청 클릭");
4591
+ }
4592
+ },
4593
+ {
4594
+ id: "business-trip",
4595
+ title: "출장신청",
4596
+ // icon: <CarOutlined />,
4597
+ icon: /* @__PURE__ */ e(
4598
+ "img",
4599
+ {
4600
+ src: Jr,
4601
+ alt: "출장신청",
4602
+ className: "quick-business-trip"
4603
+ }
4604
+ ),
4605
+ color: "#1890ff",
4606
+ onClick: () => {
4607
+ console.log("출장 신청 클릭");
4608
+ }
4609
+ },
4610
+ {
4611
+ id: "vacation",
4612
+ title: "휴가신청",
4613
+ // icon: <HeartOutlined />,
4614
+ icon: /* @__PURE__ */ e("img", { src: en, alt: "휴가신청", className: "quick-holiday" }),
4615
+ color: "#eb2f96",
4616
+ onClick: () => {
4617
+ console.log("휴가 신청 클릭");
4618
+ }
4619
+ },
4620
+ {
4621
+ id: "document",
4622
+ title: "문서신청",
4623
+ icon: /* @__PURE__ */ e(Ut, {}),
4624
+ color: "#52c41a",
4625
+ onClick: () => {
4626
+ console.log("문서 신청 클릭");
4627
+ }
4628
+ },
4629
+ {
4630
+ id: "profile",
4631
+ title: "인사정보",
4632
+ icon: /* @__PURE__ */ e(Kt, {}),
4633
+ color: "#fa8c16",
4634
+ onClick: () => {
4635
+ console.log("인사 정보 클릭");
4636
+ }
4637
+ },
4638
+ {
4639
+ id: "settings",
4640
+ title: "설정",
4641
+ icon: /* @__PURE__ */ e(dt, {}),
4642
+ color: "#13c2c2",
4643
+ onClick: () => {
4644
+ console.log("설정 클릭");
4645
+ }
4646
+ }
4647
+ ];
4648
+ O(() => {
4649
+ const n = () => {
4650
+ const x = window.innerHeight, E = Math.max(64, (x - 300) / 3);
4651
+ c({
4652
+ x: 0,
4653
+ y: E
4654
+ });
4655
+ const B = x / 2;
4656
+ S(E < B);
4657
+ };
4658
+ return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
4659
+ }, []);
4660
+ const M = (n) => {
4661
+ if (n.preventDefault(), n.stopPropagation(), V.current) {
4662
+ const x = V.current.getBoundingClientRect();
4663
+ u({
4664
+ x: n.clientX - x.left,
4665
+ y: n.clientY - x.top
4666
+ }), i(!0);
4667
+ }
4668
+ }, I = (n) => {
4669
+ if (o) {
4670
+ const x = n.clientY - h.y, b = window.innerHeight - 24, B = Math.max(64, Math.min(b, x));
4671
+ c({
4672
+ x: r.x,
4673
+ y: B
4674
+ });
4675
+ const q = window.innerHeight / 2;
4676
+ S(B < q);
4677
+ }
4678
+ }, A = () => {
4679
+ i(!1);
4680
+ }, f = () => {
4681
+ C(!D);
4682
+ }, N = (n) => {
4683
+ n.onClick && n.onClick();
4684
+ };
4685
+ return O(() => {
4686
+ if (o)
4687
+ return document.addEventListener("mousemove", I), document.addEventListener("mouseup", A), () => {
4688
+ document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", A);
4689
+ };
4690
+ }, [o, h]), /* @__PURE__ */ m(
4691
+ "div",
4692
+ {
4693
+ className: "quick-tab-container",
4694
+ ref: V,
4695
+ style: {
4696
+ position: "fixed",
4697
+ right: 0,
4698
+ top: r.y,
4699
+ zIndex: 1e3,
4700
+ userSelect: "none",
4701
+ touchAction: "none"
4702
+ },
4703
+ children: [
4704
+ /* @__PURE__ */ m(
4705
+ "div",
4706
+ {
4707
+ className: "quick-tab",
4708
+ style: {
4709
+ position: "absolute",
4710
+ right: "40px",
4711
+ // 토글 버튼 너비만큼 띄움
4712
+ top: v ? 0 : "auto",
4713
+ bottom: v ? "auto" : 0,
4714
+ display: "flex",
4715
+ flexDirection: "column",
4716
+ gap: "15px",
4717
+ border: "1px solid #E0DEEF",
4718
+ borderRadius: "15px",
4719
+ // padding:
4720
+ // isAboveHalf && position.y < 100
4721
+ // ? '16px 12px 12px 12px'
4722
+ // : !isAboveHalf && position.y > window.innerHeight - 100
4723
+ // ? '12px 12px 16px 12px'
4724
+ // : '12px',
4725
+ padding: "8px",
4726
+ boxShadow: "0 0 10px rgba(0, 0, 0, 0.3)",
4727
+ minWidth: "88px",
4728
+ maxWidth: "88px",
4729
+ maxHeight: v ? `calc(100vh - ${r.y + 12}px)` : `${r.y - 12}px`,
4730
+ transform: D ? "translateX(0)" : "translateX(calc(100% + 100px))",
4731
+ transition: "transform 0.3s ease",
4732
+ // 경계 부근에서 간격 조정
4733
+ marginTop: v && r.y < 100 ? "32px" : "0",
4734
+ marginBottom: !v && r.y > window.innerHeight - 100 ? "8px" : "0"
4735
+ },
4736
+ children: [
4737
+ /* @__PURE__ */ e(
4738
+ "div",
4739
+ {
4740
+ className: "quick-tab-items-wrap",
4741
+ style: {
4742
+ background: "#ffffff",
4743
+ borderRadius: "10px",
4744
+ flex: 1,
4745
+ overflowY: "auto",
4746
+ maxHeight: v ? `calc(100vh - ${r.y + 120}px)` : `${r.y - 60}px`,
4747
+ // 플러스 버튼 높이만큼 뺌
4748
+ // paddingRight: '4px', // 스크롤바 공간
4749
+ padding: "14px 0"
4750
+ },
4751
+ children: l.map((n) => /* @__PURE__ */ e(
4752
+ gt,
4753
+ {
4754
+ className: "quick-tab-items",
4755
+ size: "small",
4756
+ style: {
4757
+ border: "none",
4758
+ boxShadow: "none",
4759
+ marginBottom: "15px",
4760
+ cursor: "pointer",
4761
+ transition: "all 0.2s ease"
4762
+ },
4763
+ styles: {
4764
+ body: {
4765
+ padding: "0"
4766
+ }
4767
+ },
4768
+ onClick: () => N(n),
4769
+ onMouseEnter: (x) => {
4770
+ },
4771
+ onMouseLeave: (x) => {
4772
+ },
4773
+ children: /* @__PURE__ */ m("div", { className: "quick-tab-item-inner", children: [
4774
+ /* @__PURE__ */ e(
4775
+ "div",
4776
+ {
4777
+ className: "quick-tab-items-icon",
4778
+ style: {
4779
+ width: "44px",
4780
+ height: "44px",
4781
+ borderRadius: "8PX",
4782
+ fontSize: "24px",
4783
+ color: n.color,
4784
+ marginBottom: "5px"
4785
+ },
4786
+ children: n.icon
4787
+ }
4788
+ ),
4789
+ /* @__PURE__ */ e("div", { className: "quick-tab-items-title", children: n.title })
4790
+ ] })
4791
+ },
4792
+ n.id
4793
+ ))
4794
+ }
4795
+ ),
4796
+ /* @__PURE__ */ e(
4797
+ "div",
4798
+ {
4799
+ className: "quick-tab-add-btn",
4800
+ style: {
4801
+ height: "30px",
4802
+ display: "flex",
4803
+ alignItems: "center",
4804
+ justifyContent: "center",
4805
+ cursor: "pointer",
4806
+ transition: "all 0.2s ease",
4807
+ flexShrink: 0,
4808
+ // 크기 고정
4809
+ marginBottom: "7px"
4810
+ },
4811
+ onMouseEnter: (n) => {
4812
+ },
4813
+ onMouseLeave: (n) => {
4814
+ },
4815
+ children: /* @__PURE__ */ e("span", { className: "quick-tab-add-icon", children: /* @__PURE__ */ e(ct, { style: { color: "#CDC4FF", fontSize: "15px" } }) })
4816
+ }
4817
+ )
4818
+ ]
4819
+ }
4820
+ ),
4821
+ /* @__PURE__ */ e(
4822
+ "div",
4823
+ {
4824
+ className: "quick-tab-drag-btn",
4825
+ style: {
4826
+ cursor: o ? "grabbing" : "grab",
4827
+ zIndex: 1001
4828
+ },
4829
+ onMouseDown: (n) => M(n)
4830
+ }
4831
+ ),
4832
+ /* @__PURE__ */ e(
4833
+ $,
4834
+ {
4835
+ className: `quick-tab-toggle-btn ${D ? "expanded" : ""}`,
4836
+ type: "default",
4837
+ style: {
4838
+ border: "0",
4839
+ backgroundColor: "transparent"
4840
+ },
4841
+ onClick: f
4842
+ }
4843
+ )
4844
+ ]
4845
+ }
4846
+ );
4847
+ }, Hn = () => {
4848
+ const { verifyWithToken: s } = ur(), r = Rr(), c = zr();
4849
+ return O(() => {
4850
+ const i = new URLSearchParams(c.search).get("token");
4851
+ if (!i) {
4852
+ r("/login", { replace: !0 });
4853
+ return;
4854
+ }
4855
+ (async () => {
4856
+ const h = await s(i);
4857
+ r(h ? "/main" : "/login", { replace: !0 });
4858
+ })();
4859
+ }, [c.search]), /* @__PURE__ */ e("div", { style: { display: "grid", placeItems: "center", height: "100dvh" }, children: /* @__PURE__ */ e(tr, { tip: "인증중..." }) });
4860
+ };
3
4861
  export {
4
- o as ButtonAccessController,
5
- s as BwgButtonGroup,
6
- r as BwgCmptArea,
7
- B as BwgCol,
8
- g as BwgConfigProvider,
9
- w as BwgDetail,
10
- t as BwgDrawer,
11
- i as BwgEditor,
12
- n as BwgGrid,
13
- l as BwgInfoArea,
14
- d as BwgPagination,
15
- p as BwgPopup,
16
- C as BwgRow,
17
- c as BwgSpace,
18
- u as BwgTable,
19
- f as BwgTabs,
20
- S as BwgTitleBox,
21
- m as BwgView,
22
- x as ContentBox,
23
- G as ContentLayOut,
24
- b as GlobalConfigProvider,
25
- v as QuickServiceToggle,
26
- P as SSOHandler,
27
- T as SearchBox,
28
- h as createBwgGridRenderer,
29
- k as realFormat
4862
+ it as ButtonAccessController,
4863
+ bn as BwgButtonGroup,
4864
+ vn as BwgCmptArea,
4865
+ Sn as BwgCol,
4866
+ bt as BwgConfigProvider,
4867
+ Mn as BwgDetail,
4868
+ An as BwgDrawer,
4869
+ In as BwgEditor,
4870
+ Vn as BwgGrid,
4871
+ Nn as BwgInfoArea,
4872
+ Bn as BwgModal,
4873
+ Mt as BwgPagination,
4874
+ Ln as BwgPopup,
4875
+ Dn as BwgRow,
4876
+ Rn as BwgSpace,
4877
+ zn as BwgTable,
4878
+ Pn as BwgTabs,
4879
+ Ee as BwgTitleBox,
4880
+ Xr as BwgView,
4881
+ Ye as ContentBox,
4882
+ be as ContentLayOut,
4883
+ Fn as GlobalConfigProvider,
4884
+ Tn as QuickServiceToggle,
4885
+ Hn as SSOHandler,
4886
+ vt as SearchBox,
4887
+ $n as createBwgGridRenderer,
4888
+ jn as realFormat
30
4889
  };