@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
@@ -1,809 +0,0 @@
1
- import { j as t } from "./jsx-runtime-Dpn_P65e.js";
2
- import { Form as b, Select as V, Space as D, Typography as U, Input as S, DatePicker as A, ConfigProvider as T, Radio as X, Checkbox as E, InputNumber as J, Button as v, Upload as L, Tooltip as _, message as k, Spin as Q, Card as Z, List as N, Flex as R, Progress as P } from "antd";
3
- import G, { forwardRef as ee, useMemo as q, useRef as O, useEffect as B, useState as M } from "react";
4
- import { u as te } from "./popupStore-Dp_fqtim.js";
5
- import H from "imask";
6
- import F from "dayjs";
7
- import { UploadOutlined as K, CloseCircleOutlined as ne, DeleteOutlined as re, InboxOutlined as oe, CloudUploadOutlined as se, CheckCircleOutlined as ae, FileTextOutlined as le } from "@ant-design/icons";
8
- const j = G.memo(
9
- ({ children: n, label: e, name: l, rules: s, initialValue: r, style: o }) => {
10
- const a = {
11
- fontWeight: "bold"
12
- }, i = Array.isArray(s) && s.some((g) => g.required === !0), c = () => typeof e == "string" ? /* @__PURE__ */ t.jsxs("span", { style: a, children: [
13
- e,
14
- i && /* @__PURE__ */ t.jsx("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
15
- ] }) : /* @__PURE__ */ t.jsx("span", { style: a, children: e });
16
- return /* @__PURE__ */ t.jsx(
17
- b.Item,
18
- {
19
- label: c(),
20
- labelAlign: "left",
21
- name: l,
22
- rules: s,
23
- colon: !1,
24
- initialValue: r,
25
- style: o,
26
- children: n
27
- }
28
- );
29
- }
30
- ), ie = ee(
31
- ({ children: n, labelCol: e, style: l, className: s, ...r }, o) => /* @__PURE__ */ t.jsx(
32
- b,
33
- {
34
- ref: o,
35
- ...r,
36
- requiredMark: !1,
37
- labelCol: e || { flex: "100px" },
38
- style: { padding: "10px", ...l },
39
- className: `bwg-form ${s ?? ""}`,
40
- children: n
41
- }
42
- )
43
- );
44
- ie.displayName = "BwgForm";
45
- const we = ({
46
- itemProps: n,
47
- selectProps: e = {
48
- options: [],
49
- allowClear: !0
50
- }
51
- }) => {
52
- const l = b.useFormInstance(), s = !!l, r = q(() => e?.addField === "ALL" ? [{ label: "전체", value: "" }, ...e?.options || []] : e?.addField === "NULL" ? [{ label: "", value: "" }, ...e?.options || []] : e?.options || [], [e.options, e.addField]), o = (c) => {
53
- e.onChange?.(c);
54
- }, a = {
55
- ...e,
56
- allowClear: e.allowClear ?? !0,
57
- options: r,
58
- onChange: o,
59
- variant: e.variant
60
- };
61
- console.log("selectComponentProps :: ", a);
62
- const i = /* @__PURE__ */ t.jsx(V, { ...a, disabled: e.disabled });
63
- return e.copyable && !s && console.warn(
64
- "BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
65
- ), e.copyable ? /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsxs(D.Compact, { block: !0, children: [
66
- /* @__PURE__ */ t.jsx(
67
- b.Item,
68
- {
69
- name: n?.name,
70
- rules: n?.rules,
71
- style: { width: "100%", marginBottom: 0 },
72
- validateStatus: "",
73
- help: "",
74
- children: i
75
- }
76
- ),
77
- /* @__PURE__ */ t.jsx(
78
- U.Paragraph,
79
- {
80
- copyable: {
81
- text: s && l?.getFieldValue(n?.name)?.toString() || "",
82
- tooltips: ["코드복사", "코드복사됨"]
83
- },
84
- style: {
85
- margin: 0,
86
- backgroundColor: "#f5f5f5",
87
- borderRadius: "4px",
88
- border: "1px solid #d9d9d9",
89
- fontSize: "12px",
90
- color: "#666",
91
- display: "flex",
92
- alignItems: "center",
93
- height: "30px",
94
- padding: "0 8px"
95
- }
96
- }
97
- )
98
- ] }) }) : /* @__PURE__ */ t.jsx(j, { ...n, children: i });
99
- }, $ = S.Search, ke = (n) => {
100
- const e = b.useFormInstance(), { openPopup: l } = te(), s = n.itemProps?.name || [], r = n.popupConfig || {
101
- callback(a) {
102
- console.log("callback data :: ", a), s.length > 1 ? (e.setFieldValue(s[0], a.code), e.setFieldValue(s[1], a.name)) : e.setFieldValue(s, a.code);
103
- }
104
- }, o = {
105
- ...n,
106
- placeholder: typeof n.placeholder == "string" ? n.placeholder : n.placeholder?.[0] || "",
107
- onSearch: (a) => {
108
- n.popuCd && l(n.popuCd, n.popupParams, r);
109
- }
110
- };
111
- return s.length > 1 ? /* @__PURE__ */ t.jsx(j, { ...n.itemProps, name: void 0, children: /* @__PURE__ */ t.jsxs(D.Compact, { block: !0, children: [
112
- /* @__PURE__ */ t.jsx(
113
- b.Item,
114
- {
115
- name: s[0],
116
- rules: n.itemProps?.rules,
117
- style: { width: "40%", marginBottom: 0 },
118
- validateStatus: "",
119
- help: "",
120
- children: /* @__PURE__ */ t.jsx(
121
- S,
122
- {
123
- style: { color: "#999", backgroundColor: "#f5f5f5" },
124
- placeholder: n.placeholder?.[0] || "",
125
- readOnly: !0
126
- }
127
- )
128
- }
129
- ),
130
- /* @__PURE__ */ t.jsx(b.Item, { name: s[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ t.jsx($, { ...o, disabled: n.disabled }) })
131
- ] }) }) : /* @__PURE__ */ t.jsx(j, { ...n.itemProps, children: /* @__PURE__ */ t.jsx($, { ...o }) });
132
- }, ce = (n) => {
133
- if (typeof n == "string")
134
- return n.replace(/0/g, "_");
135
- if (Array.isArray(n))
136
- return n[0].replace(/0/g, "_");
137
- if (typeof n == "object" && "mask" in n && "blocks" in n) {
138
- const { mask: e, blocks: l } = n;
139
- return e.split(".").map((s) => {
140
- const o = l?.[s]?.maxLength ?? 3;
141
- return "_".repeat(o);
142
- }).join(".");
143
- }
144
- return "";
145
- }, Me = ({
146
- itemProps: n,
147
- inputProps: e,
148
- mask: l
149
- }) => {
150
- const s = O(null), r = b.useFormInstance(), o = q(() => ce(l), [l]);
151
- return B(() => {
152
- if (!s.current?.input) return;
153
- const a = typeof l == "string" || Array.isArray(l) ? { mask: l } : l, i = H(s.current.input, a);
154
- return i.on("accept", () => {
155
- r && n?.name && r.setFieldValue(n.name, i.value);
156
- }), () => {
157
- i.destroy();
158
- };
159
- }, [l, r, n?.name]), /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsx(S, { ...e, ref: s, placeholder: o }) });
160
- }, de = (n) => {
161
- switch (n) {
162
- case "year":
163
- return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
164
- case "month":
165
- return { format: "YYYY-MM", mask: "0000-00", outputFormat: "YYYYMM" };
166
- case "date":
167
- default:
168
- return {
169
- format: "YYYY-MM-DD",
170
- mask: "0000-00-00",
171
- outputFormat: "YYYYMMDD"
172
- };
173
- }
174
- }, Le = ({
175
- type: n = "date",
176
- itemProps: e = { name: "calendar" },
177
- inputProps: l
178
- }) => {
179
- const { format: s, mask: r, outputFormat: o } = de(n), a = O(null), i = O(null), c = b.useFormInstance(), [g, d] = M(!1), [Y, p] = M(!1), m = e?.name, [x, f] = M(null);
180
- B(() => {
181
- if (!a.current?.input) return;
182
- const u = H(a.current.input, {
183
- mask: r,
184
- lazy: !1
185
- });
186
- return i.current = u, u.on("accept", () => {
187
- console.log("input :: ", u.value);
188
- const y = u.value, h = F(y, s, !0);
189
- console.log("input :: ", h), y.length === s.length && h.isValid() && (console.log("parsed :: ", h.format(o)), c.setFieldValue(m, h.format(o)), i.current.updateValue(), d(!1));
190
- }), () => {
191
- u.destroy();
192
- };
193
- }, [s, r]), B(() => {
194
- f(F(c.getFieldValue(m)));
195
- }, [c.getFieldValue(m)]);
196
- const C = (u) => {
197
- if (!u) {
198
- i.current?.updateValue();
199
- return;
200
- }
201
- const y = u.format(o);
202
- console.log("formatted :: ", y), i.current && (i.current.value = y, i.current.updateValue()), p(!1);
203
- };
204
- return /* @__PURE__ */ t.jsx(
205
- j,
206
- {
207
- ...e,
208
- name: void 0,
209
- validateStatus: Y ? "warning" : void 0,
210
- help: Y ? "유효하지 않은 날짜입니다" : void 0,
211
- children: /* @__PURE__ */ t.jsxs("div", { style: { position: "relative" }, children: [
212
- /* @__PURE__ */ t.jsx(
213
- b.Item,
214
- {
215
- name: m,
216
- getValueProps: (u) => ({
217
- value: u ? F(u).format(s) : void 0
218
- }),
219
- normalize: (u) => u ? F(u).format(o) : void 0,
220
- noStyle: !0,
221
- children: /* @__PURE__ */ t.jsx(
222
- S,
223
- {
224
- ...l,
225
- ref: a,
226
- onFocus: () => {
227
- d(!g), i.current?.updateValue();
228
- },
229
- onKeyDown: (u) => {
230
- u.key === "Backspace" && d(!0), u.key === "Tab" && d(!1);
231
- },
232
- allowClear: !0,
233
- placeholder: r.replace(/0/g, "_"),
234
- autoComplete: "off"
235
- }
236
- )
237
- }
238
- ),
239
- /* @__PURE__ */ t.jsx(
240
- A,
241
- {
242
- open: g,
243
- picker: n,
244
- format: s,
245
- value: x,
246
- onChange: C,
247
- getPopupContainer: (u) => u.parentElement,
248
- style: {
249
- position: "absolute",
250
- top: 0,
251
- left: 0,
252
- pointerEvents: "none",
253
- opacity: 0,
254
- width: "100%"
255
- }
256
- }
257
- )
258
- ] })
259
- }
260
- );
261
- }, Be = ({ itemProps: n, inputProps: e }) => /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsx(S, { ...e }) }), Se = ({
262
- itemProps: n,
263
- inputProps: e,
264
- type: l = "date",
265
- useMask: s = !1
266
- }) => {
267
- const r = {
268
- year: { displayFormat: "YYYY", outputFormat: "YYYY" },
269
- month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
270
- date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" }
271
- }, { displayFormat: o, outputFormat: a } = r[l], i = (c, g) => {
272
- if (e.onChange && typeof e.onChange == "function") {
273
- let d;
274
- c instanceof F ? d = c.format(a) : (d = [], c && c.map((Y) => {
275
- d.push(Y.format(a));
276
- })), e.onChange(d, g);
277
- }
278
- };
279
- return /* @__PURE__ */ t.jsx(
280
- j,
281
- {
282
- ...n,
283
- getValueProps: (c) => ({
284
- value: c && F(c)
285
- }),
286
- normalize: (c) => c && `${F(c).format(a)}`,
287
- children: /* @__PURE__ */ t.jsx(
288
- A,
289
- {
290
- ...e,
291
- format: s ? { format: o, type: "mask" } : void 0,
292
- onChange: i
293
- }
294
- )
295
- }
296
- );
297
- }, { RangePicker: ue } = A, ve = ({
298
- itemProps: n,
299
- inputProps: e,
300
- type: l = "date",
301
- minDate: s,
302
- maxDate: r,
303
- useMask: o = !1
304
- }) => {
305
- const a = {
306
- year: { displayFormat: "YYYY", outputFormat: "YYYY" },
307
- month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
308
- date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" }
309
- }, { displayFormat: i, outputFormat: c } = a[l], g = (d, Y) => {
310
- if (e.onChange && typeof e.onChange == "function") {
311
- let p;
312
- d instanceof F ? p = d.format(c) : (p = [], d && d.map((m) => {
313
- p.push(m.format(c));
314
- })), e.onChange(p, Y);
315
- }
316
- };
317
- return /* @__PURE__ */ t.jsx(
318
- j,
319
- {
320
- ...n,
321
- getValueProps: (d) => ({
322
- value: d && [
323
- d[0] ? F(d[0]) : null,
324
- d[1] ? F(d[1]) : null
325
- ]
326
- }),
327
- normalize: (d) => [
328
- d?.[0] ? F(d[0]).format(c) : void 0,
329
- d?.[1] ? F(d[1]).format(c) : void 0
330
- ],
331
- children: /* @__PURE__ */ t.jsx(
332
- ue,
333
- {
334
- ...e,
335
- format: o ? {
336
- format: i,
337
- type: "mask"
338
- } : void 0,
339
- picker: l,
340
- order: !0,
341
- minDate: s ? F(s, c) : void 0,
342
- maxDate: r ? F(r, c) : void 0,
343
- onChange: g
344
- }
345
- )
346
- }
347
- );
348
- }, Ie = ({ itemProps: n, inputProps: e }) => /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsx(T, { theme: {
349
- components: {
350
- Radio: {
351
- colorPrimary: "#6377D1",
352
- colorPrimaryActive: "#6449FC",
353
- colorPrimaryHover: "#6449FC"
354
- }
355
- }
356
- }, children: /* @__PURE__ */ t.jsx(X.Group, { ...e }) }) }), De = ({
357
- itemProps: n,
358
- inputProps: e = {
359
- format: "YN"
360
- }
361
- }) => {
362
- const l = b.useFormInstance(), s = (r) => {
363
- e.format === "boolean" ? l.setFieldValue(n?.name, r.target.checked) : l.setFieldValue(n?.name, r.target.checked ? "Y" : "N"), e.onChange && e.onChange(r);
364
- };
365
- return /* @__PURE__ */ t.jsx(
366
- j,
367
- {
368
- ...n,
369
- getValueProps: (r) => (console.log("getValueProps :: ", r), { checked: e.format === "boolean" ? !!r : r === "Y" }),
370
- normalize: (r) => (console.log("normalize :: ", r), typeof r == "boolean" ? e.format === "boolean" ? r : r ? "Y" : "N" : e.format === "boolean" ? !!r : r ? "Y" : "N"),
371
- children: /* @__PURE__ */ t.jsx(T, { theme: {
372
- components: {
373
- Checkbox: {
374
- colorPrimary: "#6377D1",
375
- colorPrimaryBorder: "#6377D1",
376
- colorPrimaryHover: "#6449FC"
377
- }
378
- }
379
- }, children: /* @__PURE__ */ t.jsx(E, { ...e, onChange: s, children: e?.title }) })
380
- }
381
- );
382
- }, Ne = ({ itemProps: n, inputProps: e }) => {
383
- const l = b.useFormInstance(), [s, r] = M(
384
- n?.initialValue ?? []
385
- ), [o, a] = M([]), i = o.length > 0 && o.length == s?.length, c = s?.length > 0 && s.length < o.length;
386
- B(() => {
387
- a(g(e?.options));
388
- }, [e?.options]), B(() => {
389
- r(s);
390
- }, [s]);
391
- const g = (p) => {
392
- const m = [];
393
- return (p || []).map((x, f) => {
394
- m.push(x.value);
395
- }), m;
396
- }, d = (p) => {
397
- r(p.target.checked ? o : []), l.setFieldValue(n?.name, p.target.checked ? o : []);
398
- }, Y = (p) => {
399
- r(p), l.setFieldValue(n?.name, p), e?.onChange && typeof e?.onChange == "function" && e?.onChange(p);
400
- };
401
- return /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsxs(T, { theme: {
402
- components: {
403
- Checkbox: {
404
- colorPrimary: "#6377D1",
405
- colorPrimaryBorder: "#6377D1",
406
- colorPrimaryHover: "#6449FC"
407
- }
408
- }
409
- }, children: [
410
- e?.allCheck && /* @__PURE__ */ t.jsx(
411
- E,
412
- {
413
- indeterminate: c,
414
- checked: i,
415
- onChange: d,
416
- children: "전체선택"
417
- }
418
- ),
419
- /* @__PURE__ */ t.jsx(
420
- E.Group,
421
- {
422
- options: e?.options,
423
- value: s,
424
- onChange: Y
425
- }
426
- )
427
- ] }) });
428
- }, { TextArea: me } = S, Ee = ({ itemProps: n, inputProps: e }) => /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsx(me, { ...e }) }), Oe = ({ itemProps: n, inputProps: e }) => {
429
- const l = (r) => {
430
- let o = r.toString().split(".");
431
- return e?.decimalPoint != null && o[1] != null && e?.decimalPoint > 0 ? o[1].length > e?.decimalPoint ? o[1] = "." + o[1].substring(0, e?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + o[1];
432
- }, s = (r) => {
433
- let o = r.toString().split(".");
434
- return e?.decimalPoint != null && o[1] != null && e?.decimalPoint > 0 ? o[1].length > e?.decimalPoint ? o[1] = "." + o[1].substring(0, e?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\$\s?|(,*)/g, "") + o[1];
435
- };
436
- return /* @__PURE__ */ t.jsx(j, { ...n, children: /* @__PURE__ */ t.jsx(
437
- J,
438
- {
439
- ...e,
440
- formatter: (r) => l(r),
441
- parser: (r) => s(r)
442
- }
443
- ) });
444
- }, { Option: z } = V, Ve = ({ itemProps: n, inputProps: e }) => {
445
- const [l, s] = M([]);
446
- return B(() => {
447
- e?.addField === "ALL" ? s([
448
- { label: "전체", value: "" },
449
- ...e?.list || []
450
- ]) : e?.addField === "NULL" ? s([{ label: "", value: "" }, ...e?.list || []]) : s(e?.list || []);
451
- }, [e?.list]), /* @__PURE__ */ t.jsx(
452
- j,
453
- {
454
- ...n,
455
- getValueProps: (r) => r ? {
456
- value: r && r.indexOf(",") > 0 ? r.split(",") : [r]
457
- } : {
458
- value: []
459
- },
460
- normalize: (r) => r != null && r != null && r.length > 0 ? r.toString() : "",
461
- children: /* @__PURE__ */ t.jsx(V, { ...e, mode: "multiple", children: l.map((r) => {
462
- const { value: o, label: a } = r;
463
- return e?.printCode ? /* @__PURE__ */ t.jsx(z, { value: o, label: a, children: /* @__PURE__ */ t.jsx(D, { children: `[${o}] ${a}` }) }, o) : /* @__PURE__ */ t.jsx(z, { value: o, label: a, children: /* @__PURE__ */ t.jsx(D, { children: `${a}` }) }, o);
464
- }) })
465
- }
466
- );
467
- }, Ae = (n) => /* @__PURE__ */ t.jsx(v, { ...n }), fe = [
468
- ".pdf",
469
- ".xlsx",
470
- ".xls",
471
- ".docx",
472
- ".doc",
473
- ".pptx",
474
- ".ppt",
475
- ".hwp",
476
- ".txt",
477
- ".csv",
478
- // 이미지
479
- ".jpg",
480
- ".jpeg",
481
- ".png",
482
- ".gif",
483
- // 압축
484
- ".zip"
485
- ], Te = ({
486
- onUploadComplete: n,
487
- trxCd: e,
488
- allowedExtensions: l = fe,
489
- maxFileSize: s
490
- }) => {
491
- const o = {
492
- name: "file",
493
- multiple: !0,
494
- action: "/api/upload",
495
- // 기본 업로드 엔드포인트
496
- beforeUpload: (a) => {
497
- if (l && l.length > 0) {
498
- const c = ((g) => {
499
- const d = g.lastIndexOf(".");
500
- return d === -1 ? "" : g.substring(d).toLowerCase();
501
- })(a.name);
502
- if (!l.includes(c))
503
- return k.error(
504
- `${a.name} 파일은 허용되지 않는 확장자입니다. (${l.join(
505
- ", "
506
- )}만 가능)`
507
- ), L.LIST_IGNORE;
508
- }
509
- return s && !(a.size / 1024 / 1024 < s) ? (k.error(`${a.name} 파일 크기는 ${s}MB를 초과할 수 없습니다.`), L.LIST_IGNORE) : !0;
510
- },
511
- data: (a) => (console.log("[BwgUploader] Uploading with trxCd:", e), e ? { trxCd: e } : {}),
512
- onChange(a) {
513
- const { status: i } = a.file;
514
- if (i === "done")
515
- if (a.file.response && a.file.response.success !== void 0)
516
- if (a.file.response.success) {
517
- const { uploadedFiles: c } = a.file.response;
518
- c && Array.isArray(c) && c.forEach(
519
- (g) => {
520
- const d = g.fileKey, Y = g.fileName;
521
- n && n({ fileNameP: d, fileNameL: Y });
522
- }
523
- ), k.success(
524
- a.file.response.message || `${a.file.name} 파일이 성공적으로 업로드되었습니다.`
525
- );
526
- } else
527
- k.error(
528
- a.file.response.message || `${a.file.name} 파일 업로드에 실패했습니다.`
529
- );
530
- else
531
- k.success(
532
- `${a.file.name} 파일이 성공적으로 업로드되었습니다.`
533
- );
534
- else i === "error" && (a.file.response && a.file.response.message ? k.error(a.file.response.message) : k.error(`${a.file.name} 파일 업로드에 실패했습니다.`));
535
- },
536
- /**
537
- * 업로드 목록의 각 항목을 렌더링하는 사용자 정의 함수입니다.
538
- * 마우스 오버 시 표시되는 툴팁 텍스트를 사용자 정의합니다.
539
- */
540
- itemRender(a, i, c, g) {
541
- let d = i.name;
542
- i.status === "error" && (d = `업로드 실패: ${i.response?.message || "알 수 없는 오류"}`);
543
- const Y = G.cloneElement(a, {
544
- // 파일에 유효한 URL이 있는 경우에만 href 속성을 설정하고, 그렇지 않으면 제거합니다.
545
- href: i.url && i.url !== "" ? i.url : void 0,
546
- // Ant Design이 설정할 수 있는 기본 title 속성을 명시적으로 제거합니다.
547
- title: void 0
548
- });
549
- return /* @__PURE__ */ t.jsx(_, { title: d, children: Y });
550
- }
551
- };
552
- return /* @__PURE__ */ t.jsx(L, { ...o, listType: "picture", children: /* @__PURE__ */ t.jsx(v, { icon: /* @__PURE__ */ t.jsx(K, {}), children: "파일 선택" }) });
553
- }, { Text: I, Link: Re } = U, { Dragger: ge } = L, pe = [
554
- ".pdf",
555
- ".xlsx",
556
- ".xls",
557
- ".docx",
558
- ".doc",
559
- ".pptx",
560
- ".ppt",
561
- ".hwp",
562
- ".txt",
563
- ".csv",
564
- // 이미지
565
- ".jpg",
566
- ".jpeg",
567
- ".png",
568
- ".gif",
569
- // 압축
570
- ".zip"
571
- ], he = (n, e = 2) => {
572
- if (n === 0) return "0 Bytes";
573
- const l = 1024, s = e < 0 ? 0 : e, r = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(n) / Math.log(l));
574
- return parseFloat((n / Math.pow(l, o)).toFixed(s)) + " " + r[o];
575
- }, $e = ({
576
- title: n = "첨부파일",
577
- onUploadComplete: e,
578
- trxCd: l,
579
- allowedExtensions: s = pe
580
- }) => {
581
- const [r, o] = M([]), [a, i] = M(!1), [c, g] = M(0), d = (m) => {
582
- if (s && s.length > 0) {
583
- const f = ((C) => {
584
- const u = C.lastIndexOf(".");
585
- return u === -1 ? "" : C.substring(u).toLowerCase();
586
- })(m.name);
587
- if (!s.includes(f))
588
- return k.error(
589
- `${m.name} 파일은 허용되지 않는 확장자입니다. (${s.join(
590
- ", "
591
- )}만 가능)`
592
- ), !1;
593
- }
594
- return !0;
595
- }, Y = async () => {
596
- const m = r.filter((f) => f.status !== "done");
597
- if (m.length === 0) {
598
- k.warning(
599
- "업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다."
600
- );
601
- return;
602
- }
603
- const x = new FormData();
604
- l && x.append("trxCd", l), m.forEach((f) => {
605
- x.append("files", f.originFileObj);
606
- }), i(!0), g(0);
607
- try {
608
- const f = await new Promise((u, y) => {
609
- const h = new XMLHttpRequest();
610
- h.open("POST", "/api/upload-large", !0), h.upload.onprogress = (w) => {
611
- if (w.lengthComputable) {
612
- const W = Math.round(
613
- w.loaded / w.total * 100
614
- );
615
- g(W);
616
- }
617
- }, h.onload = () => {
618
- if (h.status >= 200 && h.status < 300)
619
- try {
620
- const w = JSON.parse(h.responseText);
621
- w.success ? u(w) : y(
622
- new Error(w.message || "파일 업로드에 실패했습니다.")
623
- );
624
- } catch {
625
- y(new Error("잘못된 서버 응답입니다."));
626
- }
627
- else
628
- try {
629
- const w = JSON.parse(h.responseText);
630
- y(new Error(w.message || `서버 오류: ${h.status}`));
631
- } catch {
632
- y(new Error(`서버 오류: ${h.status}`));
633
- }
634
- }, h.onerror = () => {
635
- y(new Error("네트워크 오류가 발생했습니다."));
636
- }, h.send(x);
637
- });
638
- k.success(
639
- f.message || "모든 파일이 성공적으로 업로드되었습니다."
640
- );
641
- const C = r.map(
642
- (u) => m.find((y) => y.uid === u.uid) ? { ...u, status: "done" } : u
643
- );
644
- o(C), e && f.uploadedFiles && f.uploadedFiles.forEach((u) => {
645
- e({
646
- fileNameP: u.fileKey,
647
- fileNameL: u.fileName
648
- });
649
- });
650
- } catch (f) {
651
- k.error(f.message || "파일 업로드 중 오류가 발생했습니다.");
652
- const C = r.map(
653
- (u) => m.find((y) => y.uid === u.uid) ? {
654
- ...u,
655
- status: "error",
656
- response: f.message || "파일 업로드 중 오류가 발생했습니다."
657
- } : u
658
- );
659
- o(C);
660
- } finally {
661
- i(!1);
662
- }
663
- }, p = {
664
- multiple: !0,
665
- fileList: r,
666
- beforeUpload: (m) => d(m) ? !1 : L.LIST_IGNORE,
667
- onChange: ({ fileList: m }) => {
668
- const x = new Map(r.map((f) => [f.uid, f]));
669
- m.forEach((f) => {
670
- x.set(f.uid, f);
671
- }), o(Array.from(x.values()));
672
- },
673
- onRemove: (m) => {
674
- const x = r.filter((f) => f.uid !== m.uid);
675
- o(x);
676
- },
677
- showUploadList: !1
678
- // 수동으로 목록을 렌더링하므로 antd의 기본 목록은 숨깁니다.
679
- };
680
- return /* @__PURE__ */ t.jsx(Q, { spinning: a, tip: `파일 업로드 중... ${c}%`, children: /* @__PURE__ */ t.jsxs("div", { className: "bwg-large-uploader-container", children: [
681
- /* @__PURE__ */ t.jsx(
682
- Z,
683
- {
684
- title: /* @__PURE__ */ t.jsx(I, { strong: !0, children: n }),
685
- extra: /* @__PURE__ */ t.jsx(L, { ...p, children: /* @__PURE__ */ t.jsx(v, { icon: /* @__PURE__ */ t.jsx(K, {}), children: "파일 선택" }) }),
686
- bodyStyle: { padding: 0 },
687
- children: /* @__PURE__ */ t.jsx(
688
- ge,
689
- {
690
- ...p,
691
- style: {
692
- border: "none",
693
- background: "transparent",
694
- padding: 0
695
- },
696
- children: /* @__PURE__ */ t.jsx("div", { className: "upload-list-container", children: r.length > 0 ? /* @__PURE__ */ t.jsx(
697
- N,
698
- {
699
- style: { textAlign: "left" },
700
- dataSource: r,
701
- renderItem: (m) => {
702
- const x = m.status === "done", f = m.status === "error";
703
- let C;
704
- return x ? C = /* @__PURE__ */ t.jsx(
705
- ae,
706
- {
707
- style: { color: "#52c41a", fontSize: 14 }
708
- }
709
- ) : f ? C = /* @__PURE__ */ t.jsx(
710
- _,
711
- {
712
- title: typeof m.response == "string" ? m.response : "업로드 실패",
713
- children: /* @__PURE__ */ t.jsx(
714
- ne,
715
- {
716
- style: { color: "#ff4d4f", fontSize: 14 }
717
- }
718
- )
719
- }
720
- ) : C = /* @__PURE__ */ t.jsx(le, { style: { fontSize: 14 } }), /* @__PURE__ */ t.jsx(
721
- N.Item,
722
- {
723
- actions: [
724
- /* @__PURE__ */ t.jsx(I, { type: "secondary", children: he(m.size || 0) }, "size"),
725
- /* @__PURE__ */ t.jsx(
726
- v,
727
- {
728
- type: "text",
729
- icon: /* @__PURE__ */ t.jsx(re, {}),
730
- onClick: () => p.onRemove?.(m),
731
- disabled: a
732
- },
733
- "delete"
734
- )
735
- ],
736
- children: /* @__PURE__ */ t.jsx(
737
- N.Item.Meta,
738
- {
739
- avatar: C,
740
- title: /* @__PURE__ */ t.jsx(I, { type: f ? "danger" : void 0, children: m.name })
741
- }
742
- )
743
- },
744
- m.uid
745
- );
746
- }
747
- }
748
- ) : /* @__PURE__ */ t.jsxs(
749
- R,
750
- {
751
- gap: "middle",
752
- align: "center",
753
- justify: "center",
754
- vertical: !0,
755
- style: { padding: "20px 0", minHeight: "120px" },
756
- children: [
757
- /* @__PURE__ */ t.jsx(oe, { style: { fontSize: "32px", color: "#999" } }),
758
- /* @__PURE__ */ t.jsx(I, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
759
- ]
760
- }
761
- ) })
762
- }
763
- )
764
- }
765
- ),
766
- r.length > 0 && /* @__PURE__ */ t.jsxs(
767
- R,
768
- {
769
- justify: "flex-end",
770
- align: "center",
771
- gap: "large",
772
- style: { marginTop: 16 },
773
- children: [
774
- a && /* @__PURE__ */ t.jsx("div", { style: { width: "250px" }, children: /* @__PURE__ */ t.jsx(P, { percent: c, size: "small" }) }),
775
- /* @__PURE__ */ t.jsx(
776
- v,
777
- {
778
- type: "primary",
779
- onClick: Y,
780
- disabled: a || r.filter((m) => m.status !== "done").length === 0,
781
- icon: /* @__PURE__ */ t.jsx(se, {}),
782
- children: "일괄 업로드"
783
- }
784
- )
785
- ]
786
- }
787
- )
788
- ] }) });
789
- };
790
- export {
791
- j as B,
792
- ie as a,
793
- we as b,
794
- ke as c,
795
- Me as d,
796
- Le as e,
797
- Be as f,
798
- Se as g,
799
- ve as h,
800
- Ie as i,
801
- De as j,
802
- Ne as k,
803
- Ee as l,
804
- Oe as m,
805
- Ve as n,
806
- Ae as o,
807
- Te as p,
808
- $e as q
809
- };