@bwg-ui/core 1.0.0

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 (257) hide show
  1. package/README.md +106 -0
  2. package/dist/chunks/BwgLargeUploader-ByN1XWV4.js +809 -0
  3. package/dist/chunks/BwgLargeUploader-CU0-MVk4.cjs +1 -0
  4. package/dist/chunks/BwgSpace-CnLM4qcg.js +26 -0
  5. package/dist/chunks/BwgSpace-b0hmM1Ht.cjs +1 -0
  6. package/dist/chunks/QuickServiceToggle-CiCuWfCF.cjs +183 -0
  7. package/dist/chunks/QuickServiceToggle-y7esp1kp.js +15510 -0
  8. package/dist/chunks/ServiceCodeContext--ZnMtjzD.cjs +1 -0
  9. package/dist/chunks/ServiceCodeContext-CDZMr3Mm.js +87 -0
  10. package/dist/chunks/UtilsContext-B16Gh9LL.cjs +1 -0
  11. package/dist/chunks/UtilsContext-BbfZYiMR.js +240 -0
  12. package/dist/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
  13. package/dist/chunks/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  14. package/dist/chunks/codeStore-Dt6j826J.cjs +1 -0
  15. package/dist/chunks/codeStore-bxk_q1sl.js +449 -0
  16. package/dist/chunks/commonUtils-BV6WFv-z.js +628 -0
  17. package/dist/chunks/commonUtils-L9Jgc5y-.cjs +1 -0
  18. package/dist/chunks/favoriteStore-CguRSEcH.js +367 -0
  19. package/dist/chunks/favoriteStore-TgeeY32l.cjs +1 -0
  20. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs +30 -0
  21. package/dist/chunks/jsx-runtime-Dpn_P65e.js +633 -0
  22. package/dist/chunks/messageUtils-9DXOwada.js +117 -0
  23. package/dist/chunks/messageUtils-RjJD_ArW.cjs +1 -0
  24. package/dist/chunks/popupStore-CVD8SPTa.cjs +1 -0
  25. package/dist/chunks/popupStore-Dp_fqtim.js +96 -0
  26. package/dist/chunks/realFormat-Cha7OTd9.cjs +1 -0
  27. package/dist/chunks/realFormat-DRGLFabQ.js +304 -0
  28. package/dist/chunks/serviceConfig-BJBsdee_.js +699 -0
  29. package/dist/chunks/serviceConfig-Cr2P4yr4.cjs +2 -0
  30. package/dist/components/common/BwgButtonGroup.d.ts +31 -0
  31. package/dist/components/common/BwgCmptArea.d.ts +16 -0
  32. package/dist/components/common/BwgConfigProvider.d.ts +10 -0
  33. package/dist/components/common/BwgDrawer.d.ts +20 -0
  34. package/dist/components/common/BwgGrid.d.ts +505 -0
  35. package/dist/components/common/BwgInfoArea.d.ts +8 -0
  36. package/dist/components/common/BwgPopup.d.ts +9 -0
  37. package/dist/components/common/BwgSpace.d.ts +11 -0
  38. package/dist/components/common/BwgTable.d.ts +13 -0
  39. package/dist/components/common/BwgTabs.d.ts +5 -0
  40. package/dist/components/common/BwgTitleBox.d.ts +29 -0
  41. package/dist/components/common/BwgView.d.ts +36 -0
  42. package/dist/components/common/ContentBox.d.ts +19 -0
  43. package/dist/components/common/ContentLayOut.d.ts +13 -0
  44. package/dist/components/common/GlobalConfigProvider.d.ts +9 -0
  45. package/dist/components/common/QuickServiceToggle.d.ts +13 -0
  46. package/dist/components/common/SearchBox.d.ts +16 -0
  47. package/dist/components/common/index.cjs +1 -0
  48. package/dist/components/common/index.d.ts +34 -0
  49. package/dist/components/common/index.js +24 -0
  50. package/dist/components/core/BwgButton.d.ts +6 -0
  51. package/dist/components/core/BwgCheck.d.ts +11 -0
  52. package/dist/components/core/BwgCheckList.d.ts +11 -0
  53. package/dist/components/core/BwgDatePicker.d.ts +10 -0
  54. package/dist/components/core/BwgForm.d.ts +6 -0
  55. package/dist/components/core/BwgFormItem.d.ts +17 -0
  56. package/dist/components/core/BwgInput.d.ts +9 -0
  57. package/dist/components/core/BwgLargeUploader.d.ts +15 -0
  58. package/dist/components/core/BwgMaskedInput.d.ts +20 -0
  59. package/dist/components/core/BwgMaskedPicker.d.ts +11 -0
  60. package/dist/components/core/BwgMultiSelect.d.ts +14 -0
  61. package/dist/components/core/BwgNumber.d.ts +13 -0
  62. package/dist/components/core/BwgRadio.d.ts +8 -0
  63. package/dist/components/core/BwgRangePicker.d.ts +12 -0
  64. package/dist/components/core/BwgSearch.d.ts +16 -0
  65. package/dist/components/core/BwgSelect.d.ts +15 -0
  66. package/dist/components/core/BwgTextArea.d.ts +8 -0
  67. package/dist/components/core/BwgUploader.d.ts +34 -0
  68. package/dist/components/core/index.cjs +1 -0
  69. package/dist/components/core/index.d.ts +36 -0
  70. package/dist/components/core/index.js +21 -0
  71. package/dist/components/guide/BwgComponentGuide.d.ts +2 -0
  72. package/dist/components/guide/BwgDeveloperGuide.d.ts +2 -0
  73. package/dist/components/guide/index.cjs +1 -0
  74. package/dist/components/guide/index.d.ts +2 -0
  75. package/dist/components/guide/index.js +7 -0
  76. package/dist/index.cjs +1 -0
  77. package/dist/index.d.ts +5 -0
  78. package/dist/index.js +291 -0
  79. package/dist/provider/contexts/CommonCodeContext.d.ts +46 -0
  80. package/dist/provider/contexts/SearchBoxContext.d.ts +15 -0
  81. package/dist/provider/contexts/ServiceCodeContext.d.ts +108 -0
  82. package/dist/provider/contexts/UtilsContext.d.ts +194 -0
  83. package/dist/provider/contexts/index.d.ts +4 -0
  84. package/dist/provider/hooks/index.d.ts +2 -0
  85. package/dist/provider/hooks/usePopup.d.ts +17 -0
  86. package/dist/provider/hooks/useViewState.d.ts +14 -0
  87. package/dist/provider/index.cjs +1 -0
  88. package/dist/provider/index.d.ts +2 -0
  89. package/dist/provider/index.js +27 -0
  90. package/dist/public/styles/assets/images/contents/icon/ico-business-trip.svg +21 -0
  91. package/dist/public/styles/assets/images/contents/icon/ico-holiday.svg +23 -0
  92. package/dist/public/styles/assets/images/contents/icon/ico-menu-help.svg +5 -0
  93. package/dist/public/styles/assets/images/contents/icon/ico-overtime.svg +17 -0
  94. package/dist/public/styles/assets/images/contents/icon/ico-quick-tab-move.svg +8 -0
  95. package/dist/public/styles/assets/images/contents/icon/quick tab-text.svg +4 -0
  96. package/dist/public/styles/assets/images/contents/icon/quick-tab-text.svg +4 -0
  97. package/dist/public/test.txt +0 -0
  98. package/dist/stores/codeStore.d.ts +173 -0
  99. package/dist/stores/favoriteStore.d.ts +19 -0
  100. package/dist/stores/index.cjs +1 -0
  101. package/dist/stores/index.d.ts +14 -0
  102. package/dist/stores/index.js +20 -0
  103. package/dist/stores/menuStore.d.ts +52 -0
  104. package/dist/stores/popupStore.d.ts +72 -0
  105. package/dist/stores/userStore.d.ts +36 -0
  106. package/dist/styles/assets/fonts/Roboto/Roboto-bold.eot +2751 -0
  107. package/dist/styles/assets/fonts/Roboto/Roboto-bold.svg +626 -0
  108. package/dist/styles/assets/fonts/Roboto/Roboto-bold.ttf +2755 -0
  109. package/dist/styles/assets/fonts/Roboto/Roboto-bold.woff +2755 -0
  110. package/dist/styles/assets/fonts/Roboto/Roboto-bold.woff2 +2754 -0
  111. package/dist/styles/assets/fonts/Roboto/Roboto-medium.eot +0 -0
  112. package/dist/styles/assets/fonts/Roboto/Roboto-medium.svg +1064 -0
  113. package/dist/styles/assets/fonts/Roboto/Roboto-medium.ttf +0 -0
  114. package/dist/styles/assets/fonts/Roboto/Roboto-medium.woff +0 -0
  115. package/dist/styles/assets/fonts/Roboto/Roboto-medium.woff2 +2754 -0
  116. package/dist/styles/assets/fonts/Roboto/Roboto-regular.eot +0 -0
  117. package/dist/styles/assets/fonts/Roboto/Roboto-regular.svg +1063 -0
  118. package/dist/styles/assets/fonts/Roboto/Roboto-regular.ttf +1597 -0
  119. package/dist/styles/assets/fonts/Roboto/Roboto-regular.woff +1597 -0
  120. package/dist/styles/assets/fonts/Roboto/Roboto-regular.woff2 +1597 -0
  121. package/dist/styles/assets/fonts/material/MaterialIcons-Regular.eot +1594 -0
  122. package/dist/styles/assets/fonts/material/MaterialIcons-Regular.ttf +0 -0
  123. package/dist/styles/assets/fonts/material/MaterialIcons-Regular.woff +1594 -0
  124. package/dist/styles/assets/fonts/material/MaterialIcons-Regular.woff2 +1594 -0
  125. package/dist/styles/assets/fonts/material/MaterialSymbolsOutlined.woff2 +0 -0
  126. package/dist/styles/assets/fonts/meiryo/meiryo.ttf +0 -0
  127. package/dist/styles/assets/fonts/meiryo/meiryob.ttf +0 -0
  128. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothic.eot +0 -0
  129. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothic.ttf +0 -0
  130. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothic.woff +0 -0
  131. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicBold.eot +0 -0
  132. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicBold.ttf +0 -0
  133. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicBold.woff +0 -0
  134. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWeb.eot +0 -0
  135. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWeb.ttf +0 -0
  136. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWeb.woff +0 -0
  137. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebBold.eot +0 -0
  138. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebBold.ttf +0 -0
  139. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebBold.woff +0 -0
  140. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebLight.eot +0 -0
  141. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebLight.ttf +0 -0
  142. package/dist/styles/assets/fonts/nanumBarun/NanumBarunGothicWebLight.woff +0 -0
  143. package/dist/styles/assets/fonts/notokr/NotoSans-Bold.eot +2314 -0
  144. package/dist/styles/assets/fonts/notokr/NotoSans-Bold.otf +2314 -0
  145. package/dist/styles/assets/fonts/notokr/NotoSans-Bold.svg +47 -0
  146. package/dist/styles/assets/fonts/notokr/NotoSans-Bold.ttf +2301 -0
  147. package/dist/styles/assets/fonts/notokr/NotoSans-Bold.woff +2314 -0
  148. package/dist/styles/assets/fonts/notokr/NotoSans-Bold.woff2 +2315 -0
  149. package/dist/styles/assets/fonts/notokr/NotoSans-Light.otf +0 -0
  150. package/dist/styles/assets/fonts/notokr/NotoSans-Light.woff +0 -0
  151. package/dist/styles/assets/fonts/notokr/NotoSans-Light.woff2 +0 -0
  152. package/dist/styles/assets/fonts/notokr/NotoSans-Medium.eot +0 -0
  153. package/dist/styles/assets/fonts/notokr/NotoSans-Medium.otf +0 -0
  154. package/dist/styles/assets/fonts/notokr/NotoSans-Medium.svg +47 -0
  155. package/dist/styles/assets/fonts/notokr/NotoSans-Medium.ttf +0 -0
  156. package/dist/styles/assets/fonts/notokr/NotoSans-Medium.woff +0 -0
  157. package/dist/styles/assets/fonts/notokr/NotoSans-Medium.woff2 +0 -0
  158. package/dist/styles/assets/fonts/notokr/NotoSans-Regular.eot +0 -0
  159. package/dist/styles/assets/fonts/notokr/NotoSans-Regular.otf +0 -0
  160. package/dist/styles/assets/fonts/notokr/NotoSans-Regular.svg +47 -0
  161. package/dist/styles/assets/fonts/notokr/NotoSans-Regular.ttf +2299 -0
  162. package/dist/styles/assets/fonts/notokr/NotoSans-Regular.woff +0 -0
  163. package/dist/styles/assets/fonts/notokr/NotoSans-Regular.woff2 +0 -0
  164. package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.eot +0 -0
  165. package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.ttf +0 -0
  166. package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.woff +0 -0
  167. package/dist/styles/assets/fonts/poppins/Poppins-ExtraLight.woff2 +0 -0
  168. package/dist/styles/assets/fonts/poppins/Poppins-Light.eot +0 -0
  169. package/dist/styles/assets/fonts/poppins/Poppins-Light.ttf +0 -0
  170. package/dist/styles/assets/fonts/poppins/Poppins-Light.woff +0 -0
  171. package/dist/styles/assets/fonts/poppins/Poppins-Light.woff2 +0 -0
  172. package/dist/styles/assets/fonts/poppins/Poppins-Medium.eot +0 -0
  173. package/dist/styles/assets/fonts/poppins/Poppins-Medium.ttf +0 -0
  174. package/dist/styles/assets/fonts/poppins/Poppins-Medium.woff +0 -0
  175. package/dist/styles/assets/fonts/poppins/Poppins-Medium.woff2 +0 -0
  176. package/dist/styles/assets/fonts/poppins/Poppins-Regular.eot +0 -0
  177. package/dist/styles/assets/fonts/poppins/Poppins-Regular.ttf +0 -0
  178. package/dist/styles/assets/fonts/poppins/Poppins-Regular.woff +0 -0
  179. package/dist/styles/assets/fonts/poppins/Poppins-Regular.woff2 +0 -0
  180. package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.eot +0 -0
  181. package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.ttf +0 -0
  182. package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.woff +0 -0
  183. package/dist/styles/assets/fonts/poppins/Poppins-SemiBold.woff2 +0 -0
  184. package/dist/styles/assets/fonts/pretendard/Pretendard-Black.woff2 +0 -0
  185. package/dist/styles/assets/fonts/pretendard/Pretendard-Bold.woff2 +0 -0
  186. package/dist/styles/assets/fonts/pretendard/Pretendard-ExtraBold.woff2 +0 -0
  187. package/dist/styles/assets/fonts/pretendard/Pretendard-ExtraLight.woff2 +0 -0
  188. package/dist/styles/assets/fonts/pretendard/Pretendard-Light.woff2 +0 -0
  189. package/dist/styles/assets/fonts/pretendard/Pretendard-Medium.woff2 +0 -0
  190. package/dist/styles/assets/fonts/pretendard/Pretendard-Regular.woff2 +0 -0
  191. package/dist/styles/assets/fonts/pretendard/Pretendard-SemiBold.woff2 +0 -0
  192. package/dist/styles/assets/fonts/pretendard/Pretendard-Thin.woff2 +0 -0
  193. package/dist/styles/assets/images/README.md +144 -0
  194. package/dist/styles/assets/images/backgrounds/landing_bg.png +0 -0
  195. package/dist/styles/assets/images/backgrounds/login_bg_01.png +0 -0
  196. package/dist/styles/assets/images/backgrounds/login_bg_02.png +0 -0
  197. package/dist/styles/assets/images/contents/btn/btn-down-on.png +0 -0
  198. package/dist/styles/assets/images/contents/btn/btn-down.png +0 -0
  199. package/dist/styles/assets/images/contents/btn/btn-left-on.png +0 -0
  200. package/dist/styles/assets/images/contents/btn/btn-left.png +0 -0
  201. package/dist/styles/assets/images/contents/btn/btn-right-on.png +0 -0
  202. package/dist/styles/assets/images/contents/btn/btn-right.png +0 -0
  203. package/dist/styles/assets/images/contents/btn/btn-up-on.png +0 -0
  204. package/dist/styles/assets/images/contents/btn/btn-up.png +0 -0
  205. package/dist/styles/assets/images/contents/icon/ico-business-trip.svg +21 -0
  206. package/dist/styles/assets/images/contents/icon/ico-holiday.svg +23 -0
  207. package/dist/styles/assets/images/contents/icon/ico-menu-help.svg +5 -0
  208. package/dist/styles/assets/images/contents/icon/ico-overtime.svg +17 -0
  209. package/dist/styles/assets/images/contents/icon/ico-quick-tab-move.svg +4 -0
  210. package/dist/styles/assets/images/contents/icon/ico-setting.svg +4 -0
  211. package/dist/styles/assets/images/contents/icon/ico_blue.png +0 -0
  212. package/dist/styles/assets/images/contents/icon/ico_red.png +0 -0
  213. package/dist/styles/assets/images/contents/icon/quick tab-text.svg +4 -0
  214. package/dist/styles/assets/images/contents/icon/quick-tab-text.svg +4 -0
  215. package/dist/styles/assets/images/logos/KRX Logo.svg +22 -0
  216. package/dist/styles/assets/images/logos/bwg-logo-blue.png +0 -0
  217. package/dist/styles/assets/images/logos/krx-logo-x2.png +0 -0
  218. package/dist/styles/assets/images/logos/krx-logo.png +0 -0
  219. package/dist/styles/assets/react.svg +1 -0
  220. package/dist/styles/components.css +785 -0
  221. package/dist/styles/fonts.css +101 -0
  222. package/dist/styles/global.css +52 -0
  223. package/dist/styles/index.css +41 -0
  224. package/dist/styles/layout.css +1132 -0
  225. package/dist/styles/login.css +151 -0
  226. package/dist/styles/popup.css +30 -0
  227. package/dist/styles/renderers.css +190 -0
  228. package/dist/styles/size.css +4019 -0
  229. package/dist/styles/variables.css +106 -0
  230. package/dist/test.txt +0 -0
  231. package/dist/types/images.d.ts +25 -0
  232. package/dist/utils/apiUtils.d.ts +85 -0
  233. package/dist/utils/arrayUtils.d.ts +34 -0
  234. package/dist/utils/commonUtils.d.ts +54 -0
  235. package/dist/utils/cookieUtils.d.ts +4 -0
  236. package/dist/utils/dateUtils.d.ts +26 -0
  237. package/dist/utils/envUtils.d.ts +8 -0
  238. package/dist/utils/imageUtils.d.ts +31 -0
  239. package/dist/utils/index.cjs +1 -0
  240. package/dist/utils/index.d.ts +14 -0
  241. package/dist/utils/index.js +211 -0
  242. package/dist/utils/messageUtils.d.ts +65 -0
  243. package/dist/utils/notificationUtils.d.ts +51 -0
  244. package/dist/utils/objectUtils.d.ts +27 -0
  245. package/dist/utils/realFormat.d.ts +242 -0
  246. package/dist/utils/serviceConfig.d.ts +35 -0
  247. package/dist/utils/stringUtils.d.ts +142 -0
  248. package/dist/utils/userUtils.d.ts +19 -0
  249. package/package.json +123 -0
  250. package/public/styles/assets/images/contents/icon/ico-business-trip.svg +21 -0
  251. package/public/styles/assets/images/contents/icon/ico-holiday.svg +23 -0
  252. package/public/styles/assets/images/contents/icon/ico-menu-help.svg +5 -0
  253. package/public/styles/assets/images/contents/icon/ico-overtime.svg +17 -0
  254. package/public/styles/assets/images/contents/icon/ico-quick-tab-move.svg +8 -0
  255. package/public/styles/assets/images/contents/icon/quick tab-text.svg +4 -0
  256. package/public/styles/assets/images/contents/icon/quick-tab-text.svg +4 -0
  257. package/public/test.txt +0 -0
@@ -0,0 +1,809 @@
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
+ };