@bwg-ui/core 1.2.34 → 1.3.0

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