@bwg-ui/core 1.0.0 → 1.1.2

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 (315) hide show
  1. package/dist/chunks/AuthContext-CXng9fj0.cjs +2 -0
  2. package/dist/chunks/AuthContext-CXng9fj0.cjs.map +1 -0
  3. package/dist/chunks/AuthContext-Ei2P-z4d.js +53 -0
  4. package/dist/chunks/AuthContext-Ei2P-z4d.js.map +1 -0
  5. package/dist/chunks/BwgLargeUploader-CaH2F8x6.cjs +3 -0
  6. package/dist/chunks/BwgLargeUploader-CaH2F8x6.cjs.map +1 -0
  7. package/dist/chunks/BwgLargeUploader-CwaZ2WwY.js +3316 -0
  8. package/dist/chunks/BwgLargeUploader-CwaZ2WwY.js.map +1 -0
  9. package/dist/chunks/BwgSpace-CnLM4qcg.js +1 -0
  10. package/dist/chunks/BwgSpace-CnLM4qcg.js.map +1 -0
  11. package/dist/chunks/BwgSpace-b0hmM1Ht.cjs +1 -0
  12. package/dist/chunks/BwgSpace-b0hmM1Ht.cjs.map +1 -0
  13. package/dist/chunks/FileUtils-CmK-zHC5.cjs +2 -0
  14. package/dist/chunks/FileUtils-CmK-zHC5.cjs.map +1 -0
  15. package/dist/chunks/FileUtils-DsA-Sw37.js +141 -0
  16. package/dist/chunks/FileUtils-DsA-Sw37.js.map +1 -0
  17. package/dist/chunks/PublicLayout-BiTPwkVq.cjs +36 -0
  18. package/dist/chunks/PublicLayout-BiTPwkVq.cjs.map +1 -0
  19. package/dist/chunks/PublicLayout-g9WMtoZ0.js +139 -0
  20. package/dist/chunks/PublicLayout-g9WMtoZ0.js.map +1 -0
  21. package/dist/chunks/SSOHandler-CpCGcq5k.cjs +184 -0
  22. package/dist/chunks/SSOHandler-CpCGcq5k.cjs.map +1 -0
  23. package/dist/chunks/{QuickServiceToggle-y7esp1kp.js → SSOHandler-CvYiloZ5.js} +14832 -14630
  24. package/dist/chunks/SSOHandler-CvYiloZ5.js.map +1 -0
  25. package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs +2 -0
  26. package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs.map +1 -0
  27. package/dist/chunks/ScreenProtectContext-zByHldrr.js +115 -0
  28. package/dist/chunks/ScreenProtectContext-zByHldrr.js.map +1 -0
  29. package/dist/chunks/{ServiceCodeContext-CDZMr3Mm.js → SearchBoxContext-CzDzVCVm.js} +40 -39
  30. package/dist/chunks/SearchBoxContext-CzDzVCVm.js.map +1 -0
  31. package/dist/chunks/SearchBoxContext-mcPWk862.cjs +2 -0
  32. package/dist/chunks/SearchBoxContext-mcPWk862.cjs.map +1 -0
  33. package/dist/chunks/{UtilsContext-B16Gh9LL.cjs → UtilsContext-B6P_aohP.cjs} +2 -1
  34. package/dist/chunks/UtilsContext-B6P_aohP.cjs.map +1 -0
  35. package/dist/chunks/{UtilsContext-BbfZYiMR.js → UtilsContext-B9uAvAVF.js} +10 -9
  36. package/dist/chunks/UtilsContext-B9uAvAVF.js.map +1 -0
  37. package/dist/chunks/_commonjsHelpers-C6fGbg64.js +1 -0
  38. package/dist/chunks/_commonjsHelpers-C6fGbg64.js.map +1 -0
  39. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  40. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs.map +1 -0
  41. package/dist/chunks/{codeStore-Dt6j826J.cjs → codeStore-BG8S_mdS.cjs} +2 -1
  42. package/dist/chunks/codeStore-BG8S_mdS.cjs.map +1 -0
  43. package/dist/chunks/{codeStore-bxk_q1sl.js → codeStore-rU4v3QIA.js} +2 -1
  44. package/dist/chunks/codeStore-rU4v3QIA.js.map +1 -0
  45. package/dist/chunks/commonUtils-BV6WFv-z.js +1 -0
  46. package/dist/chunks/commonUtils-BV6WFv-z.js.map +1 -0
  47. package/dist/chunks/commonUtils-L9Jgc5y-.cjs +1 -0
  48. package/dist/chunks/commonUtils-L9Jgc5y-.cjs.map +1 -0
  49. package/dist/chunks/envUtils-C9Gf5aek.js +30 -0
  50. package/dist/chunks/envUtils-C9Gf5aek.js.map +1 -0
  51. package/dist/chunks/envUtils-CduTHoHu.cjs +2 -0
  52. package/dist/chunks/envUtils-CduTHoHu.cjs.map +1 -0
  53. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs +1 -0
  54. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs.map +1 -0
  55. package/dist/chunks/jsx-runtime-Dpn_P65e.js +1 -0
  56. package/dist/chunks/jsx-runtime-Dpn_P65e.js.map +1 -0
  57. package/dist/chunks/menuStore-CBvENehP.cjs +2 -0
  58. package/dist/chunks/menuStore-CBvENehP.cjs.map +1 -0
  59. package/dist/chunks/{favoriteStore-CguRSEcH.js → menuStore-CvQrMo35.js} +137 -123
  60. package/dist/chunks/menuStore-CvQrMo35.js.map +1 -0
  61. package/dist/chunks/{popupStore-CVD8SPTa.cjs → popupStore--hKZUZcO.cjs} +2 -1
  62. package/dist/chunks/popupStore--hKZUZcO.cjs.map +1 -0
  63. package/dist/chunks/{popupStore-Dp_fqtim.js → popupStore-BFIHOcoZ.js} +2 -1
  64. package/dist/chunks/popupStore-BFIHOcoZ.js.map +1 -0
  65. package/dist/chunks/realFormat-Cha7OTd9.cjs +1 -0
  66. package/dist/chunks/realFormat-Cha7OTd9.cjs.map +1 -0
  67. package/dist/chunks/realFormat-DRGLFabQ.js +1 -0
  68. package/dist/chunks/realFormat-DRGLFabQ.js.map +1 -0
  69. package/dist/chunks/serviceConfig-Cc8jfw_Y.cjs +3 -0
  70. package/dist/chunks/serviceConfig-Cc8jfw_Y.cjs.map +1 -0
  71. package/dist/chunks/{serviceConfig-BJBsdee_.js → serviceConfig-lAlRNVIw.js} +177 -206
  72. package/dist/chunks/serviceConfig-lAlRNVIw.js.map +1 -0
  73. package/dist/components/common/BwgButtonGroup.d.ts +1 -0
  74. package/dist/components/common/BwgButtonGroup.d.ts.map +1 -0
  75. package/dist/components/common/BwgCmptArea.d.ts +85 -6
  76. package/dist/components/common/BwgCmptArea.d.ts.map +1 -0
  77. package/dist/components/common/BwgCol.d.ts +20 -0
  78. package/dist/components/common/BwgCol.d.ts.map +1 -0
  79. package/dist/components/common/BwgConfigProvider.d.ts +3 -1
  80. package/dist/components/common/BwgConfigProvider.d.ts.map +1 -0
  81. package/dist/components/common/BwgDrawer.d.ts +1 -0
  82. package/dist/components/common/BwgDrawer.d.ts.map +1 -0
  83. package/dist/components/common/BwgGrid.d.ts +10 -4
  84. package/dist/components/common/BwgGrid.d.ts.map +1 -0
  85. package/dist/components/common/BwgInfoArea.d.ts +3 -1
  86. package/dist/components/common/BwgInfoArea.d.ts.map +1 -0
  87. package/dist/components/common/BwgPopup.d.ts +1 -0
  88. package/dist/components/common/BwgPopup.d.ts.map +1 -0
  89. package/dist/components/common/BwgRow.d.ts +20 -0
  90. package/dist/components/common/BwgRow.d.ts.map +1 -0
  91. package/dist/components/common/BwgSpace.d.ts +1 -0
  92. package/dist/components/common/BwgSpace.d.ts.map +1 -0
  93. package/dist/components/common/BwgTable.d.ts +1 -0
  94. package/dist/components/common/BwgTable.d.ts.map +1 -0
  95. package/dist/components/common/BwgTabs.d.ts +1 -0
  96. package/dist/components/common/BwgTabs.d.ts.map +1 -0
  97. package/dist/components/common/BwgTitleBox.d.ts +6 -1
  98. package/dist/components/common/BwgTitleBox.d.ts.map +1 -0
  99. package/dist/components/common/BwgView.d.ts +3 -13
  100. package/dist/components/common/BwgView.d.ts.map +1 -0
  101. package/dist/components/common/ContentBox.d.ts +1 -0
  102. package/dist/components/common/ContentBox.d.ts.map +1 -0
  103. package/dist/components/common/ContentLayOut.d.ts +1 -0
  104. package/dist/components/common/ContentLayOut.d.ts.map +1 -0
  105. package/dist/components/common/GlobalConfigProvider.d.ts +1 -0
  106. package/dist/components/common/GlobalConfigProvider.d.ts.map +1 -0
  107. package/dist/components/common/QuickServiceToggle.d.ts +1 -0
  108. package/dist/components/common/QuickServiceToggle.d.ts.map +1 -0
  109. package/dist/components/common/SSOHandler.d.ts +3 -0
  110. package/dist/components/common/SSOHandler.d.ts.map +1 -0
  111. package/dist/components/common/SearchBox.d.ts +60 -7
  112. package/dist/components/common/SearchBox.d.ts.map +1 -0
  113. package/dist/components/common/index.cjs +2 -1
  114. package/dist/components/common/index.cjs.map +1 -0
  115. package/dist/components/common/index.d.ts +20 -16
  116. package/dist/components/common/index.d.ts.map +1 -0
  117. package/dist/components/common/index.js +21 -17
  118. package/dist/components/common/index.js.map +1 -0
  119. package/dist/components/core/BwgButton.d.ts +1 -0
  120. package/dist/components/core/BwgButton.d.ts.map +1 -0
  121. package/dist/components/core/BwgCheck.d.ts +1 -0
  122. package/dist/components/core/BwgCheck.d.ts.map +1 -0
  123. package/dist/components/core/BwgCheckList.d.ts +1 -0
  124. package/dist/components/core/BwgCheckList.d.ts.map +1 -0
  125. package/dist/components/core/BwgDatePicker.d.ts +1 -0
  126. package/dist/components/core/BwgDatePicker.d.ts.map +1 -0
  127. package/dist/components/core/BwgForm.d.ts +1 -0
  128. package/dist/components/core/BwgForm.d.ts.map +1 -0
  129. package/dist/components/core/BwgFormItem.d.ts +1 -0
  130. package/dist/components/core/BwgFormItem.d.ts.map +1 -0
  131. package/dist/components/core/BwgInput.d.ts +1 -0
  132. package/dist/components/core/BwgInput.d.ts.map +1 -0
  133. package/dist/components/core/BwgLargeUploader.d.ts +5 -1
  134. package/dist/components/core/BwgLargeUploader.d.ts.map +1 -0
  135. package/dist/components/core/BwgMaskedInput.d.ts +1 -0
  136. package/dist/components/core/BwgMaskedInput.d.ts.map +1 -0
  137. package/dist/components/core/BwgMaskedPicker.d.ts +1 -0
  138. package/dist/components/core/BwgMaskedPicker.d.ts.map +1 -0
  139. package/dist/components/core/BwgMultiSelect.d.ts +1 -0
  140. package/dist/components/core/BwgMultiSelect.d.ts.map +1 -0
  141. package/dist/components/core/BwgNumber.d.ts +1 -0
  142. package/dist/components/core/BwgNumber.d.ts.map +1 -0
  143. package/dist/components/core/BwgRadio.d.ts +1 -0
  144. package/dist/components/core/BwgRadio.d.ts.map +1 -0
  145. package/dist/components/core/BwgRangePicker.d.ts +1 -0
  146. package/dist/components/core/BwgRangePicker.d.ts.map +1 -0
  147. package/dist/components/core/BwgSearch.d.ts +5 -0
  148. package/dist/components/core/BwgSearch.d.ts.map +1 -0
  149. package/dist/components/core/BwgSelect.d.ts +1 -0
  150. package/dist/components/core/BwgSelect.d.ts.map +1 -0
  151. package/dist/components/core/BwgTextArea.d.ts +1 -0
  152. package/dist/components/core/BwgTextArea.d.ts.map +1 -0
  153. package/dist/components/core/BwgUploader.d.ts +31 -7
  154. package/dist/components/core/BwgUploader.d.ts.map +1 -0
  155. package/dist/components/core/index.cjs +2 -1
  156. package/dist/components/core/index.cjs.map +1 -0
  157. package/dist/components/core/index.d.ts +1 -0
  158. package/dist/components/core/index.d.ts.map +1 -0
  159. package/dist/components/core/index.js +2 -1
  160. package/dist/components/core/index.js.map +1 -0
  161. package/dist/components/guide/BwgComponentGuide.d.ts +1 -0
  162. package/dist/components/guide/BwgComponentGuide.d.ts.map +1 -0
  163. package/dist/components/guide/BwgDeveloperGuide.d.ts +1 -0
  164. package/dist/components/guide/BwgDeveloperGuide.d.ts.map +1 -0
  165. package/dist/components/guide/index.cjs +1 -0
  166. package/dist/components/guide/index.cjs.map +1 -0
  167. package/dist/components/guide/index.d.ts +1 -0
  168. package/dist/components/guide/index.d.ts.map +1 -0
  169. package/dist/components/guide/index.js +1 -0
  170. package/dist/components/guide/index.js.map +1 -0
  171. package/dist/components/layout/ProgressOverlay.d.ts +11 -0
  172. package/dist/components/layout/ProgressOverlay.d.ts.map +1 -0
  173. package/dist/components/layout/ProtectLayout.d.ts +7 -0
  174. package/dist/components/layout/ProtectLayout.d.ts.map +1 -0
  175. package/dist/components/layout/PublicLayout.d.ts +7 -0
  176. package/dist/components/layout/PublicLayout.d.ts.map +1 -0
  177. package/dist/components/layout/index.cjs +2 -0
  178. package/dist/components/layout/index.cjs.map +1 -0
  179. package/dist/components/layout/index.d.ts +4 -0
  180. package/dist/components/layout/index.d.ts.map +1 -0
  181. package/dist/components/layout/index.js +7 -0
  182. package/dist/components/layout/index.js.map +1 -0
  183. package/dist/index.cjs +2 -1
  184. package/dist/index.cjs.map +1 -0
  185. package/dist/index.d.ts +2 -0
  186. package/dist/index.d.ts.map +1 -0
  187. package/dist/index.js +305 -289
  188. package/dist/index.js.map +1 -0
  189. package/dist/provider/contexts/AuthContext.d.ts +13 -0
  190. package/dist/provider/contexts/AuthContext.d.ts.map +1 -0
  191. package/dist/provider/contexts/CommonCodeContext.d.ts +6 -5
  192. package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -0
  193. package/dist/provider/contexts/ScreenProtectContext.d.ts +22 -0
  194. package/dist/provider/contexts/ScreenProtectContext.d.ts.map +1 -0
  195. package/dist/provider/contexts/SearchBoxContext.d.ts +1 -0
  196. package/dist/provider/contexts/SearchBoxContext.d.ts.map +1 -0
  197. package/dist/provider/contexts/ServiceCodeContext.d.ts +1 -0
  198. package/dist/provider/contexts/ServiceCodeContext.d.ts.map +1 -0
  199. package/dist/provider/contexts/UtilsContext.d.ts +1 -0
  200. package/dist/provider/contexts/UtilsContext.d.ts.map +1 -0
  201. package/dist/provider/contexts/index.d.ts +3 -0
  202. package/dist/provider/contexts/index.d.ts.map +1 -0
  203. package/dist/provider/hooks/index.d.ts +1 -0
  204. package/dist/provider/hooks/index.d.ts.map +1 -0
  205. package/dist/provider/hooks/usePopup.d.ts +2 -1
  206. package/dist/provider/hooks/usePopup.d.ts.map +1 -0
  207. package/dist/provider/hooks/useViewState.d.ts +1 -0
  208. package/dist/provider/hooks/useViewState.d.ts.map +1 -0
  209. package/dist/provider/index.cjs +2 -1
  210. package/dist/provider/index.cjs.map +1 -0
  211. package/dist/provider/index.d.ts +1 -0
  212. package/dist/provider/index.d.ts.map +1 -0
  213. package/dist/provider/index.js +26 -19
  214. package/dist/provider/index.js.map +1 -0
  215. package/dist/public/realgrid/css/realgrid-style-custom.css +643 -0
  216. package/dist/public/realgrid/css/realgrid-style.css +1902 -0
  217. package/dist/public/realgrid/images/ico_c.png +0 -0
  218. package/dist/public/realgrid/images/ico_d.png +0 -0
  219. package/dist/public/realgrid/images/ico_jp.png +0 -0
  220. package/dist/public/realgrid/images/ico_mp.png +0 -0
  221. package/dist/public/realgrid/images/ico_n.png +0 -0
  222. package/dist/public/realgrid/images/ico_nd.png +0 -0
  223. package/dist/public/realgrid/images/ico_p.png +0 -0
  224. package/dist/public/realgrid/images/ico_r.png +0 -0
  225. package/dist/public/realgrid/images/ico_sp.png +0 -0
  226. package/dist/public/realgrid/images/ico_u.png +0 -0
  227. package/dist/public/realgrid/images/ico_wt.png +0 -0
  228. package/dist/stores/codeStore.d.ts +4 -3
  229. package/dist/stores/codeStore.d.ts.map +1 -0
  230. package/dist/stores/favoriteStore.d.ts +1 -0
  231. package/dist/stores/favoriteStore.d.ts.map +1 -0
  232. package/dist/stores/index.cjs +2 -1
  233. package/dist/stores/index.cjs.map +1 -0
  234. package/dist/stores/index.d.ts +1 -0
  235. package/dist/stores/index.d.ts.map +1 -0
  236. package/dist/stores/index.js +6 -5
  237. package/dist/stores/index.js.map +1 -0
  238. package/dist/stores/menuStore.d.ts +1 -0
  239. package/dist/stores/menuStore.d.ts.map +1 -0
  240. package/dist/stores/popupStore.d.ts +1 -0
  241. package/dist/stores/popupStore.d.ts.map +1 -0
  242. package/dist/stores/userStore.d.ts +4 -3
  243. package/dist/stores/userStore.d.ts.map +1 -0
  244. package/dist/styles/assets/images/backgrounds/krx_login_bg.png +0 -0
  245. package/dist/styles/assets/images/contents/icon/ico-lockscreen.svg +44 -0
  246. package/dist/styles/assets/images/logos/krx-logo-full.svg +35 -0
  247. package/dist/styles/components.css +130 -17
  248. package/dist/styles/global.css +19 -0
  249. package/dist/styles/layout.css +108 -35
  250. package/dist/styles/login.css +39 -33
  251. package/dist/styles/variables.css +221 -5
  252. package/dist/types/global.d.ts +2 -0
  253. package/dist/utils/FileUtils.d.ts +8 -0
  254. package/dist/utils/FileUtils.d.ts.map +1 -0
  255. package/dist/utils/apiUtils.d.ts +1 -0
  256. package/dist/utils/apiUtils.d.ts.map +1 -0
  257. package/dist/utils/arrayUtils.d.ts +1 -0
  258. package/dist/utils/arrayUtils.d.ts.map +1 -0
  259. package/dist/utils/commonUtils.d.ts +1 -0
  260. package/dist/utils/commonUtils.d.ts.map +1 -0
  261. package/dist/utils/cookieUtils.d.ts +1 -0
  262. package/dist/utils/cookieUtils.d.ts.map +1 -0
  263. package/dist/utils/dateUtils.d.ts +1 -0
  264. package/dist/utils/dateUtils.d.ts.map +1 -0
  265. package/dist/utils/envUtils.d.ts +9 -0
  266. package/dist/utils/envUtils.d.ts.map +1 -0
  267. package/dist/utils/imageUtils.d.ts +1 -0
  268. package/dist/utils/imageUtils.d.ts.map +1 -0
  269. package/dist/utils/index.cjs +2 -1
  270. package/dist/utils/index.cjs.map +1 -0
  271. package/dist/utils/index.d.ts +2 -0
  272. package/dist/utils/index.d.ts.map +1 -0
  273. package/dist/utils/index.js +106 -103
  274. package/dist/utils/index.js.map +1 -0
  275. package/dist/utils/messageUtils.d.ts +1 -0
  276. package/dist/utils/messageUtils.d.ts.map +1 -0
  277. package/dist/utils/notificationUtils.d.ts +1 -0
  278. package/dist/utils/notificationUtils.d.ts.map +1 -0
  279. package/dist/utils/objectUtils.d.ts +1 -0
  280. package/dist/utils/objectUtils.d.ts.map +1 -0
  281. package/dist/utils/realFormat.d.ts +1 -0
  282. package/dist/utils/realFormat.d.ts.map +1 -0
  283. package/dist/utils/serviceConfig.d.ts +1 -0
  284. package/dist/utils/serviceConfig.d.ts.map +1 -0
  285. package/dist/utils/stringUtils.d.ts +1 -0
  286. package/dist/utils/stringUtils.d.ts.map +1 -0
  287. package/dist/utils/userUtils.d.ts +2 -1
  288. package/dist/utils/userUtils.d.ts.map +1 -0
  289. package/package.json +40 -37
  290. package/dist/chunks/BwgLargeUploader-ByN1XWV4.js +0 -809
  291. package/dist/chunks/BwgLargeUploader-CU0-MVk4.cjs +0 -1
  292. package/dist/chunks/QuickServiceToggle-CiCuWfCF.cjs +0 -183
  293. package/dist/chunks/ServiceCodeContext--ZnMtjzD.cjs +0 -1
  294. package/dist/chunks/favoriteStore-TgeeY32l.cjs +0 -1
  295. package/dist/chunks/messageUtils-9DXOwada.js +0 -117
  296. package/dist/chunks/messageUtils-RjJD_ArW.cjs +0 -1
  297. package/dist/chunks/serviceConfig-Cr2P4yr4.cjs +0 -2
  298. package/dist/public/styles/assets/images/contents/icon/ico-business-trip.svg +0 -21
  299. package/dist/public/styles/assets/images/contents/icon/ico-holiday.svg +0 -23
  300. package/dist/public/styles/assets/images/contents/icon/ico-menu-help.svg +0 -5
  301. package/dist/public/styles/assets/images/contents/icon/ico-overtime.svg +0 -17
  302. package/dist/public/styles/assets/images/contents/icon/ico-quick-tab-move.svg +0 -8
  303. package/dist/public/styles/assets/images/contents/icon/quick tab-text.svg +0 -4
  304. package/dist/public/styles/assets/images/contents/icon/quick-tab-text.svg +0 -4
  305. package/dist/public/test.txt +0 -0
  306. package/dist/styles/assets/images/contents/icon/quick tab-text.svg +0 -4
  307. package/dist/test.txt +0 -0
  308. package/public/styles/assets/images/contents/icon/ico-business-trip.svg +0 -21
  309. package/public/styles/assets/images/contents/icon/ico-holiday.svg +0 -23
  310. package/public/styles/assets/images/contents/icon/ico-menu-help.svg +0 -5
  311. package/public/styles/assets/images/contents/icon/ico-overtime.svg +0 -17
  312. package/public/styles/assets/images/contents/icon/ico-quick-tab-move.svg +0 -8
  313. package/public/styles/assets/images/contents/icon/quick tab-text.svg +0 -4
  314. package/public/styles/assets/images/contents/icon/quick-tab-text.svg +0 -4
  315. package/public/test.txt +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menuStore-CBvENehP.cjs","sources":["../../src/stores/favoriteStore.ts","../../src/stores/menuStore.ts"],"sourcesContent":["import { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\nimport type { MenuItem } from \"./menuStore\";\r\nimport { isLocal } from \"@/utils\";\r\n\r\n// 즐겨찾기 메뉴 타입 정의\r\nexport interface FavoriteMenuItem extends MenuItem {\r\n addedAt: string; // 즐겨찾기 추가 시간\r\n userId: string; // 사용자 ID\r\n}\r\n\r\n// 즐겨찾기 스토어 타입 정의\r\nexport interface FavoriteStore {\r\n favorites: FavoriteMenuItem[];\r\n isLoading: boolean;\r\n error: string | null;\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: (params: { crprCd: string; userId: string }) => Promise<void>;\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: (menuItem: MenuItem, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: (menuId: string, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => boolean;\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => void;\r\n}\r\n\r\n// 즐겨찾기 스토어 생성\r\nexport const useFavoriteStore = create<FavoriteStore>((set, get) => ({\r\n favorites: [],\r\n isLoading: false,\r\n error: null,\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: async ({ crprCd, userId }) => {\r\n console.log(\"즐겨찾기 메뉴 요청:\", { crprCd, userId });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n // 서버에서 즐겨찾기 메뉴 가져오기\r\n const data = await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n crprCd,\r\n userId,\r\n });\r\n\r\n let favoritesList: FavoriteMenuItem[] = [];\r\n\r\n if (data?.favorites && Array.isArray(data.favorites)) {\r\n favoritesList = data.favorites;\r\n } else if (Array.isArray(data)) {\r\n favoritesList = data;\r\n } else {\r\n console.warn(\"즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다.\");\r\n favoritesList = [];\r\n }\r\n\r\n console.log(\"즐겨찾기 메뉴 로드 완료:\", favoritesList);\r\n\r\n // 개발 모드에서 테스트용 즐겨찾기 데이터 추가\r\n if (isLocal && favoritesList.length === 0) {\r\n const testFavorites: FavoriteMenuItem[] = [\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST001\",\r\n menuNm: \"API 테스트\",\r\n scrnId: \"TEST001\",\r\n menuNo: 1,\r\n scrnPath: \"/dev/ApiTest\",\r\n menuLvl: 3,\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST002\",\r\n menuNm: \"프로젝트 개요\",\r\n scrnId: \"DOCS001\",\r\n menuNo: 2,\r\n scrnPath: \"/docs/ProjectOverview\",\r\n menuLvl: 3,\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n ];\r\n set({ favorites: testFavorites, isLoading: false, error: null });\r\n console.log(\"개발 모드: 테스트용 즐겨찾기 데이터 추가\");\r\n } else {\r\n set({ favorites: favoritesList, isLoading: false, error: null });\r\n }\r\n } catch (error) {\r\n console.error(\"즐겨찾기 메뉴 로드 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"즐겨찾기 로드 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: async (menuItem: MenuItem, userId: string) => {\r\n const { favorites } = get();\r\n\r\n // 이미 즐겨찾기에 있는지 확인\r\n if (favorites.some((fav) => fav.menuId === menuItem.menuId)) {\r\n console.log(\"이미 즐겨찾기에 추가된 메뉴입니다:\", menuItem.menuNm);\r\n return;\r\n }\r\n\r\n try {\r\n // 서버에 즐겨찾기 추가 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"add\",\r\n crprCd: menuItem.crprCd,\r\n userId,\r\n menuId: menuItem.menuId,\r\n menuNm: menuItem.menuNm,\r\n scrnPath: menuItem.scrnPath,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const newFavorite: FavoriteMenuItem = {\r\n ...menuItem,\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n };\r\n\r\n set({ favorites: [...favorites, newFavorite] });\r\n console.log(\"즐겨찾기 추가 완료:\", menuItem.menuNm);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 추가 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: async (menuId: string, userId: string) => {\r\n const { favorites } = get();\r\n\r\n try {\r\n // 서버에 즐겨찾기 제거 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"remove\",\r\n crprCd: \"100\", // 기본값\r\n userId,\r\n menuId,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const updatedFavorites = favorites.filter((fav) => fav.menuId !== menuId);\r\n set({ favorites: updatedFavorites });\r\n console.log(\"즐겨찾기 제거 완료:\", menuId);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 제거 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => {\r\n const { favorites } = get();\r\n return favorites.some((fav) => fav.menuId === menuId);\r\n },\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => {\r\n set({ favorites: [], isLoading: false, error: null });\r\n },\r\n}));\r\n","import { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\n\r\n// 메뉴 아이템 타입 정의 (서버 응답 구조 기반)\r\nexport interface MenuItem {\r\n crprCd: string; // 회사 코드\r\n menuGbCd: string; // 메뉴 구분 코드 (CMPRGRM: 메인, CMPRGRS: 서브, CMPRGRP: 프로그램)\r\n menuPrntId: string; // 부모 메뉴 ID\r\n menuId: string; // 메뉴 ID\r\n menuNm: string; // 메뉴명\r\n scrnId: string; // 화면 ID\r\n menuNo: number; // 메뉴 순서\r\n scrnPath: string; // 화면 경로\r\n menuLvl: number; // 메뉴 레벨 (1: 메인, 2~3: 서브, 2~4: 프로그램)\r\n rootMenu: string; // 루트 메뉴\r\n iconCd?: string; // 아이콘 코드\r\n children?: MenuItem[]; // 하위 메뉴 (클라이언트에서 구성)\r\n}\r\n\r\n// 탭 아이템 타입 정의\r\nexport interface TabItem {\r\n key: string; // 탭 고유 키 (menuId)\r\n label: string; // 탭 표시명 (menuNm)\r\n menuItem: MenuItem; // 메뉴 아이템 정보\r\n closable: boolean; // 닫기 가능 여부\r\n}\r\n\r\n// 개발자 메뉴 데이터 (개발 모드에서만 표시)\r\nconst getDeveloperMenuData = (): MenuItem[] => {\r\n const isDevelopment =\r\n (typeof process !== \"undefined\" &&\r\n process.env.NODE_ENV === \"development\") ||\r\n (typeof window !== \"undefined\" && window.location.hostname === \"localhost\");\r\n //console.log('isDevelopment:', isDevelopment);\r\n\r\n if (!isDevelopment) return [];\r\n\r\n return [\r\n // 1뎁스: 개발자 도구\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRM\",\r\n menuPrntId: \"-\",\r\n menuId: \"DEV001\",\r\n menuNm: \"개발자 도구\",\r\n scrnId: \"\",\r\n menuNo: 0,\r\n scrnPath: \"\",\r\n menuLvl: 1,\r\n rootMenu: \"DEV001\",\r\n },\r\n // 2뎁스: 컴포넌트 가이드\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRS\",\r\n menuPrntId: \"DEV001\",\r\n menuId: \"DEV00101\",\r\n menuNm: \"컴포넌트 가이드\",\r\n scrnId: \"\",\r\n menuNo: 1,\r\n scrnPath: \"\",\r\n menuLvl: 2,\r\n rootMenu: \"DEV001\",\r\n },\r\n // 3뎁스: BwgComponentGuideM01 컴포넌트\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00101\",\r\n menuId: \"DEV0010101\",\r\n menuNm: \"기본 컴포넌트\",\r\n scrnId: \"BwgComponentGuideM01\",\r\n menuNo: 9991,\r\n scrnPath: \"/cm/guide/BwgComponentGuideM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00101\",\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00101\",\r\n menuId: \"DEV0010102\",\r\n menuNm: \"응용 컴포넌트\",\r\n scrnId: \"BwgComponentGuideM02\",\r\n menuNo: 9992,\r\n scrnPath: \"/cm/guide/BwgComponentGuideM02\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00101\",\r\n },\r\n // 2뎁스: 개발자 가이드\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRS\",\r\n menuPrntId: \"DEV001\",\r\n menuId: \"DEV00102\",\r\n menuNm: \"개발자 가이드\",\r\n scrnId: \"\",\r\n menuNo: 2,\r\n scrnPath: \"\",\r\n menuLvl: 2,\r\n rootMenu: \"DEV001\",\r\n },\r\n // 3뎁스: BwgDeveloperGuideM01 컴포넌트\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00102\",\r\n menuId: \"DEV0010201\",\r\n menuNm: \"개발자 가이드\",\r\n scrnId: \"BwgDeveloperGuideM01\",\r\n menuNo: 9993,\r\n scrnPath: \"/cm/guide/BwgDeveloperGuideM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00102\",\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00102\",\r\n menuId: \"DEV0010202\",\r\n menuNm: \"React 가이드\",\r\n scrnId: \"BwgReactGuideM01\",\r\n menuNo: 9994,\r\n scrnPath: \"/cm/guide/BwgReactGuideM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00102\",\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00102\",\r\n menuId: \"DEV0010203\",\r\n menuNm: \"연습공간\",\r\n scrnId: \"BwgPracticeM01\",\r\n menuNo: 9995,\r\n scrnPath: \"/cm/guide/BwgPracticeM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00102\",\r\n },\r\n ];\r\n};\r\n\r\ntype fetchMenuParams = {\r\n crprCd: string;\r\n userId: string;\r\n prntGbcd: number;\r\n};\r\n\r\n// 메뉴 스토어 타입 정의\r\n// 뷰 상태 타입 정의\r\nexport interface ViewState {\r\n [key: string]: any;\r\n}\r\n\r\nexport interface MenuStore {\r\n menuList: MenuItem[];\r\n isLoading: boolean;\r\n error: string | null;\r\n activeMenu: string;\r\n currentProgram: MenuItem | null; // 현재 선택된 프로그램\r\n tabs: TabItem[]; // 열린 탭 목록\r\n activeTabKey: string | null; // 현재 활성 탭 키\r\n _lastFetchParams: fetchMenuParams | null; // 마지막 fetch 파라미터 (내부용)\r\n sidebarCollapsed: boolean; // 사이드바 접기/펼치기 상태\r\n viewStates: Record<string, ViewState>; // 뷰별 상태 저장\r\n fetchMenu: (params: fetchMenuParams) => Promise<void>;\r\n setActiveMenu: (menuId: string) => void;\r\n setCurrentProgram: (program: MenuItem | null) => void;\r\n addTab: (menuItem: MenuItem) => void;\r\n removeTab: (tabKey: string) => void;\r\n setActiveTab: (tabKey: string) => void;\r\n clearTabs: () => void;\r\n clearMenu: () => void;\r\n toggleSidebar: () => void; // 사이드바 접기/펼치기 토글\r\n // 뷰 상태 관리 함수들\r\n updateViewState: (viewKey: string, key: string, value: any) => void;\r\n}\r\n\r\n// 계층적 메뉴 구성 함수\r\nconst buildMenuHierarchy = (flatMenuList: MenuItem[]): MenuItem[] => {\r\n if (\r\n !flatMenuList ||\r\n !Array.isArray(flatMenuList) ||\r\n flatMenuList.length === 0\r\n ) {\r\n return [];\r\n }\r\n\r\n const menuMap = new Map<string, MenuItem>();\r\n const rootMenus: MenuItem[] = [];\r\n\r\n // 모든 메뉴를 Map에 저장\r\n flatMenuList.forEach((menu) => {\r\n if (menu && menu.menuId) {\r\n menuMap.set(menu.menuId, { ...menu, children: [] });\r\n }\r\n });\r\n\r\n // 계층 구조 구성\r\n flatMenuList.forEach((menu) => {\r\n if (!menu || !menu.menuId) return;\r\n\r\n const menuWithChildren = menuMap.get(menu.menuId);\r\n if (!menuWithChildren) return;\r\n\r\n // 개발자 메뉴만 로그 출력\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.log(`DEV 메뉴 처리: ${menu.menuId} (${menu.menuNm}), 부모: ${menu.menuPrntId}`)\r\n //}\r\n\r\n if (menu.menuPrntId && menu.menuPrntId !== \"\" && menu.menuPrntId !== \"-\") {\r\n // 부모 메뉴가 있는 경우\r\n const parentMenu = menuMap.get(menu.menuPrntId);\r\n if (parentMenu) {\r\n parentMenu.children!.push(menuWithChildren);\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.log(`✅ DEV 자식 메뉴 추가: ${menu.menuId} → ${menu.menuPrntId}`)\r\n //}\r\n } else {\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.warn(`❌ DEV 부모 메뉴를 찾을 수 없음: ${menu.menuPrntId}`)\r\n //}\r\n }\r\n } else {\r\n // 루트 메뉴인 경우 (부모가 없거나 '-'인 경우)\r\n rootMenus.push(menuWithChildren);\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.log(`✅ DEV 루트 메뉴 추가: ${menu.menuId} (${menu.menuNm})`)\r\n //}\r\n }\r\n });\r\n\r\n // 개발자 메뉴만 확인\r\n //const devRootMenus = rootMenus.filter(m => m.menuId.startsWith('DEV'))\r\n //if (devRootMenus.length > 0) {\r\n //console.log('DEV 루트 메뉴들:', devRootMenus.map(m => `${m.menuId} (${m.menuNm})`))\r\n //} else {\r\n //console.warn('❌ DEV 루트 메뉴가 없습니다!')\r\n //}\r\n\r\n // menuNo로 정렬\r\n const sortMenus = (menus: MenuItem[]): MenuItem[] => {\r\n return menus\r\n .sort((a, b) => a.menuNo - b.menuNo)\r\n .map((menu) => ({\r\n ...menu,\r\n children:\r\n menu.children && menu.children.length > 0\r\n ? sortMenus(menu.children)\r\n : undefined,\r\n }));\r\n };\r\n\r\n const result = sortMenus(rootMenus);\r\n\r\n // 개발자 메뉴만 최종 결과 확인\r\n const devResult = result.filter((m) => m.menuId.startsWith(\"DEV\"));\r\n if (devResult.length > 0) {\r\n console.log(\"DEV 최종 결과:\", devResult);\r\n }\r\n\r\n return result;\r\n};\r\n\r\n// 메뉴 스토어 생성\r\nexport const useMenuStore = create<MenuStore>((set, get) => ({\r\n menuList: [],\r\n isLoading: false,\r\n error: null,\r\n activeMenu: \"1\",\r\n currentProgram: null,\r\n tabs: [],\r\n activeTabKey: null,\r\n sidebarCollapsed: false, // 사이드바 접기/펼치기 상태\r\n viewStates: {}, // 뷰별 상태 저장\r\n _lastFetchParams: null as fetchMenuParams | null, // 마지막 fetch 파라미터 저장\r\n\r\n // 메뉴 데이터 가져오기\r\n fetchMenu: async ({ crprCd, userId, prntGbcd }: fetchMenuParams) => {\r\n const currentParams = { crprCd, userId, prntGbcd: prntGbcd ?? 1 };\r\n const { _lastFetchParams } = get();\r\n\r\n // 동일한 파라미터로 중복 요청 방지\r\n if (\r\n _lastFetchParams &&\r\n _lastFetchParams.crprCd === currentParams.crprCd &&\r\n _lastFetchParams.userId === currentParams.userId &&\r\n _lastFetchParams.prntGbcd === currentParams.prntGbcd\r\n ) {\r\n console.log(\"동일한 파라미터로 중복 요청 방지:\", currentParams);\r\n return;\r\n }\r\n\r\n console.log(\"메뉴 데이터 요청 시작:\", currentParams);\r\n set({ isLoading: true, error: null, _lastFetchParams: currentParams });\r\n\r\n try {\r\n // 실제 서버에서 메뉴 데이터 가져오기\r\n const data = await callService(\r\n getServiceCode(\"AUTH_MENU\"),\r\n currentParams\r\n );\r\n\r\n // console.log('서버 응답 전체 데이터:', data)\r\n // console.log('서버 응답 타입:', typeof data)\r\n // console.log('data.menuList 존재 여부:', !!data?.menuList)\r\n // console.log('data.menuList 타입:', typeof data?.menuList)\r\n // console.log('data.menuList 길이:', data?.menuList?.length)\r\n\r\n // 서버 응답 구조 확인 및 데이터 추출\r\n let flatMenuList: MenuItem[] = [];\r\n\r\n if (data?.menus && Array.isArray(data.menus)) {\r\n flatMenuList = data.menus;\r\n } else if (Array.isArray(data)) {\r\n // 응답이 바로 배열인 경우\r\n flatMenuList = data;\r\n } else {\r\n console.warn(\r\n \"서버 응답이 비어있거나 예상과 다른 구조입니다. 개발자 메뉴만 표시합니다.\"\r\n );\r\n flatMenuList = [];\r\n }\r\n\r\n // 개발자 메뉴 추가 (개발 모드에서만)\r\n const developerMenus = getDeveloperMenuData();\r\n //console.log('개발자 메뉴 데이터:', developerMenus)\r\n if (developerMenus.length > 0) {\r\n flatMenuList = [...developerMenus, ...flatMenuList];\r\n //console.log('개발자 메뉴 추가 후 flatMenuList 길이:', flatMenuList.length)\r\n }\r\n\r\n // console.log('추출된 flatMenuList:', flatMenuList)\r\n\r\n const hierarchicalMenuList = buildMenuHierarchy(flatMenuList);\r\n\r\n console.log(\"메뉴 데이터 로드 완료 (계층 구조):\", hierarchicalMenuList);\r\n\r\n set({\r\n menuList: hierarchicalMenuList,\r\n isLoading: false,\r\n error: null,\r\n });\r\n } catch (error) {\r\n console.error(\"메뉴 데이터 로드 실패:\", error);\r\n\r\n // 서버 오류 시에도 개발자 메뉴는 표시\r\n const developerMenus = getDeveloperMenuData();\r\n if (developerMenus.length > 0) {\r\n console.log(\"서버 오류로 인해 개발자 메뉴만 표시합니다.\");\r\n const hierarchicalMenuList = buildMenuHierarchy(developerMenus);\r\n set({\r\n menuList: hierarchicalMenuList,\r\n isLoading: false,\r\n error: null,\r\n });\r\n } else {\r\n set({\r\n error: error instanceof Error ? error.message : \"메뉴 로드 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n }\r\n },\r\n\r\n // 활성 메뉴 설정\r\n setActiveMenu: (menuId: string) => {\r\n set({ activeMenu: menuId });\r\n },\r\n\r\n // 현재 프로그램 설정\r\n setCurrentProgram: (program: MenuItem | null) => {\r\n console.log(\"setCurrentProgram 호출:\", program);\r\n set({ currentProgram: program });\r\n },\r\n\r\n // 탭 추가\r\n addTab: (menuItem: MenuItem) => {\r\n const { tabs } = get();\r\n const existingTab = tabs.find((tab) => tab.key === menuItem.menuId);\r\n\r\n if (!existingTab) {\r\n const newTab: TabItem = {\r\n key: menuItem.menuId,\r\n label: menuItem.menuNm,\r\n menuItem,\r\n closable: true,\r\n };\r\n set({\r\n tabs: [...tabs, newTab],\r\n activeTabKey: menuItem.menuId,\r\n });\r\n } else {\r\n // 이미 존재하는 탭이면 활성화만\r\n set({ activeTabKey: menuItem.menuId });\r\n }\r\n },\r\n\r\n // 탭 제거\r\n removeTab: (tabKey: string) => {\r\n const { tabs, activeTabKey } = get();\r\n const newTabs = tabs.filter((tab) => tab.key !== tabKey);\r\n\r\n // 제거된 탭이 현재 활성 탭이었다면 다른 탭을 활성화\r\n let newActiveTabKey = activeTabKey;\r\n if (activeTabKey === tabKey) {\r\n const currentIndex = tabs.findIndex((tab) => tab.key === tabKey);\r\n if (newTabs.length > 0) {\r\n // 제거된 탭 다음 탭을 활성화, 마지막 탭이었다면 이전 탭을 활성화\r\n newActiveTabKey =\r\n newTabs[Math.min(currentIndex, newTabs.length - 1)]?.key || null;\r\n } else {\r\n newActiveTabKey = null;\r\n }\r\n }\r\n\r\n set({\r\n tabs: newTabs,\r\n activeTabKey: newActiveTabKey,\r\n currentProgram: newActiveTabKey\r\n ? newTabs.find((tab) => tab.key === newActiveTabKey)?.menuItem || null\r\n : null,\r\n });\r\n },\r\n\r\n // 활성 탭 설정\r\n setActiveTab: (tabKey: string) => {\r\n const { tabs } = get();\r\n const targetTab = tabs.find((tab) => tab.key === tabKey);\r\n if (targetTab) {\r\n set({\r\n activeTabKey: tabKey,\r\n currentProgram: targetTab.menuItem,\r\n });\r\n }\r\n },\r\n\r\n // 탭 초기화\r\n clearTabs: () => {\r\n set({\r\n tabs: [],\r\n activeTabKey: null,\r\n currentProgram: null,\r\n });\r\n },\r\n\r\n // 메뉴 데이터 초기화\r\n clearMenu: () => {\r\n set({\r\n menuList: [],\r\n error: null,\r\n activeMenu: \"1\",\r\n currentProgram: null,\r\n tabs: [],\r\n activeTabKey: null,\r\n _lastFetchParams: null, // 마지막 fetch 파라미터도 초기화\r\n });\r\n },\r\n\r\n // 사이드바 접기/펼치기 토글\r\n toggleSidebar: () => {\r\n const { sidebarCollapsed } = get();\r\n set({ sidebarCollapsed: !sidebarCollapsed });\r\n },\r\n\r\n // 뷰 상태 업데이트\r\n updateViewState: (viewKey: string, key: string, value: any) => {\r\n set((prev) => ({\r\n viewStates: {\r\n ...prev.viewStates,\r\n [viewKey]: {\r\n ...prev.viewStates[viewKey],\r\n [key]: value,\r\n },\r\n },\r\n }));\r\n console.log(`뷰 상태 업데이트: ${viewKey}.${key}`, value);\r\n },\r\n}));\r\n"],"names":["useFavoriteStore","create","set","get","crprCd","userId","data","callService","getServiceCode","favoritesList","isLocal","testFavorites","error","menuItem","favorites","fav","newFavorite","menuId","updatedFavorites","getDeveloperMenuData","buildMenuHierarchy","flatMenuList","menuMap","rootMenus","menu","menuWithChildren","parentMenu","sortMenus","menus","a","b","result","devResult","m","useMenuStore","prntGbcd","currentParams","_lastFetchParams","developerMenus","hierarchicalMenuList","program","tabs","tab","newTab","tabKey","activeTabKey","newTabs","newActiveTabKey","currentIndex","targetTab","sidebarCollapsed","viewKey","key","value","prev"],"mappings":"uHAmCaA,EAAmBC,EAAAA,OAAsB,CAACC,EAAKC,KAAS,CACnE,UAAW,CAAA,EACX,UAAW,GACX,MAAO,KAGP,eAAgB,MAAO,CAAE,OAAAC,EAAQ,OAAAC,KAAa,CAC5C,QAAQ,IAAI,cAAe,CAAE,OAAAD,EAAQ,OAAAC,EAAQ,EAC7CH,EAAI,CAAE,UAAW,GAAM,MAAO,KAAM,EAEpC,GAAI,CAEF,MAAMI,EAAO,MAAMC,EAAAA,YAAYC,EAAAA,eAAe,WAAW,EAAG,CAC1D,OAAAJ,EACA,OAAAC,CAAA,CACD,E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EAAaC,IAAe,CAC7DnD,EAAKoD,IAAU,CACb,WAAY,CACV,GAAGA,EAAK,WACR,CAACH,CAAO,EAAG,CACT,GAAGG,EAAK,WAAWH,CAAO,EAC1B,CAACC,CAAG,EAAGC,CAAA,CACT,CACF,EACA,EACF,QAAQ,IAAI,cAAcF,CAAO,IAAIC,CAAG,GAAIC,CAAK,CACnD,CACF,EAAE"}
@@ -1,6 +1,113 @@
1
- import { create as g } from "zustand";
2
- import { V as u, am as d, ao as P } from "./serviceConfig-BJBsdee_.js";
3
- const v = () => typeof process < "u" && process.env.NODE_ENV === "development" || typeof window < "u" && window.location.hostname === "localhost" ? [
1
+ import { create as f } from "zustand";
2
+ import { V as l, am as d } from "./serviceConfig-lAlRNVIw.js";
3
+ import { i as P } from "./envUtils-C9Gf5aek.js";
4
+ const C = f((t, i) => ({
5
+ favorites: [],
6
+ isLoading: !1,
7
+ error: null,
8
+ // 즐겨찾기 메뉴 가져오기
9
+ fetchFavorites: async ({ crprCd: e, userId: a }) => {
10
+ console.log("즐겨찾기 메뉴 요청:", { crprCd: e, userId: a }), t({ isLoading: !0, error: null });
11
+ try {
12
+ const n = await l(d("AUTH_BMRK"), {
13
+ crprCd: e,
14
+ userId: a
15
+ });
16
+ let r = [];
17
+ if (n?.favorites && Array.isArray(n.favorites) ? r = n.favorites : Array.isArray(n) ? r = n : (console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."), r = []), console.log("즐겨찾기 메뉴 로드 완료:", r), P && r.length === 0) {
18
+ const o = [
19
+ {
20
+ crprCd: "100",
21
+ menuGbCd: "CMPRGRP",
22
+ menuPrntId: "FAV001",
23
+ menuId: "FAV_TEST001",
24
+ menuNm: "API 테스트",
25
+ scrnId: "TEST001",
26
+ menuNo: 1,
27
+ scrnPath: "/dev/ApiTest",
28
+ menuLvl: 3,
29
+ rootMenu: "FAV001",
30
+ addedAt: (/* @__PURE__ */ new Date()).toISOString(),
31
+ userId: a
32
+ },
33
+ {
34
+ crprCd: "100",
35
+ menuGbCd: "CMPRGRP",
36
+ menuPrntId: "FAV001",
37
+ menuId: "FAV_TEST002",
38
+ menuNm: "프로젝트 개요",
39
+ scrnId: "DOCS001",
40
+ menuNo: 2,
41
+ scrnPath: "/docs/ProjectOverview",
42
+ menuLvl: 3,
43
+ rootMenu: "FAV001",
44
+ addedAt: (/* @__PURE__ */ new Date()).toISOString(),
45
+ userId: a
46
+ }
47
+ ];
48
+ t({ favorites: o, isLoading: !1, error: null }), console.log("개발 모드: 테스트용 즐겨찾기 데이터 추가");
49
+ } else
50
+ t({ favorites: r, isLoading: !1, error: null });
51
+ } catch (n) {
52
+ console.error("즐겨찾기 메뉴 로드 실패:", n), t({
53
+ error: n instanceof Error ? n.message : "즐겨찾기 로드 실패",
54
+ isLoading: !1
55
+ });
56
+ }
57
+ },
58
+ // 즐겨찾기 추가
59
+ addFavorite: async (e, a) => {
60
+ const { favorites: n } = i();
61
+ if (n.some((r) => r.menuId === e.menuId)) {
62
+ console.log("이미 즐겨찾기에 추가된 메뉴입니다:", e.menuNm);
63
+ return;
64
+ }
65
+ try {
66
+ await l(d("AUTH_BMRK"), {
67
+ action: "add",
68
+ crprCd: e.crprCd,
69
+ userId: a,
70
+ menuId: e.menuId,
71
+ menuNm: e.menuNm,
72
+ scrnPath: e.scrnPath
73
+ });
74
+ const r = {
75
+ ...e,
76
+ addedAt: (/* @__PURE__ */ new Date()).toISOString(),
77
+ userId: a
78
+ };
79
+ t({ favorites: [...n, r] }), console.log("즐겨찾기 추가 완료:", e.menuNm);
80
+ } catch (r) {
81
+ throw console.error("즐겨찾기 추가 실패:", r), r;
82
+ }
83
+ },
84
+ // 즐겨찾기 제거
85
+ removeFavorite: async (e, a) => {
86
+ const { favorites: n } = i();
87
+ try {
88
+ await l(d("AUTH_BMRK"), {
89
+ action: "remove",
90
+ crprCd: "100",
91
+ // 기본값
92
+ userId: a,
93
+ menuId: e
94
+ });
95
+ const r = n.filter((o) => o.menuId !== e);
96
+ t({ favorites: r }), console.log("즐겨찾기 제거 완료:", e);
97
+ } catch (r) {
98
+ throw console.error("즐겨찾기 제거 실패:", r), r;
99
+ }
100
+ },
101
+ // 즐겨찾기 여부 확인
102
+ isFavorite: (e) => {
103
+ const { favorites: a } = i();
104
+ return a.some((n) => n.menuId === e);
105
+ },
106
+ // 즐겨찾기 초기화
107
+ clearFavorites: () => {
108
+ t({ favorites: [], isLoading: !1, error: null });
109
+ }
110
+ })), v = () => typeof process < "u" && process.env.NODE_ENV === "development" || typeof window < "u" && window.location.hostname === "localhost" ? [
4
111
  // 1뎁스: 개발자 도구
5
112
  {
6
113
  crprCd: "100",
@@ -36,7 +143,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
36
143
  menuNm: "기본 컴포넌트",
37
144
  scrnId: "BwgComponentGuideM01",
38
145
  menuNo: 9991,
39
- scrnPath: "/guide/BwgComponentGuideM01",
146
+ scrnPath: "/cm/guide/BwgComponentGuideM01",
40
147
  menuLvl: 3,
41
148
  rootMenu: "DEV00101"
42
149
  },
@@ -48,7 +155,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
48
155
  menuNm: "응용 컴포넌트",
49
156
  scrnId: "BwgComponentGuideM02",
50
157
  menuNo: 9992,
51
- scrnPath: "/guide/BwgComponentGuideM02",
158
+ scrnPath: "/cm/guide/BwgComponentGuideM02",
52
159
  menuLvl: 3,
53
160
  rootMenu: "DEV00101"
54
161
  },
@@ -74,7 +181,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
74
181
  menuNm: "개발자 가이드",
75
182
  scrnId: "BwgDeveloperGuideM01",
76
183
  menuNo: 9993,
77
- scrnPath: "/guide/BwgDeveloperGuideM01",
184
+ scrnPath: "/cm/guide/BwgDeveloperGuideM01",
78
185
  menuLvl: 3,
79
186
  rootMenu: "DEV00102"
80
187
  },
@@ -83,14 +190,26 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
83
190
  menuGbCd: "CMPRGRP",
84
191
  menuPrntId: "DEV00102",
85
192
  menuId: "DEV0010202",
193
+ menuNm: "React 가이드",
194
+ scrnId: "BwgReactGuideM01",
195
+ menuNo: 9994,
196
+ scrnPath: "/cm/guide/BwgReactGuideM01",
197
+ menuLvl: 3,
198
+ rootMenu: "DEV00102"
199
+ },
200
+ {
201
+ crprCd: "100",
202
+ menuGbCd: "CMPRGRP",
203
+ menuPrntId: "DEV00102",
204
+ menuId: "DEV0010203",
86
205
  menuNm: "연습공간",
87
206
  scrnId: "BwgPracticeM01",
88
- menuNo: 9994,
89
- scrnPath: "/guide/BwgPracticeM01",
207
+ menuNo: 9995,
208
+ scrnPath: "/cm/guide/BwgPracticeM01",
90
209
  menuLvl: 3,
91
210
  rootMenu: "DEV00102"
92
211
  }
93
- ] : [], f = (t) => {
212
+ ] : [], g = (t) => {
94
213
  if (!t || !Array.isArray(t) || t.length === 0)
95
214
  return [];
96
215
  const i = /* @__PURE__ */ new Map(), e = [];
@@ -111,7 +230,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
111
230
  children: s.children && s.children.length > 0 ? a(s.children) : void 0
112
231
  })), n = a(e), r = n.filter((o) => o.menuId.startsWith("DEV"));
