@bwg-ui/core 1.3.6 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/chunks/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
  2. package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
  3. package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
  4. package/dist/chunks/{CMSearchIntfGwP01-BBdPmalj.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
  5. package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
  6. package/dist/chunks/{MenuReport-CYK_Eaqa.js → MenuReport-DgMjx5Hs.js} +5 -5
  7. package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
  8. package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
  9. package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
  10. package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
  11. package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
  12. package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
  13. package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
  14. package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
  15. package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
  16. package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
  17. package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
  18. package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
  19. package/dist/chunks/UploadMultiFileP01-Bf1qonGN.cjs +1 -0
  20. package/dist/chunks/UploadMultiFileP01-BgyIhfac.js +38 -0
  21. package/dist/chunks/{layout-components-gqu1pmfr.js → layout-components-Lyp9SZ7V.js} +1134 -1008
  22. package/dist/chunks/layout-components-NtKR0O6Y.cjs +38 -0
  23. package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
  24. package/dist/chunks/provider-ff4RVDYo.js +711 -0
  25. package/dist/components/common/ButtonAccessController.d.ts +2 -3
  26. package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
  27. package/dist/components/common/BwgButtonGroup.d.ts +1 -1
  28. package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
  29. package/dist/components/common/BwgCol.d.ts +1 -1
  30. package/dist/components/common/BwgCol.d.ts.map +1 -1
  31. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  32. package/dist/components/common/BwgModal.d.ts +10 -0
  33. package/dist/components/common/BwgModal.d.ts.map +1 -0
  34. package/dist/components/common/BwgView.d.ts.map +1 -1
  35. package/dist/components/common/index.cjs +1 -1
  36. package/dist/components/common/index.d.ts +1 -0
  37. package/dist/components/common/index.d.ts.map +1 -1
  38. package/dist/components/common/index.js +4887 -28
  39. package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
  40. package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
  41. package/dist/components/core/BwgDeptSearch.d.ts +38 -0
  42. package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
  43. package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
  44. package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
  45. package/dist/components/core/BwgEmpSearch.d.ts +12 -4
  46. package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
  47. package/dist/components/core/BwgUploader.d.ts +6 -92
  48. package/dist/components/core/BwgUploader.d.ts.map +1 -1
  49. package/dist/components/core/BwgUploader_bak.d.ts +98 -0
  50. package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
  51. package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
  52. package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
  53. package/dist/components/core/index.cjs +1 -1
  54. package/dist/components/core/index.d.ts +11 -2
  55. package/dist/components/core/index.d.ts.map +1 -1
  56. package/dist/components/core/index.js +1318 -1164
  57. package/dist/components/guide/index.cjs +1 -1
  58. package/dist/components/guide/index.js +17 -17
  59. package/dist/components/layout/AppWrapper.d.ts +5 -1
  60. package/dist/components/layout/AppWrapper.d.ts.map +1 -1
  61. package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
  62. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  63. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  64. package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
  65. package/dist/components/layout/index.cjs +1 -1
  66. package/dist/components/layout/index.js +1 -1
  67. package/dist/components/pages/auth/AuthManagement.d.ts +8 -0
  68. package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
  69. package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
  70. package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
  71. package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
  72. package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
  73. package/dist/components/pages/auth/RoleView.d.ts +17 -0
  74. package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
  75. package/dist/components/pages/board/AdminBoard.d.ts +6 -0
  76. package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
  77. package/dist/components/pages/board/BoardComment.d.ts +8 -0
  78. package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
  79. package/dist/components/pages/board/MyBoard.d.ts +6 -0
  80. package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
  81. package/dist/components/pages/index.d.ts +9 -10
  82. package/dist/components/pages/index.d.ts.map +1 -1
  83. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
  84. package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
  85. package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
  86. package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
  87. package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
  88. package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
  89. package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
  90. package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
  91. package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
  92. package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
  93. package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
  94. package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
  95. package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
  96. package/dist/components/pages/types.d.ts +5 -1
  97. package/dist/components/pages/types.d.ts.map +1 -1
  98. package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
  99. package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
  100. package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
  101. package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
  102. package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
  103. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
  104. package/dist/components/popup/index.cjs +1 -1
  105. package/dist/components/popup/index.d.ts +1 -0
  106. package/dist/components/popup/index.d.ts.map +1 -1
  107. package/dist/components/popup/index.js +16 -8
  108. package/dist/index.cjs +185 -1
  109. package/dist/index.js +31237 -288
  110. package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
  111. package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
  112. package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
  113. package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
  114. package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
  115. package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
  116. package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
  117. package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
  118. package/dist/provider/contexts/PageContentContext.d.ts +23 -0
  119. package/dist/provider/contexts/PageContentContext.d.ts.map +1 -0
  120. package/dist/provider/contexts/index.d.ts +1 -0
  121. package/dist/provider/contexts/index.d.ts.map +1 -1
  122. package/dist/provider/hooks/index.d.ts +1 -0
  123. package/dist/provider/hooks/index.d.ts.map +1 -1
  124. package/dist/provider/hooks/useFileUploader.d.ts +74 -0
  125. package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
  126. package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
  127. package/dist/provider/index.cjs +1 -1
  128. package/dist/provider/index.d.ts +1 -0
  129. package/dist/provider/index.d.ts.map +1 -1
  130. package/dist/provider/index.js +22 -19
  131. package/dist/stores/codeStore.d.ts +65 -128
  132. package/dist/stores/codeStore.d.ts.map +1 -1
  133. package/dist/stores/index.cjs +2 -2
  134. package/dist/stores/index.d.ts +3 -3
  135. package/dist/stores/index.d.ts.map +1 -1
  136. package/dist/stores/index.js +815 -1625
  137. package/dist/stores/menuModelStore.d.ts +22 -7
  138. package/dist/stores/menuModelStore.d.ts.map +1 -1
  139. package/dist/stores/menuViewStore.d.ts +3 -3
  140. package/dist/stores/menuViewStore.d.ts.map +1 -1
  141. package/dist/stores/systemStore.d.ts +50 -17
  142. package/dist/stores/systemStore.d.ts.map +1 -1
  143. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  144. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  145. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  146. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  147. package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
  148. package/dist/styles/assets/images/menus/ico1-design.png +0 -0
  149. package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
  150. package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
  151. package/dist/styles/assets/images/menus/ico2-design.png +0 -0
  152. package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
  153. package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
  154. package/dist/styles/assets/images/menus/ico3-design.png +0 -0
  155. package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
  156. package/dist/utils/apiUtils.d.ts.map +1 -1
  157. package/dist/utils/commonUtils.d.ts +1 -2
  158. package/dist/utils/commonUtils.d.ts.map +1 -1
  159. package/dist/utils/index.cjs +1 -1
  160. package/dist/utils/index.d.ts +25 -25
  161. package/dist/utils/index.d.ts.map +1 -1
  162. package/dist/utils/index.js +980 -1967
  163. package/dist/utils/messageUtils.d.ts +36 -48
  164. package/dist/utils/messageUtils.d.ts.map +1 -1
  165. package/dist/utils/modalUtils.d.ts +68 -0
  166. package/dist/utils/modalUtils.d.ts.map +1 -0
  167. package/dist/utils/notificationUtils.d.ts +50 -41
  168. package/dist/utils/notificationUtils.d.ts.map +1 -1
  169. package/dist/utils/serviceConfig.d.ts +9 -3
  170. package/dist/utils/serviceConfig.d.ts.map +1 -1
  171. package/package.json +5 -5
  172. package/dist/chunks/CMSearchIntfGwP01-Cs78BtE7.cjs +0 -1
  173. package/dist/chunks/MenuReport-BCO-gXwk.cjs +0 -1
  174. package/dist/chunks/common-components-C61ER0qC.js +0 -52599
  175. package/dist/chunks/common-components-mXgJEMpT.cjs +0 -1109
  176. package/dist/chunks/layout-components-D7I6VhXN.cjs +0 -38
  177. package/dist/chunks/provider-Kxea5IoZ.js +0 -449
  178. package/dist/chunks/provider-r4mkv5Zs.cjs +0 -1
  179. package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
  180. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
  181. package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
  182. package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
  183. package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
  184. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
  185. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
  186. package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
  187. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
  188. package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
  189. package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
  190. package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
  191. package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
  192. package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
  193. package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
  194. package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
@@ -1,117 +1,118 @@
1
- import { jsx as a, jsxs as P } from "react/jsx-runtime";
2
- import { Button as X, Form as E, Checkbox as ue, ConfigProvider as se, DatePicker as ie, message as z, Card as Ve, List as re, Input as q, Spin as Le, Upload as Z, Typography as be, Flex as ge, Progress as ve, notification as Ae, Tooltip as Me, Select as fe, Space as ae, InputNumber as _e, Radio as De, Switch as Ee } from "antd";
3
- import { useMemo as Q, memo as xe, useState as j, useEffect as G, forwardRef as Be, useRef as K, cloneElement as Oe, useCallback as ce } from "react";
4
- import { useUserStore as ze, usePopupStore as $e } from "../../stores/index.js";
5
- import _ from "dayjs";
6
- import { PaperClipOutlined as Re, DownloadOutlined as Ue, DeleteOutlined as Te, InboxOutlined as je, UploadOutlined as ke, CloudUploadOutlined as He, CheckCircleOutlined as Ke, CloseCircleOutlined as Pe, FileTextOutlined as Ge, CalendarOutlined as de, ExclamationCircleOutlined as Se, SearchOutlined as Ne } from "@ant-design/icons";
7
- import { getApiDeps as he, callServiceByAppCd as We, getCrprCd as qe, callService as J, getUserInfo as te } from "../../utils/index.js";
8
- import Ze from "jszip";
9
- import le from "imask";
10
- import { d as we, e as Je } from "../../chunks/provider-Kxea5IoZ.js";
11
- import { debounce as Xe, findIndex as ne } from "lodash";
12
- import { DndProvider as Qe, useDrop as et, useDrag as tt } from "react-dnd";
13
- import { HTML5Backend as rt } from "react-dnd-html5-backend";
14
- const vt = (e) => {
15
- const { componentSize: t } = ze(), f = Q(() => e.size ? e.size : {
1
+ import { jsx as t, jsxs as T, Fragment as _e } from "react/jsx-runtime";
2
+ import { Button as J, Form as D, Checkbox as ue, ConfigProvider as ie, DatePicker as ce, message as x, Card as Ve, List as ne, Input as X, Spin as Ee, Upload as ee, Typography as fe, Flex as ye, Progress as Ue, notification as ze, Tooltip as Re, Select as he, Space as j, InputNumber as Pe, Radio as $e, Switch as He, Popover as Fe } from "antd";
3
+ import { useMemo as q, memo as We, useState as z, useEffect as G, forwardRef as je, useRef as K, useCallback as Q, cloneElement as Ge } from "react";
4
+ import { useUserStore as Xe, usePopupStore as Ke } from "../../stores/index.js";
5
+ import N from "dayjs";
6
+ import { PaperClipOutlined as qe, DownloadOutlined as Je, DeleteOutlined as Ze, InboxOutlined as De, UploadOutlined as ae, CloudUploadOutlined as Qe, CheckCircleOutlined as et, CloseCircleOutlined as tt, FileTextOutlined as nt, CalendarOutlined as me, ExclamationCircleOutlined as Ie, SearchOutlined as ge, PlayCircleOutlined as rt, RedoOutlined as ot, ExclamationCircleFilled as at, FilePdfTwoTone as lt, FileWordTwoTone as st, FileExcelTwoTone as it, FilePptTwoTone as ct, FileTwoTone as dt, LinkOutlined as ut, FileOutlined as mt } from "@ant-design/icons";
7
+ import { getApiDeps as Ce, callServiceByAppCd as ft, getCrprCd as Ne, callService as te, getUserInfo as ve } from "../../utils/index.js";
8
+ import ht from "jszip";
9
+ import se from "imask";
10
+ import { d as xe, e as Le, h as Ae } from "../../chunks/provider-ff4RVDYo.js";
11
+ import { findIndex as de } from "lodash";
12
+ import { useDrop as gt, useDrag as pt, DndProvider as Me } from "react-dnd";
13
+ import { HTML5Backend as Oe } from "react-dnd-html5-backend";
14
+ import yt from "antd/es/upload/Dragger";
15
+ const oe = (e) => {
16
+ const { componentSize: r } = Xe(), u = q(() => e.size ? e.size : {
16
17
  0: "small",
17
18
  1: "middle",
18
19
  2: "large"
19
- }[t], [t, e.size]), s = Q(() => ({
20
+ }[r], [r, e.size]), l = q(() => ({
20
21
  0: 12,
21
22
  // 작게
22
23
  1: 14,
23
24
  // 보통
24
25
  2: 16
25
26
  // 크게
26
- })[t], [t]);
27
- return /* @__PURE__ */ a(
28
- X,
27
+ })[r], [r]);
28
+ return /* @__PURE__ */ t(
29
+ J,
29
30
  {
30
31
  ...e,
31
- size: f,
32
+ size: u,
32
33
  className: "bwg-btn",
33
- style: { fontSize: `${s}px`, ...e.style },
34
+ style: { fontSize: `${l}px`, ...e.style },
34
35
  children: e.children
35
36
  }
36
37
  );
37
- }, T = xe(
38
+ }, R = We(
38
39
  ({
39
40
  children: e,
40
- label: t,
41
- name: f,
42
- rules: s,
43
- initialValue: r,
44
- style: l,
45
- required: g,
41
+ label: r,
42
+ name: u,
43
+ rules: l,
44
+ initialValue: n,
45
+ style: o,
46
+ required: d,
46
47
  ...i
47
48
  }) => {
48
- const y = {
49
+ const f = {
49
50
  fontWeight: "bold"
50
51
  };
51
- (s == null || s == null) && g && (s = [
52
+ (l == null || l == null) && d && (l = [
52
53
  {
53
54
  required: !0,
54
- message: `${t}을(를) 입력해주세요.`
55
+ message: `${r}을(를) 입력해주세요.`
55
56
  }
56
57
  ]);
57
- const c = Array.isArray(s) && s.some((Y) => Y.required === !0), u = () => typeof t == "string" ? /* @__PURE__ */ P("span", { style: y, children: [
58
- t,
59
- c && /* @__PURE__ */ a("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
60
- ] }) : /* @__PURE__ */ a("span", { style: y, children: t });
61
- return /* @__PURE__ */ a(
62
- E.Item,
58
+ const s = Array.isArray(l) && l.some((y) => y.required === !0), c = () => typeof r == "string" ? /* @__PURE__ */ T("span", { style: f, children: [
59
+ r,
60
+ s && /* @__PURE__ */ t("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
61
+ ] }) : /* @__PURE__ */ t("span", { style: f, children: r });
62
+ return /* @__PURE__ */ t(
63
+ D.Item,
63
64
  {
64
65
  className: "bwg-form-item",
65
- label: t ? u() : void 0,
66
+ label: r ? c() : void 0,
66
67
  labelAlign: i.labelAlign || "left",
67
- name: f,
68
- rules: s,
68
+ name: u,
69
+ rules: l,
69
70
  colon: !1,
70
- initialValue: r,
71
- style: l,
71
+ initialValue: n,
72
+ style: o,
72
73
  ...i,
73
74
  children: e
74
75
  }
75
76
  );
76
77
  }
77
- ), At = ({
78
+ ), jt = ({
78
79
  itemProps: e,
79
- inputProps: t = {
80
+ inputProps: r = {
80
81
  format: "YN"
81
82
  }
82
83
  }) => {
83
- const f = E.useFormInstance();
84
- return /* @__PURE__ */ a(
85
- T,
84
+ const u = D.useFormInstance();
85
+ return /* @__PURE__ */ t(
86
+ R,
86
87
  {
87
88
  ...e,
88
- getValueProps: (r) => ({ checked: t.format === "boolean" ? !!r : r === "Y" }),
89
- normalize: (r) => typeof r == "boolean" ? t.format === "boolean" ? r : r ? "Y" : "N" : t.format === "boolean" ? !!r : r ? "Y" : "N",
90
- children: /* @__PURE__ */ a(ue, { ...t, onChange: (r) => {
91
- t.format === "boolean" ? f.setFieldValue(e?.name, r.target.checked) : f.setFieldValue(e?.name, r.target.checked ? "Y" : "N"), t.onChange && t.onChange(r);
92
- }, children: t?.title })
89
+ getValueProps: (n) => ({ checked: r.format === "boolean" ? !!n : n === "Y" }),
90
+ normalize: (n) => typeof n == "boolean" ? r.format === "boolean" ? n : n ? "Y" : "N" : r.format === "boolean" ? !!n : n ? "Y" : "N",
91
+ children: /* @__PURE__ */ t(ue, { ...r, onChange: (n) => {
92
+ r.format === "boolean" ? u.setFieldValue(e?.name, n.target.checked) : u.setFieldValue(e?.name, n.target.checked ? "Y" : "N"), r.onChange && r.onChange(n);
93
+ }, children: r?.title })
93
94
  }
94
95
  );
95
- }, Mt = ({ itemProps: e, inputProps: t }) => {
96
- const f = E.useFormInstance(), [s, r] = j(
96
+ }, Gt = ({ itemProps: e, inputProps: r }) => {
97
+ const u = D.useFormInstance(), [l, n] = z(
97
98
  e?.initialValue ?? []
98
- ), [l, g] = j([]), i = l.length > 0 && l.length == s?.length, y = s?.length > 0 && s.length < l.length;
99
+ ), [o, d] = z([]), i = o.length > 0 && o.length == l?.length, f = l?.length > 0 && l.length < o.length;
99
100
  G(() => {
100
- g(c(t?.options));
101
- }, [t?.options]), G(() => {
102
- r(s);
103
- }, [s]);
104
- const c = (F) => {
105
- const v = [];
106
- return (F || []).map((V, R) => {
107
- v.push(V.value);
108
- }), v;
109
- }, u = (F) => {
110
- r(F.target.checked ? l : []), f.setFieldValue(e?.name, F.target.checked ? l : []);
111
- }, Y = (F) => {
112
- r(F), f.setFieldValue(e?.name, F), t?.onChange && typeof t?.onChange == "function" && t?.onChange(F);
101
+ d(s(r?.options));
102
+ }, [r?.options]), G(() => {
103
+ n(l);
104
+ }, [l]);
105
+ const s = (g) => {
106
+ const Y = [];
107
+ return (g || []).map((C, O) => {
108
+ Y.push(C.value);
109
+ }), Y;
110
+ }, c = (g) => {
111
+ n(g.target.checked ? o : []), u.setFieldValue(e?.name, g.target.checked ? o : []);
112
+ }, y = (g) => {
113
+ n(g), u.setFieldValue(e?.name, g), r?.onChange && typeof r?.onChange == "function" && r?.onChange(g);
113
114
  };
114
- return /* @__PURE__ */ a(T, { ...e, children: /* @__PURE__ */ P(se, { theme: {
115
+ return /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ T(ie, { theme: {
115
116
  components: {
116
117
  Checkbox: {
117
118
  colorPrimary: "var(--check-primary)",
@@ -120,25 +121,25 @@ const vt = (e) => {
120
121
  }
121
122
  }
122
123
  }, children: [
123
- t?.allCheck && /* @__PURE__ */ a(
124
+ r?.allCheck && /* @__PURE__ */ t(
124
125
  ue,
125
126
  {
126
- indeterminate: y,
127
+ indeterminate: f,
127
128
  checked: i,
128
- onChange: u,
129
+ onChange: c,
129
130
  children: "전체선택"
130
131
  }
131
132
  ),
132
- /* @__PURE__ */ a(
133
+ /* @__PURE__ */ t(
133
134
  ue.Group,
134
135
  {
135
- options: t?.options,
136
- value: s,
137
- onChange: Y
136
+ options: r?.options,
137
+ value: l,
138
+ onChange: y
138
139
  }
139
140
  )
140
141
  ] }) });
141
- }, pe = {
142
+ }, ke = {
142
143
  year: { displayFormat: "YYYY", outputFormat: "YYYY" },
143
144
  month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
144
145
  date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
@@ -147,111 +148,111 @@ const vt = (e) => {
147
148
  displayFormat: "YYYY-MM-DD HH:mm",
148
149
  outputFormat: "YYYYMMDDHHmm"
149
150
  }
150
- }, _t = ({
151
+ }, Xt = ({
151
152
  itemProps: e,
152
- inputProps: t,
153
- type: f = "date",
154
- returnType: s = "string"
153
+ inputProps: r,
154
+ type: u = "date",
155
+ returnType: l = "string"
155
156
  }) => {
156
- const { displayFormat: r, outputFormat: l } = Q(
157
- () => pe[f],
158
- [f]
159
- ), g = Q(
160
- () => Object.values(pe).map((i) => i.outputFormat).sort((i, y) => {
161
- if (i.length === y.length) {
162
- if (i === l) return -1;
163
- if (y === l) return 1;
157
+ const { displayFormat: n, outputFormat: o } = q(
158
+ () => ke[u],
159
+ [u]
160
+ ), d = q(
161
+ () => Object.values(ke).map((i) => i.outputFormat).sort((i, f) => {
162
+ if (i.length === f.length) {
163
+ if (i === o) return -1;
164
+ if (f === o) return 1;
164
165
  }
165
- return y.length - i.length;
166
+ return f.length - i.length;
166
167
  }),
167
- [l]
168
+ [o]
168
169
  // type(outputFormat)이 바뀔 때마다 재정렬
169
170
  );
170
- return /* @__PURE__ */ a(
171
- T,
171
+ return /* @__PURE__ */ t(
172
+ R,
172
173
  {
173
174
  ...e,
174
175
  getValueProps: (i) => ({
175
176
  // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환
176
- value: i ? _.isDayjs(i) ? i : _(i, g) : null
177
+ value: i ? N.isDayjs(i) ? i : N(i, d) : null
177
178
  }),
178
- normalize: (i) => i ? s === "dayjs" ? i : i.format(l) : null,
179
- children: /* @__PURE__ */ a(
180
- ie,
179
+ normalize: (i) => i ? l === "dayjs" ? i : i.format(o) : null,
180
+ children: /* @__PURE__ */ t(
181
+ ce,
181
182
  {
182
- ...t,
183
- picker: f === "datetime" ? "date" : f,
184
- showTime: t?.showTime ?? (f === "datetime" || f === "time"),
185
- format: t?.format ?? r
183
+ ...r,
184
+ picker: u === "datetime" ? "date" : u,
185
+ showTime: r?.showTime ?? (u === "datetime" || u === "time"),
186
+ format: r?.format ?? n
186
187
  }
187
188
  )
188
189
  }
189
190
  );
190
- }, Dt = ({
191
+ }, Kt = ({
191
192
  fileGrpKey: e,
192
- onFetchFilesTrxCd: t = "SCMFILE00101",
193
- readOnly: f = !1,
194
- appCd: s = __APP_CD__
193
+ onFetchFilesTrxCd: r = "SCMFILE00101",
194
+ readOnly: u = !1,
195
+ appCd: l = __APP_CD__
195
196
  }) => {
196
- const [r, l] = j([]);
197
+ const [n, o] = z([]);
197
198
  G(() => {
198
- if (t)
199
- if (s != __APP_CD__) {
200
- const y = he().findSystemByAppCd?.(s ?? __APP_CD__);
201
- if (!y || !y.sysCd) {
202
- console.error("해당 앱코드는 존재하지 않습니다.", s);
199
+ if (r)
200
+ if (l != __APP_CD__) {
201
+ const f = Ce().findSystemByAppCd?.(l ?? __APP_CD__);
202
+ if (!f || !f.sysCd) {
203
+ console.error("해당 앱코드는 존재하지 않습니다.", l);
203
204
  return;
204
205
  }
205
- We(
206
- { trxCd: t, appCd: s },
206
+ ft(
207
+ { trxCd: r, appCd: l },
207
208
  {
208
- crprCd: qe(),
209
- sysCd: y.sysCd,
209
+ crprCd: Ne(),
210
+ sysCd: f.sysCd,
210
211
  fileGrpKey: e
211
212
  }
212
- ).then((c) => {
213
- if (c?.sub) {
214
- const u = c.sub.map((Y) => ({
215
- uid: Y.fileKey,
216
- name: Y.lgclFileNm,
217
- filePath: Y.filePath
213
+ ).then((s) => {
214
+ if (s?.sub) {
215
+ const c = s.sub.map((y) => ({
216
+ uid: y.fileKey,
217
+ name: y.lgclFileNm,
218
+ filePath: y.filePath
218
219
  }));
219
- l(u);
220
+ o(c);
220
221
  }
221
- }).catch((c) => {
222
- console.error("파일 목록 조회 서비스 호출에 실패했습니다.", c), z.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
222
+ }).catch((s) => {
223
+ console.error("파일 목록 조회 서비스 호출에 실패했습니다.", s), x.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
223
224
  });
224
225
  } else
225
- J(t, {
226
- crprCd: te()?.crprCd,
226
+ te(r, {
227
+ crprCd: ve()?.crprCd,
227
228
  sysCd: __SYS_CD__,
228
229
  fileGrpKey: e
229
230
  }).then((i) => {
230
231
  if (i?.sub) {
231
- const y = i.sub.map((c) => ({
232
- uid: c.fileKey,
233
- name: c.lgclFileNm,
234
- filePath: c.filePath
232
+ const f = i.sub.map((s) => ({
233
+ uid: s.fileKey,
234
+ name: s.lgclFileNm,
235
+ filePath: s.filePath
235
236
  }));
236
- l(y);
237
+ o(f);
237
238
  }
238
239
  }).catch((i) => {
239
- console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), z.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
240
+ console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), x.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
240
241
  });
241
242
  else
242
- l([]);
243
- }, [e, t, s]);
244
- const g = async (i) => {
243
+ o([]);
244
+ }, [e, r, l]);
245
+ const d = async (i) => {
245
246
  try {
246
- const c = he().findSystemByAppCd?.(s ?? __APP_CD__);
247
- if (!c || !c.sysCd) {
248
- console.error("해당 앱코드는 존재하지 않습니다.", s);
247
+ const s = Ce().findSystemByAppCd?.(l ?? __APP_CD__);
248
+ if (!s || !s.sysCd) {
249
+ console.error("해당 앱코드는 존재하지 않습니다.", l);
249
250
  return;
250
251
  }
251
- const Y = await fetch("/api/download", {
252
+ const y = await fetch("/api/download", {
252
253
  method: "POST",
253
254
  headers: {
254
- SYSCD: c.sysCd,
255
+ SYSCD: s.sysCd,
255
256
  "Content-Type": "application/json"
256
257
  // 여기에 필요한 다른 헤더(예: 인증 토큰)를 추가할 수 있습니다.
257
258
  },
@@ -261,44 +262,44 @@ const vt = (e) => {
261
262
  fileKey: i.uid
262
263
  })
263
264
  });
264
- if (!Y.ok) {
265
- const N = (await Y.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
266
- throw new Error(N);
265
+ if (!y.ok) {
266
+ const p = (await y.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
267
+ throw new Error(p);
267
268
  }
268
- const F = await Y.blob(), v = window.URL.createObjectURL(F), V = document.createElement("a");
269
- V.href = v, V.setAttribute("download", i.name), document.body.appendChild(V), V.click(), document.body.removeChild(V), window.URL.revokeObjectURL(v);
270
- } catch (y) {
271
- console.error(y), z.error(
272
- y.message || "파일을 다운로드하는 중 오류가 발생했습니다."
269
+ const g = await y.blob(), Y = window.URL.createObjectURL(g), C = document.createElement("a");
270
+ C.href = Y, C.setAttribute("download", i.name), document.body.appendChild(C), C.click(), document.body.removeChild(C), window.URL.revokeObjectURL(Y);
271
+ } catch (f) {
272
+ console.error(f), x.error(
273
+ f.message || "파일을 다운로드하는 중 오류가 발생했습니다."
273
274
  );
274
275
  }
275
276
  };
276
- return /* @__PURE__ */ a(Ve, { title: "파일 목록", children: /* @__PURE__ */ a(
277
- re,
277
+ return /* @__PURE__ */ t(Ve, { title: "파일 목록", children: /* @__PURE__ */ t(
278
+ ne,
278
279
  {
279
- dataSource: r,
280
- renderItem: (i) => /* @__PURE__ */ a(
281
- re.Item,
280
+ dataSource: n,
281
+ renderItem: (i) => /* @__PURE__ */ t(
282
+ ne.Item,
282
283
  {
283
- actions: f ? [] : [
284
- /* @__PURE__ */ a(
285
- X,
284
+ actions: u ? [] : [
285
+ /* @__PURE__ */ t(
286
+ J,
286
287
  {
287
288
  type: "text",
288
- icon: /* @__PURE__ */ a(Ue, {}),
289
- onClick: () => g(i)
289
+ icon: /* @__PURE__ */ t(Je, {}),
290
+ onClick: () => d(i)
290
291
  },
291
292
  "download"
292
293
  )
293
294
  ],
294
- children: /* @__PURE__ */ a(re.Item.Meta, { avatar: /* @__PURE__ */ a(Re, {}), title: i.name })
295
+ children: /* @__PURE__ */ t(ne.Item.Meta, { avatar: /* @__PURE__ */ t(qe, {}), title: i.name })
295
296
  }
296
297
  )
297
298
  }
298
299
  ) });
299
- }, nt = Be(
300
- ({ children: e, labelCol: t, style: f, className: s, ...r }, l) => /* @__PURE__ */ a(
301
- se,
300
+ }, Ft = je(
301
+ ({ children: e, labelCol: r, style: u, className: l, ...n }, o) => /* @__PURE__ */ t(
302
+ ie,
302
303
  {
303
304
  form: {
304
305
  /**
@@ -307,23 +308,23 @@ const vt = (e) => {
307
308
  */
308
309
  // validateMessages: { required: "'${label}을(를) 입력해주세요.'" },
309
310
  },
310
- children: /* @__PURE__ */ a(
311
- E,
311
+ children: /* @__PURE__ */ t(
312
+ D,
312
313
  {
313
- ref: l,
314
- ...r,
314
+ ref: o,
315
+ ...n,
315
316
  requiredMark: !1,
316
- labelCol: t || { flex: "100px" },
317
- style: { padding: "10px", ...f },
318
- className: `bwg-form ${s ?? ""}`,
317
+ labelCol: r || { flex: "100px" },
318
+ style: { padding: "10px", ...u },
319
+ className: `bwg-form ${l ?? ""}`,
319
320
  children: e
320
321
  }
321
322
  )
322
323
  }
323
324
  )
324
325
  );
325
- nt.displayName = "BwgForm";
326
- const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, children: /* @__PURE__ */ a(q, { ...t }) }), { Text: oe } = be, { Dragger: at } = Z, ot = [
326
+ Ft.displayName = "BwgForm";
327
+ const qt = ({ itemProps: e, inputProps: r }) => /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(X, { ...r }) }), { Text: le } = fe, { Dragger: Ct } = ee, kt = [
327
328
  ".pdf",
328
329
  ".xlsx",
329
330
  ".xls",
@@ -341,60 +342,60 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
341
342
  ".gif",
342
343
  // 압축
343
344
  ".zip"
344
- ], lt = (e, t = 2) => {
345
+ ], wt = (e, r = 2) => {
345
346
  if (e === 0) return "0 Bytes";
346
- const f = 1024, s = t < 0 ? 0 : t, r = ["Bytes", "KB", "MB", "GB", "TB"], l = Math.floor(Math.log(e) / Math.log(f));
347
- return parseFloat((e / Math.pow(f, l)).toFixed(s)) + " " + r[l];
348
- }, xt = ({
347
+ const u = 1024, l = r < 0 ? 0 : r, n = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(e) / Math.log(u));
348
+ return parseFloat((e / Math.pow(u, o)).toFixed(l)) + " " + n[o];
349
+ }, Jt = ({
349
350
  title: e = "첨부파일",
350
- fileGrpKey: t,
351
- onUploadComplete: f,
352
- onSuccessTrxCd: s = "SCMFILE00102",
351
+ fileGrpKey: r,
352
+ onUploadComplete: u,
353
+ onSuccessTrxCd: l = "SCMFILE00102",
353
354
  // BwgUploader와 동일한 기본 trxCd 설정
354
- anotherServiceTrxCd: r = "SCMFILE00105",
355
- allowedExtensions: l = ot,
356
- maxFileSize: g = 2048
355
+ anotherServiceTrxCd: n = "SCMFILE00105",
356
+ allowedExtensions: o = kt,
357
+ maxFileSize: d = 2048
357
358
  // 기본값 2GB
358
359
  }) => {
359
- const [i, y] = j([]), [c, u] = j(!1), [Y, F] = j(!1), [v, V] = j(0), R = (h) => {
360
- if (l && l.length > 0) {
361
- const x = (($) => {
362
- const o = $.lastIndexOf(".");
363
- return o === -1 ? "" : $.substring(o).toLowerCase();
360
+ const [i, f] = z([]), [s, c] = z(!1), [y, g] = z(!1), [Y, C] = z(0), O = (h) => {
361
+ if (o && o.length > 0) {
362
+ const L = ((U) => {
363
+ const a = U.lastIndexOf(".");
364
+ return a === -1 ? "" : U.substring(a).toLowerCase();
364
365
  })(h.name);
365
- if (!l.includes(x))
366
- return z.error(
367
- `${h.name} 파일은 허용되지 않는 확장자입니다. (${l.join(
366
+ if (!o.includes(L))
367
+ return x.error(
368
+ `${h.name} 파일은 허용되지 않는 확장자입니다. (${o.join(
368
369
  ", "
369
370
  )}만 가능)`
370
371
  ), !1;
371
372
  }
372
373
  return !0;
373
- }, N = async () => {
374
- const h = i.filter((C) => C.status !== "done"), L = h.reduce(
375
- (C, w) => C + (w.size || 0),
374
+ }, p = async () => {
375
+ const h = i.filter((k) => k.status !== "done"), P = h.reduce(
376
+ (k, b) => k + (b.size || 0),
376
377
  0
377
- ), x = 2 * 1024 * 1024 * 1024;
378
- if (L > x) {
379
- Ae.error({
378
+ ), L = 2 * 1024 * 1024 * 1024;
379
+ if (P > L) {
380
+ ze.error({
380
381
  message: "업로드 용량 초과",
381
382
  description: "한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."
382
383
  });
383
384
  return;
384
385
  }
385
386
  if (h.length === 0) {
386
- z.warning(
387
+ x.warning(
387
388
  "업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다."
388
389
  );
389
390
  return;
390
391
  }
391
- F(!0);
392
- let $;
392
+ g(!0);
393
+ let U;
393
394
  try {
394
- const C = new Ze();
395
- h.forEach((w) => {
396
- w.originFileObj && C.file(w.name, w.originFileObj);
397
- }), $ = await C.generateAsync({
395
+ const k = new ht();
396
+ h.forEach((b) => {
397
+ b.originFileObj && k.file(b.name, b.originFileObj);
398
+ }), U = await k.generateAsync({
398
399
  type: "blob",
399
400
  compression: "DEFLATE",
400
401
  compressionOptions: {
@@ -402,198 +403,198 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
402
403
  // 높은 압축률 설정
403
404
  }
404
405
  });
405
- } catch (C) {
406
- F(!1), z.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", C);
406
+ } catch (k) {
407
+ g(!1), x.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", k);
407
408
  return;
408
409
  }
409
- F(!1);
410
- const o = new FormData();
411
- o.append("file", $, "upload.zip"), u(!0), V(0);
410
+ g(!1);
411
+ const a = new FormData();
412
+ a.append("file", U, "upload.zip"), c(!0), C(0);
412
413
  try {
413
- const C = await new Promise((I, B) => {
414
- const O = new XMLHttpRequest();
415
- O.open("POST", "/api/upload-large", !0), O.upload.onprogress = (U) => {
416
- if (U.lengthComputable) {
417
- const ee = Math.round(
418
- U.loaded / U.total * 100
414
+ const k = await new Promise((B, A) => {
415
+ const M = new XMLHttpRequest();
416
+ M.open("POST", "/api/upload-large", !0), M.upload.onprogress = ($) => {
417
+ if ($.lengthComputable) {
418
+ const re = Math.round(
419
+ $.loaded / $.total * 100
419
420
  );
420
- V(ee);
421
+ C(re);
421
422
  }
422
- }, O.onload = () => {
423
- if (O.status >= 200 && O.status < 300)
423
+ }, M.onload = () => {
424
+ if (M.status >= 200 && M.status < 300)
424
425
  try {
425
- const U = JSON.parse(O.responseText);
426
- U.success ? I(U) : B(
427
- new Error(U.message || "파일 업로드에 실패했습니다.")
426
+ const $ = JSON.parse(M.responseText);
427
+ $.success ? B($) : A(
428
+ new Error($.message || "파일 업로드에 실패했습니다.")
428
429
  );
429
430
  } catch {
430
- B(new Error("잘못된 서버 응답입니다."));
431
+ A(new Error("잘못된 서버 응답입니다."));
431
432
  }
432
433
  else
433
434
  try {
434
- const U = JSON.parse(O.responseText);
435
- B(new Error(U.message || `서버 오류: ${O.status}`));
435
+ const $ = JSON.parse(M.responseText);
436
+ A(new Error($.message || `서버 오류: ${M.status}`));
436
437
  } catch {
437
- B(new Error(`서버 오류: ${O.status}`));
438
+ A(new Error(`서버 오류: ${M.status}`));
438
439
  }
439
- }, O.onerror = () => {
440
- B(new Error("네트워크 오류가 발생했습니다."));
441
- }, O.send(o);
440
+ }, M.onerror = () => {
441
+ A(new Error("네트워크 오류가 발생했습니다."));
442
+ }, M.send(a);
442
443
  });
443
- z.success(
444
- C.message || "압축 파일이 성공적으로 업로드되었습니다."
444
+ x.success(
445
+ k.message || "압축 파일이 성공적으로 업로드되었습니다."
445
446
  );
446
- const w = i.map(
447
- (I) => h.find((B) => B.uid === I.uid) ? { ...I, status: "done" } : I
447
+ const b = i.map(
448
+ (B) => h.find((A) => A.uid === B.uid) ? { ...B, status: "done" } : B
448
449
  );
449
- if (y(w), s && C.uploadedFiles && Array.isArray(C.uploadedFiles)) {
450
- const I = te();
451
- C.uploadedFiles.forEach((B) => {
452
- const O = {
453
- crprCd: I?.crprCd,
450
+ if (f(b), l && k.uploadedFiles && Array.isArray(k.uploadedFiles)) {
451
+ const B = ve();
452
+ k.uploadedFiles.forEach((A) => {
453
+ const M = {
454
+ crprCd: B?.crprCd,
454
455
  sysCd: __SYS_CD__,
455
- fileGrpKey: t,
456
+ fileGrpKey: r,
456
457
  sub: [
457
458
  {
458
- crprCd: I?.crprCd,
459
+ crprCd: B?.crprCd,
459
460
  sysCd: __SYS_CD__,
460
- fileGrpKey: t,
461
- physFileNm: B.fileNameP,
462
- lgclFileNm: B.fileNameL,
463
- filePath: B.filePath,
464
- fileExtn: B.fileExt,
465
- fileSize: B.fileSize,
461
+ fileGrpKey: r,
462
+ physFileNm: A.fileNameP,
463
+ lgclFileNm: A.fileNameL,
464
+ filePath: A.filePath,
465
+ fileExtn: A.fileExt,
466
+ fileSize: A.fileSize,
466
467
  mltpYn: "Y"
467
468
  }
468
469
  ]
469
470
  };
470
- J(s, O).then((U) => {
471
- const ee = i.map((W) => ({
472
- crprCd: I?.crprCd,
471
+ te(l, M).then(($) => {
472
+ const re = i.map((Z) => ({
473
+ crprCd: B?.crprCd,
473
474
  sysCd: __SYS_CD__,
474
- fileGrpKey: U.sub[0].fileGrpKey,
475
- fileKey: U.sub[0].fileKey,
476
- lgclFileNm: W.name,
477
- fileSize: W.size,
478
- fileExtn: W.name.split(".").pop(),
479
- fileType: W.type
475
+ fileGrpKey: $.sub[0].fileGrpKey,
476
+ fileKey: $.sub[0].fileKey,
477
+ lgclFileNm: Z.name,
478
+ fileSize: Z.size,
479
+ fileExtn: Z.name.split(".").pop(),
480
+ fileType: Z.type
480
481
  }));
481
- J(r, {
482
+ te(n, {
482
483
  // 파일 목록에 fileKey를 추가합니다.
483
- sub: ee
484
+ sub: re
484
485
  });
485
- }).catch((U) => {
486
- console.error("후처리 서비스 호출 실패:", U), z.error(
487
- `${B.fileNameL} 파일의 후처리 작업에 실패했습니다.`
486
+ }).catch(($) => {
487
+ console.error("후처리 서비스 호출 실패:", $), x.error(
488
+ `${A.fileNameL} 파일의 후처리 작업에 실패했습니다.`
488
489
  );
489
- }), f && f({
490
- fileNameP: B.fileNameP,
491
- fileNameL: B.fileNameL
490
+ }), u && u({
491
+ fileNameP: A.fileNameP,
492
+ fileNameL: A.fileNameL
492
493
  });
493
494
  });
494
495
  }
495
- } catch (C) {
496
- z.error(C.message || "파일 업로드 중 오류가 발생했습니다.");
497
- const w = i.map(
498
- (I) => h.find((B) => B.uid === I.uid) ? {
499
- ...I,
496
+ } catch (k) {
497
+ x.error(k.message || "파일 업로드 중 오류가 발생했습니다.");
498
+ const b = i.map(
499
+ (B) => h.find((A) => A.uid === B.uid) ? {
500
+ ...B,
500
501
  status: "error",
501
- response: C.message || "파일 업로드 중 오류가 발생했습니다."
502
- } : I
502
+ response: k.message || "파일 업로드 중 오류가 발생했습니다."
503
+ } : B
503
504
  );
504
- y(w);
505
+ f(b);
505
506
  } finally {
506
- u(!1);
507
+ c(!1);
507
508
  }
508
- }, M = {
509
+ }, E = {
509
510
  multiple: !0,
510
511
  fileList: i,
511
- beforeUpload: (h) => R(h) ? g && h.size >= g * 1024 * 1024 ? (z.error(
512
- `대용량 첨부 파일 최대 크기는 ${(g / 1024).toFixed(
512
+ beforeUpload: (h) => O(h) ? d && h.size >= d * 1024 * 1024 ? (x.error(
513
+ `대용량 첨부 파일 최대 크기는 ${(d / 1024).toFixed(
513
514
  1
514
515
  )}GB입니다.`
515
- ), Z.LIST_IGNORE) : !1 : Z.LIST_IGNORE,
516
+ ), ee.LIST_IGNORE) : !1 : ee.LIST_IGNORE,
516
517
  onChange: ({ fileList: h }) => {
517
- const L = new Map(i.map((x) => [x.uid, x]));
518
- h.forEach((x) => {
519
- L.set(x.uid, x);
520
- }), y(Array.from(L.values()));
518
+ const P = new Map(i.map((L) => [L.uid, L]));
519
+ h.forEach((L) => {
520
+ P.set(L.uid, L);
521
+ }), f(Array.from(P.values()));
521
522
  },
522
523
  onRemove: (h) => {
523
- const L = i.filter((x) => x.uid !== h.uid);
524
- y(L);
524
+ const P = i.filter((L) => L.uid !== h.uid);
525
+ f(P);
525
526
  },
526
527
  showUploadList: !1
527
528
  // 수동으로 목록을 렌더링하므로 antd의 기본 목록은 숨깁니다.
528
529
  };
529
- return /* @__PURE__ */ a(
530
- Le,
530
+ return /* @__PURE__ */ t(
531
+ Ee,
531
532
  {
532
- spinning: c || Y,
533
- tip: Y ? "파일 압축 중..." : `파일 업로드 중... ${v}%`,
534
- children: /* @__PURE__ */ P("div", { className: "bwg-large-uploader-container", children: [
535
- /* @__PURE__ */ a(
533
+ spinning: s || y,
534
+ tip: y ? "파일 압축 중..." : `파일 업로드 중... ${Y}%`,
535
+ children: /* @__PURE__ */ T("div", { className: "bwg-large-uploader-container", children: [
536
+ /* @__PURE__ */ t(
536
537
  Ve,
537
538
  {
538
- title: /* @__PURE__ */ a(oe, { strong: !0, children: e }),
539
- extra: /* @__PURE__ */ a(Z, { ...M, children: /* @__PURE__ */ a(X, { icon: /* @__PURE__ */ a(ke, {}), children: "파일 선택" }) }),
539
+ title: /* @__PURE__ */ t(le, { strong: !0, children: e }),
540
+ extra: /* @__PURE__ */ t(ee, { ...E, children: /* @__PURE__ */ t(J, { icon: /* @__PURE__ */ t(ae, {}), children: "파일 선택" }) }),
540
541
  style: { padding: 0 },
541
- children: /* @__PURE__ */ a(
542
- at,
542
+ children: /* @__PURE__ */ t(
543
+ Ct,
543
544
  {
544
- ...M,
545
+ ...E,
545
546
  style: {
546
547
  border: "none",
547
548
  background: "transparent",
548
549
  padding: 0
549
550
  },
550
- children: /* @__PURE__ */ a("div", { className: "upload-list-container", children: i.length > 0 ? /* @__PURE__ */ a(
551
- re,
551
+ children: /* @__PURE__ */ t("div", { className: "upload-list-container", children: i.length > 0 ? /* @__PURE__ */ t(
552
+ ne,
552
553
  {
553
554
  style: { textAlign: "left" },
554
555
  dataSource: i,
555
556
  renderItem: (h) => {
556
- const L = h.status === "done", x = h.status === "error";
557
- let $;
558
- return L ? $ = /* @__PURE__ */ a(
559
- Ke,
557
+ const P = h.status === "done", L = h.status === "error";
558
+ let U;
559
+ return P ? U = /* @__PURE__ */ t(
560
+ et,
560
561
  {
561
562
  style: { color: "#52c41a", fontSize: 14 }
562
563
  }
563
- ) : x ? $ = /* @__PURE__ */ a(
564
- Me,
564
+ ) : L ? U = /* @__PURE__ */ t(
565
+ Re,
565
566
  {
566
567
  title: typeof h.response == "string" ? h.response : "업로드 실패",
567
- children: /* @__PURE__ */ a(
568
- Pe,
568
+ children: /* @__PURE__ */ t(
569
+ tt,
569
570
  {
570
571
  style: { color: "#ff4d4f", fontSize: 14 }
571
572
  }
572
573
  )
573
574
  }
574
- ) : $ = /* @__PURE__ */ a(Ge, { style: { fontSize: 14 } }), /* @__PURE__ */ a(
575
- re.Item,
575
+ ) : U = /* @__PURE__ */ t(nt, { style: { fontSize: 14 } }), /* @__PURE__ */ t(
576
+ ne.Item,
576
577
  {
577
578
  actions: [
578
- /* @__PURE__ */ a(oe, { type: "secondary", children: lt(h.size || 0) }, "size"),
579
- /* @__PURE__ */ a(
580
- X,
579
+ /* @__PURE__ */ t(le, { type: "secondary", children: wt(h.size || 0) }, "size"),
580
+ /* @__PURE__ */ t(
581
+ J,
581
582
  {
582
583
  type: "text",
583
- icon: /* @__PURE__ */ a(Te, {}),
584
- onClick: (o) => {
585
- o.stopPropagation(), M.onRemove?.(h);
584
+ icon: /* @__PURE__ */ t(Ze, {}),
585
+ onClick: (a) => {
586
+ a.stopPropagation(), E.onRemove?.(h);
586
587
  },
587
- disabled: c || Y
588
+ disabled: s || y
588
589
  },
589
590
  "delete"
590
591
  )
591
592
  ],
592
- children: /* @__PURE__ */ a(
593
- re.Item.Meta,
593
+ children: /* @__PURE__ */ t(
594
+ ne.Item.Meta,
594
595
  {
595
- avatar: $,
596
- title: /* @__PURE__ */ a(oe, { type: x ? "danger" : void 0, children: h.name })
596
+ avatar: U,
597
+ title: /* @__PURE__ */ t(le, { type: L ? "danger" : void 0, children: h.name })
597
598
  }
598
599
  )
599
600
  },
@@ -601,8 +602,8 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
601
602
  );
602
603
  }
603
604
  }
604
- ) : /* @__PURE__ */ P(
605
- ge,
605
+ ) : /* @__PURE__ */ T(
606
+ ye,
606
607
  {
607
608
  gap: "middle",
608
609
  align: "center",
@@ -610,8 +611,8 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
610
611
  vertical: !0,
611
612
  style: { padding: "20px 0", minHeight: "120px" },
612
613
  children: [
613
- /* @__PURE__ */ a(je, { style: { fontSize: "32px", color: "#999" } }),
614
- /* @__PURE__ */ a(oe, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
614
+ /* @__PURE__ */ t(De, { style: { fontSize: "32px", color: "#999" } }),
615
+ /* @__PURE__ */ t(le, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
615
616
  ]
616
617
  }
617
618
  ) })
@@ -619,22 +620,22 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
619
620
  )
620
621
  }
621
622
  ),
622
- i.length > 0 && /* @__PURE__ */ P(
623
- ge,
623
+ i.length > 0 && /* @__PURE__ */ T(
624
+ ye,
624
625
  {
625
626
  justify: "flex-end",
626
627
  align: "center",
627
628
  gap: "large",
628
629
  style: { marginTop: 16 },
629
630
  children: [
630
- c && /* @__PURE__ */ a("div", { style: { width: "250px" }, children: /* @__PURE__ */ a(ve, { percent: v, size: "small" }) }),
631
- /* @__PURE__ */ a(
632
- X,
631
+ s && /* @__PURE__ */ t("div", { style: { width: "250px" }, children: /* @__PURE__ */ t(Ue, { percent: Y, size: "small" }) }),
632
+ /* @__PURE__ */ t(
633
+ J,
633
634
  {
634
635
  type: "primary",
635
- onClick: N,
636
- disabled: c || Y || i.filter((h) => h.status !== "done").length === 0,
637
- icon: /* @__PURE__ */ a(He, {}),
636
+ onClick: p,
637
+ disabled: s || y || i.filter((h) => h.status !== "done").length === 0,
638
+ icon: /* @__PURE__ */ t(Qe, {}),
638
639
  children: "일괄 업로드"
639
640
  }
640
641
  )
@@ -644,35 +645,35 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
644
645
  ] })
645
646
  }
646
647
  );
647
- }, st = (e) => {
648
+ }, Yt = (e) => {
648
649
  if (typeof e == "string")
649
650
  return e.replace(/0/g, "_");
650
651
  if (Array.isArray(e))
651
652
  return e[0].replace(/0/g, "_");
652
653
  if (typeof e == "object" && "mask" in e && "blocks" in e) {
653
- const { mask: t, blocks: f } = e;
654
- return t.split(".").map((s) => {
655
- const l = f?.[s]?.maxLength ?? 3;
656
- return "_".repeat(l);
654
+ const { mask: r, blocks: u } = e;
655
+ return r.split(".").map((l) => {
656
+ const o = u?.[l]?.maxLength ?? 3;
657
+ return "_".repeat(o);
657
658
  }).join(".");
658
659
  }
659
660
  return "";
660
- }, Bt = ({
661
+ }, Zt = ({
661
662
  itemProps: e,
662
- inputProps: t,
663
- mask: f
663
+ inputProps: r,
664
+ mask: u
664
665
  }) => {
665
- const s = K(null), r = E.useFormInstance(), l = Q(() => st(f), [f]);
666
+ const l = K(null), n = D.useFormInstance(), o = q(() => Yt(u), [u]);
666
667
  return G(() => {
667
- if (!s.current?.input) return;
668
- const g = typeof f == "string" || Array.isArray(f) ? { mask: f } : f, i = le(s.current.input, g);
668
+ if (!l.current?.input) return;
669
+ const d = typeof u == "string" || Array.isArray(u) ? { mask: u } : u, i = se(l.current.input, d);
669
670
  return i.on("accept", () => {
670
- r && e?.name && r.setFieldValue(e.name, i.value);
671
+ n && e?.name && n.setFieldValue(e.name, i.value);
671
672
  }), () => {
672
673
  i.destroy();
673
674
  };
674
- }, [f, r, e?.name]), /* @__PURE__ */ a(T, { ...e, children: /* @__PURE__ */ a(q, { ...t, ref: s, placeholder: l }) });
675
- }, it = (e) => {
675
+ }, [u, n, e?.name]), /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(X, { ...r, ref: l, placeholder: o }) });
676
+ }, bt = (e) => {
676
677
  switch (e) {
677
678
  case "year":
678
679
  return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
@@ -686,69 +687,69 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
686
687
  outputFormat: "YYYYMMDD"
687
688
  };
688
689
  }
689
- }, Ot = ({
690
+ }, Qt = ({
690
691
  type: e = "date",
691
- itemProps: t = { name: "calendar" },
692
- inputProps: f,
693
- pickerProps: s
692
+ itemProps: r = { name: "calendar" },
693
+ inputProps: u,
694
+ pickerProps: l
694
695
  }) => {
695
- const { format: r, mask: l, outputFormat: g } = it(e), i = K(null), y = K(null), c = K(null), u = E.useFormInstance(), [Y, F] = j(!1), [v, V] = j(!1), R = t?.name, [N, M] = j(null), h = E.useWatch(R, u), L = we();
696
+ const { format: n, mask: o, outputFormat: d } = bt(e), i = K(null), f = K(null), s = K(null), c = D.useFormInstance(), [y, g] = z(!1), [Y, C] = z(!1), O = r?.name, [p, E] = z(null), h = D.useWatch(O, c), P = xe();
696
697
  G(() => {
697
698
  if (!i.current?.input) return;
698
- const o = le(i.current.input, {
699
- mask: l,
699
+ const a = se(i.current.input, {
700
+ mask: o,
700
701
  lazy: !1
701
702
  });
702
- return y.current = o, o.on("accept", () => {
703
- const C = o.value;
704
- C.length > 0 && F(!0);
705
- const w = _(C, r, !0);
706
- C.length === r.length && w.isValid() && (u.setFieldValue(R, w.format(g)), M(w), y.current?.updateValue());
703
+ return f.current = a, a.on("accept", () => {
704
+ const k = a.value;
705
+ k.length > 0 && g(!0);
706
+ const b = N(k, n, !0);
707
+ k.length === n.length && b.isValid() && (c.setFieldValue(O, b.format(d)), E(b), f.current?.updateValue());
707
708
  }), () => {
708
- o.destroy();
709
+ a.destroy();
709
710
  };
710
- }, [r, l]), G(() => {
711
+ }, [n, o]), G(() => {
711
712
  if (!h) {
712
- M(null);
713
+ E(null);
713
714
  return;
714
715
  }
715
- let o = null;
716
- if (typeof h == "string" && h.length === g.length && /^\d+$/.test(h))
716
+ let a = null;
717
+ if (typeof h == "string" && h.length === d.length && /^\d+$/.test(h))
717
718
  if (e === "date") {
718
- const C = h.substring(0, 4), w = h.substring(4, 6), I = h.substring(6, 8);
719
- o = _(`${C}-${w}-${I}`, r, !0);
719
+ const k = h.substring(0, 4), b = h.substring(4, 6), B = h.substring(6, 8);
720
+ a = N(`${k}-${b}-${B}`, n, !0);
720
721
  } else if (e === "month") {
721
- const C = h.substring(0, 4), w = h.substring(4, 6);
722
- o = _(`${C}-${w}`, r, !0);
723
- } else e === "year" && (o = _(h, r, !0));
722
+ const k = h.substring(0, 4), b = h.substring(4, 6);
723
+ a = N(`${k}-${b}`, n, !0);
724
+ } else e === "year" && (a = N(h, n, !0));
724
725
  else
725
- o = _(h, r, !0);
726
- o && o.isValid() ? M(o) : M(null), V(!1);
727
- }, [h, r, g, e]);
728
- const x = (o) => {
729
- if (!o) {
730
- u.setFieldValue(R, void 0), M(null), y.current?.updateValue();
726
+ a = N(h, n, !0);
727
+ a && a.isValid() ? E(a) : E(null), C(!1);
728
+ }, [h, n, d, e]);
729
+ const L = (a) => {
730
+ if (!a) {
731
+ c.setFieldValue(O, void 0), E(null), f.current?.updateValue();
731
732
  return;
732
733
  }
733
- M(o);
734
- const C = o.format(g);
735
- u.setFieldValue(R, C), y.current && (y.current.value = o.format(r), y.current.updateValue()), V(!1);
736
- }, $ = (o) => {
734
+ E(a);
735
+ const k = a.format(d);
736
+ c.setFieldValue(O, k), f.current && (f.current.value = a.format(n), f.current.updateValue()), C(!1);
737
+ }, U = (a) => {
737
738
  setTimeout(() => {
738
- const C = document.activeElement, w = c.current, I = w?.querySelector(".ant-picker-dropdown");
739
- !(w && (w.contains(C) || w === C || I?.contains(C))) && !(o !== void 0 ? o : Y) && console.log("✅ Input과 DatePicker 모두 포커스가 없습니다");
739
+ const k = document.activeElement, b = s.current, B = b?.querySelector(".ant-picker-dropdown");
740
+ !(b && (b.contains(k) || b === k || B?.contains(k))) && !(a !== void 0 ? a : y) && console.log("✅ Input과 DatePicker 모두 포커스가 없습니다");
740
741
  }, 0);
741
742
  };
742
- return /* @__PURE__ */ a(
743
- T,
743
+ return /* @__PURE__ */ t(
744
+ R,
744
745
  {
745
- ...t,
746
+ ...r,
746
747
  name: void 0,
747
- validateStatus: v ? "warning" : void 0,
748
- children: /* @__PURE__ */ P(
749
- se,
748
+ validateStatus: Y ? "warning" : void 0,
749
+ children: /* @__PURE__ */ T(
750
+ ie,
750
751
  {
751
- componentSize: L.componentSize,
752
+ componentSize: P.componentSize,
752
753
  theme: {
753
754
  components: {
754
755
  Input: {
@@ -757,63 +758,63 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
757
758
  }
758
759
  },
759
760
  children: [
760
- /* @__PURE__ */ a(
761
- E.Item,
761
+ /* @__PURE__ */ t(
762
+ D.Item,
762
763
  {
763
- name: R,
764
- getValueProps: (o) => ({
765
- value: o ? _(o).format(r) : void 0
764
+ name: O,
765
+ getValueProps: (a) => ({
766
+ value: a ? N(a).format(n) : void 0
766
767
  }),
767
- normalize: (o) => o ? _(o).format(g) : void 0,
768
+ normalize: (a) => a ? N(a).format(d) : void 0,
768
769
  noStyle: !0,
769
- rules: t?.rules ?? [],
770
- children: /* @__PURE__ */ a(
771
- q,
770
+ rules: r?.rules ?? [],
771
+ children: /* @__PURE__ */ t(
772
+ X,
772
773
  {
773
- ...f,
774
+ ...u,
774
775
  ref: i,
775
776
  onFocus: () => {
776
- F(!Y), y.current?.updateValue();
777
+ g(!y), f.current?.updateValue();
777
778
  },
778
779
  onBlur: () => {
779
- $();
780
+ U();
780
781
  },
781
- onKeyDown: (o) => {
782
- if (o.key === "Backspace" && F(!0), o.key === "Tab" && F(!1), o.key === "Enter")
783
- if (Y) {
784
- const C = y.current?.value || "", w = _(C, r, !0);
785
- C.length === r.length && w.isValid() ? (F(!1), V(!1)) : V(!0);
782
+ onKeyDown: (a) => {
783
+ if (a.key === "Backspace" && g(!0), a.key === "Tab" && g(!1), a.key === "Enter")
784
+ if (y) {
785
+ const k = f.current?.value || "", b = N(k, n, !0);
786
+ k.length === n.length && b.isValid() ? (g(!1), C(!1)) : C(!0);
786
787
  } else
787
- F(!0);
788
+ g(!0);
788
789
  },
789
790
  style: {
790
791
  width: "65%"
791
792
  },
792
793
  allowClear: !0,
793
- placeholder: l.replace(/0/g, "_"),
794
- suffix: /* @__PURE__ */ a(de, { style: { color: "#d9d9d9" } }),
794
+ placeholder: o.replace(/0/g, "_"),
795
+ suffix: /* @__PURE__ */ t(me, { style: { color: "#d9d9d9" } }),
795
796
  autoComplete: "off"
796
797
  }
797
798
  )
798
799
  }
799
800
  ),
800
- /* @__PURE__ */ a(
801
- ie,
801
+ /* @__PURE__ */ t(
802
+ ce,
802
803
  {
803
- ...s,
804
- open: Y,
804
+ ...l,
805
+ open: y,
805
806
  picker: e,
806
807
  format: {
807
- format: r,
808
+ format: n,
808
809
  type: "mask"
809
810
  },
810
811
  showNow: !0,
811
- value: N,
812
- onChange: x,
813
- onOpenChange: (o) => {
814
- F(o), o || $(!1);
812
+ value: p,
813
+ onChange: L,
814
+ onOpenChange: (a) => {
815
+ g(a), a || U(!1);
815
816
  },
816
- renderExtraFooter: () => v ? /* @__PURE__ */ P(
817
+ renderExtraFooter: () => Y ? /* @__PURE__ */ T(
817
818
  "div",
818
819
  {
819
820
  style: {
@@ -827,12 +828,12 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
827
828
  backgroundColor: "#fffbe6"
828
829
  },
829
830
  children: [
830
- /* @__PURE__ */ a(Se, {}),
831
- /* @__PURE__ */ a("span", { children: "유효하지 않은 날짜입니다" })
831
+ /* @__PURE__ */ t(Ie, {}),
832
+ /* @__PURE__ */ t("span", { children: "유효하지 않은 날짜입니다" })
832
833
  ]
833
834
  }
834
835
  ) : null,
835
- getPopupContainer: (o) => o.parentElement,
836
+ getPopupContainer: (a) => a.parentElement,
836
837
  style: {
837
838
  position: "absolute",
838
839
  top: 0,
@@ -848,7 +849,7 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
848
849
  )
849
850
  }
850
851
  );
851
- }, { RangePicker: ct } = ie, ut = (e) => {
852
+ }, { RangePicker: St } = ce, Vt = (e) => {
852
853
  switch (e) {
853
854
  case "year":
854
855
  return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
@@ -862,231 +863,231 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
862
863
  outputFormat: "YYYYMMDD"
863
864
  };
864
865
  }
865
- }, zt = ({
866
+ }, en = ({
866
867
  type: e = "date",
867
- itemProps: t = { name: "dateRange" },
868
- inputProps: f,
869
- pickerProps: s
868
+ itemProps: r = { name: "dateRange" },
869
+ inputProps: u,
870
+ pickerProps: l
870
871
  }) => {
871
- const { format: r, mask: l, outputFormat: g } = ut(e), i = K(null), y = K(null), c = K(null), u = K(null), Y = K(null), F = E.useFormInstance(), [v, V] = j(!1), [R, N] = j(!1), [M, h] = j(null), [L, x] = j(!1), $ = K(!1), o = t?.name, [C, w] = j([
872
+ const { format: n, mask: o, outputFormat: d } = Vt(e), i = K(null), f = K(null), s = K(null), c = K(null), y = K(null), g = D.useFormInstance(), [Y, C] = z(!1), [O, p] = z(!1), [E, h] = z(null), [P, L] = z(!1), U = K(!1), a = r?.name, [k, b] = z([
872
873
  null,
873
874
  null
874
- ]), I = E.useWatch(
875
- o ? Array.isArray(o) ? [...o, 0] : [o, 0] : void 0,
876
- F
877
- ), B = E.useWatch(
878
- o ? Array.isArray(o) ? [...o, 1] : [o, 1] : void 0,
879
- F
880
- ), O = E.useWatch(o, F), U = we();
875
+ ]), B = D.useWatch(
876
+ a ? Array.isArray(a) ? [...a, 0] : [a, 0] : void 0,
877
+ g
878
+ ), A = D.useWatch(
879
+ a ? Array.isArray(a) ? [...a, 1] : [a, 1] : void 0,
880
+ g
881
+ ), M = D.useWatch(a, g), $ = xe();
881
882
  G(() => {
882
883
  if (!i.current?.input) return;
883
- const n = le(i.current.input, {
884
- mask: l,
884
+ const m = se(i.current.input, {
885
+ mask: o,
885
886
  lazy: !1
886
887
  });
887
- return c.current = n, n.on("accept", () => {
888
- const m = n.value, p = n.unmaskedValue || "";
888
+ return s.current = m, m.on("accept", () => {
889
+ const F = m.value, V = m.unmaskedValue || "";
889
890
  if (console.log("🔵 [시작일] accept 이벤트:", {
890
- maskValue: m,
891
- unmaskedValue: p,
892
- length: m.length,
893
- formatLength: r.length
894
- }), m.length > 0 && (h("start"), V(!0), x(!1)), p.length === g.length) {
895
- const d = _(m, r, !0);
896
- if (d.isValid()) {
891
+ maskValue: F,
892
+ unmaskedValue: V,
893
+ length: F.length,
894
+ formatLength: n.length
895
+ }), F.length > 0 && (h("start"), C(!0), L(!1)), V.length === d.length) {
896
+ const w = N(F, n, !0);
897
+ if (w.isValid()) {
897
898
  console.log("🔵 [시작일] 입력 완료 및 검증 통과:", {
898
- parsed: d.format(r)
899
+ parsed: w.format(n)
899
900
  });
900
- const A = d.format(g);
901
- $.current = !0;
902
- const k = Array.isArray(o) ? [...o, 0] : [o, 0];
903
- F.setFieldValue(k, A), w([d, C[1]]), c.current && c.current.updateValue(), N(!1), setTimeout(() => {
904
- u.current && (u.current.value = "", u.current.unmaskedValue = "", u.current.updateValue());
905
- const b = Array.isArray(o) ? [...o, 1] : [o, 1];
906
- F.getFieldValue(b) || F.setFieldValue(b, void 0), y.current?.focus(), setTimeout(() => {
907
- if (u.current) {
908
- const D = u.current.value || "";
909
- !(u.current.unmaskedValue || "") && !D.replace(/[^0-9]/g, "") && (u.current.value = "", u.current.updateValue());
901
+ const H = w.format(d);
902
+ U.current = !0;
903
+ const S = Array.isArray(a) ? [...a, 0] : [a, 0];
904
+ g.setFieldValue(S, H), b([w, k[1]]), s.current && s.current.updateValue(), p(!1), setTimeout(() => {
905
+ c.current && (c.current.value = "", c.current.unmaskedValue = "", c.current.updateValue());
906
+ const I = Array.isArray(a) ? [...a, 1] : [a, 1];
907
+ g.getFieldValue(I) || g.setFieldValue(I, void 0), f.current?.focus(), setTimeout(() => {
908
+ if (c.current) {
909
+ const W = c.current.value || "";
910
+ !(c.current.unmaskedValue || "") && !W.replace(/[^0-9]/g, "") && (c.current.value = "", c.current.updateValue());
910
911
  }
911
- }, 10), h("end"), V(!0), $.current = !1;
912
+ }, 10), h("end"), C(!0), U.current = !1;
912
913
  }, 0);
913
914
  } else
914
- s?.allowEmpty ? N(!1) : (console.log("🔵 [시작일] 검증 실패:", { val: m, parsed: d }), N(!0));
915
+ l?.allowEmpty ? p(!1) : (console.log("🔵 [시작일] 검증 실패:", { val: F, parsed: w }), p(!0));
915
916
  }
916
917
  }), () => {
917
- n.destroy();
918
+ m.destroy();
918
919
  };
919
- }, [r, l, o]), G(() => {
920
- if (!y.current?.input) return;
921
- const n = le(y.current.input, {
922
- mask: l,
920
+ }, [n, o, a]), G(() => {
921
+ if (!f.current?.input) return;
922
+ const m = se(f.current.input, {
923
+ mask: o,
923
924
  lazy: !1
924
925
  });
925
- return u.current = n, n.on("accept", () => {
926
- const m = n.value, p = n.unmaskedValue || "";
926
+ return c.current = m, m.on("accept", () => {
927
+ const F = m.value, V = m.unmaskedValue || "";
927
928
  if (console.log("🟢 [종료일] accept 이벤트:", {
928
- maskValue: m,
929
- unmaskedValue: p,
930
- length: m.length,
931
- formatLength: r.length
932
- }), p === "" || p.length === 0) {
933
- const d = Array.isArray(o) ? [...o, 1] : [o, 1];
934
- F.setFieldValue(d, void 0), w([C[0], null]), u.current && (u.current.value = "", u.current.updateValue()), setTimeout(() => {
935
- i.current?.focus(), h("start"), V(!0);
929
+ maskValue: F,
930
+ unmaskedValue: V,
931
+ length: F.length,
932
+ formatLength: n.length
933
+ }), V === "" || V.length === 0) {
934
+ const w = Array.isArray(a) ? [...a, 1] : [a, 1];
935
+ g.setFieldValue(w, void 0), b([k[0], null]), c.current && (c.current.value = "", c.current.updateValue()), setTimeout(() => {
936
+ i.current?.focus(), h("start"), C(!0);
936
937
  }, 0);
937
938
  return;
938
939
  }
939
- if (m.length > 0 && (h("end"), V(!0)), m.length < r.length) {
940
- N(!1);
940
+ if (F.length > 0 && (h("end"), C(!0)), F.length < n.length) {
941
+ p(!1);
941
942
  return;
942
943
  }
943
- if (p.length === g.length) {
944
- const d = _(m, r, !0);
945
- if (d.isValid()) {
946
- const A = d.format(g);
944
+ if (V.length === d.length) {
945
+ const w = N(F, n, !0);
946
+ if (w.isValid()) {
947
+ const H = w.format(d);
947
948
  console.log("🟢 [종료일] 입력 완료:", {
948
- parsed: d.format(r),
949
- formatted: A
950
- }), $.current = !0;
951
- const k = Array.isArray(o) ? [...o, 1] : [o, 1];
952
- F.setFieldValue(k, A), w([C[0], d]), u.current?.updateValue(), setTimeout(() => {
953
- $.current = !1;
949
+ parsed: w.format(n),
950
+ formatted: H
951
+ }), U.current = !0;
952
+ const S = Array.isArray(a) ? [...a, 1] : [a, 1];
953
+ g.setFieldValue(S, H), b([k[0], w]), c.current?.updateValue(), setTimeout(() => {
954
+ U.current = !1;
954
955
  }, 0);
955
956
  } else
956
- s?.allowEmpty ? N(!1) : (console.log("🟢 [종료일] 검증 실패:", { val: m, parsed: d }), N(!0));
957
+ l?.allowEmpty ? p(!1) : (console.log("🟢 [종료일] 검증 실패:", { val: F, parsed: w }), p(!0));
957
958
  }
958
959
  }), () => {
959
- n.destroy();
960
+ m.destroy();
960
961
  };
961
- }, [r, l, o]), G(() => {
962
+ }, [n, o, a]), G(() => {
962
963
  console.log("🟡 [useEffect] form 값 변경 감지:", {
963
- startFormValue: I,
964
- endFormValue: B,
965
- formValue: O
964
+ startFormValue: B,
965
+ endFormValue: A,
966
+ formValue: M
966
967
  });
967
- const n = I ?? (Array.isArray(O) ? O[0] : null), m = B ?? (Array.isArray(O) ? O[1] : null);
968
- if (n === void 0 && m === void 0 && (!O || !Array.isArray(O))) {
969
- w([null, null]);
968
+ const m = B ?? (Array.isArray(M) ? M[0] : null), F = A ?? (Array.isArray(M) ? M[1] : null);
969
+ if (m === void 0 && F === void 0 && (!M || !Array.isArray(M))) {
970
+ b([null, null]);
970
971
  return;
971
972
  }
972
- const p = (k) => {
973
- if (!k) return null;
974
- let b = null;
975
- if (typeof k == "string" && k.length === g.length && /^\d+$/.test(k))
973
+ const V = (S) => {
974
+ if (!S) return null;
975
+ let I = null;
976
+ if (typeof S == "string" && S.length === d.length && /^\d+$/.test(S))
976
977
  if (e === "date") {
977
- const S = k.substring(0, 4), D = k.substring(4, 6), H = k.substring(6, 8);
978
- b = _(`${S}-${D}-${H}`, r, !0);
978
+ const _ = S.substring(0, 4), W = S.substring(4, 6), pe = S.substring(6, 8);
979
+ I = N(`${_}-${W}-${pe}`, n, !0);
979
980
  } else if (e === "month") {
980
- const S = k.substring(0, 4), D = k.substring(4, 6);
981
- b = _(`${S}-${D}`, r, !0);
982
- } else e === "year" && (b = _(k, r, !0));
981
+ const _ = S.substring(0, 4), W = S.substring(4, 6);
982
+ I = N(`${_}-${W}`, n, !0);
983
+ } else e === "year" && (I = N(S, n, !0));
983
984
  else
984
- b = _(k, r, !0);
985
- return b && b.isValid() ? b : null;
986
- }, d = p(n), A = p(m);
985
+ I = N(S, n, !0);
986
+ return I && I.isValid() ? I : null;
987
+ }, w = V(m), H = V(F);
987
988
  if (console.log("🟡 [useEffect] 파싱 결과:", {
988
- startParsed: d ? d.format(r) : null,
989
- endParsed: A ? A.format(r) : null,
990
- isStartDateFromPicker: L
991
- }), w([d, A]), $.current) {
992
- console.log("🟡 [useEffect] 사용자 입력 중 - 마스크 값 업데이트 스킵"), N(!1);
989
+ startParsed: w ? w.format(n) : null,
990
+ endParsed: H ? H.format(n) : null,
991
+ isStartDateFromPicker: P
992
+ }), b([w, H]), U.current) {
993
+ console.log("🟡 [useEffect] 사용자 입력 중 - 마스크 값 업데이트 스킵"), p(!1);
993
994
  return;
994
995
  }
995
- if (!L && c.current) {
996
- const k = c.current.value || "", b = d ? d.format(r) : "", S = c.current.unmaskedValue || "", D = d ? d.format(g) : "";
996
+ if (!P && s.current) {
997
+ const S = s.current.value || "", I = w ? w.format(n) : "", _ = s.current.unmaskedValue || "", W = w ? w.format(d) : "";
997
998
  console.log("🟡 [useEffect] 시작일 마스크 값 체크:", {
998
- currentMaskValue: k,
999
- expectedMaskValue: b,
1000
- unmaskedValue: S,
1001
- expectedUnmasked: D,
1002
- shouldUpdate: k === "" || k !== b,
1003
- canUpdate: S === "" || S === D
1004
- }), (k === "" || k !== b) && (S === "" || S === D ? (console.log("🟡 [useEffect] 시작일 마스크 값 업데이트:", {
1005
- before: k,
1006
- after: d ? d.format(r) : ""
1007
- }), d ? (c.current.value = d.format(r), c.current.updateValue()) : (c.current.value = "", c.current.updateValue())) : console.log(
999
+ currentMaskValue: S,
1000
+ expectedMaskValue: I,
1001
+ unmaskedValue: _,
1002
+ expectedUnmasked: W,
1003
+ shouldUpdate: S === "" || S !== I,
1004
+ canUpdate: _ === "" || _ === W
1005
+ }), (S === "" || S !== I) && (_ === "" || _ === W ? (console.log("🟡 [useEffect] 시작일 마스크 값 업데이트:", {
1006
+ before: S,
1007
+ after: w ? w.format(n) : ""
1008
+ }), w ? (s.current.value = w.format(n), s.current.updateValue()) : (s.current.value = "", s.current.updateValue())) : console.log(
1008
1009
  "🟡 [useEffect] 시작일 마스크 값 업데이트 스킵 (사용자 입력 중)"
1009
1010
  ));
1010
1011
  }
1011
- if (u.current) {
1012
- const k = u.current.value || "", b = A ? A.format(r) : "", S = u.current.unmaskedValue || "", D = A ? A.format(g) : "";
1012
+ if (c.current) {
1013
+ const S = c.current.value || "", I = H ? H.format(n) : "", _ = c.current.unmaskedValue || "", W = H ? H.format(d) : "";
1013
1014
  console.log("🟡 [useEffect] 종료일 마스크 값 체크:", {
1014
- currentMaskValue: k,
1015
- expectedMaskValue: b,
1016
- unmaskedValue: S,
1017
- expectedUnmasked: D,
1018
- shouldUpdate: k === "" || k !== b,
1019
- canUpdate: S === "" || S === D
1020
- }), (k === "" || k !== b) && (S === "" || S === D ? (console.log("🟡 [useEffect] 종료일 마스크 값 업데이트:", {
1021
- before: k,
1022
- after: b
1023
- }), A ? (u.current.value = A.format(r), u.current.updateValue()) : (u.current.value = "", u.current.updateValue())) : console.log(
1015
+ currentMaskValue: S,
1016
+ expectedMaskValue: I,
1017
+ unmaskedValue: _,
1018
+ expectedUnmasked: W,
1019
+ shouldUpdate: S === "" || S !== I,
1020
+ canUpdate: _ === "" || _ === W
1021
+ }), (S === "" || S !== I) && (_ === "" || _ === W ? (console.log("🟡 [useEffect] 종료일 마스크 값 업데이트:", {
1022
+ before: S,
1023
+ after: I
1024
+ }), H ? (c.current.value = H.format(n), c.current.updateValue()) : (c.current.value = "", c.current.updateValue())) : console.log(
1024
1025
  "🟡 [useEffect] 종료일 마스크 값 업데이트 스킵 (사용자 입력 중)"
1025
1026
  ));
1026
1027
  }
1027
- N(!1);
1028
- }, [I, B, O, r, g, e]);
1029
- const ee = (n) => {
1028
+ p(!1);
1029
+ }, [B, A, M, n, d, e]);
1030
+ const re = (m) => {
1030
1031
  if (console.log("🔴 [RangePicker] 날짜 변경:", {
1031
- dates: n ? [
1032
- n[0] ? n[0].format(r) : null,
1033
- n[1] ? n[1].format(r) : null
1032
+ dates: m ? [
1033
+ m[0] ? m[0].format(n) : null,
1034
+ m[1] ? m[1].format(n) : null
1034
1035
  ] : null,
1035
1036
  prevRange: [
1036
- C[0] ? C[0].format(r) : null,
1037
- C[1] ? C[1].format(r) : null
1037
+ k[0] ? k[0].format(n) : null,
1038
+ k[1] ? k[1].format(n) : null
1038
1039
  ]
1039
- }), !n) {
1040
- w([null, null]);
1041
- const b = Array.isArray(o) ? [...o, 0] : [o, 0], S = Array.isArray(o) ? [...o, 1] : [o, 1];
1042
- F.setFieldValue(b, void 0), F.setFieldValue(S, void 0), c.current?.updateValue(), u.current?.updateValue();
1040
+ }), !m) {
1041
+ b([null, null]);
1042
+ const I = Array.isArray(a) ? [...a, 0] : [a, 0], _ = Array.isArray(a) ? [...a, 1] : [a, 1];
1043
+ g.setFieldValue(I, void 0), g.setFieldValue(_, void 0), s.current?.updateValue(), c.current?.updateValue();
1043
1044
  return;
1044
1045
  }
1045
- const [m, p] = n, d = C[0], A = m && (!d || !m.isSame(
1046
- d,
1046
+ const [F, V] = m, w = k[0], H = F && (!w || !F.isSame(
1047
+ w,
1047
1048
  e === "year" ? "year" : e === "month" ? "month" : "day"
1048
1049
  ));
1049
1050
  if (console.log("🔴 [RangePicker] 시작일 변경 여부:", {
1050
- isStartDateChanged: A,
1051
- startDate: m ? m.format(r) : null,
1052
- prevStartDate: d ? d.format(r) : null
1053
- }), w([m, p]), A) {
1054
- console.log("🔴 [RangePicker] 시작일 선택됨 - input 비우기"), x(!0), c.current && (c.current.value = "", c.current.updateValue());
1055
- const b = m.format(g);
1051
+ isStartDateChanged: H,
1052
+ startDate: F ? F.format(n) : null,
1053
+ prevStartDate: w ? w.format(n) : null
1054
+ }), b([F, V]), H) {
1055
+ console.log("🔴 [RangePicker] 시작일 선택됨 - input 비우기"), L(!0), s.current && (s.current.value = "", s.current.updateValue());
1056
+ const I = F.format(d);
1056
1057
  console.log("🔴 [RangePicker] form 값 업데이트:", {
1057
- formatted: b
1058
+ formatted: I
1058
1059
  });
1059
- const S = Array.isArray(o) ? [...o, 0] : [o, 0];
1060
- F.setFieldValue(S, b);
1061
- } else if (!m && c.current) {
1062
- x(!1), c.current.value = "", c.current.updateValue();
1063
- const b = Array.isArray(o) ? [...o, 0] : [o, 0];
1064
- F.setFieldValue(b, void 0);
1060
+ const _ = Array.isArray(a) ? [...a, 0] : [a, 0];
1061
+ g.setFieldValue(_, I);
1062
+ } else if (!F && s.current) {
1063
+ L(!1), s.current.value = "", s.current.updateValue();
1064
+ const I = Array.isArray(a) ? [...a, 0] : [a, 0];
1065
+ g.setFieldValue(I, void 0);
1065
1066
  } else
1066
- x(!1);
1067
- const k = Array.isArray(o) ? [...o, 1] : [o, 1];
1068
- if (p) {
1069
- const b = p.format(g);
1070
- F.setFieldValue(k, b), u.current && (u.current.value = p.format(r), u.current.updateValue());
1067
+ L(!1);
1068
+ const S = Array.isArray(a) ? [...a, 1] : [a, 1];
1069
+ if (V) {
1070
+ const I = V.format(d);
1071
+ g.setFieldValue(S, I), c.current && (c.current.value = V.format(n), c.current.updateValue());
1071
1072
  } else
1072
- F.setFieldValue(k, void 0), u.current && (u.current.value = "", u.current.updateValue());
1073
- N(!1);
1074
- }, W = (n) => {
1073
+ g.setFieldValue(S, void 0), c.current && (c.current.value = "", c.current.updateValue());
1074
+ p(!1);
1075
+ }, Z = (m) => {
1075
1076
  setTimeout(() => {
1076
- const m = document.activeElement, p = Y.current, d = p?.querySelector(".ant-picker-dropdown");
1077
- !(p && (p.contains(m) || p === m || d?.contains(m))) && !(n !== void 0 ? n : v) && (console.log("✅ Input과 RangePicker 모두 포커스가 없습니다"), V(!1));
1077
+ const F = document.activeElement, V = y.current, w = V?.querySelector(".ant-picker-dropdown");
1078
+ !(V && (V.contains(F) || V === F || w?.contains(F))) && !(m !== void 0 ? m : Y) && (console.log("✅ Input과 RangePicker 모두 포커스가 없습니다"), C(!1));
1078
1079
  }, 0);
1079
1080
  };
1080
- return /* @__PURE__ */ a(
1081
- T,
1081
+ return /* @__PURE__ */ t(
1082
+ R,
1082
1083
  {
1083
- ...t,
1084
+ ...r,
1084
1085
  name: void 0,
1085
- validateStatus: R ? "warning" : void 0,
1086
- children: /* @__PURE__ */ P(
1087
- se,
1086
+ validateStatus: O ? "warning" : void 0,
1087
+ children: /* @__PURE__ */ T(
1088
+ ie,
1088
1089
  {
1089
- componentSize: U.componentSize,
1090
+ componentSize: $.componentSize,
1090
1091
  theme: {
1091
1092
  components: {
1092
1093
  Input: {
@@ -1095,10 +1096,10 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1095
1096
  }
1096
1097
  },
1097
1098
  children: [
1098
- /* @__PURE__ */ P(
1099
+ /* @__PURE__ */ T(
1099
1100
  "div",
1100
1101
  {
1101
- ref: Y,
1102
+ ref: y,
1102
1103
  style: {
1103
1104
  display: "flex",
1104
1105
  alignItems: "center",
@@ -1106,130 +1107,130 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1106
1107
  width: "100%"
1107
1108
  },
1108
1109
  children: [
1109
- /* @__PURE__ */ a(
1110
- E.Item,
1110
+ /* @__PURE__ */ t(
1111
+ D.Item,
1111
1112
  {
1112
- name: o ? Array.isArray(o) ? [...o, 0] : [o, 0] : void 0,
1113
- getValueProps: (n) => {
1114
- if (!n) return { value: void 0 };
1115
- if (typeof n == "string" && n.length === g.length && /^\d+$/.test(n)) {
1113
+ name: a ? Array.isArray(a) ? [...a, 0] : [a, 0] : void 0,
1114
+ getValueProps: (m) => {
1115
+ if (!m) return { value: void 0 };
1116
+ if (typeof m == "string" && m.length === d.length && /^\d+$/.test(m)) {
1116
1117
  if (e === "date") {
1117
- const m = n.substring(0, 4), p = n.substring(4, 6), d = n.substring(6, 8);
1118
- return { value: `${m}-${p}-${d}` };
1118
+ const F = m.substring(0, 4), V = m.substring(4, 6), w = m.substring(6, 8);
1119
+ return { value: `${F}-${V}-${w}` };
1119
1120
  } else if (e === "month") {
1120
- const m = n.substring(0, 4), p = n.substring(4, 6);
1121
- return { value: `${m}-${p}` };
1121
+ const F = m.substring(0, 4), V = m.substring(4, 6);
1122
+ return { value: `${F}-${V}` };
1122
1123
  } else if (e === "year")
1123
- return { value: n };
1124
+ return { value: m };
1124
1125
  }
1125
- return { value: _(n).format(r) };
1126
+ return { value: N(m).format(n) };
1126
1127
  },
1127
- normalize: (n) => n ? _(n).format(g) : (s?.allowEmpty, void 0),
1128
+ normalize: (m) => m ? N(m).format(d) : (l?.allowEmpty, void 0),
1128
1129
  noStyle: !0,
1129
- rules: t?.rules ?? [],
1130
- children: /* @__PURE__ */ a(
1131
- q,
1130
+ rules: r?.rules ?? [],
1131
+ children: /* @__PURE__ */ t(
1132
+ X,
1132
1133
  {
1133
- ...f,
1134
+ ...u,
1134
1135
  value: void 0,
1135
1136
  ref: i,
1136
1137
  onFocus: () => {
1137
- if (h("start"), V(!v), x(!1), c.current) {
1138
- const n = Array.isArray(o) ? [...o, 0] : [o, 0];
1139
- F.getFieldValue(n) || (c.current.value = "", c.current.unmaskedValue = ""), c.current.updateValue();
1138
+ if (h("start"), C(!Y), L(!1), s.current) {
1139
+ const m = Array.isArray(a) ? [...a, 0] : [a, 0];
1140
+ g.getFieldValue(m) || (s.current.value = "", s.current.unmaskedValue = ""), s.current.updateValue();
1140
1141
  }
1141
1142
  },
1142
1143
  onBlur: () => {
1143
- W();
1144
+ Z();
1144
1145
  },
1145
- onKeyDown: (n) => {
1146
- if (n.key === "Backspace" && (h("start"), V(!0)), n.key === "Enter")
1147
- if (v && M === "start") {
1148
- const m = c.current?.value || "";
1149
- m.length === r.length ? _(m, r, !0).isValid() ? (V(!1), N(!1)) : s?.allowEmpty ? N(!1) : N(!0) : N(!1);
1146
+ onKeyDown: (m) => {
1147
+ if (m.key === "Backspace" && (h("start"), C(!0)), m.key === "Enter")
1148
+ if (Y && E === "start") {
1149
+ const F = s.current?.value || "";
1150
+ F.length === n.length ? N(F, n, !0).isValid() ? (C(!1), p(!1)) : l?.allowEmpty ? p(!1) : p(!0) : p(!1);
1150
1151
  } else
1151
- h("start"), V(!0);
1152
+ h("start"), C(!0);
1152
1153
  },
1153
1154
  style: {
1154
1155
  flex: 1
1155
1156
  },
1156
1157
  allowClear: !0,
1157
- placeholder: l.replace(/0/g, "_"),
1158
- suffix: /* @__PURE__ */ a(de, { style: { color: "#d9d9d9" } }),
1158
+ placeholder: o.replace(/0/g, "_"),
1159
+ suffix: /* @__PURE__ */ t(me, { style: { color: "#d9d9d9" } }),
1159
1160
  autoComplete: "off"
1160
1161
  }
1161
1162
  )
1162
1163
  }
1163
1164
  ),
1164
- /* @__PURE__ */ a("span", { style: { color: "#d9d9d9", userSelect: "none" }, children: "~" }),
1165
- /* @__PURE__ */ a(
1166
- E.Item,
1165
+ /* @__PURE__ */ t("span", { style: { color: "#d9d9d9", userSelect: "none" }, children: "~" }),
1166
+ /* @__PURE__ */ t(
1167
+ D.Item,
1167
1168
  {
1168
- name: o ? Array.isArray(o) ? [...o, 1] : [o, 1] : void 0,
1169
- getValueProps: (n) => {
1170
- if (!n) return { value: void 0 };
1171
- if (typeof n == "string" && n.length === g.length && /^\d+$/.test(n)) {
1169
+ name: a ? Array.isArray(a) ? [...a, 1] : [a, 1] : void 0,
1170
+ getValueProps: (m) => {
1171
+ if (!m) return { value: void 0 };
1172
+ if (typeof m == "string" && m.length === d.length && /^\d+$/.test(m)) {
1172
1173
  if (e === "date") {
1173
- const m = n.substring(0, 4), p = n.substring(4, 6), d = n.substring(6, 8);
1174
- return { value: `${m}-${p}-${d}` };
1174
+ const F = m.substring(0, 4), V = m.substring(4, 6), w = m.substring(6, 8);
1175
+ return { value: `${F}-${V}-${w}` };
1175
1176
  } else if (e === "month") {
1176
- const m = n.substring(0, 4), p = n.substring(4, 6);
1177
- return { value: `${m}-${p}` };
1177
+ const F = m.substring(0, 4), V = m.substring(4, 6);
1178
+ return { value: `${F}-${V}` };
1178
1179
  } else if (e === "year")
1179
- return { value: n };
1180
+ return { value: m };
1180
1181
  }
1181
- return { value: _(n).format(r) };
1182
+ return { value: N(m).format(n) };
1182
1183
  },
1183
- normalize: (n) => n ? _(n).format(g) : (s?.allowEmpty, void 0),
1184
+ normalize: (m) => m ? N(m).format(d) : (l?.allowEmpty, void 0),
1184
1185
  noStyle: !0,
1185
- rules: t?.rules ?? [],
1186
- children: /* @__PURE__ */ a(
1187
- q,
1186
+ rules: r?.rules ?? [],
1187
+ children: /* @__PURE__ */ t(
1188
+ X,
1188
1189
  {
1189
- ...f,
1190
- ref: y,
1190
+ ...u,
1191
+ ref: f,
1191
1192
  onFocus: () => {
1192
- if (h("end"), V(!v), u.current) {
1193
- u.current.updateValue();
1194
- const n = u.current.value || "";
1195
- !(u.current.unmaskedValue || "") && !n.replace(/[^0-9]/g, "") && (u.current.value = "", u.current.updateValue());
1193
+ if (h("end"), C(!Y), c.current) {
1194
+ c.current.updateValue();
1195
+ const m = c.current.value || "";
1196
+ !(c.current.unmaskedValue || "") && !m.replace(/[^0-9]/g, "") && (c.current.value = "", c.current.updateValue());
1196
1197
  }
1197
1198
  },
1198
1199
  onBlur: () => {
1199
- W();
1200
+ Z();
1200
1201
  },
1201
- onKeyDown: (n) => {
1202
- if (n.key === "Backspace") {
1203
- const m = u.current?.value || "", p = u.current?.unmaskedValue || "";
1204
- if (m === "" || p === "" || m.replace(/[^0-9]/g, "").length <= 1) {
1205
- n.preventDefault();
1206
- const d = Array.isArray(o) ? [...o, 1] : [o, 1];
1207
- F.setFieldValue(d, void 0), w([C[0], null]), u.current && (u.current.value = "", u.current.updateValue()), setTimeout(() => {
1208
- i.current?.focus(), h("start"), V(!0);
1202
+ onKeyDown: (m) => {
1203
+ if (m.key === "Backspace") {
1204
+ const F = c.current?.value || "", V = c.current?.unmaskedValue || "";
1205
+ if (F === "" || V === "" || F.replace(/[^0-9]/g, "").length <= 1) {
1206
+ m.preventDefault();
1207
+ const w = Array.isArray(a) ? [...a, 1] : [a, 1];
1208
+ g.setFieldValue(w, void 0), b([k[0], null]), c.current && (c.current.value = "", c.current.updateValue()), setTimeout(() => {
1209
+ i.current?.focus(), h("start"), C(!0);
1209
1210
  }, 0);
1210
1211
  return;
1211
1212
  }
1212
- h("end"), V(!0);
1213
+ h("end"), C(!0);
1213
1214
  }
1214
- if (n.key === "Tab" && V(!1), n.key === "Enter")
1215
- if (v && M === "end") {
1216
- const m = u.current?.value || "";
1217
- m.length === r.length ? _(m, r, !0).isValid() ? (V(!1), N(!1)) : s?.allowEmpty ? N(!1) : N(!0) : N(!1);
1215
+ if (m.key === "Tab" && C(!1), m.key === "Enter")
1216
+ if (Y && E === "end") {
1217
+ const F = c.current?.value || "";
1218
+ F.length === n.length ? N(F, n, !0).isValid() ? (C(!1), p(!1)) : l?.allowEmpty ? p(!1) : p(!0) : p(!1);
1218
1219
  } else
1219
- h("end"), V(!0);
1220
+ h("end"), C(!0);
1220
1221
  },
1221
1222
  style: {
1222
1223
  flex: 1
1223
1224
  },
1224
1225
  allowClear: !0,
1225
1226
  onClear: () => {
1226
- const n = Array.isArray(o) ? [...o, 1] : [o, 1];
1227
- F.setFieldValue(n, void 0), w([C[0], null]), u.current && (u.current.value = "", u.current.updateValue()), setTimeout(() => {
1228
- i.current?.focus(), h("start"), V(!0);
1227
+ const m = Array.isArray(a) ? [...a, 1] : [a, 1];
1228
+ g.setFieldValue(m, void 0), b([k[0], null]), c.current && (c.current.value = "", c.current.updateValue()), setTimeout(() => {
1229
+ i.current?.focus(), h("start"), C(!0);
1229
1230
  }, 0);
1230
1231
  },
1231
- placeholder: l.replace(/0/g, "_"),
1232
- suffix: /* @__PURE__ */ a(de, { style: { color: "#d9d9d9" } }),
1232
+ placeholder: o.replace(/0/g, "_"),
1233
+ suffix: /* @__PURE__ */ t(me, { style: { color: "#d9d9d9" } }),
1233
1234
  autoComplete: "off"
1234
1235
  }
1235
1236
  )
@@ -1238,23 +1239,23 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1238
1239
  ]
1239
1240
  }
1240
1241
  ),
1241
- /* @__PURE__ */ a(
1242
- ct,
1242
+ /* @__PURE__ */ t(
1243
+ St,
1243
1244
  {
1244
- ...s,
1245
- open: v,
1245
+ ...l,
1246
+ open: Y,
1246
1247
  picker: e,
1247
1248
  format: {
1248
- format: r,
1249
+ format: n,
1249
1250
  type: "mask"
1250
1251
  },
1251
1252
  showNow: !0,
1252
- value: C,
1253
- onChange: ee,
1254
- onOpenChange: (n) => {
1255
- V(n), n || W(!1);
1253
+ value: k,
1254
+ onChange: re,
1255
+ onOpenChange: (m) => {
1256
+ C(m), m || Z(!1);
1256
1257
  },
1257
- renderExtraFooter: () => R ? /* @__PURE__ */ P(
1258
+ renderExtraFooter: () => O ? /* @__PURE__ */ T(
1258
1259
  "div",
1259
1260
  {
1260
1261
  style: {
@@ -1268,12 +1269,12 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1268
1269
  backgroundColor: "#fffbe6"
1269
1270
  },
1270
1271
  children: [
1271
- /* @__PURE__ */ a(Se, {}),
1272
- /* @__PURE__ */ a("span", { children: "유효하지 않은 날짜입니다" })
1272
+ /* @__PURE__ */ t(Ie, {}),
1273
+ /* @__PURE__ */ t("span", { children: "유효하지 않은 날짜입니다" })
1273
1274
  ]
1274
1275
  }
1275
1276
  ) : null,
1276
- getPopupContainer: (n) => n.parentElement,
1277
+ getPopupContainer: (m) => m.parentElement,
1277
1278
  style: {
1278
1279
  position: "absolute",
1279
1280
  top: 0,
@@ -1289,46 +1290,46 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1289
1290
  )
1290
1291
  }
1291
1292
  );
1292
- }, { Option: ye } = fe, $t = ({ itemProps: e, inputProps: t }) => {
1293
- const [f, s] = j([]);
1293
+ }, { Option: we } = he, tn = ({ itemProps: e, inputProps: r }) => {
1294
+ const [u, l] = z([]);
1294
1295
  return G(() => {
1295
- t?.addField === "ALL" ? s([
1296
+ r?.addField === "ALL" ? l([
1296
1297
  { label: "전체", value: "" },
1297
- ...t?.list || []
1298
- ]) : t?.addField === "NULL" ? s([{ label: "", value: "" }, ...t?.list || []]) : s(t?.list || []);
1299
- }, [t?.list]), /* @__PURE__ */ a(
1300
- T,
1298
+ ...r?.list || []
1299
+ ]) : r?.addField === "NULL" ? l([{ label: "", value: "" }, ...r?.list || []]) : l(r?.list || []);
1300
+ }, [r?.list]), /* @__PURE__ */ t(
1301
+ R,
1301
1302
  {
1302
1303
  ...e,
1303
- getValueProps: (r) => r ? {
1304
- value: r && r.indexOf(",") > 0 ? r.split(",") : [r]
1304
+ getValueProps: (n) => n ? {
1305
+ value: n && n.indexOf(",") > 0 ? n.split(",") : [n]
1305
1306
  } : {
1306
1307
  value: []
1307
1308
  },
1308
- normalize: (r) => r != null && r != null && r.length > 0 ? r.toString() : "",
1309
- children: /* @__PURE__ */ a(fe, { ...t, mode: "multiple", children: f.map((r) => {
1310
- const { value: l, label: g } = r;
1311
- return t?.printCode ? /* @__PURE__ */ a(ye, { value: l, label: g, children: /* @__PURE__ */ a(ae, { children: `[${l}] ${g}` }) }, l) : /* @__PURE__ */ a(ye, { value: l, label: g, children: /* @__PURE__ */ a(ae, { children: `${g}` }) }, l);
1309
+ normalize: (n) => n != null && n != null && n.length > 0 ? n.toString() : "",
1310
+ children: /* @__PURE__ */ t(he, { ...r, mode: "multiple", children: u.map((n) => {
1311
+ const { value: o, label: d } = n;
1312
+ return r?.printCode ? /* @__PURE__ */ t(we, { value: o, label: d, children: /* @__PURE__ */ t(j, { children: `[${o}] ${d}` }) }, o) : /* @__PURE__ */ t(we, { value: o, label: d, children: /* @__PURE__ */ t(j, { children: `${d}` }) }, o);
1312
1313
  }) })
1313
1314
  }
1314
1315
  );
1315
- }, Rt = ({ itemProps: e, inputProps: t }) => {
1316
- const f = (r) => {
1317
- let l = r.toString().split(".");
1318
- return t?.decimalPoint != null && l[1] != null && t?.decimalPoint > 0 ? l[1].length > t?.decimalPoint ? l[1] = "." + l[1].substring(0, t?.decimalPoint) : l[1] = "." + l[1] : l[1] = "", l[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + l[1];
1319
- }, s = (r) => {
1320
- let l = r.toString().split(".");
1321
- return t?.decimalPoint != null && l[1] != null && t?.decimalPoint > 0 ? l[1].length > t?.decimalPoint ? l[1] = "." + l[1].substring(0, t?.decimalPoint) : l[1] = "." + l[1] : l[1] = "", l[0].replace(/\$\s?|(,*)/g, "") + l[1];
1316
+ }, nn = ({ itemProps: e, inputProps: r }) => {
1317
+ const u = (n) => {
1318
+ let o = n.toString().split(".");
1319
+ return r?.decimalPoint != null && o[1] != null && r?.decimalPoint > 0 ? o[1].length > r?.decimalPoint ? o[1] = "." + o[1].substring(0, r?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + o[1];
1320
+ }, l = (n) => {
1321
+ let o = n.toString().split(".");
1322
+ return r?.decimalPoint != null && o[1] != null && r?.decimalPoint > 0 ? o[1].length > r?.decimalPoint ? o[1] = "." + o[1].substring(0, r?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\$\s?|(,*)/g, "") + o[1];
1322
1323
  };
1323
- return /* @__PURE__ */ a(T, { ...e, children: /* @__PURE__ */ a(
1324
- _e,
1324
+ return /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(
1325
+ Pe,
1325
1326
  {
1326
- ...t,
1327
- formatter: (r) => f(r),
1328
- parser: (r) => s(r)
1327
+ ...r,
1328
+ formatter: (n) => u(n),
1329
+ parser: (n) => l(n)
1329
1330
  }
1330
1331
  ) });
1331
- }, Ut = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, children: /* @__PURE__ */ a(De.Group, { ...t }) }), { RangePicker: dt } = ie, Fe = {
1332
+ }, rn = ({ itemProps: e, inputProps: r }) => /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t($e.Group, { ...r }) }), { RangePicker: Et } = ce, Ye = {
1332
1333
  year: { displayFormat: "YYYY", outputFormat: "YYYY" },
1333
1334
  month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
1334
1335
  date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
@@ -1337,83 +1338,83 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1337
1338
  displayFormat: "YYYY-MM-DD HH:mm",
1338
1339
  outputFormat: "YYYYMMDDHHmm"
1339
1340
  }
1340
- }, Tt = ({
1341
+ }, on = ({
1341
1342
  itemProps: e,
1342
- inputProps: t,
1343
- type: f = "date",
1344
- minDate: s,
1345
- maxDate: r,
1346
- returnType: l = "string"
1343
+ inputProps: r,
1344
+ type: u = "date",
1345
+ minDate: l,
1346
+ maxDate: n,
1347
+ returnType: o = "string"
1347
1348
  }) => {
1348
- const { displayFormat: g, outputFormat: i } = Q(
1349
- () => Fe[f],
1350
- [f]
1351
- ), y = Q(
1352
- () => Object.values(Fe).map((c) => c.outputFormat).sort((c, u) => {
1353
- if (c.length === u.length) {
1354
- if (c === i) return -1;
1355
- if (u === i) return 1;
1349
+ const { displayFormat: d, outputFormat: i } = q(
1350
+ () => Ye[u],
1351
+ [u]
1352
+ ), f = q(
1353
+ () => Object.values(Ye).map((s) => s.outputFormat).sort((s, c) => {
1354
+ if (s.length === c.length) {
1355
+ if (s === i) return -1;
1356
+ if (c === i) return 1;
1356
1357
  }
1357
- return u.length - c.length;
1358
+ return c.length - s.length;
1358
1359
  }),
1359
1360
  [i]
1360
1361
  // type(outputFormat)이 바뀔 때마다 재정렬
1361
1362
  );
1362
- return /* @__PURE__ */ a(
1363
- T,
1363
+ return /* @__PURE__ */ t(
1364
+ R,
1364
1365
  {
1365
1366
  ...e,
1366
- getValueProps: (c) => ({
1367
+ getValueProps: (s) => ({
1367
1368
  // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환
1368
- value: c && c.length > 0 ? [
1369
- c[0] ? _.isDayjs(c[0]) ? c[0] : _(c[0], y) : null,
1370
- c[1] ? _.isDayjs(c[1]) ? c[1] : _(c[1], y) : null
1369
+ value: s && s.length > 0 ? [
1370
+ s[0] ? N.isDayjs(s[0]) ? s[0] : N(s[0], f) : null,
1371
+ s[1] ? N.isDayjs(s[1]) ? s[1] : N(s[1], f) : null
1371
1372
  ] : null
1372
1373
  }),
1373
- normalize: (c) => c ? l === "dayjs" ? [c[0] ?? void 0, c[1] ?? void 0] : [
1374
- c[0] ? c[0].format(i) : void 0,
1375
- c[1] ? c[1].format(i) : void 0
1374
+ normalize: (s) => s ? o === "dayjs" ? [s[0] ?? void 0, s[1] ?? void 0] : [
1375
+ s[0] ? s[0].format(i) : void 0,
1376
+ s[1] ? s[1].format(i) : void 0
1376
1377
  ] : [void 0, void 0],
1377
- children: /* @__PURE__ */ a(
1378
- dt,
1378
+ children: /* @__PURE__ */ t(
1379
+ Et,
1379
1380
  {
1380
- ...t,
1381
+ ...r,
1381
1382
  order: !0,
1382
- minDate: s ? _(s, y) : void 0,
1383
- maxDate: r ? _(r, y) : void 0,
1384
- picker: f === "datetime" ? "date" : f,
1385
- showTime: t?.showTime ?? (f === "datetime" || f === "time"),
1386
- format: g
1383
+ minDate: l ? N(l, f) : void 0,
1384
+ maxDate: n ? N(n, f) : void 0,
1385
+ picker: u === "datetime" ? "date" : u,
1386
+ showTime: r?.showTime ?? (u === "datetime" || u === "time"),
1387
+ format: d
1387
1388
  }
1388
1389
  )
1389
1390
  }
1390
1391
  );
1391
- }, Ce = q.Search, jt = (e) => {
1392
- const t = E.useFormInstance(), { openPopup: f } = $e(), s = e.itemProps?.name || [], r = e.popupConfig || {
1393
- callback(g) {
1394
- Array.isArray(s) && s.length > 1 ? (t.setFieldValue(s[0], g.code), t.setFieldValue(s[1], g.name)) : t.setFieldValue(s, g.code);
1392
+ }, be = X.Search, an = (e) => {
1393
+ const r = D.useFormInstance(), { openPopup: u } = Ke(), l = e.itemProps?.name || [], n = e.popupConfig || {
1394
+ callback(d) {
1395
+ Array.isArray(l) && l.length > 1 ? (r.setFieldValue(l[0], d.code), r.setFieldValue(l[1], d.name)) : r.setFieldValue(l, d.code);
1395
1396
  }
1396
- }, l = {
1397
+ }, o = {
1397
1398
  ...e,
1398
1399
  placeholder: typeof e.placeholder == "string" ? e.placeholder : e.placeholder?.[0] || "",
1399
- onChange: (g) => {
1400
- Array.isArray(s) && s.length > 1 && t.setFieldValue(s[0], ""), e.onChange?.(g);
1400
+ onChange: (d) => {
1401
+ Array.isArray(l) && l.length > 1 && r.setFieldValue(l[0], ""), e.onChange?.(d);
1401
1402
  },
1402
- onSearch: (g) => {
1403
- e.popuCd ? f(e.popuCd, e.popupParams, r) : e.onSearch?.(g);
1403
+ onSearch: (d) => {
1404
+ e.popuCd ? u(e.popuCd, e.popupParams, n) : e.onSearch?.(d);
1404
1405
  }
1405
1406
  };
1406
- return Array.isArray(s) && s.length > 1 ? /* @__PURE__ */ a(T, { ...e.itemProps, name: void 0, children: /* @__PURE__ */ P(ae.Compact, { block: !0, children: [
1407
- /* @__PURE__ */ a(
1408
- E.Item,
1407
+ return Array.isArray(l) && l.length > 1 ? /* @__PURE__ */ t(R, { ...e.itemProps, name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
1408
+ /* @__PURE__ */ t(
1409
+ D.Item,
1409
1410
  {
1410
- name: s[0],
1411
+ name: l[0],
1411
1412
  rules: e.itemProps?.rules,
1412
1413
  style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
1413
1414
  validateStatus: "",
1414
1415
  help: "",
1415
- children: /* @__PURE__ */ a(
1416
- q,
1416
+ children: /* @__PURE__ */ t(
1417
+ X,
1417
1418
  {
1418
1419
  style: { color: "#999", backgroundColor: "#f5f5f5" },
1419
1420
  placeholder: e.placeholder?.[0] || "",
@@ -1422,42 +1423,42 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1422
1423
  )
1423
1424
  }
1424
1425
  ),
1425
- /* @__PURE__ */ a(E.Item, { name: s[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ a(
1426
- Ce,
1426
+ /* @__PURE__ */ t(D.Item, { name: l[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ t(
1427
+ be,
1427
1428
  {
1428
1429
  readOnly: e.readOnly,
1429
- enterButton: /* @__PURE__ */ a(
1430
- X,
1430
+ enterButton: /* @__PURE__ */ t(
1431
+ J,
1431
1432
  {
1432
- icon: /* @__PURE__ */ a(Ne, {}),
1433
+ icon: /* @__PURE__ */ t(ge, {}),
1433
1434
  disabled: e.readOnly
1434
1435
  }
1435
1436
  ),
1436
- ...l
1437
+ ...o
1437
1438
  }
1438
1439
  ) })
1439
- ] }) }) : /* @__PURE__ */ a(T, { ...e.itemProps, children: /* @__PURE__ */ a(Ce, { ...l }) });
1440
- }, Ht = ({
1440
+ ] }) }) : /* @__PURE__ */ t(R, { ...e.itemProps, children: /* @__PURE__ */ t(be, { ...o }) });
1441
+ }, ln = ({
1441
1442
  itemProps: e,
1442
- selectProps: t = {
1443
+ selectProps: r = {
1443
1444
  options: [],
1444
1445
  allowClear: !0
1445
1446
  }
1446
1447
  }) => {
1447
- const f = E.useFormInstance(), s = !!f, r = Q(() => t?.addField === "ALL" ? [{ label: "전체", value: "" }, ...t?.options || []] : t?.addField === "NULL" ? [{ label: "", value: "" }, ...t?.options || []] : t?.options || [], [t.options, t.addField]), l = (y) => {
1448
- t.onChange?.(y);
1449
- }, g = {
1450
- ...t,
1451
- allowClear: t.allowClear ?? !0,
1452
- options: r,
1453
- onChange: l,
1454
- variant: t.variant
1455
- }, i = /* @__PURE__ */ a(fe, { ...g, disabled: t.disabled });
1456
- return t.copyable && !s && console.warn(
1448
+ const u = D.useFormInstance(), l = !!u, n = q(() => r?.addField === "ALL" ? [{ label: "전체", value: "" }, ...r?.options || []] : r?.addField === "NULL" ? [{ label: "", value: "" }, ...r?.options || []] : r?.options || [], [r.options, r.addField]), o = (f) => {
1449
+ r.onChange?.(f);
1450
+ }, d = {
1451
+ ...r,
1452
+ allowClear: r.allowClear ?? !0,
1453
+ options: n,
1454
+ onChange: o,
1455
+ variant: r.variant
1456
+ }, i = /* @__PURE__ */ t(he, { ...d, disabled: r.disabled });
1457
+ return r.copyable && !l && console.warn(
1457
1458
  "BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
1458
- ), t.copyable ? /* @__PURE__ */ a(T, { ...e, name: void 0, children: /* @__PURE__ */ P(ae.Compact, { block: !0, children: [
1459
- /* @__PURE__ */ a(
1460
- E.Item,
1459
+ ), r.copyable ? /* @__PURE__ */ t(R, { ...e, name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
1460
+ /* @__PURE__ */ t(
1461
+ D.Item,
1461
1462
  {
1462
1463
  name: e?.name,
1463
1464
  rules: e?.rules,
@@ -1467,11 +1468,11 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1467
1468
  children: i
1468
1469
  }
1469
1470
  ),
1470
- /* @__PURE__ */ a(
1471
- be.Paragraph,
1471
+ /* @__PURE__ */ t(
1472
+ fe.Paragraph,
1472
1473
  {
1473
1474
  copyable: {
1474
- text: s && f?.getFieldValue(e?.name)?.toString() || "",
1475
+ text: l && u?.getFieldValue(e?.name)?.toString() || "",
1475
1476
  tooltips: ["코드복사", "코드복사됨"]
1476
1477
  },
1477
1478
  style: {
@@ -1488,491 +1489,644 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
1488
1489
  }
1489
1490
  }
1490
1491
  )
1491
- ] }) }) : /* @__PURE__ */ a(T, { ...e, children: i });
1492
- }, Kt = ({
1492
+ ] }) }) : /* @__PURE__ */ t(R, { ...e, children: i });
1493
+ }, sn = ({
1493
1494
  itemProps: e,
1494
- inputProps: t = {
1495
+ inputProps: r = {
1495
1496
  format: "YN"
1496
1497
  }
1497
1498
  }) => {
1498
- const f = E.useFormInstance(), s = (r, l) => {
1499
- t.format === "boolean" ? f.setFieldValue(e?.name, r) : f.setFieldValue(e?.name, r ? "Y" : "N"), t.onChange && t.onChange(r, l);
1499
+ const u = D.useFormInstance(), l = (n, o) => {
1500
+ r.format === "boolean" ? u.setFieldValue(e?.name, n) : u.setFieldValue(e?.name, n ? "Y" : "N"), r.onChange && r.onChange(n, o);
1500
1501
  };
1501
- return /* @__PURE__ */ a(
1502
- T,
1502
+ return /* @__PURE__ */ t(
1503
+ R,
1503
1504
  {
1504
1505
  ...e,
1505
- getValueProps: (r) => ({ checked: t.format === "boolean" ? !!r : r === "Y" }),
1506
- normalize: (r) => typeof r == "boolean" ? t.format === "boolean" ? r : r ? "Y" : "N" : t.format === "boolean" ? !!r : r ? "Y" : "N",
1507
- children: /* @__PURE__ */ a(Ee, { ...t, onChange: (r, l) => s(r, l) })
1506
+ getValueProps: (n) => ({ checked: r.format === "boolean" ? !!n : n === "Y" }),
1507
+ normalize: (n) => typeof n == "boolean" ? r.format === "boolean" ? n : n ? "Y" : "N" : r.format === "boolean" ? !!n : n ? "Y" : "N",
1508
+ children: /* @__PURE__ */ t(He, { ...r, onChange: (n, o) => l(n, o) })
1508
1509
  }
1509
1510
  );
1510
- }, { TextArea: ft } = q, Pt = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, children: /* @__PURE__ */ a(ft, { ...t }) }), mt = [
1511
- ".pdf",
1512
- ".xlsx",
1513
- ".xls",
1514
- ".docx",
1515
- ".doc",
1516
- ".pptx",
1517
- ".ppt",
1518
- ".hwp",
1519
- ".txt",
1520
- ".csv",
1521
- // 이미지
1522
- ".jpg",
1523
- ".jpeg",
1524
- ".png",
1525
- ".gif",
1526
- // 압축
1527
- ".zip"
1528
- ], Ye = {
1529
- FILE: "file"
1530
- }, gt = ({
1531
- originNode: e,
1532
- file: t,
1533
- fileList: f,
1534
- moveFile: s,
1535
- onDrop: r
1536
- }) => {
1537
- const l = K(null), [{ handlerId: g }, i] = et({
1538
- accept: Ye.FILE,
1539
- collect: (Y) => ({
1540
- handlerId: Y.getHandlerId()
1541
- }),
1542
- hover(Y, F) {
1543
- if (!l.current)
1544
- return;
1545
- const v = Y.uid, V = t.uid;
1546
- if (v === V)
1547
- return;
1548
- const R = ne(f, { uid: V }), N = ne(f, { uid: v });
1549
- if (N === -1 || R === -1)
1550
- return;
1551
- const M = l.current.getBoundingClientRect(), h = F.getClientOffset();
1552
- if (!h)
1553
- return;
1554
- const L = (M.bottom - M.top) / 2, x = h.y - M.top;
1555
- N < R && x < L || N > R && x > L || s(v, V);
1511
+ }, { TextArea: Dt } = X, cn = ({ itemProps: e, inputProps: r }) => /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(Dt, { ...r }) }), It = X.Search, dn = (e) => {
1512
+ const r = D.useFormInstance(), { openCorePopup: u } = Le(), l = {
1513
+ value: "deptNm",
1514
+ fieldName: "deptNm",
1515
+ placeholder: "부서명"
1516
+ }, n = {
1517
+ value: "empNm",
1518
+ fieldName: "empNm",
1519
+ placeholder: "사원명 입력"
1520
+ }, o = e.field1 || l, d = e.field2 || n, i = Q(
1521
+ (c) => {
1522
+ r.setFieldValue(e.employeeFieldName || "employee", c), r.setFieldValue(e.empNoFieldName || "empNo", c.empNo ?? ""), r.setFieldValue(
1523
+ o.fieldName,
1524
+ c[o.value || "deptNm"] ?? ""
1525
+ ), r.setFieldValue(
1526
+ d.fieldName,
1527
+ c[d.value || "empNm"] ?? ""
1528
+ ), e.onFinish?.();
1556
1529
  },
1557
- drop() {
1558
- r();
1559
- }
1560
- }), [{ isDragging: y }, c] = tt({
1561
- type: Ye.FILE,
1562
- item: () => ({
1563
- uid: t.uid,
1564
- index: ne(f, { uid: t.uid })
1565
- }),
1566
- collect: (Y) => ({
1567
- isDragging: Y.isDragging()
1568
- })
1569
- }), u = y ? 0 : 1;
1570
- return c(i(l)), /* @__PURE__ */ a("div", { ref: l, style: { opacity: u }, "data-handler-id": g, children: e });
1571
- }, Gt = ({
1572
- itemProps: e,
1573
- fileGrpKey: t,
1574
- onUploadComplete: f,
1575
- onFetchFilesTrxCd: s = "SCMFILE00101",
1576
- onSuccessTrxCd: r = "SCMFILE00102",
1577
- onDeleteFileTrxCd: l = "SCMFILE00103",
1578
- onReorderFilesTrxCd: g = "SCMFILE00104",
1579
- allowedExtensions: i = mt,
1580
- maxFileSize: y = 200,
1581
- showButton: c = !0,
1582
- // 기본값으로 true 설정
1583
- multiple: u = !1,
1584
- newFileGrpKeyonModify: Y = !1,
1585
- buttonText: F = "파일 선택",
1586
- localOnly: v = !1,
1587
- onFilesChange: V
1588
- }) => {
1589
- const [R, N] = j([]), M = K(t), h = K([]), L = E.useFormInstance(), $ = K(
1590
- Xe(() => {
1591
- if (v || h.current.length === 0)
1592
- return;
1593
- const n = [...h.current];
1594
- if (h.current = [], r) {
1595
- const m = n.map((p) => ({
1596
- crprCd: te()?.crprCd,
1597
- sysCd: __SYS_CD__,
1598
- fileGrpKey: M.current,
1599
- physFileNm: p.fileNameP,
1600
- lgclFileNm: p.fileNameL,
1601
- filePath: p.filePath,
1602
- fileExtn: p.fileExt,
1603
- fileSize: p.fileSize,
1604
- mltpYn: "N"
1605
- }));
1606
- console.log("newFileGrpKeyonModify", Y), console.log(
1607
- "newFileGrpKeyonModify",
1608
- Y ? 0 : M.current
1609
- ), J(r, {
1610
- crprCd: te()?.crprCd,
1611
- sysCd: __SYS_CD__,
1612
- fileGrpKey: Y ? 0 : M.current,
1613
- oldFileGrpKey: M.current,
1614
- newFileGrpKeyonModify: Y,
1615
- sub: m
1616
- }).then((p) => {
1617
- if (p?.sub && p.sub.length > 0) {
1618
- const d = p.sub[0].fileGrpKey;
1619
- (!M.current || Y) && (M.current = d);
1620
- const A = /* @__PURE__ */ new Map();
1621
- p.sub.forEach((S) => {
1622
- const D = n.find(
1623
- (H) => H.fileNameL === S.lgclFileNm
1624
- );
1625
- D && A.set(D.tempId, S);
1626
- });
1627
- const k = e?.name;
1628
- ((S) => {
1629
- if (I) {
1630
- const D = L?.getFieldValue(k) || [], H = S(D);
1631
- L?.setFieldValue(k, H);
1632
- } else
1633
- N((D) => S(D));
1634
- })((S) => S.map((D) => {
1635
- const H = A.get(D.uid);
1636
- if (H) {
1637
- const me = n.find(
1638
- (Ie) => Ie.tempId === D.uid
1639
- );
1640
- return f && me && f({
1641
- ...me,
1642
- fileGrpKey: d,
1643
- fileKey: H.fileKey
1644
- }), {
1645
- ...D,
1646
- name: H.lgclFileNm,
1647
- fileGrpKey: d,
1648
- fileKey: H.fileKey,
1649
- uid: H.fileKey,
1650
- status: "done",
1651
- url: `/api/download?filePath=${H.filePath}&logicalName=${H.lgclFileNm}`
1652
- };
1530
+ [r, o, d, e.employeeFieldName]
1531
+ ), f = Q(
1532
+ (c) => {
1533
+ u("CORE_ORGANIZATION_01", {
1534
+ onSelect: (y) => {
1535
+ i(y);
1536
+ },
1537
+ defaultParams: {
1538
+ keyword: c
1539
+ }
1540
+ });
1541
+ },
1542
+ [i, u]
1543
+ ), s = Q(
1544
+ async (c) => {
1545
+ const y = c?.trim();
1546
+ if (y)
1547
+ try {
1548
+ const g = await te(
1549
+ "SCMUTIL00101",
1550
+ {
1551
+ keyword: y
1552
+ },
1553
+ { showLoading: !1 }
1554
+ ), Y = g?.empList || [];
1555
+ if (g?.empCnt === 0) {
1556
+ x.warning(
1557
+ "일치하는 사원을 찾을 수 없어 팝업을 열립니다. 사원을 선택해주세요."
1558
+ ), f();
1559
+ return;
1560
+ }
1561
+ if (g?.empCnt > 1) {
1562
+ x.info(
1563
+ "여러 건이 검색되어 팝업이 열립니다. 사원을 선택해주세요."
1564
+ ), f(y);
1565
+ return;
1566
+ }
1567
+ const C = Y[0];
1568
+ i(C);
1569
+ } catch (g) {
1570
+ console.error("사원 검색 서비스 실패:", g), x.error("사원 검색 중 오류가 발생했습니다.");
1571
+ }
1572
+ },
1573
+ [i, f]
1574
+ );
1575
+ return /* @__PURE__ */ t(R, { label: e.label || "사원", name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
1576
+ /* @__PURE__ */ t(
1577
+ D.Item,
1578
+ {
1579
+ name: o.fieldName,
1580
+ style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
1581
+ validateStatus: "",
1582
+ help: "",
1583
+ children: /* @__PURE__ */ t(
1584
+ X,
1585
+ {
1586
+ style: { color: "#999", backgroundColor: "#f5f5f5" },
1587
+ placeholder: o.placeholder,
1588
+ readOnly: !0
1589
+ }
1590
+ )
1591
+ }
1592
+ ),
1593
+ /* @__PURE__ */ t(
1594
+ D.Item,
1595
+ {
1596
+ name: e.employeeFieldName || "employee",
1597
+ hidden: !0
1598
+ }
1599
+ ),
1600
+ /* @__PURE__ */ t(D.Item, { name: e.empNoFieldName || "empNo", hidden: !0 }),
1601
+ /* @__PURE__ */ t(
1602
+ D.Item,
1603
+ {
1604
+ name: d.fieldName,
1605
+ style: { width: "60%", marginBottom: 0 },
1606
+ children: /* @__PURE__ */ t(
1607
+ It,
1608
+ {
1609
+ allowClear: !0,
1610
+ readOnly: e.readOnly,
1611
+ placeholder: d.placeholder,
1612
+ enterButton: /* @__PURE__ */ t(
1613
+ J,
1614
+ {
1615
+ icon: /* @__PURE__ */ t(ge, {}),
1616
+ disabled: e.readOnly,
1617
+ onClick: () => {
1618
+ f();
1619
+ }
1653
1620
  }
1654
- return D;
1655
- }));
1621
+ ),
1622
+ onSearch: s,
1623
+ onChange: (c) => {
1624
+ r.setFieldValue(o.fieldName, ""), r.setFieldValue(e.employeeFieldName || "employee", null), r.setFieldValue(e.empNoFieldName || "empNo", "");
1625
+ }
1656
1626
  }
1657
- }).catch((p) => {
1658
- console.error("업로드 후처리 서비스 호출 실패:", p), z.error("파일 후처리 중 오류가 발생했습니다.");
1659
- const d = new Set(n.map((b) => b.tempId)), A = e?.name;
1660
- ((b) => {
1661
- if (I) {
1662
- const S = L?.getFieldValue(A) || [], D = b(S);
1663
- L?.setFieldValue(A, D);
1664
- } else
1665
- N((S) => b(S));
1666
- })(
1667
- (b) => b.map(
1668
- (S) => d.has(S.uid) ? { ...S, status: "error", error: "후처리 실패" } : S
1669
- )
1670
- );
1671
- });
1627
+ )
1672
1628
  }
1673
- }, 500)
1674
- ).current;
1675
- G(() => () => {
1676
- $.cancel();
1677
- }, [$]), G(() => {
1678
- M.current = t;
1679
- }, [t]), G(() => {
1680
- v || t && s && J(s, {
1681
- crprCd: te()?.crprCd,
1682
- sysCd: __SYS_CD__,
1683
- fileGrpKey: t
1684
- }).then((n) => {
1685
- if (n?.sub) {
1686
- const m = n.sub.map((d) => ({
1687
- uid: d.fileKey,
1688
- name: d.lgclFileNm,
1689
- status: "done",
1690
- url: `/api/download?filePath=${d.filePath}&logicalName=${d.lgclFileNm}`
1691
- })), p = e?.name;
1692
- I ? L?.setFieldValue(p, m) : N(m);
1693
- } else {
1694
- const m = e?.name;
1695
- I ? L?.setFieldValue(m, []) : N([]);
1629
+ )
1630
+ ] }) });
1631
+ }, { Text: Se } = fe, v = {
1632
+ IDLE: "idle",
1633
+ UPLOADING: "uploading",
1634
+ UPLOADED: "uploaded",
1635
+ EXECUTING: "executing",
1636
+ COMPLETED: "completed",
1637
+ FAILED: "failed"
1638
+ }, Nt = {
1639
+ [v.IDLE]: "엑셀 파일을 선택해 업로드 해 주세요. (xlsx, xls, csv만 가능)",
1640
+ [v.UPLOADING]: "엑셀 업로드 중입니다. 잠시만 기다려 주세요.",
1641
+ [v.UPLOADED]: "엑셀 업로드가 완료되었습니다.",
1642
+ [v.EXECUTING]: "배치 작업 실행 중입니다. 잠시만 기다려 주세요.",
1643
+ [v.COMPLETED]: "배치 작업이 완료되었습니다.",
1644
+ [v.FAILED]: "배치 작업이 실패했습니다."
1645
+ }, un = ({
1646
+ label: e = "엑셀 업로드",
1647
+ jobId: r,
1648
+ extraParams: u,
1649
+ onFinish: l,
1650
+ disabled: n = !1
1651
+ }) => {
1652
+ const [o, d] = z(v.IDLE), [i, f] = z(null), [s, c] = z(null), y = Q(async () => {
1653
+ if (!(!i || !s)) {
1654
+ if (!r) {
1655
+ x.warning("실행 job id(jobId)가 설정되어 있지 않습니다.");
1656
+ return;
1657
+ }
1658
+ try {
1659
+ if (!s.filePath) {
1660
+ x.error("파일 URL 정보가 없습니다.");
1661
+ return;
1662
+ }
1663
+ d(v.EXECUTING);
1664
+ const p = {
1665
+ crprCd: Ne(),
1666
+ sysCd: window.__SYS_CD__ || "",
1667
+ fileKey: s.fileKey,
1668
+ filePath: s.filePath,
1669
+ jobId: r
1670
+ }, E = await te("SCMUTIL00301", {
1671
+ ...p,
1672
+ ...u
1673
+ });
1674
+ E?.success ? (g(), x.success(
1675
+ E?.message || "배치 실행 요청이 성공적으로 완료되었습니다."
1676
+ )) : (d(v.FAILED), x.error(E?.message || "배치 실행 요청에 실패했습니다."));
1677
+ } catch (p) {
1678
+ console.error("배치 실행 요청에 실패했습니다.", p), x.error("배치 실행 요청에 실패했습니다."), d(v.FAILED);
1696
1679
  }
1697
- }).catch((n) => {
1698
- console.error("파일 목록 조회 서비스 호출에 실패했습니다.", n), z.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
1699
- });
1700
- }, [t, s]);
1701
- const o = (n, m) => {
1702
- const p = e?.name, d = I ? L?.getFieldValue(p) || [] : R, A = ne(d, { uid: n }), k = ne(d, { uid: m });
1703
- if (A < 0 || k < 0) return;
1704
- const b = [...d], [S] = b.splice(A, 1);
1705
- b.splice(k, 0, S), I ? L?.setFieldValue(p, b) : N(b);
1706
- }, C = () => {
1707
- if (!v && t && g) {
1708
- const n = e?.name, p = (I ? L?.getFieldValue(n) || [] : R).map((d) => d.uid);
1709
- J(g, {
1710
- crprCd: te()?.crprCd,
1711
- sysCd: __SYS_CD__,
1712
- fileGrpKey: t,
1713
- reorderedFileKeys: p
1714
- }).then(() => {
1715
- z.success("파일 순서가 성공적으로 저장되었습니다.");
1716
- }).catch((d) => {
1717
- console.error("파일 순서 저장 서비스 호출 실패:", d), z.error("파일 순서 저장 중 오류가 발생했습니다.");
1718
- });
1719
- }
1720
- }, w = (n) => {
1721
- const m = e?.name, p = I ? L?.getFieldValue(m) || [] : R;
1722
- if (!u && p.length > 0)
1723
- return z.error("하나의 파일만 업로드할 수 있습니다."), Z.LIST_IGNORE;
1724
- if (i && i.length > 0) {
1725
- const d = `.${n.name.split(".").pop()?.toLowerCase()}`;
1726
- if (!i.includes(d))
1727
- return z.error(
1728
- `${n.name} 파일은 허용되지 않는 확장자입니다. (${i.join(
1729
- ", "
1730
- )})`
1731
- ), Z.LIST_IGNORE;
1732
1680
  }
1733
- return y && !(n.size / 1024 / 1024 < y) ? (z.error(`일반업로드의 최대용량은 ${y}MB입니다.`), Z.LIST_IGNORE) : !v;
1734
- }, I = !!e?.name, B = {
1735
- name: "file",
1736
- multiple: u,
1737
- action: v ? void 0 : "/api/upload",
1738
- beforeUpload: w,
1739
- showUploadList: {
1740
- showRemoveIcon: c
1741
- // showButton 값에 따라 삭제 버튼 표시/숨김
1742
- },
1743
- onChange(n) {
1744
- const { status: m, uid: p } = n.file;
1745
- if (m === "removed") {
1746
- if (!v && l)
1747
- J(l, {
1748
- crprCd: te()?.crprCd,
1749
- sysCd: __SYS_CD__,
1750
- fileGrpKey: Y ? 0 : M.current,
1751
- fileKey: p,
1752
- oldFileGrpKey: M.current,
1753
- newFileGrpKeyonModify: Y
1754
- }).then((d) => {
1755
- if (z.success("파일이 성공적으로 삭제되었습니다."), Y && (M.current = d.fileGrpKey), I) {
1756
- const A = e?.name;
1757
- L?.setFieldValue(A, n.fileList);
1758
- } else
1759
- N(n.fileList);
1760
- V?.(n.fileList), f?.({
1761
- fileGrpKey: d.fileGrpKey
1681
+ }, [i, s, r, u]), g = Q(async () => {
1682
+ setTimeout(async () => {
1683
+ try {
1684
+ const p = await te("SCMUTIL00302", {
1685
+ jobId: r
1686
+ });
1687
+ if (p?.status === "COMPLETED") {
1688
+ d(v.COMPLETED), x.success("배치 작업이 완료되었습니다."), l?.();
1689
+ return;
1690
+ } else if (p?.status === "FAILED") {
1691
+ d(v.FAILED), x.error("배치 작업이 실패했습니다.");
1692
+ return;
1693
+ } else {
1694
+ setTimeout(g, 1e3);
1695
+ return;
1696
+ }
1697
+ } catch (p) {
1698
+ console.error("배치 작업 상태 확인 오류:", p), d(v.FAILED), x.error("배치 작업 상태 확인 중 오류가 발생했습니다.");
1699
+ }
1700
+ }, 3e3);
1701
+ }, [r, l]), Y = q(
1702
+ () => ({
1703
+ name: "file",
1704
+ accept: ".xlsx, .xls, .csv",
1705
+ listType: "picture",
1706
+ multiple: !1,
1707
+ action: "/api/upload",
1708
+ showUploadList: {
1709
+ showRemoveIcon: !0
1710
+ },
1711
+ beforeUpload: (p) => {
1712
+ const E = `.${p.name.split(".").pop()?.toLowerCase()}`;
1713
+ if (![".xlsx", ".xls", ".csv"].includes(E))
1714
+ return x.error(
1715
+ `${p.name} 파일은 허용되지 않는 확장자입니다. (xlsx, xls, csv만 가능)`
1716
+ ), ee.LIST_IGNORE;
1717
+ },
1718
+ onChange: (p) => {
1719
+ const { status: E } = p.file;
1720
+ if (E === "removed") {
1721
+ f(null), d(v.IDLE), c(null);
1722
+ return;
1723
+ }
1724
+ if (f(p.file), E === "uploading") {
1725
+ d(v.UPLOADING);
1726
+ return;
1727
+ }
1728
+ if (E === "done") {
1729
+ if (p.file.response?.success) {
1730
+ d(v.UPLOADED);
1731
+ const h = p.file.response.uploadedFiles[0] || {};
1732
+ c({
1733
+ fileKey: h.fileKey,
1734
+ filePath: h.filePath,
1735
+ fileNameL: h.fileNameL,
1736
+ fileNameP: h.fileNameP,
1737
+ fileSize: h.fileSize,
1738
+ fileExt: h.fileExt
1762
1739
  });
1763
- }).catch((d) => {
1764
- console.error("파일 삭제 서비스 호출에 실패했습니다.", d), z.error("파일 삭제 중 오류가 발생했습니다.");
1765
- });
1766
- else {
1767
- if (I) {
1768
- const d = e?.name;
1769
- L?.setFieldValue(d, n.fileList);
1770
1740
  } else
1771
- N(n.fileList);
1772
- V?.(n.fileList);
1741
+ d(v.IDLE), x.error(
1742
+ p.file.response?.message || `${p.file.name} 파일 업로드에 실패했습니다.`
1743
+ );
1744
+ return;
1773
1745
  }
1774
- return;
1746
+ E === "error" && (d(v.IDLE), x.error(
1747
+ p.file.response?.message || `${p.file.name} 파일 업로드 중 오류가 발생했습니다.`
1748
+ ));
1775
1749
  }
1776
- if (I) {
1777
- const d = e?.name;
1778
- L?.setFieldValue(d, n.fileList);
1779
- } else
1780
- N(n.fileList);
1781
- if (V?.(n.fileList), m === "done")
1782
- if (!v && n.file.response?.success) {
1783
- const { uploadedFiles: d } = n.file.response;
1784
- d && Array.isArray(d) && d.length > 0 && (d.forEach((A) => {
1785
- A.tempId = n.file.uid, h.current.push(A);
1786
- }), $()), z.success(
1787
- n.file.response.message || `${n.file.name} 파일이 성공적으로 업로드되었습니다.`
1788
- );
1789
- } else
1790
- z.error(
1791
- n.file.response?.message || `${n.file.name} 파일 업로드에 실패했습니다.`
1792
- );
1793
- else m === "error" && z.error(
1794
- n.file.response?.message || `${n.file.name} 파일 업로드 중 오류가 발생했습니다.`
1795
- );
1796
- },
1797
- itemRender(n, m, p) {
1798
- const d = Oe(n, {
1799
- href: m.url || void 0,
1800
- title: void 0
1801
- });
1802
- return /* @__PURE__ */ a(
1803
- gt,
1750
+ }),
1751
+ []
1752
+ ), C = q(
1753
+ () => /* @__PURE__ */ T(j, { direction: "vertical", style: { width: 400 }, children: [
1754
+ /* @__PURE__ */ T(j, { children: [
1755
+ o === v.EXECUTING && /* @__PURE__ */ t(Ee, { size: "small" }),
1756
+ /* @__PURE__ */ t(Se, { type: o === v.FAILED ? "danger" : "secondary", children: Nt[o] })
1757
+ ] }),
1758
+ o !== v.EXECUTING && o !== v.COMPLETED && o !== v.FAILED && /* @__PURE__ */ t(ee, { ...Y, children: !i && /* @__PURE__ */ t(oe, { icon: /* @__PURE__ */ t(ae, {}), children: "파일 선택" }) }),
1759
+ o === v.UPLOADED && /* @__PURE__ */ t(j, { direction: "vertical", children: /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(
1760
+ oe,
1804
1761
  {
1805
- originNode: d,
1806
- file: m,
1807
- fileList: p,
1808
- moveFile: o,
1809
- onDrop: C
1810
- },
1811
- m.uid
1812
- );
1813
- }
1814
- };
1815
- I || (B.fileList = R);
1816
- const O = (n) => Array.isArray(n) ? n : n && n.fileList, U = e?.name, ee = I ? E.useWatch?.(U, L) : void 0, W = I ? ee || [] : R;
1817
- return /* @__PURE__ */ a(Qe, { backend: rt, children: /* @__PURE__ */ a(
1818
- T,
1762
+ type: "primary",
1763
+ icon: /* @__PURE__ */ t(rt, {}),
1764
+ onClick: y,
1765
+ disabled: !i,
1766
+ children: "실행하기"
1767
+ }
1768
+ ) }) }),
1769
+ (o === v.COMPLETED || o === v.FAILED) && /* @__PURE__ */ t(j, { direction: "vertical", children: /* @__PURE__ */ T(j, { children: [
1770
+ /* @__PURE__ */ t(oe, { icon: /* @__PURE__ */ t(ot, {}), onClick: y, children: "다시 실행하기" }),
1771
+ /* @__PURE__ */ t(
1772
+ oe,
1773
+ {
1774
+ icon: /* @__PURE__ */ t(ae, {}),
1775
+ onClick: () => {
1776
+ d(v.IDLE), f(null), c(null);
1777
+ },
1778
+ children: "다른 파일 업로드"
1779
+ }
1780
+ )
1781
+ ] }) })
1782
+ ] }),
1783
+ [o, i, y, Y]
1784
+ ), O = /* @__PURE__ */ t(oe, { icon: /* @__PURE__ */ t(ae, {}), disabled: n, children: e });
1785
+ return n ? /* @__PURE__ */ t(
1786
+ Fe,
1819
1787
  {
1820
- valuePropName: "fileList",
1821
- getValueFromEvent: O,
1822
- ...e,
1823
- children: /* @__PURE__ */ a(
1824
- Z,
1788
+ title: /* @__PURE__ */ T("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1789
+ /* @__PURE__ */ t(at, { style: { color: "#faad14", fontSize: 16 } }),
1790
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600 }, children: "'엑셀 업로드' 버튼에 대한 사용 권한이 없습니다." })
1791
+ ] }),
1792
+ content: /* @__PURE__ */ t(
1793
+ "div",
1825
1794
  {
1826
- headers: { SYSCD: __SYS_CD__ },
1827
- ...B,
1828
- listType: "picture",
1829
- children: c && (u || W.length === 0) && /* @__PURE__ */ a(X, { icon: /* @__PURE__ */ a(ke, {}), children: F })
1795
+ style: {
1796
+ display: "flex",
1797
+ flexDirection: "column",
1798
+ gap: 4,
1799
+ paddingLeft: 24
1800
+ },
1801
+ children: /* @__PURE__ */ t("span", { style: { fontSize: 12 }, children: "관리자에게 문의하세요." })
1830
1802
  }
1831
- )
1803
+ ),
1804
+ placement: "bottom",
1805
+ styles: { body: { backgroundColor: "#fffbe6" } },
1806
+ children: /* @__PURE__ */ t("span", { children: O })
1832
1807
  }
1833
- ) });
1834
- }, ht = q.Search, Wt = (e) => {
1835
- const t = E.useFormInstance(), { openCorePopup: f } = Je(), s = {
1808
+ ) : /* @__PURE__ */ t(
1809
+ Fe,
1810
+ {
1811
+ content: C,
1812
+ title: /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", marginBottom: 0 }, children: /* @__PURE__ */ t(Se, { strong: !0, children: "엑셀 업로드" }) }),
1813
+ trigger: "click",
1814
+ placement: "bottom",
1815
+ children: O
1816
+ }
1817
+ );
1818
+ }, vt = X.Search, mn = (e) => {
1819
+ const r = D.useFormInstance(), { openCorePopup: u } = Le(), l = {
1836
1820
  value: "deptNm",
1837
1821
  fieldName: "deptNm",
1838
1822
  placeholder: "부서명"
1839
- }, r = {
1840
- value: "empNm",
1841
- fieldName: "empNm",
1842
- placeholder: "사원명 입력"
1843
- }, l = e.field1 || s, g = e.field2 || r, i = ce(
1844
- (u) => {
1845
- t.setFieldValue(e.employeeFieldName || "employee", u), t.setFieldValue(e.empNoFieldName || "empNo", u.empNo ?? ""), t.setFieldValue(
1846
- l.fieldName,
1847
- u[l.value || "deptNm"] ?? ""
1848
- ), t.setFieldValue(
1849
- g.fieldName,
1850
- u[g.value || "empNm"] ?? ""
1823
+ }, n = e.field || l, o = Q(
1824
+ (f) => {
1825
+ r.setFieldValue(e.departmentFieldName || "department", f), r.setFieldValue(
1826
+ n.fieldName,
1827
+ f[n.value || "deptNm"] ?? ""
1828
+ ), r.setFieldValue(
1829
+ e.deptCdFieldName || "deptCd",
1830
+ f.deptCd ?? ""
1851
1831
  ), e.onFinish?.();
1852
1832
  },
1853
- [t, l, g, e.employeeFieldName]
1854
- ), y = ce(
1855
- (u) => {
1856
- f("CORE_ORGANIZATION_01", {
1857
- onSelect: (Y) => {
1858
- i(Y);
1833
+ [r, n, e.departmentFieldName, e.deptCdFieldName]
1834
+ ), d = Q(
1835
+ (f) => {
1836
+ u("CORE_DEPARTMENT_01", {
1837
+ onSelect: (s) => {
1838
+ o(s);
1859
1839
  },
1860
1840
  defaultParams: {
1861
- keyword: u
1841
+ keyword: f
1862
1842
  }
1863
1843
  });
1864
1844
  },
1865
- [i, f]
1866
- ), c = ce(
1867
- async (u) => {
1868
- const Y = u?.trim();
1869
- if (Y)
1845
+ [o, u]
1846
+ ), i = Q(
1847
+ async (f) => {
1848
+ const s = f?.trim();
1849
+ if (s)
1870
1850
  try {
1871
- const F = await J(
1872
- "SCMUTIL00101",
1851
+ const c = await te(
1852
+ "SCMUTIL00103",
1873
1853
  {
1874
- keyword: Y
1854
+ keyword: s
1875
1855
  },
1876
1856
  { showLoading: !1 }
1877
- ), v = F?.empList || [];
1878
- if (F?.empCnt === 0) {
1879
- z.warning(
1880
- "일치하는 사원을 찾을 수 없어 팝업을 열립니다. 사원을 선택해주세요."
1881
- ), y();
1857
+ ), y = c?.deptCnt ?? 0, g = c?.deptList || [];
1858
+ if (y === 0 || g.length === 0) {
1859
+ x.warning(
1860
+ "일치하는 부서를 찾을 수 없어 팝업을 열립니다. 부서를 선택해주세요."
1861
+ ), d(s);
1882
1862
  return;
1883
1863
  }
1884
- if (F?.empCnt > 1) {
1885
- z.info(
1886
- "여러 건이 검색되어 팝업이 열립니다. 사원을 선택해주세요."
1887
- ), y(Y);
1864
+ if (y > 1 || g.length > 1) {
1865
+ x.info(
1866
+ "여러 건이 검색되어 팝업이 열립니다. 부서를 선택해주세요."
1867
+ ), d(s);
1888
1868
  return;
1889
1869
  }
1890
- const V = v[0];
1891
- i(V);
1892
- } catch (F) {
1893
- console.error("사원 검색 서비스 실패:", F), z.error("사원 검색 중 오류가 발생했습니다.");
1870
+ const Y = g[0];
1871
+ o(Y);
1872
+ } catch (c) {
1873
+ console.error("부서 검색 서비스 실패:", c), x.error("부서 검색 중 오류가 발생했습니다.");
1894
1874
  }
1895
1875
  },
1896
- [i, y]
1876
+ [o, d]
1897
1877
  );
1898
- return /* @__PURE__ */ a(T, { label: e.label || "사원", name: void 0, children: /* @__PURE__ */ P(ae.Compact, { block: !0, children: [
1899
- /* @__PURE__ */ a(
1900
- E.Item,
1878
+ return /* @__PURE__ */ t(R, { label: e.label || "부서", name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
1879
+ /* @__PURE__ */ t(
1880
+ D.Item,
1901
1881
  {
1902
- name: l.fieldName,
1882
+ name: e.deptCdFieldName || "deptCd",
1903
1883
  style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
1904
1884
  validateStatus: "",
1905
1885
  help: "",
1906
- children: /* @__PURE__ */ a(
1907
- q,
1886
+ children: /* @__PURE__ */ t(
1887
+ X,
1908
1888
  {
1909
1889
  style: { color: "#999", backgroundColor: "#f5f5f5" },
1910
- placeholder: l.placeholder,
1890
+ placeholder: "부서코드",
1911
1891
  readOnly: !0
1912
1892
  }
1913
1893
  )
1914
1894
  }
1915
1895
  ),
1916
- /* @__PURE__ */ a(
1917
- E.Item,
1896
+ /* @__PURE__ */ t(
1897
+ D.Item,
1918
1898
  {
1919
- name: e.employeeFieldName || "employee",
1899
+ name: e.departmentFieldName || "department",
1920
1900
  hidden: !0
1921
1901
  }
1922
1902
  ),
1923
- /* @__PURE__ */ a(E.Item, { name: e.empNoFieldName || "empNo", hidden: !0 }),
1924
- /* @__PURE__ */ a(
1925
- E.Item,
1903
+ /* @__PURE__ */ t(
1904
+ D.Item,
1926
1905
  {
1927
- name: g.fieldName,
1906
+ name: n.fieldName,
1928
1907
  style: { width: "60%", marginBottom: 0 },
1929
- children: /* @__PURE__ */ a(
1930
- ht,
1908
+ children: /* @__PURE__ */ t(
1909
+ vt,
1931
1910
  {
1932
1911
  allowClear: !0,
1933
1912
  readOnly: e.readOnly,
1934
- placeholder: g.placeholder,
1935
- enterButton: /* @__PURE__ */ a(
1936
- X,
1913
+ placeholder: n.placeholder,
1914
+ enterButton: /* @__PURE__ */ t(
1915
+ J,
1937
1916
  {
1938
- icon: /* @__PURE__ */ a(Ne, {}),
1917
+ icon: /* @__PURE__ */ t(ge, {}),
1939
1918
  disabled: e.readOnly,
1940
1919
  onClick: () => {
1941
- y();
1920
+ d();
1942
1921
  }
1943
1922
  }
1944
1923
  ),
1945
- onSearch: c,
1946
- onChange: (u) => {
1947
- t.setFieldValue(l.fieldName, ""), t.setFieldValue(e.employeeFieldName || "employee", null), t.setFieldValue(e.empNoFieldName || "empNo", "");
1924
+ onSearch: i,
1925
+ onChange: (f) => {
1926
+ r.setFieldValue(e.deptCdFieldName || "deptCd", ""), r.setFieldValue(
1927
+ e.departmentFieldName || "department",
1928
+ null
1929
+ );
1948
1930
  }
1949
1931
  }
1950
1932
  )
1951
1933
  }
1952
1934
  )
1953
1935
  ] }) });
1936
+ }, xt = ({
1937
+ originNode: e,
1938
+ file: r,
1939
+ fileList: u,
1940
+ moveFile: l,
1941
+ onDrop: n
1942
+ }) => {
1943
+ const o = K(null), [{ handlerId: d }, i] = gt({
1944
+ accept: "file",
1945
+ collect: (y) => ({
1946
+ handlerId: y.getHandlerId()
1947
+ }),
1948
+ hover(y, g) {
1949
+ if (!o.current)
1950
+ return;
1951
+ const Y = y.uid, C = r.uid;
1952
+ if (Y === C)
1953
+ return;
1954
+ const O = de(u, { uid: C }), p = de(u, { uid: Y });
1955
+ if (p === -1 || O === -1)
1956
+ return;
1957
+ const E = o.current.getBoundingClientRect(), h = g.getClientOffset();
1958
+ if (!h)
1959
+ return;
1960
+ const P = (E.bottom - E.top) / 2, L = h.y - E.top;
1961
+ p < O && L < P || p > O && L > P || l(Y, C);
1962
+ },
1963
+ drop() {
1964
+ n();
1965
+ }
1966
+ }), [{ isDragging: f }, s] = pt({
1967
+ type: "file",
1968
+ item: () => ({
1969
+ uid: r.uid,
1970
+ index: de(u, { uid: r.uid })
1971
+ }),
1972
+ collect: (y) => ({
1973
+ isDragging: y.isDragging()
1974
+ })
1975
+ }), c = f ? 0 : 1;
1976
+ return s(i(o)), /* @__PURE__ */ t("div", { ref: o, style: { opacity: c }, "data-handler-id": d, children: e });
1977
+ }, Be = (e, r, u, l, n) => {
1978
+ const o = u[0]?.uid === r.uid, d = Ge(e, {
1979
+ href: r.url || void 0,
1980
+ title: void 0
1981
+ });
1982
+ return /* @__PURE__ */ T(_e, { children: [
1983
+ o && /* @__PURE__ */ T(
1984
+ "div",
1985
+ {
1986
+ style: {
1987
+ fontSize: 12,
1988
+ color: "var(--text-secondary, #666)",
1989
+ marginBottom: 4
1990
+ },
1991
+ children: [
1992
+ "총 ",
1993
+ u.length,
1994
+ "건"
1995
+ ]
1996
+ }
1997
+ ),
1998
+ /* @__PURE__ */ t(
1999
+ xt,
2000
+ {
2001
+ originNode: d,
2002
+ file: r,
2003
+ fileList: u,
2004
+ moveFile: l,
2005
+ onDrop: n
2006
+ }
2007
+ )
2008
+ ] });
2009
+ }, Te = (e, r) => {
2010
+ const u = String(r || "");
2011
+ return u.startsWith("picture") ? e.name.endsWith(".pdf") ? /* @__PURE__ */ t(lt, {}) : e.name.endsWith(".docx") || e.name.endsWith(".doc") ? /* @__PURE__ */ t(st, {}) : e.name.endsWith(".xlsx") || e.name.endsWith(".xls") ? /* @__PURE__ */ t(it, {}) : e.name.endsWith(".pptx") || e.name.endsWith(".ppt") ? /* @__PURE__ */ t(ct, {}) : /* @__PURE__ */ t(dt, {}) : u.startsWith("text") ? /* @__PURE__ */ t(ut, {}) : /* @__PURE__ */ t(mt, {});
2012
+ }, fn = ({
2013
+ listType: e = "picture",
2014
+ buttonText: r = "파일 선택",
2015
+ permissions: u,
2016
+ multiple: l = !1,
2017
+ fileGrpKey: n,
2018
+ uploadProps: o,
2019
+ heights: d,
2020
+ ...i
2021
+ }) => {
2022
+ const {
2023
+ defaultUploadProps: f,
2024
+ fileList: s,
2025
+ fetchFileList: c,
2026
+ reorderFiles: y,
2027
+ saveFileOrder: g
2028
+ } = Ae({ multiple: l, fileGrpKey: n, ...i });
2029
+ G(() => {
2030
+ n && c();
2031
+ }, [n]);
2032
+ const Y = !!u?.fileAdd, C = {
2033
+ ...f,
2034
+ listType: e,
2035
+ styles: {
2036
+ root: { height: d?.root },
2037
+ list: { height: d?.list }
2038
+ },
2039
+ iconRender: Te,
2040
+ itemRender(O, p, E) {
2041
+ return Be(
2042
+ O,
2043
+ p,
2044
+ E,
2045
+ y,
2046
+ g
2047
+ );
2048
+ },
2049
+ ...o
2050
+ };
2051
+ return /* @__PURE__ */ t(Me, { backend: Oe, children: /* @__PURE__ */ t(
2052
+ ee,
2053
+ {
2054
+ headers: { SYSCD: __SYS_CD__ },
2055
+ style: { height: d?.root },
2056
+ ...C,
2057
+ children: Y && l || (Y && !l || s.length === 0) && /* @__PURE__ */ t(J, { icon: /* @__PURE__ */ t(ae, {}), children: r })
2058
+ }
2059
+ ) });
2060
+ }, hn = ({
2061
+ listType: e = "picture",
2062
+ permissions: r,
2063
+ multiple: u = !1,
2064
+ fileGrpKey: l,
2065
+ uploadProps: n,
2066
+ heights: o,
2067
+ ...d
2068
+ }) => {
2069
+ const { defaultUploadProps: i, fetchFileList: f, reorderFiles: s, saveFileOrder: c } = Ae({ multiple: u, fileGrpKey: l, ...d }), y = {
2070
+ ...i,
2071
+ listType: e,
2072
+ // styles: {
2073
+ // root: { height: heights?.root },
2074
+ // list: { height: heights?.list, overflowY: 'auto' },
2075
+ // },
2076
+ iconRender: Te,
2077
+ itemRender(g, Y, C) {
2078
+ return Be(
2079
+ g,
2080
+ Y,
2081
+ C,
2082
+ s,
2083
+ c
2084
+ );
2085
+ },
2086
+ ...n
2087
+ };
2088
+ return G(() => {
2089
+ l && f();
2090
+ }, [l]), /* @__PURE__ */ t(Me, { backend: Oe, children: /* @__PURE__ */ T(
2091
+ yt,
2092
+ {
2093
+ style: { marginBottom: 10 },
2094
+ height: o?.dragger || 100,
2095
+ ...y,
2096
+ children: [
2097
+ /* @__PURE__ */ t("p", { className: "ant-upload-drag-icon", style: { marginBottom: 10 }, children: /* @__PURE__ */ t(De, { style: { fontSize: 25 } }) }),
2098
+ /* @__PURE__ */ t("p", { className: "ant-upload-hint", children: "첨부할 파일을 여기에 끌어다 놓거나, 영역을 클릭하여 파일을 직접 선택해주세요." })
2099
+ ]
2100
+ }
2101
+ ) });
1954
2102
  };
1955
2103
  export {
1956
- vt as BwgButton,
1957
- At as BwgCheck,
1958
- Mt as BwgCheckList,
1959
- _t as BwgDatePicker,
1960
- Dt as BwgDownload,
1961
- Wt as BwgEmpSearch,
1962
- nt as BwgForm,
1963
- T as BwgFormItem,
1964
- Et as BwgInput,
1965
- xt as BwgLargeUploader,
1966
- Ot as BwgMaskedDate,
1967
- Bt as BwgMaskedInput,
1968
- zt as BwgMaskedRange,
1969
- $t as BwgMultiSelect,
1970
- Rt as BwgNumber,
1971
- Ut as BwgRadio,
1972
- Tt as BwgRangePicker,
1973
- jt as BwgSearch,
1974
- Ht as BwgSelect,
1975
- Kt as BwgSwitch,
1976
- Pt as BwgTextArea,
1977
- Gt as BwgUploader
2104
+ oe as BwgButton,
2105
+ jt as BwgCheck,
2106
+ Gt as BwgCheckList,
2107
+ Xt as BwgDatePicker,
2108
+ mn as BwgDeptSearch,
2109
+ Kt as BwgDownload,
2110
+ hn as BwgDraggerUploader,
2111
+ dn as BwgEmpSearch,
2112
+ Ft as BwgForm,
2113
+ R as BwgFormItem,
2114
+ qt as BwgInput,
2115
+ Jt as BwgLargeUploader,
2116
+ Qt as BwgMaskedDate,
2117
+ Zt as BwgMaskedInput,
2118
+ en as BwgMaskedRange,
2119
+ tn as BwgMultiSelect,
2120
+ nn as BwgNumber,
2121
+ rn as BwgRadio,
2122
+ on as BwgRangePicker,
2123
+ an as BwgSearch,
2124
+ ln as BwgSelect,
2125
+ sn as BwgSwitch,
2126
+ cn as BwgTextArea,
2127
+ fn as BwgUploader,
2128
+ un as BwgXlsxUploader,
2129
+ xt as DraggableUploadListItem,
2130
+ Te as defaultIconRender,
2131
+ Be as defaultItemRender
1978
2132
  };