@bwg-ui/core 1.3.6 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/chunks/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
  2. package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
  3. package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
  4. package/dist/chunks/{CMSearchIntfGwP01-BBdPmalj.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
  5. package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
  6. package/dist/chunks/{MenuReport-CYK_Eaqa.js → MenuReport-DgMjx5Hs.js} +5 -5
  7. package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
  8. package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
  9. package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
  10. package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
  11. package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
  12. package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
  13. package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
  14. package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
  15. package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
  16. package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
  17. package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
  18. package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
  19. package/dist/chunks/UploadMultiFileP01-Bf1qonGN.cjs +1 -0
  20. package/dist/chunks/UploadMultiFileP01-BgyIhfac.js +38 -0
  21. package/dist/chunks/{layout-components-gqu1pmfr.js → layout-components-Lyp9SZ7V.js} +1134 -1008
  22. package/dist/chunks/layout-components-NtKR0O6Y.cjs +38 -0
  23. package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
  24. package/dist/chunks/provider-ff4RVDYo.js +711 -0
  25. package/dist/components/common/ButtonAccessController.d.ts +2 -3
  26. package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
  27. package/dist/components/common/BwgButtonGroup.d.ts +1 -1
  28. package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
  29. package/dist/components/common/BwgCol.d.ts +1 -1
  30. package/dist/components/common/BwgCol.d.ts.map +1 -1
  31. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  32. package/dist/components/common/BwgModal.d.ts +10 -0
  33. package/dist/components/common/BwgModal.d.ts.map +1 -0
  34. package/dist/components/common/BwgView.d.ts.map +1 -1
  35. package/dist/components/common/index.cjs +1 -1
  36. package/dist/components/common/index.d.ts +1 -0
  37. package/dist/components/common/index.d.ts.map +1 -1
  38. package/dist/components/common/index.js +4887 -28
  39. package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
  40. package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
  41. package/dist/components/core/BwgDeptSearch.d.ts +38 -0
  42. package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
  43. package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
  44. package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
  45. package/dist/components/core/BwgEmpSearch.d.ts +12 -4
  46. package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
  47. package/dist/components/core/BwgUploader.d.ts +6 -92
  48. package/dist/components/core/BwgUploader.d.ts.map +1 -1
  49. package/dist/components/core/BwgUploader_bak.d.ts +98 -0
  50. package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
  51. package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
  52. package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
  53. package/dist/components/core/index.cjs +1 -1
  54. package/dist/components/core/index.d.ts +11 -2
  55. package/dist/components/core/index.d.ts.map +1 -1
  56. package/dist/components/core/index.js +1318 -1164
  57. package/dist/components/guide/index.cjs +1 -1
  58. package/dist/components/guide/index.js +17 -17
  59. package/dist/components/layout/AppWrapper.d.ts +5 -1
  60. package/dist/components/layout/AppWrapper.d.ts.map +1 -1
  61. package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
  62. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  63. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  64. package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
  65. package/dist/components/layout/index.cjs +1 -1
  66. package/dist/components/layout/index.js +1 -1
  67. package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
  68. package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
  69. package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
  70. package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
  71. package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
  72. package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
  73. package/dist/components/pages/auth/RoleView.d.ts +17 -0
  74. package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
  75. package/dist/components/pages/board/AdminBoard.d.ts +6 -0
  76. package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
  77. package/dist/components/pages/board/BoardComment.d.ts +8 -0
  78. package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
  79. package/dist/components/pages/board/MyBoard.d.ts +6 -0
  80. package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
  81. package/dist/components/pages/index.d.ts +9 -10
  82. package/dist/components/pages/index.d.ts.map +1 -1
  83. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
  84. package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
  85. package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
  86. package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
  87. package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
  88. package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
  89. package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
  90. package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
  91. package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
  92. package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
  93. package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
  94. package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
  95. package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
  96. package/dist/components/pages/types.d.ts +5 -1
  97. package/dist/components/pages/types.d.ts.map +1 -1
  98. package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
  99. package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
  100. package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
  101. package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
  102. package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
  103. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
  104. package/dist/components/popup/index.cjs +1 -1
  105. package/dist/components/popup/index.d.ts +1 -0
  106. package/dist/components/popup/index.d.ts.map +1 -1
  107. package/dist/components/popup/index.js +16 -8
  108. package/dist/index.cjs +185 -1
  109. package/dist/index.js +31237 -288
  110. package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
  111. package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
  112. package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
  113. package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
  114. package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
  115. package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
  116. package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
  117. package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
  118. package/dist/provider/contexts/PageContentContext.d.ts +23 -0
  119. package/dist/provider/contexts/PageContentContext.d.ts.map +1 -0
  120. package/dist/provider/contexts/index.d.ts +1 -0
  121. package/dist/provider/contexts/index.d.ts.map +1 -1
  122. package/dist/provider/hooks/index.d.ts +1 -0
  123. package/dist/provider/hooks/index.d.ts.map +1 -1
  124. package/dist/provider/hooks/useFileUploader.d.ts +74 -0
  125. package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
  126. package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
  127. package/dist/provider/index.cjs +1 -1
  128. package/dist/provider/index.d.ts +1 -0
  129. package/dist/provider/index.d.ts.map +1 -1
  130. package/dist/provider/index.js +22 -19
  131. package/dist/stores/codeStore.d.ts +65 -128
  132. package/dist/stores/codeStore.d.ts.map +1 -1
  133. package/dist/stores/index.cjs +2 -2
  134. package/dist/stores/index.d.ts +3 -3
  135. package/dist/stores/index.d.ts.map +1 -1
  136. package/dist/stores/index.js +815 -1625
  137. package/dist/stores/menuModelStore.d.ts +22 -7
  138. package/dist/stores/menuModelStore.d.ts.map +1 -1
  139. package/dist/stores/menuViewStore.d.ts +3 -3
  140. package/dist/stores/menuViewStore.d.ts.map +1 -1
  141. package/dist/stores/systemStore.d.ts +50 -17
  142. package/dist/stores/systemStore.d.ts.map +1 -1
  143. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  144. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  145. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  146. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  147. package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
  148. package/dist/styles/assets/images/menus/ico1-design.png +0 -0
  149. package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
  150. package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
  151. package/dist/styles/assets/images/menus/ico2-design.png +0 -0
  152. package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
  153. package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
  154. package/dist/styles/assets/images/menus/ico3-design.png +0 -0
  155. package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
  156. package/dist/utils/apiUtils.d.ts.map +1 -1
  157. package/dist/utils/commonUtils.d.ts +1 -2
  158. package/dist/utils/commonUtils.d.ts.map +1 -1
  159. package/dist/utils/index.cjs +1 -1
  160. package/dist/utils/index.d.ts +25 -25
  161. package/dist/utils/index.d.ts.map +1 -1
  162. package/dist/utils/index.js +980 -1967
  163. package/dist/utils/messageUtils.d.ts +36 -48
  164. package/dist/utils/messageUtils.d.ts.map +1 -1
  165. package/dist/utils/modalUtils.d.ts +68 -0
  166. package/dist/utils/modalUtils.d.ts.map +1 -0
  167. package/dist/utils/notificationUtils.d.ts +50 -41
  168. package/dist/utils/notificationUtils.d.ts.map +1 -1
  169. package/dist/utils/serviceConfig.d.ts +9 -3
  170. package/dist/utils/serviceConfig.d.ts.map +1 -1
  171. package/package.json +5 -5
  172. package/dist/chunks/CMSearchIntfGwP01-Cs78BtE7.cjs +0 -1
  173. package/dist/chunks/MenuReport-BCO-gXwk.cjs +0 -1
  174. package/dist/chunks/common-components-C61ER0qC.js +0 -52599
  175. package/dist/chunks/common-components-mXgJEMpT.cjs +0 -1109
  176. package/dist/chunks/layout-components-D7I6VhXN.cjs +0 -38
  177. package/dist/chunks/provider-Kxea5IoZ.js +0 -449
  178. package/dist/chunks/provider-r4mkv5Zs.cjs +0 -1
  179. package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
  180. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
  181. package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
  182. package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
  183. package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
  184. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
  185. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
  186. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
  187. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
  188. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
  189. package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
  190. package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
  191. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
  192. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
  193. package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
  194. package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
@@ -0,0 +1,711 @@
1
+ import { jsx as C, jsxs as q } from "react/jsx-runtime";
2
+ import { createContext as L, useContext as b, useMemo as _, useCallback as j, useState as x, useRef as N, useEffect as M, useLayoutEffect as se } from "react";
3
+ import { useUserStore as J, usePopupStore as ce, useCodeStore as ie } from "../stores/index.js";
4
+ import { message as w, Modal as ae, Upload as V, Input as ue } from "antd";
5
+ import { debounce as le, findIndex as K } from "lodash";
6
+ import { getUserInfo as W, callService as O, setServiceCodeOverrides as Y, DEFAULT_SERVICE_CODES as $ } from "../utils/index.js";
7
+ const H = L(null), we = ({
8
+ children: e,
9
+ menuId: t,
10
+ menuItem: r,
11
+ appCd: i
12
+ }) => {
13
+ const n = {
14
+ menuId: t,
15
+ menuItem: r,
16
+ appCd: i
17
+ };
18
+ return /* @__PURE__ */ C(H.Provider, { value: n, children: e });
19
+ }, ve = () => b(H), Q = L(null), Se = ({
20
+ children: e,
21
+ buttonPermissions: t = {},
22
+ isLoadingPermissions: r = !1,
23
+ permissionsError: i = null,
24
+ refreshPermissions: n,
25
+ getButtonPermissions: u
26
+ }) => {
27
+ const m = {
28
+ buttonPermissions: t,
29
+ isLoadingPermissions: r,
30
+ permissionsError: i,
31
+ refreshPermissions: n,
32
+ getButtonPermissions: u
33
+ };
34
+ return /* @__PURE__ */ C(Q.Provider, { value: m, children: e });
35
+ }, Pe = () => b(Q), ye = () => {
36
+ const { componentSize: e } = J();
37
+ return _(() => {
38
+ const r = {
39
+ 0: 12,
40
+ // 작게
41
+ 1: 14,
42
+ // 보통
43
+ 2: 16
44
+ // 크게
45
+ }, i = {
46
+ 0: "small",
47
+ 1: "middle",
48
+ 2: "large"
49
+ };
50
+ return {
51
+ fontSize: r[e],
52
+ componentSize: i[e]
53
+ };
54
+ }, [e]);
55
+ }, xe = () => {
56
+ const { gridSize: e } = J();
57
+ return _(() => {
58
+ const r = {
59
+ 0: 12,
60
+ // 작게
61
+ 1: 13,
62
+ // 보통
63
+ 2: 14
64
+ // 크게
65
+ }, i = {
66
+ 0: "small",
67
+ 1: "middle",
68
+ 2: "large"
69
+ }, n = {
70
+ 0: 24,
71
+ // 작게
72
+ 1: 30,
73
+ // 보통
74
+ 2: 35
75
+ // 크게
76
+ }, u = {
77
+ 0: 200,
78
+ // 작게
79
+ 1: 220,
80
+ // 보통
81
+ 2: 250
82
+ // 크게
83
+ };
84
+ return {
85
+ fontSize: r[e],
86
+ componentSize: i[e],
87
+ buttonSize: n[e],
88
+ width: u[e]
89
+ };
90
+ }, [e]);
91
+ }, Fe = () => {
92
+ const {
93
+ popups: e,
94
+ activePopupId: t,
95
+ setActivePopup: r,
96
+ closePopup: i,
97
+ openPopup: n,
98
+ openCorePopup: u
99
+ } = ce(), m = j(
100
+ async (f, g, c) => {
101
+ try {
102
+ await n(f, g, c);
103
+ } catch (l) {
104
+ throw console.error("팝업 열기 실패:", l), l;
105
+ }
106
+ },
107
+ [n]
108
+ ), h = j(
109
+ (f, g) => {
110
+ try {
111
+ u(f, g);
112
+ } catch (c) {
113
+ throw console.error("로컬 팝업 열기 실패:", c), c;
114
+ }
115
+ },
116
+ [u]
117
+ );
118
+ return {
119
+ popups: e,
120
+ activePopupId: t,
121
+ setActivePopup: r,
122
+ closePopup: i,
123
+ showPopup: m,
124
+ openCorePopup: h,
125
+ isPopup: e.length > 0
126
+ };
127
+ }, ke = ({
128
+ fileGrpKey: e,
129
+ multiple: t = !1,
130
+ allowedExtensions: r,
131
+ maxFileSize: i = 200,
132
+ fileTrxCdList: n = {
133
+ onFetchFilesTrxCd: "SCMFILE00101",
134
+ onSuccessTrxCd: "SCMFILE00102",
135
+ onDeleteFileTrxCd: "SCMFILE00103",
136
+ onReorderFilesTrxCd: "SCMFILE00104"
137
+ },
138
+ newFileGrpKeyonModify: u = !1,
139
+ onFilesChange: m,
140
+ onUploadComplete: h
141
+ }) => {
142
+ const [f, g] = x([]), c = N(e), l = N([]), p = () => ({
143
+ crprCd: W()?.crprCd,
144
+ sysCd: __SYS_CD__
145
+ });
146
+ M(() => {
147
+ !e || n.onFetchFilesTrxCd;
148
+ }, [e, n.onFetchFilesTrxCd]);
149
+ const F = N(
150
+ le(() => {
151
+ if (!n.onSuccessTrxCd || l.current.length === 0) return;
152
+ const o = [...l.current];
153
+ l.current = [];
154
+ const a = o.map((s) => ({
155
+ crprCd: W()?.crprCd,
156
+ sysCd: __SYS_CD__,
157
+ fileGrpKey: c.current,
158
+ physFileNm: s.fileNameP,
159
+ lgclFileNm: s.fileNameL,
160
+ filePath: s.filePath,
161
+ fileExtn: s.fileExt,
162
+ fileSize: s.fileSize,
163
+ mltpYn: "N"
164
+ }));
165
+ O(n.onSuccessTrxCd, {
166
+ ...p(),
167
+ fileGrpKey: u ? 0 : c.current,
168
+ oldFileGrpKey: c.current,
169
+ newFileGrpKeyonModify: u,
170
+ sub: a
171
+ }).then((s) => {
172
+ if (!s?.sub || s.sub.length === 0) return;
173
+ const d = s.sub[0].fileGrpKey;
174
+ (!c.current || u) && (c.current = d);
175
+ const v = /* @__PURE__ */ new Map();
176
+ s.sub.forEach((S) => {
177
+ const P = o.find(
178
+ (y) => y.fileNameL === S.lgclFileNm
179
+ );
180
+ P && v.set(P.tempId, S);
181
+ }), g(
182
+ (S) => S.map((P) => {
183
+ const y = v.get(P.uid);
184
+ if (!y) return P;
185
+ const G = o.find(
186
+ (ne) => ne.tempId === P.uid
187
+ );
188
+ return h && G && h({
189
+ ...G,
190
+ fileGrpKey: d,
191
+ fileKey: y.fileKey
192
+ }), {
193
+ ...P,
194
+ name: y.lgclFileNm,
195
+ fileGrpKey: d,
196
+ fileKey: y.fileKey,
197
+ uid: y.fileKey,
198
+ status: "done",
199
+ url: `/api/download?filePath=${y.filePath}&logicalName=${y.lgclFileNm}`
200
+ };
201
+ })
202
+ );
203
+ }).catch((s) => {
204
+ console.error("업로드 후처리 실패:", s), w.error("파일 후처리 중 오류가 발생했습니다.");
205
+ const d = new Set(
206
+ l.current.map((v) => v.tempId)
207
+ );
208
+ g(
209
+ (v) => v.map(
210
+ (S) => d.has(S.uid) ? { ...S, status: "error", error: "후처리 실패" } : S
211
+ )
212
+ );
213
+ });
214
+ }, 500)
215
+ ).current;
216
+ M(() => () => {
217
+ F.cancel();
218
+ }, [F]);
219
+ const I = () => {
220
+ n.onFetchFilesTrxCd && O(n.onFetchFilesTrxCd, {
221
+ ...p(),
222
+ fileGrpKey: e
223
+ }).then((o) => {
224
+ if (o?.sub) {
225
+ const a = o.sub.map((s) => ({
226
+ uid: s.fileKey,
227
+ name: s.lgclFileNm,
228
+ status: "done",
229
+ url: `/api/download?filePath=${s.filePath}&logicalName=${s.lgclFileNm}`
230
+ }));
231
+ g(a), m?.(a);
232
+ } else
233
+ g([]), m?.([]);
234
+ }).catch((o) => {
235
+ console.error("파일 목록 조회 실패:", o), w.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
236
+ });
237
+ };
238
+ function R(o, a) {
239
+ g((s) => {
240
+ const d = K(s, { uid: o }), v = K(s, { uid: a });
241
+ if (d < 0 || v < 0) return s;
242
+ const S = [...s], [P] = S.splice(d, 1);
243
+ return S.splice(v, 0, P), S;
244
+ });
245
+ }
246
+ const D = () => {
247
+ if (!n.onReorderFilesTrxCd || !c.current) return;
248
+ const o = f.map((a) => a.uid);
249
+ O(n.onReorderFilesTrxCd, {
250
+ ...p(),
251
+ fileGrpKey: c.current,
252
+ reorderedFileKeys: o
253
+ }).then(() => {
254
+ w.success("파일 순서가 성공적으로 저장되었습니다.");
255
+ }).catch((a) => {
256
+ console.error("파일 순서 저장 실패:", a), w.error("파일 순서 저장 중 오류가 발생했습니다.");
257
+ });
258
+ }, A = (o) => {
259
+ if (!t && f.length > 0)
260
+ return w.error("하나의 파일만 업로드할 수 있습니다."), V.LIST_IGNORE;
261
+ if (r && r.length > 0) {
262
+ const a = `.${o.name.split(".").pop()?.toLowerCase()}`;
263
+ if (!r.includes(a))
264
+ return w.error(
265
+ `${o.name} 파일은 허용되지 않는 확장자입니다. (${r.join(
266
+ ", "
267
+ )})`
268
+ ), V.LIST_IGNORE;
269
+ }
270
+ return i && !(o.size / 1024 / 1024 < i) ? (w.error(`일반업로드의 최대용량은 ${i}MB입니다.`), V.LIST_IGNORE) : !0;
271
+ }, E = (o) => {
272
+ ae.confirm({
273
+ title: "파일 삭제",
274
+ content: `총 ${o.length}건의 파일을 삭제하시겠습니까?`,
275
+ onOk: async () => {
276
+ T(o);
277
+ }
278
+ });
279
+ }, T = async (o) => {
280
+ if (!n.onDeleteFileTrxCd || o.length === 0 || f.filter((a) => o.includes(a.uid)).length === 0) return !0;
281
+ try {
282
+ const a = await O(n.onDeleteFileTrxCd, {
283
+ ...p(),
284
+ fileGrpKey: u ? 0 : c.current,
285
+ fileKeys: o,
286
+ oldFileGrpKey: c.current,
287
+ newFileGrpKeyonModify: u
288
+ });
289
+ if (a?.resultCnt && a.resultCnt > 0) {
290
+ w.success(
291
+ `${a.resultCnt}개의 파일이 성공적으로 삭제되었습니다.`
292
+ );
293
+ const s = f.filter((d) => !o.includes(d.uid));
294
+ g(s), m?.(s);
295
+ } else w.error("파일 삭제 중 오류가 발생했습니다.");
296
+ return u && a?.fileGrpKey && (c.current = a.fileGrpKey), !0;
297
+ } catch (a) {
298
+ return console.error("파일 삭제 실패:", a), w.error("파일 삭제 중 오류가 발생했습니다."), !1;
299
+ }
300
+ };
301
+ return {
302
+ defaultUploadProps: {
303
+ name: "file",
304
+ multiple: t,
305
+ action: "/api/upload",
306
+ fileList: f,
307
+ showUploadList: {
308
+ showRemoveIcon: !0,
309
+ showPreviewIcon: !1,
310
+ showDownloadIcon: !1
311
+ },
312
+ beforeUpload: A,
313
+ onRemove(o) {
314
+ return E([o.uid]), !1;
315
+ },
316
+ onChange(o) {
317
+ g(o.fileList), m?.(o.fileList);
318
+ const { status: a } = o.file;
319
+ if (a === "done")
320
+ if (o.file.response?.success) {
321
+ const { uploadedFiles: s } = o.file.response;
322
+ s && Array.isArray(s) && s.length > 0 && (s.forEach((d) => {
323
+ d.tempId = o.file.uid, l.current.push(d);
324
+ }), F()), w.success(
325
+ o.file.response.message || `${o.file.name} 파일이 성공적으로 업로드되었습니다.`
326
+ );
327
+ } else
328
+ w.error(
329
+ o.file.response?.message || `${o.file.name} 파일 업로드에 실패했습니다.`
330
+ );
331
+ else a === "error" && w.error(
332
+ o.file.response?.message || `${o.file.name} 파일 업로드 중 오류가 발생했습니다.`
333
+ );
334
+ }
335
+ },
336
+ fileList: f,
337
+ fetchFileList: I,
338
+ setFileList: g,
339
+ saveFileOrder: D,
340
+ reorderFiles: R,
341
+ confirmAndDeleteFiles: E,
342
+ deleteFiles: T
343
+ };
344
+ }, X = L(null), Le = () => {
345
+ const e = b(X);
346
+ if (!e) throw new Error("useAuth must be used within AuthProvider");
347
+ return e;
348
+ }, be = ({ children: e }) => {
349
+ const [t, r] = x(!1), [i, n] = x(!1), u = async (c) => {
350
+ const l = (await c.text()).trim().toLowerCase();
351
+ try {
352
+ const p = JSON.parse(l);
353
+ if (typeof p == "object" && p && (p.ok === !0 || p.success === !0))
354
+ return !0;
355
+ } catch {
356
+ }
357
+ return !!["true", "ok", "1", "y"].includes(l);
358
+ }, m = async (c) => {
359
+ n(!0);
360
+ try {
361
+ const l = await fetch("/serviceEndpoint/sso_check.jsp", {
362
+ method: "POST",
363
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
364
+ body: "token=" + encodeURIComponent(c)
365
+ }), p = l.ok && await u(l);
366
+ return r(p), p;
367
+ } catch {
368
+ return !1;
369
+ } finally {
370
+ n(!1);
371
+ }
372
+ }, h = async (c) => {
373
+ n(!0);
374
+ try {
375
+ const l = await fetch("/serviceEndpoint/sso_reauth.jsp", {
376
+ method: "POST",
377
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
378
+ body: "pin=" + encodeURIComponent(c)
379
+ });
380
+ return l.ok && await u(l) ? (r(!0), !0) : !1;
381
+ } catch {
382
+ return !1;
383
+ } finally {
384
+ n(!1);
385
+ }
386
+ }, f = () => {
387
+ r(!1);
388
+ }, g = _(
389
+ () => ({ authed: t, busy: i, verifyWithToken: m, reauthWithPin: h, logout: f }),
390
+ [t, i]
391
+ );
392
+ return /* @__PURE__ */ C(X.Provider, { value: g, children: e });
393
+ }, Z = L(
394
+ void 0
395
+ ), Ie = ({
396
+ children: e
397
+ }) => {
398
+ const {
399
+ codeData: t,
400
+ isLoading: r,
401
+ error: i,
402
+ lastUpdated: n,
403
+ getCodeList: u,
404
+ getCodeListByOption: m,
405
+ getCodeName: h,
406
+ getCodeColor: f,
407
+ getCodeByOption: g,
408
+ getAvailableGroupCodes: c,
409
+ getGridLookup: l,
410
+ fetchCommonCodes: p
411
+ } = ie(), B = {
412
+ codeData: t,
413
+ isLoading: r,
414
+ error: i,
415
+ lastUpdated: n,
416
+ getCodeList: u,
417
+ getCodeListByOption: m,
418
+ getCodeName: h,
419
+ getCodeColor: f,
420
+ getCodeByOption: g,
421
+ getAvailableGroupCodes: c,
422
+ getGridLookup: l,
423
+ refreshCodes: p
424
+ };
425
+ return /* @__PURE__ */ C(Z.Provider, { value: B, children: e });
426
+ }, z = () => {
427
+ const e = b(Z);
428
+ if (e === void 0)
429
+ throw new Error("useCommonCode must be used within a CommonCodeProvider");
430
+ return e;
431
+ }, Ee = () => {
432
+ const { getCodeList: e, isLoading: t, error: r } = z();
433
+ return {
434
+ getCodeList: e,
435
+ isLoading: t,
436
+ error: r
437
+ };
438
+ }, Ne = () => {
439
+ const { getCodeName: e, isLoading: t, error: r } = z();
440
+ return {
441
+ getCodeName: e,
442
+ isLoading: t,
443
+ error: r
444
+ };
445
+ }, ze = () => {
446
+ const { getCodeColor: e, isLoading: t, error: r } = z();
447
+ return {
448
+ getCodeColor: e,
449
+ isLoading: t,
450
+ error: r
451
+ };
452
+ }, Be = () => {
453
+ const { getCodeListByOption: e, isLoading: t, error: r } = z();
454
+ return {
455
+ getCodeListByOption: e,
456
+ isLoading: t,
457
+ error: r
458
+ };
459
+ }, De = () => {
460
+ const { getGridLookup: e, isLoading: t, error: r } = z();
461
+ return {
462
+ getGridLookup: e,
463
+ isLoading: t,
464
+ error: r
465
+ };
466
+ }, ee = L(
467
+ void 0
468
+ ), Te = ({
469
+ children: e
470
+ }) => {
471
+ const [t, r] = x(void 0), [i, n] = x(void 0);
472
+ return /* @__PURE__ */ C(ee.Provider, { value: { title: t, setTitle: r, extra: i, setExtra: n }, children: e });
473
+ }, Oe = () => {
474
+ const e = b(ee);
475
+ if (!e)
476
+ throw new Error(
477
+ "usePageContent must be used within a PageContentProvider"
478
+ );
479
+ return e;
480
+ }, te = L(null), Me = () => {
481
+ const e = b(te);
482
+ if (!e)
483
+ throw new Error("useLock must be used within ScreenProtectProvider");
484
+ return e;
485
+ }, _e = ({
486
+ children: e,
487
+ idleMs: t = 1e4,
488
+ onUnlock: r,
489
+ persistLocked: i = !0,
490
+ storageKey: n = "inactivityLocked",
491
+ eventTarget: u,
492
+ overlayScope: m = "global",
493
+ overlayId: h = "lock-overlay-root",
494
+ overlayPosition: f = "fixed"
495
+ }) => {
496
+ const g = i && typeof window < "u" && window.localStorage.getItem(n) === "1", [c, l] = x(g), [p, B] = x(t), F = Number.isFinite(p) && p > 0, I = N(null), R = () => {
497
+ try {
498
+ i && window.localStorage.setItem(n, "1");
499
+ } catch {
500
+ }
501
+ l(!0);
502
+ }, D = async (k) => {
503
+ if (!(r && !await r(k))) {
504
+ try {
505
+ i && window.localStorage.removeItem(n);
506
+ } catch {
507
+ }
508
+ l(!1), F && E();
509
+ }
510
+ }, A = () => {
511
+ try {
512
+ i && window.localStorage.setItem(n, "1");
513
+ } catch {
514
+ }
515
+ l(!0);
516
+ }, E = () => {
517
+ F && (I.current && window.clearTimeout(I.current), I.current = window.setTimeout(() => {
518
+ A();
519
+ }, p));
520
+ };
521
+ M(() => {
522
+ if (!F) return;
523
+ const k = () => {
524
+ c || E();
525
+ }, o = { passive: !0 }, a = [
526
+ "pointermove",
527
+ "pointerdown",
528
+ "keydown",
529
+ "wheel",
530
+ "touchstart"
531
+ ], s = u ?? window;
532
+ return a.forEach((d) => s.addEventListener(d, k, o)), E(), () => {
533
+ I.current && window.clearTimeout(I.current), a.forEach((d) => s.removeEventListener(d, k));
534
+ };
535
+ }, [p, c, u, F]), M(() => {
536
+ if (!c) return;
537
+ const k = (d) => {
538
+ const v = document.getElementById(h);
539
+ v && v.contains(d.target) || (d.stopPropagation(), d.preventDefault());
540
+ }, o = { capture: !0 }, a = [
541
+ "pointerdown",
542
+ "pointerup",
543
+ "pointermove",
544
+ "click",
545
+ "wheel",
546
+ "keydown",
547
+ "keyup",
548
+ "touchstart",
549
+ "touchmove"
550
+ ], s = m === "scoped" ? u ?? window : window;
551
+ return a.forEach((d) => s.addEventListener(d, k, o)), () => a.forEach((d) => s.removeEventListener(d, k, o));
552
+ }, [c, m, h, u]);
553
+ const T = _(
554
+ () => ({ locked: c, lock: R, unlock: D, setIdleMs: B }),
555
+ [c]
556
+ );
557
+ return /* @__PURE__ */ q(te.Provider, { value: T, children: [
558
+ /* @__PURE__ */ C(
559
+ "div",
560
+ {
561
+ style: { width: "100%", height: "100%" },
562
+ ...c ? { inert: "" } : {},
563
+ ...c ? { "aria-hidden": !0 } : {},
564
+ children: e
565
+ }
566
+ ),
567
+ c && /* @__PURE__ */ C(
568
+ de,
569
+ {
570
+ onUnlock: D,
571
+ overlayId: h,
572
+ overlayPosition: f
573
+ }
574
+ )
575
+ ] });
576
+ }, de = ({
577
+ onUnlock: e,
578
+ overlayId: t = "lock-overlay-root",
579
+ overlayPosition: r = "fixed"
580
+ }) => {
581
+ const [i] = x(4), [n, u] = x("");
582
+ return /* @__PURE__ */ C(
583
+ "div",
584
+ {
585
+ id: t,
586
+ "aria-modal": "true",
587
+ role: "dialog",
588
+ "aria-label": "Locked screen",
589
+ style: {
590
+ position: r,
591
+ inset: 0,
592
+ background: "rgba(12, 14, 18, 0.85)",
593
+ backdropFilter: "blur(4px)",
594
+ display: "grid",
595
+ placeItems: "center",
596
+ zIndex: 9999
597
+ },
598
+ children: /* @__PURE__ */ q("div", { className: "lockscreen-form", style: { width: 420, maxWidth: "92vw" }, children: [
599
+ /* @__PURE__ */ C("div", { className: "lock-icon-wrap", children: /* @__PURE__ */ C("span", { className: "lock-icon-box" }) }),
600
+ /* @__PURE__ */ C("h2", { children: "잠금됨" }),
601
+ /* @__PURE__ */ C("p", { children: "PIN 번호를 입력하세요" }),
602
+ /* @__PURE__ */ C(
603
+ "div",
604
+ {
605
+ className: "lock-ipt-wrap",
606
+ style: { display: "flex", justifyContent: "center" },
607
+ children: /* @__PURE__ */ C(
608
+ ue.OTP,
609
+ {
610
+ mask: "*",
611
+ autoFocus: !0,
612
+ length: i,
613
+ value: n,
614
+ onChange: (m) => {
615
+ const h = (m ?? "").replace(/\D/g, "").slice(0, i);
616
+ u(h), h.length === i && e(h);
617
+ }
618
+ }
619
+ )
620
+ }
621
+ )
622
+ ] })
623
+ }
624
+ );
625
+ }, oe = L(null), Re = ({ children: e }) => {
626
+ const t = N(null), h = {
627
+ searchBoxRef: t,
628
+ getFormData: () => t.current?.getFormData() || {},
629
+ setFormData: (f) => {
630
+ t.current?.setFormData(f);
631
+ },
632
+ setDefaultValue: (f) => {
633
+ t.current?.setDefaultValue(f);
634
+ },
635
+ resetForm: () => {
636
+ t.current?.resetForm();
637
+ },
638
+ validateForm: async () => await t.current?.validateForm() || {
639
+ success: !1,
640
+ error: null
641
+ }
642
+ };
643
+ return /* @__PURE__ */ C(oe.Provider, { value: h, children: e });
644
+ }, Ae = () => {
645
+ const e = b(oe);
646
+ if (!e)
647
+ throw new Error("useSearchBox must be used within a SearchBoxProvider");
648
+ return e;
649
+ }, re = L(null), Ve = ({
650
+ children: e,
651
+ serviceCodes: t = {}
652
+ }) => {
653
+ Y(t), se(() => {
654
+ Y(t);
655
+ }, [t]);
656
+ const i = {
657
+ serviceCodes: t,
658
+ getServiceCode: (n) => t[n] && t[n].trim() !== "" ? t[n] : $[n]
659
+ };
660
+ return /* @__PURE__ */ C(re.Provider, { value: i, children: e });
661
+ }, U = () => {
662
+ const e = b(re);
663
+ if (!e)
664
+ throw new Error("useServiceCode must be used within a ServiceCodeProvider");
665
+ return e;
666
+ }, $e = (e) => {
667
+ const { getServiceCode: t } = U();
668
+ return t(e);
669
+ }, Ue = () => {
670
+ const { getServiceCode: e } = U(), t = {};
671
+ for (const r of Object.keys($))
672
+ t[r] = e(r);
673
+ return t;
674
+ }, Ge = () => {
675
+ const { getServiceCode: e } = U();
676
+ console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
677
+ for (const t of Object.keys($)) {
678
+ const r = e(t);
679
+ console.log(` ${t}: ${r}`);
680
+ }
681
+ };
682
+ export {
683
+ be as A,
684
+ we as B,
685
+ Ie as C,
686
+ Se as M,
687
+ Te as P,
688
+ Re as S,
689
+ Pe as a,
690
+ xe as b,
691
+ Ae as c,
692
+ ye as d,
693
+ Fe as e,
694
+ $e as f,
695
+ Le as g,
696
+ ke as h,
697
+ Ve as i,
698
+ _e as j,
699
+ Me as k,
700
+ Oe as l,
701
+ z as m,
702
+ Ee as n,
703
+ Ne as o,
704
+ ze as p,
705
+ Be as q,
706
+ De as r,
707
+ U as s,
708
+ Ue as t,
709
+ ve as u,
710
+ Ge as v
711
+ };
@@ -1,5 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ButtonAccessControllerProps } from './type';
3
- declare const ButtonAccessController: FC<ButtonAccessControllerProps>;
4
- export default ButtonAccessController;
2
+ declare const _default: import('react').NamedExoticComponent<ButtonAccessControllerProps>;
3
+ export default _default;
5
4
  //# sourceMappingURL=ButtonAccessController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAccessController.d.ts","sourceRoot":"","sources":["../../../src/components/common/ButtonAccessController.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAErD,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA2K3D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ButtonAccessController.d.ts","sourceRoot":"","sources":["../../../src/components/common/ButtonAccessController.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;;AA6HrD,wBAA4C"}