113
232
  return r.length > 0 && console.log("DEV 최종 결과:", r), n;
114
- }, p = g((t, i) => ({
233
+ }, b = f((t, i) => ({
115
234
  menuList: [],
116
235
  isLoading: !1,
117
236
  error: null,
@@ -134,7 +253,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
134
253
  }
135
254
  console.log("메뉴 데이터 요청 시작:", r), t({ isLoading: !0, error: null, _lastFetchParams: r });
136
255
  try {
137
- const s = await u(
256
+ const s = await l(
138
257
  d("AUTH_MENU"),
139
258
  r
140
259
  );
@@ -142,9 +261,9 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
142
261
  s?.menus && Array.isArray(s.menus) ? c = s.menus : Array.isArray(s) ? c = s : (console.warn(
143
262
  "서버 응답이 비어있거나 예상과 다른 구조입니다. 개발자 메뉴만 표시합니다."
144
263
  ), c = []);
145
- const l = v();
146
- l.length > 0 && (c = [...l, ...c]);
147
- const m = f(c);
264
+ const u = v();
265
+ u.length > 0 && (c = [...u, ...c]);
266
+ const m = g(c);
148
267
  console.log("메뉴 데이터 로드 완료 (계층 구조):", m), t({
149
268
  menuList: m,
150
269
  isLoading: !1,
@@ -155,9 +274,9 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
155
274
  const c = v();
156
275
  if (c.length > 0) {
157
276
  console.log("서버 오류로 인해 개발자 메뉴만 표시합니다.");
158
- const l = f(c);
277
+ const u = g(c);
159
278
  t({
160
- menuList: l,
279
+ menuList: u,
161
280
  isLoading: !1,
162
281
  error: null
163
282
  });
@@ -254,114 +373,9 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
254
373
  }
255
374
  })), console.log(`뷰 상태 업데이트: ${e}.${a}`, n);
256
375
  }
257
- })), C = g((t, i) => ({
258
- favorites: [],
259
- isLoading: !1,
260
- error: null,
261
- // 즐겨찾기 메뉴 가져오기
262
- fetchFavorites: async ({ crprCd: e, userId: a }) => {
263
- console.log("즐겨찾기 메뉴 요청:", { crprCd: e, userId: a }), t({ isLoading: !0, error: null });
264
- try {
265
- const n = await u(d("AUTH_BMRK"), {
266
- crprCd: e,
267
- userId: a
268
- });
269
- let r = [];
270
- if (n?.favorites && Array.isArray(n.favorites) ? r = n.favorites : Array.isArray(n) ? r = n : (console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."), r = []), console.log("즐겨찾기 메뉴 로드 완료:", r), P && r.length === 0) {
271
- const o = [
272
- {
273
- crprCd: "100",
274
- menuGbCd: "CMPRGRP",
275
- menuPrntId: "FAV001",
276
- menuId: "FAV_TEST001",
277
- menuNm: "API 테스트",
278
- scrnId: "TEST001",
279
- menuNo: 1,
280
- scrnPath: "/dev/ApiTest",
281
- menuLvl: 3,
282
- rootMenu: "FAV001",
283
- addedAt: (/* @__PURE__ */ new Date()).toISOString(),
284
- userId: a
285
- },
286
- {
287
- crprCd: "100",
288
- menuGbCd: "CMPRGRP",
289
- menuPrntId: "FAV001",
290
- menuId: "FAV_TEST002",
291
- menuNm: "프로젝트 개요",
292
- scrnId: "DOCS001",
293
- menuNo: 2,
294
- scrnPath: "/docs/ProjectOverview",
295
- menuLvl: 3,
296
- rootMenu: "FAV001",
297
- addedAt: (/* @__PURE__ */ new Date()).toISOString(),
298
- userId: a
299
- }
300
- ];
301
- t({ favorites: o, isLoading: !1, error: null }), console.log("개발 모드: 테스트용 즐겨찾기 데이터 추가");
302
- } else
303
- t({ favorites: r, isLoading: !1, error: null });
304
- } catch (n) {
305
- console.error("즐겨찾기 메뉴 로드 실패:", n), t({
306
- error: n instanceof Error ? n.message : "즐겨찾기 로드 실패",
307
- isLoading: !1
308
- });
309
- }
310
- },
311
- // 즐겨찾기 추가
312
- addFavorite: async (e, a) => {
313
- const { favorites: n } = i();
314
- if (n.some((r) => r.menuId === e.menuId)) {
315
- console.log("이미 즐겨찾기에 추가된 메뉴입니다:", e.menuNm);
316
- return;
317
- }
318
- try {
319
- await u(d("AUTH_BMRK"), {
320
- action: "add",
321
- crprCd: e.crprCd,
322
- userId: a,
323
- menuId: e.menuId,
324
- menuNm: e.menuNm,
325
- scrnPath: e.scrnPath
326
- });
327
- const r = {
328
- ...e,
329
- addedAt: (/* @__PURE__ */ new Date()).toISOString(),
330
- userId: a
331
- };
332
- t({ favorites: [...n, r] }), console.log("즐겨찾기 추가 완료:", e.menuNm);
333
- } catch (r) {
334
- throw console.error("즐겨찾기 추가 실패:", r), r;
335
- }
336
- },
337
- // 즐겨찾기 제거
338
- removeFavorite: async (e, a) => {
339
- const { favorites: n } = i();
340
- try {
341
- await u(d("AUTH_BMRK"), {
342
- action: "remove",
343
- crprCd: "100",
344
- // 기본값
345
- userId: a,
346
- menuId: e
347
- });
348
- const r = n.filter((o) => o.menuId !== e);
349
- t({ favorites: r }), console.log("즐겨찾기 제거 완료:", e);
350
- } catch (r) {
351
- throw console.error("즐겨찾기 제거 실패:", r), r;
352
- }
353
- },
354
- // 즐겨찾기 여부 확인
355
- isFavorite: (e) => {
356
- const { favorites: a } = i();
357
- return a.some((n) => n.menuId === e);
358
- },
359
- // 즐겨찾기 초기화
360
- clearFavorites: () => {
361
- t({ favorites: [], isLoading: !1, error: null });
362
- }
363
376
  }));
364
377
  export {
365
378
  C as a,
366
- p as u
379
+ b as u
367
380
  };
381
+ //# sourceMappingURL=menuStore-CvQrMo35.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menuStore-CvQrMo35.js","sources":["../../src/stores/favoriteStore.ts","../../src/stores/menuStore.ts"],"sourcesContent":["import { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\nimport type { MenuItem } from \"./menuStore\";\r\nimport { isLocal } from \"@/utils\";\r\n\r\n// 즐겨찾기 메뉴 타입 정의\r\nexport interface FavoriteMenuItem extends MenuItem {\r\n addedAt: string; // 즐겨찾기 추가 시간\r\n userId: string; // 사용자 ID\r\n}\r\n\r\n// 즐겨찾기 스토어 타입 정의\r\nexport interface FavoriteStore {\r\n favorites: FavoriteMenuItem[];\r\n isLoading: boolean;\r\n error: string | null;\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: (params: { crprCd: string; userId: string }) => Promise<void>;\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: (menuItem: MenuItem, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: (menuId: string, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => boolean;\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => void;\r\n}\r\n\r\n// 즐겨찾기 스토어 생성\r\nexport const useFavoriteStore = create<FavoriteStore>((set, get) => ({\r\n favorites: [],\r\n isLoading: false,\r\n error: null,\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: async ({ crprCd, userId }) => {\r\n console.log(\"즐겨찾기 메뉴 요청:\", { crprCd, userId });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n // 서버에서 즐겨찾기 메뉴 가져오기\r\n const data = await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n crprCd,\r\n userId,\r\n });\r\n\r\n let favoritesList: FavoriteMenuItem[] = [];\r\n\r\n if (data?.favorites && Array.isArray(data.favorites)) {\r\n favoritesList = data.favorites;\r\n } else if (Array.isArray(data)) {\r\n favoritesList = data;\r\n } else {\r\n console.warn(\"즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다.\");\r\n favoritesList = [];\r\n }\r\n\r\n console.log(\"즐겨찾기 메뉴 로드 완료:\", favoritesList);\r\n\r\n // 개발 모드에서 테스트용 즐겨찾기 데이터 추가\r\n if (isLocal && favoritesList.length === 0) {\r\n const testFavorites: FavoriteMenuItem[] = [\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST001\",\r\n menuNm: \"API 테스트\",\r\n scrnId: \"TEST001\",\r\n menuNo: 1,\r\n scrnPath: \"/dev/ApiTest\",\r\n menuLvl: 3,\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST002\",\r\n menuNm: \"프로젝트 개요\",\r\n scrnId: \"DOCS001\",\r\n menuNo: 2,\r\n scrnPath: \"/docs/ProjectOverview\",\r\n menuLvl: 3,\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n ];\r\n set({ favorites: testFavorites, isLoading: false, error: null });\r\n console.log(\"개발 모드: 테스트용 즐겨찾기 데이터 추가\");\r\n } else {\r\n set({ favorites: favoritesList, isLoading: false, error: null });\r\n }\r\n } catch (error) {\r\n console.error(\"즐겨찾기 메뉴 로드 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"즐겨찾기 로드 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: async (menuItem: MenuItem, userId: string) => {\r\n const { favorites } = get();\r\n\r\n // 이미 즐겨찾기에 있는지 확인\r\n if (favorites.some((fav) => fav.menuId === menuItem.menuId)) {\r\n console.log(\"이미 즐겨찾기에 추가된 메뉴입니다:\", menuItem.menuNm);\r\n return;\r\n }\r\n\r\n try {\r\n // 서버에 즐겨찾기 추가 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"add\",\r\n crprCd: menuItem.crprCd,\r\n userId,\r\n menuId: menuItem.menuId,\r\n menuNm: menuItem.menuNm,\r\n scrnPath: menuItem.scrnPath,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const newFavorite: FavoriteMenuItem = {\r\n ...menuItem,\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n };\r\n\r\n set({ favorites: [...favorites, newFavorite] });\r\n console.log(\"즐겨찾기 추가 완료:\", menuItem.menuNm);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 추가 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: async (menuId: string, userId: string) => {\r\n const { favorites } = get();\r\n\r\n try {\r\n // 서버에 즐겨찾기 제거 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"remove\",\r\n crprCd: \"100\", // 기본값\r\n userId,\r\n menuId,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const updatedFavorites = favorites.filter((fav) => fav.menuId !== menuId);\r\n set({ favorites: updatedFavorites });\r\n console.log(\"즐겨찾기 제거 완료:\", menuId);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 제거 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => {\r\n const { favorites } = get();\r\n return favorites.some((fav) => fav.menuId === menuId);\r\n },\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => {\r\n set({ favorites: [], isLoading: false, error: null });\r\n },\r\n}));\r\n","import { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\n\r\n// 메뉴 아이템 타입 정의 (서버 응답 구조 기반)\r\nexport interface MenuItem {\r\n crprCd: string; // 회사 코드\r\n menuGbCd: string; // 메뉴 구분 코드 (CMPRGRM: 메인, CMPRGRS: 서브, CMPRGRP: 프로그램)\r\n menuPrntId: string; // 부모 메뉴 ID\r\n menuId: string; // 메뉴 ID\r\n menuNm: string; // 메뉴명\r\n scrnId: string; // 화면 ID\r\n menuNo: number; // 메뉴 순서\r\n scrnPath: string; // 화면 경로\r\n menuLvl: number; // 메뉴 레벨 (1: 메인, 2~3: 서브, 2~4: 프로그램)\r\n rootMenu: string; // 루트 메뉴\r\n iconCd?: string; // 아이콘 코드\r\n children?: MenuItem[]; // 하위 메뉴 (클라이언트에서 구성)\r\n}\r\n\r\n// 탭 아이템 타입 정의\r\nexport interface TabItem {\r\n key: string; // 탭 고유 키 (menuId)\r\n label: string; // 탭 표시명 (menuNm)\r\n menuItem: MenuItem; // 메뉴 아이템 정보\r\n closable: boolean; // 닫기 가능 여부\r\n}\r\n\r\n// 개발자 메뉴 데이터 (개발 모드에서만 표시)\r\nconst getDeveloperMenuData = (): MenuItem[] => {\r\n const isDevelopment =\r\n (typeof process !== \"undefined\" &&\r\n process.env.NODE_ENV === \"development\") ||\r\n (typeof window !== \"undefined\" && window.location.hostname === \"localhost\");\r\n //console.log('isDevelopment:', isDevelopment);\r\n\r\n if (!isDevelopment) return [];\r\n\r\n return [\r\n // 1뎁스: 개발자 도구\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRM\",\r\n menuPrntId: \"-\",\r\n menuId: \"DEV001\",\r\n menuNm: \"개발자 도구\",\r\n scrnId: \"\",\r\n menuNo: 0,\r\n scrnPath: \"\",\r\n menuLvl: 1,\r\n rootMenu: \"DEV001\",\r\n },\r\n // 2뎁스: 컴포넌트 가이드\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRS\",\r\n menuPrntId: \"DEV001\",\r\n menuId: \"DEV00101\",\r\n menuNm: \"컴포넌트 가이드\",\r\n scrnId: \"\",\r\n menuNo: 1,\r\n scrnPath: \"\",\r\n menuLvl: 2,\r\n rootMenu: \"DEV001\",\r\n },\r\n // 3뎁스: BwgComponentGuideM01 컴포넌트\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00101\",\r\n menuId: \"DEV0010101\",\r\n menuNm: \"기본 컴포넌트\",\r\n scrnId: \"BwgComponentGuideM01\",\r\n menuNo: 9991,\r\n scrnPath: \"/cm/guide/BwgComponentGuideM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00101\",\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00101\",\r\n menuId: \"DEV0010102\",\r\n menuNm: \"응용 컴포넌트\",\r\n scrnId: \"BwgComponentGuideM02\",\r\n menuNo: 9992,\r\n scrnPath: \"/cm/guide/BwgComponentGuideM02\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00101\",\r\n },\r\n // 2뎁스: 개발자 가이드\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRS\",\r\n menuPrntId: \"DEV001\",\r\n menuId: \"DEV00102\",\r\n menuNm: \"개발자 가이드\",\r\n scrnId: \"\",\r\n menuNo: 2,\r\n scrnPath: \"\",\r\n menuLvl: 2,\r\n rootMenu: \"DEV001\",\r\n },\r\n // 3뎁스: BwgDeveloperGuideM01 컴포넌트\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00102\",\r\n menuId: \"DEV0010201\",\r\n menuNm: \"개발자 가이드\",\r\n scrnId: \"BwgDeveloperGuideM01\",\r\n menuNo: 9993,\r\n scrnPath: \"/cm/guide/BwgDeveloperGuideM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00102\",\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00102\",\r\n menuId: \"DEV0010202\",\r\n menuNm: \"React 가이드\",\r\n scrnId: \"BwgReactGuideM01\",\r\n menuNo: 9994,\r\n scrnPath: \"/cm/guide/BwgReactGuideM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00102\",\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"DEV00102\",\r\n menuId: \"DEV0010203\",\r\n menuNm: \"연습공간\",\r\n scrnId: \"BwgPracticeM01\",\r\n menuNo: 9995,\r\n scrnPath: \"/cm/guide/BwgPracticeM01\",\r\n menuLvl: 3,\r\n rootMenu: \"DEV00102\",\r\n },\r\n ];\r\n};\r\n\r\ntype fetchMenuParams = {\r\n crprCd: string;\r\n userId: string;\r\n prntGbcd: number;\r\n};\r\n\r\n// 메뉴 스토어 타입 정의\r\n// 뷰 상태 타입 정의\r\nexport interface ViewState {\r\n [key: string]: any;\r\n}\r\n\r\nexport interface MenuStore {\r\n menuList: MenuItem[];\r\n isLoading: boolean;\r\n error: string | null;\r\n activeMenu: string;\r\n currentProgram: MenuItem | null; // 현재 선택된 프로그램\r\n tabs: TabItem[]; // 열린 탭 목록\r\n activeTabKey: string | null; // 현재 활성 탭 키\r\n _lastFetchParams: fetchMenuParams | null; // 마지막 fetch 파라미터 (내부용)\r\n sidebarCollapsed: boolean; // 사이드바 접기/펼치기 상태\r\n viewStates: Record<string, ViewState>; // 뷰별 상태 저장\r\n fetchMenu: (params: fetchMenuParams) => Promise<void>;\r\n setActiveMenu: (menuId: string) => void;\r\n setCurrentProgram: (program: MenuItem | null) => void;\r\n addTab: (menuItem: MenuItem) => void;\r\n removeTab: (tabKey: string) => void;\r\n setActiveTab: (tabKey: string) => void;\r\n clearTabs: () => void;\r\n clearMenu: () => void;\r\n toggleSidebar: () => void; // 사이드바 접기/펼치기 토글\r\n // 뷰 상태 관리 함수들\r\n updateViewState: (viewKey: string, key: string, value: any) => void;\r\n}\r\n\r\n// 계층적 메뉴 구성 함수\r\nconst buildMenuHierarchy = (flatMenuList: MenuItem[]): MenuItem[] => {\r\n if (\r\n !flatMenuList ||\r\n !Array.isArray(flatMenuList) ||\r\n flatMenuList.length === 0\r\n ) {\r\n return [];\r\n }\r\n\r\n const menuMap = new Map<string, MenuItem>();\r\n const rootMenus: MenuItem[] = [];\r\n\r\n // 모든 메뉴를 Map에 저장\r\n flatMenuList.forEach((menu) => {\r\n if (menu && menu.menuId) {\r\n menuMap.set(menu.menuId, { ...menu, children: [] });\r\n }\r\n });\r\n\r\n // 계층 구조 구성\r\n flatMenuList.forEach((menu) => {\r\n if (!menu || !menu.menuId) return;\r\n\r\n const menuWithChildren = menuMap.get(menu.menuId);\r\n if (!menuWithChildren) return;\r\n\r\n // 개발자 메뉴만 로그 출력\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.log(`DEV 메뉴 처리: ${menu.menuId} (${menu.menuNm}), 부모: ${menu.menuPrntId}`)\r\n //}\r\n\r\n if (menu.menuPrntId && menu.menuPrntId !== \"\" && menu.menuPrntId !== \"-\") {\r\n // 부모 메뉴가 있는 경우\r\n const parentMenu = menuMap.get(menu.menuPrntId);\r\n if (parentMenu) {\r\n parentMenu.children!.push(menuWithChildren);\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.log(`✅ DEV 자식 메뉴 추가: ${menu.menuId} → ${menu.menuPrntId}`)\r\n //}\r\n } else {\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.warn(`❌ DEV 부모 메뉴를 찾을 수 없음: ${menu.menuPrntId}`)\r\n //}\r\n }\r\n } else {\r\n // 루트 메뉴인 경우 (부모가 없거나 '-'인 경우)\r\n rootMenus.push(menuWithChildren);\r\n //if (menu.menuId.startsWith('DEV')) {\r\n //console.log(`✅ DEV 루트 메뉴 추가: ${menu.menuId} (${menu.menuNm})`)\r\n //}\r\n }\r\n });\r\n\r\n // 개발자 메뉴만 확인\r\n //const devRootMenus = rootMenus.filter(m => m.menuId.startsWith('DEV'))\r\n //if (devRootMenus.length > 0) {\r\n //console.log('DEV 루트 메뉴들:', devRootMenus.map(m => `${m.menuId} (${m.menuNm})`))\r\n //} else {\r\n //console.warn('❌ DEV 루트 메뉴가 없습니다!')\r\n //}\r\n\r\n // menuNo로 정렬\r\n const sortMenus = (menus: MenuItem[]): MenuItem[] => {\r\n return menus\r\n .sort((a, b) => a.menuNo - b.menuNo)\r\n .map((menu) => ({\r\n ...menu,\r\n children:\r\n menu.children && menu.children.length > 0\r\n ? sortMenus(menu.children)\r\n : undefined,\r\n }));\r\n };\r\n\r\n const result = sortMenus(rootMenus);\r\n\r\n // 개발자 메뉴만 최종 결과 확인\r\n const devResult = result.filter((m) => m.menuId.startsWith(\"DEV\"));\r\n if (devResult.length > 0) {\r\n console.log(\"DEV 최종 결과:\", devResult);\r\n }\r\n\r\n return result;\r\n};\r\n\r\n// 메뉴 스토어 생성\r\nexport const useMenuStore = create<MenuStore>((set, get) => ({\r\n menuList: [],\r\n isLoading: false,\r\n error: null,\r\n activeMenu: \"1\",\r\n currentProgram: null,\r\n tabs: [],\r\n activeTabKey: null,\r\n sidebarCollapsed: false, // 사이드바 접기/펼치기 상태\r\n viewStates: {}, // 뷰별 상태 저장\r\n _lastFetchParams: null as fetchMenuParams | null, // 마지막 fetch 파라미터 저장\r\n\r\n // 메뉴 데이터 가져오기\r\n fetchMenu: async ({ crprCd, userId, prntGbcd }: fetchMenuParams) => {\r\n const currentParams = { crprCd, userId, prntGbcd: prntGbcd ?? 1 };\r\n const { _lastFetchParams } = get();\r\n\r\n // 동일한 파라미터로 중복 요청 방지\r\n if (\r\n _lastFetchParams &&\r\n _lastFetchParams.crprCd === currentParams.crprCd &&\r\n _lastFetchParams.userId === currentParams.userId &&\r\n _lastFetchParams.prntGbcd === currentParams.prntGbcd\r\n ) {\r\n console.log(\"동일한 파라미터로 중복 요청 방지:\", currentParams);\r\n return;\r\n }\r\n\r\n console.log(\"메뉴 데이터 요청 시작:\", currentParams);\r\n set({ isLoading: true, error: null, _lastFetchParams: currentParams });\r\n\r\n try {\r\n // 실제 서버에서 메뉴 데이터 가져오기\r\n const data = await callService(\r\n getServiceCode(\"AUTH_MENU\"),\r\n currentParams\r\n );\r\n\r\n // console.log('서버 응답 전체 데이터:', data)\r\n // console.log('서버 응답 타입:', typeof data)\r\n // console.log('data.menuList 존재 여부:', !!data?.menuList)\r\n // console.log('data.menuList 타입:', typeof data?.menuList)\r\n // console.log('data.menuList 길이:', data?.menuList?.length)\r\n\r\n // 서버 응답 구조 확인 및 데이터 추출\r\n let flatMenuList: MenuItem[] = [];\r\n\r\n if (data?.menus && Array.isArray(data.menus)) {\r\n flatMenuList = data.menus;\r\n } else if (Array.isArray(data)) {\r\n // 응답이 바로 배열인 경우\r\n flatMenuList = data;\r\n } else {\r\n console.warn(\r\n \"서버 응답이 비어있거나 예상과 다른 구조입니다. 개발자 메뉴만 표시합니다.\"\r\n );\r\n flatMenuList = [];\r\n }\r\n\r\n // 개발자 메뉴 추가 (개발 모드에서만)\r\n const developerMenus = getDeveloperMenuData();\r\n //console.log('개발자 메뉴 데이터:', developerMenus)\r\n if (developerMenus.length > 0) {\r\n flatMenuList = [...developerMenus, ...flatMenuList];\r\n //console.log('개발자 메뉴 추가 후 flatMenuList 길이:', flatMenuList.length)\r\n }\r\n\r\n // console.log('추출된 flatMenuList:', flatMenuList)\r\n\r\n const hierarchicalMenuList = buildMenuHierarchy(flatMenuList);\r\n\r\n console.log(\"메뉴 데이터 로드 완료 (계층 구조):\", hierarchicalMenuList);\r\n\r\n set({\r\n menuList: hierarchicalMenuList,\r\n isLoading: false,\r\n error: null,\r\n });\r\n } catch (error) {\r\n console.error(\"메뉴 데이터 로드 실패:\", error);\r\n\r\n // 서버 오류 시에도 개발자 메뉴는 표시\r\n const developerMenus = getDeveloperMenuData();\r\n if (developerMenus.length > 0) {\r\n console.log(\"서버 오류로 인해 개발자 메뉴만 표시합니다.\");\r\n const hierarchicalMenuList = buildMenuHierarchy(developerMenus);\r\n set({\r\n menuList: hierarchicalMenuList,\r\n isLoading: false,\r\n error: null,\r\n });\r\n } else {\r\n set({\r\n error: error instanceof Error ? error.message : \"메뉴 로드 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n }\r\n },\r\n\r\n // 활성 메뉴 설정\r\n setActiveMenu: (menuId: string) => {\r\n set({ activeMenu: menuId });\r\n },\r\n\r\n // 현재 프로그램 설정\r\n setCurrentProgram: (program: MenuItem | null) => {\r\n console.log(\"setCurrentProgram 호출:\", program);\r\n set({ currentProgram: program });\r\n },\r\n\r\n // 탭 추가\r\n addTab: (menuItem: MenuItem) => {\r\n const { tabs } = get();\r\n const existingTab = tabs.find((tab) => tab.key === menuItem.menuId);\r\n\r\n if (!existingTab) {\r\n const newTab: TabItem = {\r\n key: menuItem.menuId,\r\n label: menuItem.menuNm,\r\n menuItem,\r\n closable: true,\r\n };\r\n set({\r\n tabs: [...tabs, newTab],\r\n activeTabKey: menuItem.menuId,\r\n });\r\n } else {\r\n // 이미 존재하는 탭이면 활성화만\r\n set({ activeTabKey: menuItem.menuId });\r\n }\r\n },\r\n\r\n // 탭 제거\r\n removeTab: (tabKey: string) => {\r\n const { tabs, activeTabKey } = get();\r\n const newTabs = tabs.filter((tab) => tab.key !== tabKey);\r\n\r\n // 제거된 탭이 현재 활성 탭이었다면 다른 탭을 활성화\r\n let newActiveTabKey = activeTabKey;\r\n if (activeTabKey === tabKey) {\r\n const currentIndex = tabs.findIndex((tab) => tab.key === tabKey);\r\n if (newTabs.length > 0) {\r\n // 제거된 탭 다음 탭을 활성화, 마지막 탭이었다면 이전 탭을 활성화\r\n newActiveTabKey =\r\n newTabs[Math.min(currentIndex, newTabs.length - 1)]?.key || null;\r\n } else {\r\n newActiveTabKey = null;\r\n }\r\n }\r\n\r\n set({\r\n tabs: newTabs,\r\n activeTabKey: newActiveTabKey,\r\n currentProgram: newActiveTabKey\r\n ? newTabs.find((tab) => tab.key === newActiveTabKey)?.menuItem || null\r\n : null,\r\n });\r\n },\r\n\r\n // 활성 탭 설정\r\n setActiveTab: (tabKey: string) => {\r\n const { tabs } = get();\r\n const targetTab = tabs.find((tab) => tab.key === tabKey);\r\n if (targetTab) {\r\n set({\r\n activeTabKey: tabKey,\r\n currentProgram: targetTab.menuItem,\r\n });\r\n }\r\n },\r\n\r\n // 탭 초기화\r\n clearTabs: () => {\r\n set({\r\n tabs: [],\r\n activeTabKey: null,\r\n currentProgram: null,\r\n });\r\n },\r\n\r\n // 메뉴 데이터 초기화\r\n clearMenu: () => {\r\n set({\r\n menuList: [],\r\n error: null,\r\n activeMenu: \"1\",\r\n currentProgram: null,\r\n tabs: [],\r\n activeTabKey: null,\r\n _lastFetchParams: null, // 마지막 fetch 파라미터도 초기화\r\n });\r\n },\r\n\r\n // 사이드바 접기/펼치기 토글\r\n toggleSidebar: () => {\r\n const { sidebarCollapsed } = get();\r\n set({ sidebarCollapsed: !sidebarCollapsed });\r\n },\r\n\r\n // 뷰 상태 업데이트\r\n updateViewState: (viewKey: string, key: string, value: any) => {\r\n set((prev) => ({\r\n viewStates: {\r\n ...prev.viewStates,\r\n [viewKey]: {\r\n ...prev.viewStates[viewKey],\r\n [key]: value,\r\n },\r\n },\r\n }));\r\n console.log(`뷰 상태 업데이트: ${viewKey}.${key}`, value);\r\n },\r\n}));\r\n"],"names":["useFavoriteStore","create","set","get","crprCd","userId","data","callService","getServiceCode","favoritesList","isLocal","testFavorites","error","menuItem","favorites","fav","newFavorite","menuId","updatedFavorites","getDeveloperMenuData","buildMenuHierarchy","flatMenuList","menuMap","rootMenus","menu","menuWithChildren","parentMenu","sortMenus","menus","a","b","result","devResult","m","useMenuStore","prntGbcd","currentParams","_lastFetchParams","developerMenus","hierarchicalMenuList","program","tabs","tab","newTab","tabKey","activeTabKey","newTabs","newActiveTabKey","currentIndex","targetTab","sidebarCollapsed","viewKey","key","value","prev"],"mappings":";;;AAmCO,MAAMA,IAAmBC,EAAsB,CAACC,GAAKC,OAAS;AAAA,EACnE,WAAW,CAAA;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA;AAAA,EAGP,gBAAgB,OAAO,EAAE,QAAAC,GAAQ,QAAAC,QAAa;AAC5C,YAAQ,IAAI,eAAe,EAAE,QAAAD,GAAQ,QAAAC,GAAQ,GAC7CH,EAAI,EAAE,WAAW,IAAM,OAAO,MAAM;AAEpC,QAAI;AAEF,YAAMI,IAAO,MAAMC,EAAYC,EAAe,WAAW,GAAG;AAAA,QAC1D,QAAAJ;AAAA,QACA,QAAAC;AAAA,MAAA,CACD;AAED,UAAII,IAAoC,CAAA;AAcxC,UAZIH,GAAM,aAAa,MAAM,QAAQA,EAAK,SAAS,IACjDG,IAAgBH,EAAK,YACZ,MAAM,QAAQA,CAAI,IAC3BG,IAAgBH,KAEhB,QAAQ,KAAK,+BAA+B,GAC5CG,IAAgB,CAAA,IAGlB,QAAQ,IAAI,kBAAkBA,CAAa,GAGvCC,KAAWD,EAAc,WAAW,GAAG;AACzC,cAAME,IAAoC;AAAA,UACxC;AAAA,YACE,QAAQ;AAAA,YACR,UAAU;AAAA,YACV,YAAY;AAAA,YACZ,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,UAAU;AAAA,YACV,SAAS;AAAA,YACT,UAAU;AAAA,YACV,UAAS,oBAAI,KAAA,GAAO,YAAA;AAAA,YACpB,QAAAN;AAAA,UAAA;AAAA,UAEF;AAAA,YACE,QAAQ;AAAA,YACR,UAAU;AAAA,YACV,YAAY;AAAA,YACZ,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,UAAU;AA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QACR,CAACH,CAAO,GAAG;AAAA,UACT,GAAGG,EAAK,WAAWH,CAAO;AAAA,UAC1B,CAACC,CAAG,GAAGC;AAAA,QAAA;AAAA,MACT;AAAA,IACF,EACA,GACF,QAAQ,IAAI,cAAcF,CAAO,IAAIC,CAAG,IAAIC,CAAK;AAAA,EACnD;AACF,EAAE;"}
@@ -1 +1,2 @@
1
- "use strict";const g=require("zustand"),a=require("./serviceConfig-Cr2P4yr4.cjs"),P=g.create((r,i)=>({popups:[],activePopupId:null,isLoading:!1,error:null,openPopup:async(p,s,u)=>{console.log("팝업 열기 요청:",{popupCode:p,data:s,config:u}),r({isLoading:!0,error:null});try{console.log("팝업 열기 시작:",p);let o=null;const n=await a.callService(a.getServiceCode("SRCH_POPU"),{crprCd:a.getUserInfo().crprCd,popuCd:p});console.log("팝업 정보 조회 결과:",n),o=n?.mstr;const t=n?.dtls||[];if(console.info("popupInfo:",o),!o||!o.popuUrl){const e=`팝업 정보를 찾을 수 없습니다: ${p}`;throw console.error(e),new Error(e)}console.log("파싱된 팝업 정보:",o),console.log("버튼 목록:",t);const d=(e=>`/src/pages/views/popup/${e}`)(o.popuUrl);console.log("변환된 팝업 URL:",d);const l={popupId:`popup_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,popupCode:p,popupTitle:o.popuNm||"팝업",popupUrl:d,popupParams:s,width:o.popuWdth||800,height:o.popuHght||600,resizable:!0,draggable:!0,buttonList:t,config:u};console.log("생성된 팝업 아이템:",l);const c=i().popups.find(e=>e.popupCode===p);if(c){console.log("기존 팝업 업데이트:",c.popupId),r({activePopupId:c.popupId,popups:i().popups.map(e=>e.popupId===c.popupId?{...e,config:u}:e),isLoading:!1});return}console.log("새 팝업 추가:",l.popupId),r(e=>({popups:[...e.popups,l],activePopupId:l.popupId,isLoading:!1})),console.log("팝업 열기 완료:",l)}catch(o){console.error("팝업 열기 실패:",o),r({error:o instanceof Error?o.message:"팝업 열기 실패",isLoading:!1})}},closePopup:p=>{const{popups:s,activePopupId:u}=i(),o=s.filter(t=>t.popupId!==p);let n=u;u===p&&(n=o.length>0?o[o.length-1].popupId:null),r({popups:o,activePopupId:n})},closeAllPopups:()=>{r({popups:[],activePopupId:null})},setActivePopup:p=>{r({activePopupId:p})},updatePopupConfig:(p,s)=>{r(u=>({popups:u.popups.map(o=>o.popupId===p?{...o,config:{...o.config,...s}}:o)}))}}));exports.usePopupStore=P;
1
+ "use strict";const g=require("zustand"),a=require("./serviceConfig-Cc8jfw_Y.cjs"),P=g.create((r,i)=>({popups:[],activePopupId:null,isLoading:!1,error:null,openPopup:async(p,s,u)=>{console.log("팝업 열기 요청:",{popupCode:p,data:s,config:u}),r({isLoading:!0,error:null});try{console.log("팝업 열기 시작:",p);let o=null;const n=await a.callService(a.getServiceCode("SRCH_POPU"),{crprCd:a.getUserInfo().crprCd,popuCd:p});console.log("팝업 정보 조회 결과:",n),o=n?.mstr;const t=n?.dtls||[];if(console.info("popupInfo:",o),!o||!o.popuUrl){const e=`팝업 정보를 찾을 수 없습니다: ${p}`;throw console.error(e),new Error(e)}console.log("파싱된 팝업 정보:",o),console.log("버튼 목록:",t);const d=(e=>`/src/pages/views/popup/${e}`)(o.popuUrl);console.log("변환된 팝업 URL:",d);const l={popupId:`popup_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,popupCode:p,popupTitle:o.popuNm||"팝업",popupUrl:d,popupParams:s,width:o.popuWdth||800,height:o.popuHght||600,resizable:!0,draggable:!0,buttonList:t,config:u};console.log("생성된 팝업 아이템:",l);const c=i().popups.find(e=>e.popupCode===p);if(c){console.log("기존 팝업 업데이트:",c.popupId),r({activePopupId:c.popupId,popups:i().popups.map(e=>e.popupId===c.popupId?{...e,config:u}:e),isLoading:!1});return}console.log("새 팝업 추가:",l.popupId),r(e=>({popups:[...e.popups,l],activePopupId:l.popupId,isLoading:!1})),console.log("팝업 열기 완료:",l)}catch(o){console.error("팝업 열기 실패:",o),r({error:o instanceof Error?o.message:"팝업 열기 실패",isLoading:!1})}},closePopup:p=>{const{popups:s,activePopupId:u}=i(),o=s.filter(t=>t.popupId!==p);let n=u;u===p&&(n=o.length>0?o[o.length-1].popupId:null),r({popups:o,activePopupId:n})},closeAllPopups:()=>{r({popups:[],activePopupId:null})},setActivePopup:p=>{r({activePopupId:p})},updatePopupConfig:(p,s)=>{r(u=>({popups:u.popups.map(o=>o.popupId===p?{...o,config:{...o.config,...s}}:o)}))}}));exports.usePopupStore=P;
2
+ //# sourceMappingURL=popupStore--hKZUZcO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popupStore--hKZUZcO.cjs","sources":["../../src/stores/popupStore.ts"],"sourcesContent":["import { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\nimport { getUserInfo } from \"@/utils\";\r\n\r\n// 팝업 아이템 타입 정의\r\nexport interface PopupItem {\r\n popupId: string; // 팝업 ID\r\n popupCode: string; // 팝업 코드\r\n popupTitle: string; // 팝업 제목\r\n popupUrl: string; // 팝업 프로그램 URL\r\n popupParams?: any; // 팝업 파라미터\r\n buttonList?: any[]; // 버튼 목록\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n config?: PopupConfig; // 팝업 설정\r\n close?: () => void; // 팝업 닫기 함수\r\n}\r\n\r\n// 팝업 스토어 타입 정의\r\nexport interface PopupStore {\r\n popups: PopupItem[]; // 열린 팝업 목록\r\n activePopupId: string | null; // 현재 활성 팝업 ID\r\n isLoading: boolean; // 로딩 상태\r\n error: string | null; // 에러 상태\r\n\r\n // 팝업 관련 액션들\r\n openPopup: (\r\n popupCode: string,\r\n data?: any,\r\n config?: PopupConfig\r\n ) => Promise<void>;\r\n closePopup: (popupId: string) => void;\r\n closeAllPopups: () => void;\r\n setActivePopup: (popupId: string) => void;\r\n\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => void;\r\n}\r\n\r\nexport interface PopupButton {\r\n key: string; // 버튼 고유 키\r\n text: string; // 버튼 텍스트\r\n type?: \"primary\" | \"default\" | \"dashed\" | \"link\" | \"text\"; // 버튼 타입\r\n danger?: boolean; // 위험 버튼 여부\r\n disabled?: boolean; // 비활성화 여부\r\n icon?: string; // 아이콘 (Ant Design 아이콘명)\r\n onClick?: (popupData?: any) => void | Promise<void>; // 클릭 이벤트\r\n}\r\n\r\n/**\r\n * 팝업 설정 타입 정의\r\n */\r\nexport interface PopupConfig {\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n title?: string; // 팝업 제목\r\n buttons?: PopupButton[]; // 팝업 버튼들\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n closable?: boolean; // 닫기 버튼 표시 여부\r\n maskClosable?: boolean; // 마스크 클릭 시 닫기 여부\r\n destroyOnClose?: boolean; // 닫을 때 컴포넌트 파괴 여부\r\n searchBox?: {\r\n reqArea: any;\r\n subArea?: any;\r\n style?: any;\r\n };\r\n /**\r\n * 팝업 콜백\r\n * 팝업 콜백은 팝업이 닫힐 때 호출되는 함수입니다.\r\n */\r\n callback?: (callbackParams?: any) => void;\r\n}\r\n\r\n/**\r\n * 팝업 내부 뷰 컴포넌트 타입\r\n */\r\nexport interface PopupViewProps {\r\n /**\r\n * 팝업정보\r\n */\r\n popup?: PopupItem;\r\n /** 팝업 이벤트 전달 프로퍼티 */\r\n popupEvent?: any;\r\n /** 팝업 닫기 이벤트 전달 프로퍼티 */\r\n onClose?: () => void;\r\n}\r\n\r\n// 팝업 스토어 생성\r\nexport const usePopupStore = create<PopupStore>((set, get) => ({\r\n popups: [],\r\n activePopupId: null,\r\n isLoading: false,\r\n error: null,\r\n\r\n // 팝업 열기\r\n openPopup: async (popupCode: string, data?: any, config?: PopupConfig) => {\r\n console.log(\"팝업 열기 요청:\", { popupCode, data, config });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n console.log(\"팝업 열기 시작:\", popupCode);\r\n\r\n // 개발 환경에서는 모의 데이터 사용\r\n let popupInfo: any = null;\r\n\r\n const response = await callService(getServiceCode(\"SRCH_POPU\"), {\r\n crprCd: getUserInfo().crprCd,\r\n popuCd: popupCode,\r\n });\r\n console.log(\"팝업 정보 조회 결과:\", response);\r\n\r\n // 응답 구조 파싱: { mstr: {...}, dtls: [...] }\r\n popupInfo = response?.mstr;\r\n const buttonList = response?.dtls || [];\r\n\r\n console.info(\"popupInfo:\", popupInfo);\r\n\r\n if (!popupInfo || !popupInfo.popuUrl) {\r\n const errorMsg = `팝업 정보를 찾을 수 없습니다: ${popupCode}`;\r\n console.error(errorMsg);\r\n throw new Error(errorMsg);\r\n }\r\n\r\n console.log(\"파싱된 팝업 정보:\", popupInfo);\r\n console.log(\"버튼 목록:\", buttonList);\r\n\r\n // 팝업 URL 경로 변환: 서버 경로 -> 클라이언트 경로\r\n const convertPopupUrl = (serverUrl: string): string => {\r\n // 서버에서 받은 경로: \"cm/CMAuthMstrP01\"\r\n // 클라이언트에서 사용할 경로: \"/src/pages/views/popup/cm/CMAuthMstrP01\"\r\n return `/src/pages/views/popup/${serverUrl}`;\r\n };\r\n\r\n const convertedPopupUrl = convertPopupUrl(popupInfo.popuUrl);\r\n console.log(\"변환된 팝업 URL:\", convertedPopupUrl);\r\n\r\n // 팝업 아이템 생성\r\n const popupItem: PopupItem = {\r\n popupId: `popup_${Date.now()}_${Math.random()\r\n .toString(36)\r\n .substr(2, 9)}`,\r\n popupCode: popupCode,\r\n popupTitle: popupInfo.popuNm || \"팝업\",\r\n popupUrl: convertedPopupUrl,\r\n popupParams: data,\r\n width: popupInfo.popuWdth || 800,\r\n height: popupInfo.popuHght || 600,\r\n resizable: true,\r\n draggable: true,\r\n buttonList: buttonList, // 버튼 목록 추가\r\n config: config,\r\n };\r\n\r\n console.log(\"생성된 팝업 아이템:\", popupItem);\r\n\r\n // 이미 같은 팝업이 열려있는지 확인\r\n const existingPopup = get().popups.find((p) => p.popupCode === popupCode);\r\n if (existingPopup) {\r\n console.log(\"기존 팝업 업데이트:\", existingPopup.popupId);\r\n // 기존 팝업을 활성화하고 데이터 업데이트\r\n set({\r\n activePopupId: existingPopup.popupId,\r\n popups: get().popups.map((p) =>\r\n p.popupId === existingPopup.popupId ? { ...p, config: config } : p\r\n ),\r\n isLoading: false,\r\n });\r\n return;\r\n }\r\n\r\n // 새 팝업 추가\r\n console.log(\"새 팝업 추가:\", popupItem.popupId);\r\n set((state) => ({\r\n popups: [...state.popups, popupItem],\r\n activePopupId: popupItem.popupId,\r\n isLoading: false,\r\n }));\r\n\r\n console.log(\"팝업 열기 완료:\", popupItem);\r\n } catch (error) {\r\n console.error(\"팝업 열기 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"팝업 열기 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 팝업 닫기\r\n closePopup: (popupId: string) => {\r\n const { popups, activePopupId } = get();\r\n const newPopups = popups.filter((p) => p.popupId !== popupId);\r\n\r\n // 닫힌 팝업이 현재 활성 팝업이었다면 다른 팝업을 활성화\r\n let newActivePopupId = activePopupId;\r\n if (activePopupId === popupId) {\r\n newActivePopupId =\r\n newPopups.length > 0 ? newPopups[newPopups.length - 1].popupId : null;\r\n }\r\n\r\n set({\r\n popups: newPopups,\r\n activePopupId: newActivePopupId,\r\n });\r\n },\r\n\r\n // 모든 팝업 닫기\r\n closeAllPopups: () => {\r\n set({\r\n popups: [],\r\n activePopupId: null,\r\n });\r\n },\r\n\r\n // 활성 팝업 설정\r\n setActivePopup: (popupId: string) => {\r\n set({ activePopupId: popupId });\r\n },\r\n\r\n // 팝업 설정 업데이트\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => {\r\n set((state) => ({\r\n popups: state.popups.map((p) =>\r\n p.popupId === popupId ? { ...p, config: { ...p.config, ...config } } : p\r\n ),\r\n }));\r\n },\r\n}));\r\n"],"names":["usePopupStore","create","set","get","popupCode","data","config","popupInfo","response","callService","getServiceCode","getUserInfo","buttonList","errorMsg","convertedPopupUrl","serverUrl","popupItem","existingPopup","p","state","error","popupId","popups","activePopupId","newPopups","newActivePopupId"],"mappings":"kFA2FaA,EAAgBC,EAAAA,OAAmB,CAACC,EAAKC,KAAS,CAC7D,OAAQ,CAAA,EACR,cAAe,KACf,UAAW,GACX,MAAO,KAGP,UAAW,MAAOC,EAAmBC,EAAYC,IAAyB,CACxE,QAAQ,IAAI,YAAa,CAAE,UAAAF,EAAW,KAAAC,EAAM,OAAAC,EAAQ,EACpDJ,EAAI,CAAE,UAAW,GAAM,MAAO,KAAM,EAEpC,GAAI,CACF,QAAQ,IAAI,YAAaE,CAAS,EAGlC,IAAIG,EAAiB,KAErB,MAAMC,EAAW,MAAMC,EAAAA,YAAYC,EAAAA,eAAe,WAAW,EAAG,CAC9D,OAAQC,EAAAA,cAAc,OACtB,OAAQP,CAAA,CACT,EACD,QAAQ,IAAI,eAAgBI,CAAQ,EAGpCD,EAAYC,GAAU,KACtB,MAAMI,EAAaJ,GAAU,MAAQ,CAAA,EAIrC,GAFA,QAAQ,KAAK,aAAcD,CAAS,EAEhC,CAACA,GAAa,CAACA,EAAU,QAAS,CACpC,MAAMM,EAAW,qBAAqBT,CAAS,GAC/C,cAAQ,MAAMS,CAAQ,EAChB,IAAI,MAAMA,CAAQ,CAC1B,CAEA,QAAQ,IAAI,aAAcN,CAAS,EACnC,QAAQ,IAAI,SAAUK,CAAU,EAShC,MAAME,GANmBC,GAGhB,0BAA0BA,CAAS,IAGFR,EAAU,OAAO,EAC3D,QAAQ,IAAI,cAAeO,CAAiB,EAG5C,MAAME,EAAuB,CAC3B,QAAS,SAAS,KAAK,IAAA,CAAK,IAAI,KAAK,OAAA,EAClC,SAAS,EAAE,EACX,OAAO,EAAG,CAAC,CAAC,GACf,UAAAZ,EACA,WAAYG,EAAU,QAAU,KAChC,SAAUO,EACV,YAAaT,EACb,MAAOE,EAAU,UAAY,IAC7B,OAAQA,EAAU,UAAY,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IAAKD,GACxBA,EAAE,UAAYG,EAAU,CAAE,GAAGH,EAAG,OAAQ,CAAE,GAAGA,EAAE,OAAQ,GAAGZ,CAAA,GAAaY,CAAA,CACzE,EACA,CACJ,CACF,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import { create as d } from "zustand";
2
- import { V as g, am as P, a7 as I } from "./serviceConfig-BJBsdee_.js";
2
+ import { V as g, am as P, a7 as I } from "./serviceConfig-lAlRNVIw.js";
3
3
  const h = d((r, i) => ({
4
4
  popups: [],
5
5
  activePopupId: null,
@@ -94,3 +94,4 @@ const h = d((r, i) => ({
94
94
  export {
95
95
  h as u
96
96
  };
97
+ //# sourceMappingURL=popupStore-BFIHOcoZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popupStore-BFIHOcoZ.js","sources":["../../src/stores/popupStore.ts"],"sourcesContent":["import { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\nimport { getUserInfo } from \"@/utils\";\r\n\r\n// 팝업 아이템 타입 정의\r\nexport interface PopupItem {\r\n popupId: string; // 팝업 ID\r\n popupCode: string; // 팝업 코드\r\n popupTitle: string; // 팝업 제목\r\n popupUrl: string; // 팝업 프로그램 URL\r\n popupParams?: any; // 팝업 파라미터\r\n buttonList?: any[]; // 버튼 목록\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n config?: PopupConfig; // 팝업 설정\r\n close?: () => void; // 팝업 닫기 함수\r\n}\r\n\r\n// 팝업 스토어 타입 정의\r\nexport interface PopupStore {\r\n popups: PopupItem[]; // 열린 팝업 목록\r\n activePopupId: string | null; // 현재 활성 팝업 ID\r\n isLoading: boolean; // 로딩 상태\r\n error: string | null; // 에러 상태\r\n\r\n // 팝업 관련 액션들\r\n openPopup: (\r\n popupCode: string,\r\n data?: any,\r\n config?: PopupConfig\r\n ) => Promise<void>;\r\n closePopup: (popupId: string) => void;\r\n closeAllPopups: () => void;\r\n setActivePopup: (popupId: string) => void;\r\n\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => void;\r\n}\r\n\r\nexport interface PopupButton {\r\n key: string; // 버튼 고유 키\r\n text: string; // 버튼 텍스트\r\n type?: \"primary\" | \"default\" | \"dashed\" | \"link\" | \"text\"; // 버튼 타입\r\n danger?: boolean; // 위험 버튼 여부\r\n disabled?: boolean; // 비활성화 여부\r\n icon?: string; // 아이콘 (Ant Design 아이콘명)\r\n onClick?: (popupData?: any) => void | Promise<void>; // 클릭 이벤트\r\n}\r\n\r\n/**\r\n * 팝업 설정 타입 정의\r\n */\r\nexport interface PopupConfig {\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n title?: string; // 팝업 제목\r\n buttons?: PopupButton[]; // 팝업 버튼들\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n closable?: boolean; // 닫기 버튼 표시 여부\r\n maskClosable?: boolean; // 마스크 클릭 시 닫기 여부\r\n destroyOnClose?: boolean; // 닫을 때 컴포넌트 파괴 여부\r\n searchBox?: {\r\n reqArea: any;\r\n subArea?: any;\r\n style?: any;\r\n };\r\n /**\r\n * 팝업 콜백\r\n * 팝업 콜백은 팝업이 닫힐 때 호출되는 함수입니다.\r\n */\r\n callback?: (callbackParams?: any) => void;\r\n}\r\n\r\n/**\r\n * 팝업 내부 뷰 컴포넌트 타입\r\n */\r\nexport interface PopupViewProps {\r\n /**\r\n * 팝업정보\r\n */\r\n popup?: PopupItem;\r\n /** 팝업 이벤트 전달 프로퍼티 */\r\n popupEvent?: any;\r\n /** 팝업 닫기 이벤트 전달 프로퍼티 */\r\n onClose?: () => void;\r\n}\r\n\r\n// 팝업 스토어 생성\r\nexport const usePopupStore = create<PopupStore>((set, get) => ({\r\n popups: [],\r\n activePopupId: null,\r\n isLoading: false,\r\n error: null,\r\n\r\n // 팝업 열기\r\n openPopup: async (popupCode: string, data?: any, config?: PopupConfig) => {\r\n console.log(\"팝업 열기 요청:\", { popupCode, data, config });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n console.log(\"팝업 열기 시작:\", popupCode);\r\n\r\n // 개발 환경에서는 모의 데이터 사용\r\n let popupInfo: any = null;\r\n\r\n const response = await callService(getServiceCode(\"SRCH_POPU\"), {\r\n crprCd: getUserInfo().crprCd,\r\n popuCd: popupCode,\r\n });\r\n console.log(\"팝업 정보 조회 결과:\", response);\r\n\r\n // 응답 구조 파싱: { mstr: {...}, dtls: [...] }\r\n popupInfo = response?.mstr;\r\n const buttonList = response?.dtls || [];\r\n\r\n console.info(\"popupInfo:\", popupInfo);\r\n\r\n if (!popupInfo || !popupInfo.popuUrl) {\r\n const errorMsg = `팝업 정보를 찾을 수 없습니다: ${popupCode}`;\r\n console.error(errorMsg);\r\n throw new Error(errorMsg);\r\n }\r\n\r\n console.log(\"파싱된 팝업 정보:\", popupInfo);\r\n console.log(\"버튼 목록:\", buttonList);\r\n\r\n // 팝업 URL 경로 변환: 서버 경로 -> 클라이언트 경로\r\n const convertPopupUrl = (serverUrl: string): string => {\r\n // 서버에서 받은 경로: \"cm/CMAuthMstrP01\"\r\n // 클라이언트에서 사용할 경로: \"/src/pages/views/popup/cm/CMAuthMstrP01\"\r\n return `/src/pages/views/popup/${serverUrl}`;\r\n };\r\n\r\n const convertedPopupUrl = convertPopupUrl(popupInfo.popuUrl);\r\n console.log(\"변환된 팝업 URL:\", convertedPopupUrl);\r\n\r\n // 팝업 아이템 생성\r\n const popupItem: PopupItem = {\r\n popupId: `popup_${Date.now()}_${Math.random()\r\n .toString(36)\r\n .substr(2, 9)}`,\r\n popupCode: popupCode,\r\n popupTitle: popupInfo.popuNm || \"팝업\",\r\n popupUrl: convertedPopupUrl,\r\n popupParams: data,\r\n width: popupInfo.popuWdth || 800,\r\n height: popupInfo.popuHght || 600,\r\n resizable: true,\r\n draggable: true,\r\n buttonList: buttonList, // 버튼 목록 추가\r\n config: config,\r\n };\r\n\r\n console.log(\"생성된 팝업 아이템:\", popupItem);\r\n\r\n // 이미 같은 팝업이 열려있는지 확인\r\n const existingPopup = get().popups.find((p) => p.popupCode === popupCode);\r\n if (existingPopup) {\r\n console.log(\"기존 팝업 업데이트:\", existingPopup.popupId);\r\n // 기존 팝업을 활성화하고 데이터 업데이트\r\n set({\r\n activePopupId: existingPopup.popupId,\r\n popups: get().popups.map((p) =>\r\n p.popupId === existingPopup.popupId ? { ...p, config: config } : p\r\n ),\r\n isLoading: false,\r\n });\r\n return;\r\n }\r\n\r\n // 새 팝업 추가\r\n console.log(\"새 팝업 추가:\", popupItem.popupId);\r\n set((state) => ({\r\n popups: [...state.popups, popupItem],\r\n activePopupId: popupItem.popupId,\r\n isLoading: false,\r\n }));\r\n\r\n console.log(\"팝업 열기 완료:\", popupItem);\r\n } catch (error) {\r\n console.error(\"팝업 열기 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"팝업 열기 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 팝업 닫기\r\n closePopup: (popupId: string) => {\r\n const { popups, activePopupId } = get();\r\n const newPopups = popups.filter((p) => p.popupId !== popupId);\r\n\r\n // 닫힌 팝업이 현재 활성 팝업이었다면 다른 팝업을 활성화\r\n let newActivePopupId = activePopupId;\r\n if (activePopupId === popupId) {\r\n newActivePopupId =\r\n newPopups.length > 0 ? newPopups[newPopups.length - 1].popupId : null;\r\n }\r\n\r\n set({\r\n popups: newPopups,\r\n activePopupId: newActivePopupId,\r\n });\r\n },\r\n\r\n // 모든 팝업 닫기\r\n closeAllPopups: () => {\r\n set({\r\n popups: [],\r\n activePopupId: null,\r\n });\r\n },\r\n\r\n // 활성 팝업 설정\r\n setActivePopup: (popupId: string) => {\r\n set({ activePopupId: popupId });\r\n },\r\n\r\n // 팝업 설정 업데이트\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => {\r\n set((state) => ({\r\n popups: state.popups.map((p) =>\r\n p.popupId === popupId ? { ...p, config: { ...p.config, ...config } } : p\r\n ),\r\n }));\r\n },\r\n}));\r\n"],"names":["usePopupStore","create","set","get","popupCode","data","config","popupInfo","response","callService","getServiceCode","getUserInfo","buttonList","errorMsg","convertedPopupUrl","serverUrl","popupItem","existingPopup","p","state","error","popupId","popups","activePopupId","newPopups","newActivePopupId"],"mappings":";;AA2FO,MAAMA,IAAgBC,EAAmB,CAACC,GAAKC,OAAS;AAAA,EAC7D,QAAQ,CAAA;AAAA,EACR,eAAe;AAAA,EACf,WAAW;AAAA,EACX,OAAO;AAAA;AAAA,EAGP,WAAW,OAAOC,GAAmBC,GAAYC,MAAyB;AACxE,YAAQ,IAAI,aAAa,EAAE,WAAAF,GAAW,MAAAC,GAAM,QAAAC,GAAQ,GACpDJ,EAAI,EAAE,WAAW,IAAM,OAAO,MAAM;AAEpC,QAAI;AACF,cAAQ,IAAI,aAAaE,CAAS;AAGlC,UAAIG,IAAiB;AAErB,YAAMC,IAAW,MAAMC,EAAYC,EAAe,WAAW,GAAG;AAAA,QAC9D,QAAQC,IAAc;AAAA,QACtB,QAAQP;AAAA,MAAA,CACT;AACD,cAAQ,IAAI,gBAAgBI,CAAQ,GAGpCD,IAAYC,GAAU;AACtB,YAAMI,IAAaJ,GAAU,QAAQ,CAAA;AAIrC,UAFA,QAAQ,KAAK,cAAcD,CAAS,GAEhC,CAACA,KAAa,CAACA,EAAU,SAAS;AACpC,cAAMM,IAAW,qBAAqBT,CAAS;AAC/C,sBAAQ,MAAMS,CAAQ,GAChB,IAAI,MAAMA,CAAQ;AAAA,MAC1B;AAEA,cAAQ,IAAI,cAAcN,CAAS,GACnC,QAAQ,IAAI,UAAUK,CAAU;AAShC,YAAME,KANkB,CAACC,MAGhB,0BAA0BA,CAAS,IAGFR,EAAU,OAAO;AAC3D,cAAQ,IAAI,eAAeO,CAAiB;AAG5C,YAAME,IAAuB;AAAA,QAC3B,SAAS,SAAS,KAAK,IAAA,CAAK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O;AAG5D,QAAII,IAAmBF;AACvB,IAAIA,MAAkBF,MACpBI,IACED,EAAU,SAAS,IAAIA,EAAUA,EAAU,SAAS,CAAC,EAAE,UAAU,OAGrEtB,EAAI;AAAA,MACF,QAAQsB;AAAA,MACR,eAAeC;AAAA,IAAA,CAChB;AAAA,EACH;AAAA;AAAA,EAGA,gBAAgB,MAAM;AACpB,IAAAvB,EAAI;AAAA,MACF,QAAQ,CAAA;AAAA,MACR,eAAe;AAAA,IAAA,CAChB;AAAA,EACH;AAAA;AAAA,EAGA,gBAAgB,CAACmB,MAAoB;AACnC,IAAAnB,EAAI,EAAE,eAAemB,GAAS;AAAA,EAChC;AAAA;AAAA,EAGA,mBAAmB,CAACA,GAAiBf,MAAiC;AACpE,IAAAJ,EAAI,CAACiB,OAAW;AAAA,MACd,QAAQA,EAAM,OAAO;AAAA,QAAI,CAACD,MACxBA,EAAE,YAAYG,IAAU,EAAE,GAAGH,GAAG,QAAQ,EAAE,GAAGA,EAAE,QAAQ,GAAGZ,EAAA,MAAaY;AAAA,MAAA;AAAA,IACzE,EACA;AAAA,EACJ;AACF,EAAE;"}
@@ -1 +1,2 @@
1
1
  "use strict";const e={left:"left",near:"left",right:"right",far:"right",center:"center",number:"#,##0",number2:"#,##0.00",number3:"#,##0.##",number4:"#,##0.000",number5:"#,##0.#####",editNumber:{type:"number",editFormat:"#,##0"},editNumber2:{type:"number",editFormat:"#,##0.00"},editNumber3:{type:"number",editFormat:"#,##0.##"},editNumber4:{type:"number",editFormat:"#,##0.000"},editNumber5:{type:"number",editFormat:"#,##0.###"},editYmd:{type:"date",datetimeFormat:"yyyyMMdd",autoclose:!0,maxDate:"99991231",minDate:"19000101",showButtons:!1,mask:{editMask:"9999-99-99"}},editYm:{type:"btdate",datetimeFormat:"yyyyMM",btOptions:{startView:1,minViewMode:1,todayBtn:"linked",language:"ko",todayHighlight:!0,autoclose:!0,mask:{editMask:"9999-99"}}},editYy:{type:"btdate",datetimeFormat:"yyyy",btOptions:{startView:2,minViewMode:2,todayBtn:"linked",language:"ko",todayHighlight:!0,autoclose:!0}},formatYmd:"([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3",formatYm:"([0-9]{4})([0-9]{2});$1-$2",formatYy:"([0-9]{4});$1",lookup:{type:"dropdown",domainOnly:!0},lookupReadOnly:{type:"dropdown",readOnly:!0},maskCard:{type:"text",mask:"0000-0000-0000-0000"},formatMaskCard:"([0-9]{4})([0-9]{4})([0-9]{4})([0-9]{4});$1-$2-$3-$4",maskBsnsNo:{type:"text",mask:"000-00-00000"},formatMaskBsnsNo:"([0-9]{3})([0-9]{2})([0-9]{5});$1-$2-$3",maskRsdn:{type:"text",mask:"000000-0000000"},formatMaskRsdn:"([0-9]{6})([0-9]{7});$1-$2",formatMaskRsdn2:"([0-9]{6})([0-9])([0-9]{6});$1-$2******",maskRsdn2:{type:"text",mask:"999999-9999999"},maskYmd:{type:"text",mask:"0000-00-00"},formatMaskYmd:"([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3",maskYm:{type:"text",mask:"0000-00"},formatMaskYm:"([0-9]{4})([0-9]{2});$1-$2",maskYmdHms:{type:"text",mask:"0000-00-00 00:00:00"},formatYmdHms:"([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2});$1-$2-$3 $4:$5:$6",maskHm:{type:"text",mask:"00:00"},formatHm:"([0-9]{2})([0-9]{2});$1:$2",maskHms:{type:"text",mask:"00:00:00"},formatHms:"([0-9]{2})([0-9]{2})([0-9]{2});$1:$2:$3",checkY:{type:"check",trueValues:"Y",falseValues:"N"},checkN:{type:"check",trueValues:"N",falseValues:"Y"},check1:{type:"check",trueValues:"1",falseValues:"0"},checkTrue:{type:"check",trueValues:"true",falseValues:"false"},checkT:{type:"check",trueValues:"T",falseValues:"F"},checkYdisabled:{type:"check",editable:!1,trueValues:"Y",falseValues:"N"},checkNdisabled:{type:"check",editable:!1,trueValues:"N",falseValues:"Y"},check1disabled:{type:"check",editable:!1,trueValues:"1",falseValues:"0"},count:{suffix:" 건",expression:"count"},count2:{prefix:"총 ",suffix:" 건",expression:"count"},datacount:{suffix:" 건",expression:"datacount"},sum:{numberFormat:"#,##0",expression:"sum"},sum2:{numberFormat:"#,##0.##",expression:"sum"},sum3:{numberFormat:"#,##0.00",expression:"sum"},avg:{numberFormat:"#,##0",expression:"avg"},avg2:{numberFormat:"#,##0.##",expression:"avg"},avg4:{numberFormat:"#,##0.####",expression:"avg"},min:{expression:"min"},max:{expression:"max"},date:{type:"date",mask:{editMask:"9999-99-99",placeHolder:"____-__-__",includedFormat:!0},datetimeFormat:"yyyy-MM-dd",textAlignment:"center",yearNavigation:!0},dateStyle:{datetimeFormat:"yyyy-MM-dd",textAlignment:"center"},maskDateFull:{type:"text",mask:"0000-00-00 00:00:00",textAlignment:"center"},bg_gray01:{background:"#cdcdcd"}};exports.realFormat=e;
2
+ //# sourceMappingURL=realFormat-Cha7OTd9.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realFormat-Cha7OTd9.cjs","sources":["../../src/utils/realFormat.ts"],"sourcesContent":["const realFormat = {\r\n /*************************************************************************************************************************************************\r\n * RealGrid2 use\r\n *************************************************************************************************************************************************/\r\n // Ex) styleName : realFormat.left, Description : 정렬\r\n left: 'left',\r\n near: 'left',\r\n right: 'right',\r\n far: 'right',\r\n center: 'center',\r\n\r\n number: '#,##0', //정수형\r\n number2: '#,##0.00', // 뒷자리'0'은 고정을 의미, 고정 소수점2자리까지 입력\r\n number3: '#,##0.##', // 뒷자리'#'은 가변형을 의미, 가변 소수점2자리까지 입력\r\n number4: '#,##0.000',\r\n number5: '#,##0.#####',\r\n\r\n editNumber: {\r\n // Ex) editor : realFormat.editNumber, Description : 정수만 입력\r\n type: 'number',\r\n editFormat: '#,##0',\r\n },\r\n editNumber2: {\r\n // Ex) editor : realFormat.editNumber, Description : 뒷자리'0'은 고정을 의미, 고정 소수점2자리까지 입력\r\n type: 'number',\r\n editFormat: '#,##0.00',\r\n },\r\n editNumber3: {\r\n // Ex) editor : realFormat.editNumber, Description : 뒷자리'#'은 가변형을 의미, 가변 소수점2자리까지 입력\r\n type: 'number',\r\n editFormat: '#,##0.##',\r\n },\r\n editNumber4: {\r\n // Ex) editor : realFormat.editNumber, Description : 뒷자리'0'은 고정을 의미, 고정 소수점3자리까지 입력\r\n type: 'number',\r\n editFormat: '#,##0.000',\r\n },\r\n editNumber5: {\r\n // Ex) editor : realFormat.editNumber, Description : 뒷자리'#'은 가변형을 의미, 가변 소수점3자리까지 입력\r\n type: 'number',\r\n editFormat: '#,##0.###',\r\n },\r\n editYmd: {\r\n // Ex) editor : realFormat.editYmd, Description : 년월일 달력\r\n type: 'date',\r\n datetimeFormat: 'yyyyMMdd',\r\n autoclose: true,\r\n maxDate: '99991231',\r\n minDate: '19000101',\r\n showButtons: false,\r\n mask: {\r\n editMask: '9999-99-99', // LDH 추가(21.08.26, 하이픈 추가하여 복사붙여넣기 하여도 원하는 날짜가 복사되도록\r\n },\r\n },\r\n editYm: {\r\n // Ex) editor : realFormat.editYm, Description : 년월 달력\r\n type: 'btdate',\r\n datetimeFormat: 'yyyyMM',\r\n btOptions: {\r\n startView: 1, // 최초 선택 모드 지정 0 : 일자 , 1:월, 2:년도\r\n minViewMode: 1, // 최종 선택 모드 지정 0 : 일자 , 1:월, 2:년도\r\n todayBtn: 'linked',\r\n language: 'ko',\r\n todayHighlight: true, // today 기능\r\n autoclose: true,\r\n mask: {\r\n editMask: '9999-99',\r\n },\r\n },\r\n },\r\n editYy: {\r\n // Ex) editor : realFormat.editYy, Description : 년 달력\r\n type: 'btdate',\r\n datetimeFormat: 'yyyy',\r\n btOptions: {\r\n startView: 2, // 최초 선택 모드 지정 0 : 일자 , 1:월, 2:년도\r\n minViewMode: 2, // 최종 선택 모드 지정 0 : 일자 , 1:월, 2:년도\r\n todayBtn: 'linked',\r\n language: 'ko',\r\n todayHighlight: true,\r\n autoclose: true,\r\n },\r\n },\r\n\r\n formatYmd: '([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3', // Ex) textFormat : realFormat.formatYmd\r\n formatYm: '([0-9]{4})([0-9]{2});$1-$2', // Ex) textFormat : realFormat.formatYm\r\n formatYy: '([0-9]{4});$1', // Ex) textFormat : realFormat.formatYy\r\n\r\n lookup: {\r\n // Ex) editor : realFormat.lookup, Description : 콤보박스 dropDown\r\n type: 'dropdown',\r\n domainOnly: true,\r\n },\r\n lookupReadOnly: {\r\n // Ex) editor : realFormat.lookup, Description : 콤보박스 dropDown\r\n type: 'dropdown',\r\n readOnly: true,\r\n },\r\n maskCard: {\r\n // Ex) editor : realFormat.maskCard\r\n type: 'text',\r\n mask: '0000-0000-0000-0000',\r\n },\r\n formatMaskCard: '([0-9]{4})([0-9]{4})([0-9]{4})([0-9]{4});$1-$2-$3-$4', // Ex) textFormat : realFormat.formatMaskCard\r\n\r\n maskBsnsNo: {\r\n // Ex) editor : realFormat.maskBsnsNo\r\n type: 'text',\r\n mask: '000-00-00000',\r\n },\r\n formatMaskBsnsNo: '([0-9]{3})([0-9]{2})([0-9]{5});$1-$2-$3', // Ex) textFormat : realFormat.formatMaskBsnsNo\r\n\r\n maskRsdn: {\r\n // Ex) editor : realFormat.maskRsdn, Description : 필드 입력 시, 공백불가\r\n type: 'text',\r\n mask: '000000-0000000',\r\n },\r\n formatMaskRsdn: '([0-9]{6})([0-9]{7});$1-$2', // Ex) textFormat : realFormat.formatMaskRsdn\r\n formatMaskRsdn2: '([0-9]{6})([0-9])([0-9]{6});$1-$2******', // Ex) textFormat : realFormat.formatMaskRsdn\r\n\r\n maskRsdn2: {\r\n // Ex) editor : realFormat.maskRsdn2, Description : 필드 입력 시, 공백허용\r\n type: 'text',\r\n mask: '999999-9999999',\r\n },\r\n\r\n maskYmd: {\r\n // Ex) editor : realFormat.maskYmd\r\n type: 'text',\r\n mask: '0000-00-00',\r\n },\r\n formatMaskYmd: '([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3', // Ex) textFormat : realFormat.formatMaskYmd\r\n\r\n maskYm: {\r\n // Ex) editor : realFormat.maskYm\r\n type: 'text',\r\n mask: '0000-00',\r\n },\r\n formatMaskYm: '([0-9]{4})([0-9]{2});$1-$2', // Ex) textFormat : realFormat.formatMaskYm\r\n\r\n maskYmdHms: {\r\n // Ex) textFormat : realFormat.maskYmdHms, Description : 년월일 시분초\r\n type: 'text',\r\n mask: '0000-00-00 00:00:00',\r\n },\r\n formatYmdHms:\r\n '([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2});$1-$2-$3 $4:$5:$6', // Ex) textFormat : realFormat.formatYmdHms\r\n\r\n maskHm: {\r\n // Ex) textFormat : realFormat.maskHm, Description : 시분\r\n type: 'text',\r\n mask: '00:00',\r\n },\r\n formatHm: '([0-9]{2})([0-9]{2});$1:$2', // Ex) textFormat : realFormat.formatHm\r\n\r\n maskHms: {\r\n // Ex) textFormat : realFormat.maskHms, Description : 시분초\r\n type: 'text',\r\n mask: '00:00:00',\r\n },\r\n formatHms: '([0-9]{2})([0-9]{2})([0-9]{2});$1:$2:$3', // Ex) textFormat : realFormat.formatHms\r\n\r\n checkY: {\r\n // Ex) renderer : realFormat.checkY , Description : 체크박스\r\n type: 'check',\r\n trueValues: 'Y',\r\n falseValues: 'N',\r\n },\r\n checkN: {\r\n // Ex) renderer : realFormat.checkN\r\n type: 'check',\r\n trueValues: 'N',\r\n falseValues: 'Y',\r\n },\r\n check1: {\r\n // Ex) renderer : realFormat.check1\r\n type: 'check',\r\n trueValues: '1',\r\n falseValues: '0',\r\n },\r\n checkTrue: {\r\n // Ex) renderer : realFormat.checkTrue\r\n type: 'check',\r\n trueValues: 'true',\r\n falseValues: 'false',\r\n },\r\n checkT: {\r\n // Ex) renderer : realFormat.checkT\r\n type: 'check',\r\n trueValues: 'T',\r\n falseValues: 'F',\r\n },\r\n checkYdisabled: {\r\n // Ex) renderer : realFormat.checkYdisabled , Description : 수정불가\r\n type: 'check',\r\n editable: false,\r\n trueValues: 'Y',\r\n falseValues: 'N',\r\n },\r\n checkNdisabled: {\r\n // Ex) renderer : realFormat.checkNdisabled , Description : 수정불가\r\n type: 'check',\r\n editable: false,\r\n trueValues: 'N',\r\n falseValues: 'Y',\r\n },\r\n check1disabled: {\r\n // Ex) renderer : realFormat.check1disabled , Description : 수정불가\r\n type: 'check',\r\n editable: false,\r\n trueValues: '1',\r\n falseValues: '0',\r\n },\r\n count: {\r\n // Ex) footer : realFormat.count, Description : 기본 footer Format\r\n suffix: ' 건',\r\n expression: 'count',\r\n },\r\n count2: {\r\n // Ex) footer : realFormat.count2\r\n prefix: '총 ',\r\n suffix: ' 건',\r\n expression: 'count',\r\n },\r\n datacount: {\r\n // Ex) footer : realFormat.datacount, Description : 값이 지정되어 잇는 데이터 개수 (null 이 아닌)\r\n suffix: ' 건',\r\n expression: 'datacount',\r\n },\r\n sum: {\r\n // Ex) renderer : realFormat.sum\r\n numberFormat: '#,##0',\r\n expression: 'sum',\r\n },\r\n sum2: {\r\n // Ex) renderer : realFormat.sum2\r\n numberFormat: '#,##0.##',\r\n expression: 'sum',\r\n },\r\n sum3: {\r\n // Ex) renderer : realFormat.sum2\r\n numberFormat: '#,##0.00',\r\n expression: 'sum',\r\n },\r\n avg: {\r\n // Ex) renderer : realFormat.avg\r\n numberFormat: '#,##0',\r\n expression: 'avg',\r\n },\r\n avg2: {\r\n // Ex) renderer : realFormat.avg2\r\n numberFormat: '#,##0.##',\r\n expression: 'avg',\r\n },\r\n avg4: {\r\n // Ex) renderer : realFormat.avg4\r\n numberFormat: '#,##0.####',\r\n expression: 'avg',\r\n },\r\n min: {\r\n // Ex) renderer : realFormat.min\r\n expression: 'min',\r\n },\r\n max: {\r\n // Ex) renderer : realFormat.max\r\n expression: 'max',\r\n },\r\n /*************************************************************************************************************************************************\r\n * RealGrid2 deprecated\r\n *************************************************************************************************************************************************/\r\n\r\n date: {\r\n type: 'date',\r\n mask: {\r\n editMask: '9999-99-99',\r\n placeHolder: '____-__-__',\r\n includedFormat: true,\r\n },\r\n datetimeFormat: 'yyyy-MM-dd',\r\n textAlignment: 'center',\r\n yearNavigation: true,\r\n },\r\n\r\n dateStyle: {\r\n datetimeFormat: 'yyyy-MM-dd',\r\n textAlignment: 'center',\r\n },\r\n\r\n maskDateFull: {\r\n type: 'text',\r\n mask: '0000-00-00 00:00:00',\r\n textAlignment: 'center',\r\n },\r\n bg_gray01: {\r\n background: '#cdcdcd',\r\n },\r\n};\r\n\r\nexport default realFormat;\r\n"],"names":["realFormat"],"mappings":"aAAA,MAAMA,EAAa,CAKjB,KAAM,OACN,KAAM,OACN,MAAO,QACP,IAAK,QACL,OAAQ,SAER,OAAQ,QACR,QAAS,WACT,QAAS,WACT,QAAS,YACT,QAAS,cAET,WAAY,CAEV,KAAM,SACN,WAAY,OAAA,EAEd,YAAa,CAEX,KAAM,SACN,WAAY,UAAA,EAEd,YAAa,CAEX,KAAM,SACN,WAAY,UAAA,EAEd,YAAa,CAEX,KAAM,SACN,WAAY,WAAA,EAEd,YAAa,CAEX,KAAM,SACN,WAAY,WAAA,EAEd,QAAS,CAEP,KAAM,OACN,eAAgB,WAChB,UAAW,GACX,QAAS,WACT,QAAS,WACT,YAAa,GACb,KAAM,CACJ,SAAU,YAAA,CACZ,EAEF,OAAQ,CAEN,KAAM,SACN,eAAgB,SAChB,UAAW,CACT,UAAW,EACX,YAAa,EACb,SAAU,SACV,SAAU,KACV,eAAgB,GAChB,UAAW,GACX,KAAM,CACJ,SAAU,SAAA,CACZ,CACF,EAEF,OAAQ,CAEN,KAAM,SACN,eAAgB,OAChB,UAAW,CACT,UAAW,EACX,YAAa,EACb,SAAU,SACV,SAAU,KACV,eAAgB,GAChB,UAAW,EAAA,CACb,EAGF,UAAW,0CACX,SAAU,6BACV,SAAU,gBAEV,OAAQ,CAEN,KAAM,WACN,WAAY,EAAA,EAEd,eAAgB,CAEd,KAAM,WACN,SAAU,EAAA,EAEZ,SAAU,CAER,KAAM,OACN,KAAM,qBAAA,EAER,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