@bwg-ui/core 1.2.32 → 1.2.35

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 (49) hide show
  1. package/dist/chunks/{CMSearchIntfGwP01-uJxdFXUb.cjs → CMSearchIntfGwP01-CMSQULsU.cjs} +1 -1
  2. package/dist/chunks/{CMSearchIntfGwP01-C_y_G3xh.js → CMSearchIntfGwP01-Duabg_5A.js} +1 -1
  3. package/dist/chunks/{MenuReport-DkWB3Yyc.cjs → MenuReport-5e2dMr_C.cjs} +1 -1
  4. package/dist/chunks/{MenuReport-XwdiwiFn.js → MenuReport-B4EU1A6l.js} +1 -1
  5. package/dist/chunks/{common-components-DcTm1Tn1.cjs → common-components-D3-r7D-8.cjs} +30 -30
  6. package/dist/chunks/{common-components-Cxh8PLBH.js → common-components-DIpOkbb5.js} +452 -401
  7. package/dist/chunks/{layout-components-Bp6b-T1V.js → layout-components-D2Fla5uu.js} +952 -699
  8. package/dist/chunks/layout-components-pfHVy2at.cjs +35 -0
  9. package/dist/components/common/index.cjs +1 -1
  10. package/dist/components/common/index.js +1 -1
  11. package/dist/components/core/BwgDatePicker.d.ts.map +1 -1
  12. package/dist/components/core/BwgDownload.d.ts +3 -3
  13. package/dist/components/core/BwgDownload.d.ts.map +1 -1
  14. package/dist/components/core/index.cjs +1 -1
  15. package/dist/components/core/index.js +546 -526
  16. package/dist/components/guide/index.cjs +1 -1
  17. package/dist/components/guide/index.js +2 -2
  18. package/dist/components/layout/AppWrapper.d.ts +1 -1
  19. package/dist/components/layout/AppWrapper.d.ts.map +1 -1
  20. package/dist/components/layout/BwgPortal02.d.ts.map +1 -1
  21. package/dist/components/layout/custom/ConfigurableHeader.d.ts.map +1 -1
  22. package/dist/components/layout/default/HeaderContainer.d.ts +15 -0
  23. package/dist/components/layout/default/HeaderContainer.d.ts.map +1 -0
  24. package/dist/components/layout/default/index.d.ts +1 -0
  25. package/dist/components/layout/default/index.d.ts.map +1 -1
  26. package/dist/components/layout/extension/ContentWrapper.d.ts +17 -0
  27. package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -0
  28. package/dist/components/layout/extension/index.d.ts +1 -0
  29. package/dist/components/layout/extension/index.d.ts.map +1 -1
  30. package/dist/components/layout/index.cjs +1 -1
  31. package/dist/components/layout/index.js +15 -13
  32. package/dist/components/layout/types.d.ts +28 -2
  33. package/dist/components/layout/types.d.ts.map +1 -1
  34. package/dist/components/pages/rsrc/CMFileMstrM01.d.ts.map +1 -1
  35. package/dist/components/pages/rsrc/CMPrgrMstrM01.d.ts.map +1 -1
  36. package/dist/components/popup/index.cjs +1 -1
  37. package/dist/components/popup/index.js +1 -1
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.js +41 -39
  40. package/dist/stores/index.cjs +1 -1
  41. package/dist/stores/index.js +1 -1
  42. package/dist/utils/apiUtils.d.ts +1 -1
  43. package/dist/utils/apiUtils.d.ts.map +1 -1
  44. package/dist/utils/index.cjs +1 -1
  45. package/dist/utils/index.d.ts +1 -1
  46. package/dist/utils/index.d.ts.map +1 -1
  47. package/dist/utils/index.js +321 -312
  48. package/package.json +1 -1
  49. package/dist/chunks/layout-components-B4ptqDmC.cjs +0 -35
@@ -1,21 +1,21 @@
1
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 ke, useState as R, useEffect as H, forwardRef as De, 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 Ue, CheckCircleOutlined as Ae, 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";
2
+ import { Button as X, Form as O, Checkbox as ie, ConfigProvider as se, DatePicker as le, message as N, Card as Fe, List as ee, Input as te, Spin as Se, Upload as G, Typography as Ce, Flex as ue, Progress as we, notification as Ie, Tooltip as _e, Select as ce, Space as ae, InputNumber as Ne, Radio as Me, Switch as De } from "antd";
3
+ import { useMemo as W, memo as ke, useState as R, useEffect as H, forwardRef as xe, useRef as q, cloneElement as ve } from "react";
4
+ import { useUserStore as Be, usePopupStore as Ee } from "../../stores/index.js";
5
+ import E from "dayjs";
6
+ import { PaperClipOutlined as Oe, DownloadOutlined as Ae, DeleteOutlined as ze, InboxOutlined as Ve, UploadOutlined as Ye, CloudUploadOutlined as Ue, CheckCircleOutlined as $e, CloseCircleOutlined as Te, FileTextOutlined as Re, CalendarOutlined as je, ExclamationCircleOutlined as He, SearchOutlined as Ke } from "@ant-design/icons";
7
+ import { getApiDeps as me, callServiceByAppCd as Ge, getCrprCd as qe, callService as J, getUserInfo as P } from "../../utils/index.js";
9
8
  import We from "jszip";
10
- import Ce from "imask";
9
+ import be from "imask";
10
+ import { debounce as Pe, findIndex as ne } from "lodash";
11
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 : {
12
+ import { HTML5Backend as Qe } from "react-dnd-html5-backend";
13
+ const Lt = (t) => {
14
+ const { componentSize: e } = Be(), s = W(() => t.size ? t.size : {
15
15
  0: "small",
16
16
  1: "middle",
17
17
  2: "large"
18
- }[e], [e, t.size]), a = J(() => ({
18
+ }[e], [e, t.size]), o = W(() => ({
19
19
  0: 12,
20
20
  // 작게
21
21
  1: 14,
@@ -24,50 +24,50 @@ const bt = (t) => {
24
24
  // 크게
25
25
  })[e], [e]);
26
26
  return /* @__PURE__ */ r(
27
- Z,
27
+ X,
28
28
  {
29
29
  ...t,
30
- size: l,
30
+ size: s,
31
31
  className: "bwg-btn",
32
- style: { fontSize: `${a}px`, ...t.style },
32
+ style: { fontSize: `${o}px`, ...t.style },
33
33
  children: t.children
34
34
  }
35
35
  );
36
- }, E = ke(
36
+ }, B = ke(
37
37
  ({
38
38
  children: t,
39
39
  label: e,
40
- name: l,
41
- rules: a,
40
+ name: s,
41
+ rules: o,
42
42
  initialValue: n,
43
- style: o,
43
+ style: a,
44
44
  required: u,
45
45
  ...i
46
46
  }) => {
47
47
  const m = {
48
48
  fontWeight: "bold"
49
49
  };
50
- (a == null || a == null) && u && (a = [
50
+ (o == null || o == null) && u && (o = [
51
51
  {
52
52
  required: !0,
53
53
  message: `${e}을(를) 입력해주세요.`
54
54
  }
55
55
  ]);
56
- const c = Array.isArray(a) && a.some((g) => g.required === !0), S = () => typeof e == "string" ? /* @__PURE__ */ K("span", { style: m, children: [
56
+ const l = Array.isArray(o) && o.some((f) => f.required === !0), L = () => typeof e == "string" ? /* @__PURE__ */ K("span", { style: m, children: [
57
57
  e,
58
- c && /* @__PURE__ */ r("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
58
+ l && /* @__PURE__ */ r("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
59
59
  ] }) : /* @__PURE__ */ r("span", { style: m, children: e });
60
60
  return /* @__PURE__ */ r(
61
61
  O.Item,
62
62
  {
63
63
  className: "bwg-form-item",
64
- label: e ? S() : void 0,
64
+ label: e ? L() : void 0,
65
65
  labelAlign: i.labelAlign || "left",
66
- name: l,
67
- rules: a,
66
+ name: s,
67
+ rules: o,
68
68
  colon: !1,
69
69
  initialValue: n,
70
- style: o,
70
+ style: a,
71
71
  ...i,
72
72
  children: t
73
73
  }
@@ -79,38 +79,38 @@ const bt = (t) => {
79
79
  format: "YN"
80
80
  }
81
81
  }) => {
82
- const l = O.useFormInstance();
82
+ const s = O.useFormInstance();
83
83
  return /* @__PURE__ */ r(
84
- E,
84
+ B,
85
85
  {
86
86
  ...t,
87
87
  getValueProps: (n) => ({ checked: e.format === "boolean" ? !!n : n === "Y" }),
88
88
  normalize: (n) => typeof n == "boolean" ? e.format === "boolean" ? n : n ? "Y" : "N" : e.format === "boolean" ? !!n : n ? "Y" : "N",
89
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);
90
+ e.format === "boolean" ? s.setFieldValue(t?.name, n.target.checked) : s.setFieldValue(t?.name, n.target.checked ? "Y" : "N"), e.onChange && e.onChange(n);
91
91
  }, children: e?.title })
92
92
  }
93
93
  );
94
- }, Lt = ({ itemProps: t, inputProps: e }) => {
95
- const l = O.useFormInstance(), [a, n] = R(
94
+ }, wt = ({ itemProps: t, inputProps: e }) => {
95
+ const s = O.useFormInstance(), [o, n] = R(
96
96
  t?.initialValue ?? []
97
- ), [o, u] = R([]), i = o.length > 0 && o.length == a?.length, m = a?.length > 0 && a.length < o.length;
97
+ ), [a, u] = R([]), i = a.length > 0 && a.length == o?.length, m = o?.length > 0 && o.length < a.length;
98
98
  H(() => {
99
- u(c(e?.options));
99
+ u(l(e?.options));
100
100
  }, [e?.options]), H(() => {
101
- n(a);
102
- }, [a]);
103
- const c = (C) => {
104
- const L = [];
105
- return (C || []).map((D, V) => {
106
- L.push(D.value);
107
- }), L;
108
- }, S = (C) => {
109
- n(C.target.checked ? o : []), l.setFieldValue(t?.name, C.target.checked ? o : []);
110
- }, g = (C) => {
111
- n(C), l.setFieldValue(t?.name, C), e?.onChange && typeof e?.onChange == "function" && e?.onChange(C);
101
+ n(o);
102
+ }, [o]);
103
+ const l = (M) => {
104
+ const Y = [];
105
+ return (M || []).map((I, A) => {
106
+ Y.push(I.value);
107
+ }), Y;
108
+ }, L = (M) => {
109
+ n(M.target.checked ? a : []), s.setFieldValue(t?.name, M.target.checked ? a : []);
110
+ }, f = (M) => {
111
+ n(M), s.setFieldValue(t?.name, M), e?.onChange && typeof e?.onChange == "function" && e?.onChange(M);
112
112
  };
113
- return /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ K(le, { theme: {
113
+ return /* @__PURE__ */ r(B, { ...t, children: /* @__PURE__ */ K(se, { theme: {
114
114
  components: {
115
115
  Checkbox: {
116
116
  colorPrimary: "var(--check-primary)",
@@ -124,7 +124,7 @@ const bt = (t) => {
124
124
  {
125
125
  indeterminate: m,
126
126
  checked: i,
127
- onChange: S,
127
+ onChange: L,
128
128
  children: "전체선택"
129
129
  }
130
130
  ),
@@ -132,12 +132,12 @@ const bt = (t) => {
132
132
  ie.Group,
133
133
  {
134
134
  options: e?.options,
135
- value: a,
136
- onChange: g
135
+ value: o,
136
+ onChange: f
137
137
  }
138
138
  )
139
139
  ] }) });
140
- }, me = {
140
+ }, fe = {
141
141
  year: { displayFormat: "YYYY", outputFormat: "YYYY" },
142
142
  month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
143
143
  date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
@@ -146,94 +146,114 @@ const bt = (t) => {
146
146
  displayFormat: "YYYY-MM-DD HH:mm",
147
147
  outputFormat: "YYYYMMDDHHmm"
148
148
  }
149
- }, wt = ({
149
+ }, It = ({
150
150
  itemProps: t,
151
151
  inputProps: e,
152
- type: l = "date",
153
- returnType: a = "string"
152
+ type: s = "date",
153
+ returnType: o = "string"
154
154
  }) => {
155
- const { displayFormat: n, outputFormat: o } = J(
156
- () => me[l],
157
- [l]
158
- ), u = J(
159
- () => Object.values(me).map((i) => i.outputFormat).sort((i, m) => {
155
+ const { displayFormat: n, outputFormat: a } = W(
156
+ () => fe[s],
157
+ [s]
158
+ ), u = W(
159
+ () => Object.values(fe).map((i) => i.outputFormat).sort((i, m) => {
160
160
  if (i.length === m.length) {
161
- if (i === o) return -1;
162
- if (m === o) return 1;
161
+ if (i === a) return -1;
162
+ if (m === a) return 1;
163
163
  }
164
164
  return m.length - i.length;
165
165
  }),
166
- [o]
166
+ [a]
167
167
  // type(outputFormat)이 바뀔 때마다 재정렬
168
168
  );
169
169
  return /* @__PURE__ */ r(
170
- E,
170
+ B,
171
171
  {
172
172
  ...t,
173
173
  getValueProps: (i) => ({
174
174
  // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환
175
- value: i ? B.isDayjs(i) ? i : B(i, u) : null
175
+ value: i ? E.isDayjs(i) ? i : E(i, u) : null
176
176
  }),
177
- normalize: (i) => i ? a === "dayjs" ? i : i.format(o) : null,
177
+ normalize: (i) => i ? o === "dayjs" ? i : i.format(a) : null,
178
178
  children: /* @__PURE__ */ r(
179
- se,
179
+ le,
180
180
  {
181
181
  ...e,
182
- picker: l === "datetime" ? "date" : l,
183
- showTime: e?.showTime ?? (l === "datetime" || l === "time"),
184
- format: n
182
+ picker: s === "datetime" ? "date" : s,
183
+ showTime: e?.showTime ?? (s === "datetime" || s === "time"),
184
+ format: e?.format ? {
185
+ format: e?.format?.format,
186
+ type: "mask"
187
+ } : n
185
188
  }
186
189
  )
187
190
  }
188
191
  );
189
- }, It = ({
192
+ }, _t = ({
190
193
  fileGrpKey: t,
191
194
  onFetchFilesTrxCd: e = "SCMFILE00101",
192
- readOnly: l = !1,
193
- sysCd: a = __SYS_CD__
195
+ readOnly: s = !1,
196
+ appCd: o = __APP_CD__
194
197
  }) => {
195
- const [n, o] = R([]);
198
+ const [n, a] = R([]);
196
199
  H(() => {
197
- t && e ? a != __SYS_CD__ ? qe(__APP_CD__, e, {
198
- crprCd: G()?.crprCd,
199
- sysCd: a,
200
- fileGrpKey: t
201
- }).then((i) => {
202
- if (i?.sub) {
203
- const m = i.sub.map((c) => ({
204
- uid: c.fileKey,
205
- name: c.lgclFileNm,
206
- filePath: c.filePath
207
- }));
208
- o(m);
209
- }
210
- }).catch((i) => {
211
- console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), _.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
212
- }) : X(e, {
213
- crprCd: G()?.crprCd,
214
- sysCd: a,
215
- fileGrpKey: t
216
- }).then((i) => {
217
- if (i?.sub) {
218
- const m = i.sub.map((c) => ({
219
- uid: c.fileKey,
220
- name: c.lgclFileNm,
221
- filePath: c.filePath
222
- }));
223
- o(m);
224
- }
225
- }).catch((i) => {
226
- console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), _.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
227
- }) : o([]);
228
- }, [t, e]);
200
+ if (e)
201
+ if (o != __APP_CD__) {
202
+ const m = me().findSystemByAppCd?.(o ?? __APP_CD__);
203
+ if (!m || !m.sysCd) {
204
+ console.error("해당 앱코드는 존재하지 않습니다.", o);
205
+ return;
206
+ }
207
+ Ge(
208
+ { trxCd: e, appCd: o },
209
+ {
210
+ crprCd: qe(),
211
+ sysCd: m.sysCd,
212
+ fileGrpKey: t
213
+ }
214
+ ).then((l) => {
215
+ if (l?.sub) {
216
+ const L = l.sub.map((f) => ({
217
+ uid: f.fileKey,
218
+ name: f.lgclFileNm,
219
+ filePath: f.filePath
220
+ }));
221
+ a(L);
222
+ }
223
+ }).catch((l) => {
224
+ console.error("파일 목록 조회 서비스 호출에 실패했습니다.", l), N.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
225
+ });
226
+ } else
227
+ J(e, {
228
+ crprCd: P()?.crprCd,
229
+ sysCd: __SYS_CD__,
230
+ fileGrpKey: t
231
+ }).then((i) => {
232
+ if (i?.sub) {
233
+ const m = i.sub.map((l) => ({
234
+ uid: l.fileKey,
235
+ name: l.lgclFileNm,
236
+ filePath: l.filePath
237
+ }));
238
+ a(m);
239
+ }
240
+ }).catch((i) => {
241
+ console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), N.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
242
+ });
243
+ else
244
+ a([]);
245
+ }, [t, e, o]);
229
246
  const u = async (i) => {
230
247
  try {
231
- let m;
232
- a != __SYS_CD__ ? m = "/api/download/" + a : m = "/api/download";
233
- const c = await fetch(m, {
248
+ const l = me().findSystemByAppCd?.(o ?? __APP_CD__);
249
+ if (!l || !l.sysCd) {
250
+ console.error("해당 앱코드는 존재하지 않습니다.", o);
251
+ return;
252
+ }
253
+ const f = await fetch("/api/download", {
234
254
  method: "POST",
235
255
  headers: {
236
- SYSCD: __SYS_CD__,
256
+ SYSCD: l.sysCd,
237
257
  "Content-Type": "application/json"
238
258
  // 여기에 필요한 다른 헤더(예: 인증 토큰)를 추가할 수 있습니다.
239
259
  },
@@ -243,44 +263,44 @@ const bt = (t) => {
243
263
  fileKey: i.uid
244
264
  })
245
265
  });
246
- if (!c.ok) {
247
- const D = (await c.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
248
- throw new Error(D);
266
+ if (!f.ok) {
267
+ const S = (await f.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
268
+ throw new Error(S);
249
269
  }
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);
270
+ const M = await f.blob(), Y = window.URL.createObjectURL(M), I = document.createElement("a");
271
+ I.href = Y, I.setAttribute("download", i.name), document.body.appendChild(I), I.click(), document.body.removeChild(I), window.URL.revokeObjectURL(Y);
252
272
  } catch (m) {
253
- console.error(m), _.error(
273
+ console.error(m), N.error(
254
274
  m.message || "파일을 다운로드하는 중 오류가 발생했습니다."
255
275
  );
256
276
  }
257
277
  };
258
- return Ke(n) ? null : /* @__PURE__ */ r(ye, { title: "파일 목록", children: /* @__PURE__ */ r(
278
+ return /* @__PURE__ */ r(Fe, { title: "파일 목록", children: /* @__PURE__ */ r(
259
279
  ee,
260
280
  {
261
281
  dataSource: n,
262
282
  renderItem: (i) => /* @__PURE__ */ r(
263
283
  ee.Item,
264
284
  {
265
- actions: l ? [] : [
285
+ actions: s ? [] : [
266
286
  /* @__PURE__ */ r(
267
- Z,
287
+ X,
268
288
  {
269
289
  type: "text",
270
- icon: /* @__PURE__ */ r(Oe, {}),
290
+ icon: /* @__PURE__ */ r(Ae, {}),
271
291
  onClick: () => u(i)
272
292
  },
273
293
  "download"
274
294
  )
275
295
  ],
276
- children: /* @__PURE__ */ r(ee.Item.Meta, { avatar: /* @__PURE__ */ r(Be, {}), title: i.name })
296
+ children: /* @__PURE__ */ r(ee.Item.Meta, { avatar: /* @__PURE__ */ r(Oe, {}), title: i.name })
277
297
  }
278
298
  )
279
299
  }
280
300
  ) });
281
- }, Qe = De(
282
- ({ children: t, labelCol: e, style: l, className: a, ...n }, o) => /* @__PURE__ */ r(
283
- le,
301
+ }, et = xe(
302
+ ({ children: t, labelCol: e, style: s, className: o, ...n }, a) => /* @__PURE__ */ r(
303
+ se,
284
304
  {
285
305
  form: {
286
306
  /**
@@ -292,20 +312,20 @@ const bt = (t) => {
292
312
  children: /* @__PURE__ */ r(
293
313
  O,
294
314
  {
295
- ref: o,
315
+ ref: a,
296
316
  ...n,
297
317
  requiredMark: !1,
298
318
  labelCol: e || { flex: "100px" },
299
- style: { padding: "10px", ...l },
300
- className: `bwg-form ${a ?? ""}`,
319
+ style: { padding: "10px", ...s },
320
+ className: `bwg-form ${o ?? ""}`,
301
321
  children: t
302
322
  }
303
323
  )
304
324
  }
305
325
  )
306
326
  );
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 = [
327
+ et.displayName = "BwgForm";
328
+ const Nt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(B, { ...t, children: /* @__PURE__ */ r(te, { ...e }) }), { Text: oe } = Ce, { Dragger: tt } = G, rt = [
309
329
  ".pdf",
310
330
  ".xlsx",
311
331
  ".xls",
@@ -323,60 +343,60 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
323
343
  ".gif",
324
344
  // 압축
325
345
  ".zip"
326
- ], rt = (t, e = 2) => {
346
+ ], nt = (t, e = 2) => {
327
347
  if (t === 0) return "0 Bytes";
328
- const l = 1024, a = e < 0 ? 0 : e, n = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(t) / Math.log(l));
329
- return parseFloat((t / Math.pow(l, o)).toFixed(a)) + " " + n[o];
330
- }, Nt = ({
348
+ const s = 1024, o = e < 0 ? 0 : e, n = ["Bytes", "KB", "MB", "GB", "TB"], a = Math.floor(Math.log(t) / Math.log(s));
349
+ return parseFloat((t / Math.pow(s, a)).toFixed(o)) + " " + n[a];
350
+ }, Mt = ({
331
351
  title: t = "첨부파일",
332
352
  fileGrpKey: e,
333
- onUploadComplete: l,
334
- onSuccessTrxCd: a = "SCMFILE00102",
353
+ onUploadComplete: s,
354
+ onSuccessTrxCd: o = "SCMFILE00102",
335
355
  // BwgUploader와 동일한 기본 trxCd 설정
336
356
  anotherServiceTrxCd: n = "SCMFILE00105",
337
- allowedExtensions: o = tt,
357
+ allowedExtensions: a = rt,
338
358
  maxFileSize: u = 2048
339
359
  // 기본값 2GB
340
360
  }) => {
341
- const [i, m] = R([]), [c, S] = R(!1), [g, C] = R(!1), [L, D] = R(0), V = (h) => {
342
- if (o && o.length > 0) {
343
- const s = ((F) => {
361
+ const [i, m] = R([]), [l, L] = R(!1), [f, M] = R(!1), [Y, I] = R(0), A = (g) => {
362
+ if (a && a.length > 0) {
363
+ const c = ((F) => {
344
364
  const w = F.lastIndexOf(".");
345
365
  return w === -1 ? "" : F.substring(w).toLowerCase();
346
- })(h.name);
347
- if (!o.includes(s))
348
- return _.error(
349
- `${h.name} 파일은 허용되지 않는 확장자입니다. (${o.join(
366
+ })(g.name);
367
+ if (!a.includes(c))
368
+ return N.error(
369
+ `${g.name} 파일은 허용되지 않는 확장자입니다. (${a.join(
350
370
  ", "
351
371
  )}만 가능)`
352
372
  ), !1;
353
373
  }
354
374
  return !0;
355
- }, N = async () => {
356
- const h = i.filter((I) => I.status !== "done"), y = h.reduce(
357
- (I, $) => I + ($.size || 0),
375
+ }, S = async () => {
376
+ const g = i.filter((_) => _.status !== "done"), y = g.reduce(
377
+ (_, $) => _ + ($.size || 0),
358
378
  0
359
- ), s = 2 * 1024 * 1024 * 1024;
360
- if (y > s) {
361
- we.error({
379
+ ), c = 2 * 1024 * 1024 * 1024;
380
+ if (y > c) {
381
+ Ie.error({
362
382
  message: "업로드 용량 초과",
363
383
  description: "한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."
364
384
  });
365
385
  return;
366
386
  }
367
- if (h.length === 0) {
368
- _.warning(
387
+ if (g.length === 0) {
388
+ N.warning(
369
389
  "업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다."
370
390
  );
371
391
  return;
372
392
  }
373
- C(!0);
393
+ M(!0);
374
394
  let F;
375
395
  try {
376
- const I = new We();
377
- h.forEach(($) => {
378
- $.originFileObj && I.file($.name, $.originFileObj);
379
- }), F = await I.generateAsync({
396
+ const _ = new We();
397
+ g.forEach(($) => {
398
+ $.originFileObj && _.file($.name, $.originFileObj);
399
+ }), F = await _.generateAsync({
380
400
  type: "blob",
381
401
  compression: "DEFLATE",
382
402
  compressionOptions: {
@@ -384,125 +404,125 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
384
404
  // 높은 압축률 설정
385
405
  }
386
406
  });
387
- } catch (I) {
388
- C(!1), _.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", I);
407
+ } catch (_) {
408
+ M(!1), N.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", _);
389
409
  return;
390
410
  }
391
- C(!1);
411
+ M(!1);
392
412
  const w = new FormData();
393
- w.append("file", F, "upload.zip"), S(!0), D(0);
413
+ w.append("file", F, "upload.zip"), L(!0), I(0);
394
414
  try {
395
- const I = await new Promise((Y, M) => {
415
+ const _ = await new Promise((C, D) => {
396
416
  const z = new XMLHttpRequest();
397
417
  z.open("POST", "/api/upload-large", !0), z.upload.onprogress = (x) => {
398
418
  if (x.lengthComputable) {
399
419
  const re = Math.round(
400
420
  x.loaded / x.total * 100
401
421
  );
402
- D(re);
422
+ I(re);
403
423
  }
404
424
  }, z.onload = () => {
405
425
  if (z.status >= 200 && z.status < 300)
406
426
  try {
407
427
  const x = JSON.parse(z.responseText);
408
- x.success ? Y(x) : M(
428
+ x.success ? C(x) : D(
409
429
  new Error(x.message || "파일 업로드에 실패했습니다.")
410
430
  );
411
431
  } catch {
412
- M(new Error("잘못된 서버 응답입니다."));
432
+ D(new Error("잘못된 서버 응답입니다."));
413
433
  }
414
434
  else
415
435
  try {
416
436
  const x = JSON.parse(z.responseText);
417
- M(new Error(x.message || `서버 오류: ${z.status}`));
437
+ D(new Error(x.message || `서버 오류: ${z.status}`));
418
438
  } catch {
419
- M(new Error(`서버 오류: ${z.status}`));
439
+ D(new Error(`서버 오류: ${z.status}`));
420
440
  }
421
441
  }, z.onerror = () => {
422
- M(new Error("네트워크 오류가 발생했습니다."));
442
+ D(new Error("네트워크 오류가 발생했습니다."));
423
443
  }, z.send(w);
424
444
  });
425
- _.success(
426
- I.message || "압축 파일이 성공적으로 업로드되었습니다."
445
+ N.success(
446
+ _.message || "압축 파일이 성공적으로 업로드되었습니다."
427
447
  );
428
448
  const $ = i.map(
429
- (Y) => h.find((M) => M.uid === Y.uid) ? { ...Y, status: "done" } : Y
449
+ (C) => g.find((D) => D.uid === C.uid) ? { ...C, status: "done" } : C
430
450
  );
431
- if (m($), a && I.uploadedFiles && Array.isArray(I.uploadedFiles)) {
432
- const Y = G();
433
- I.uploadedFiles.forEach((M) => {
451
+ if (m($), o && _.uploadedFiles && Array.isArray(_.uploadedFiles)) {
452
+ const C = P();
453
+ _.uploadedFiles.forEach((D) => {
434
454
  const z = {
435
- crprCd: Y?.crprCd,
455
+ crprCd: C?.crprCd,
436
456
  sysCd: __SYS_CD__,
437
457
  fileGrpKey: e,
438
458
  sub: [
439
459
  {
440
- crprCd: Y?.crprCd,
460
+ crprCd: C?.crprCd,
441
461
  sysCd: __SYS_CD__,
442
462
  fileGrpKey: e,
443
- physFileNm: M.fileNameP,
444
- lgclFileNm: M.fileNameL,
445
- filePath: M.filePath,
446
- fileExtn: M.fileExt,
447
- fileSize: M.fileSize,
463
+ physFileNm: D.fileNameP,
464
+ lgclFileNm: D.fileNameL,
465
+ filePath: D.filePath,
466
+ fileExtn: D.fileExt,
467
+ fileSize: D.fileSize,
448
468
  mltpYn: "Y"
449
469
  }
450
470
  ]
451
471
  };
452
- X(a, z).then((x) => {
453
- const re = i.map((P) => ({
454
- crprCd: Y?.crprCd,
472
+ J(o, z).then((x) => {
473
+ const re = i.map((Z) => ({
474
+ crprCd: C?.crprCd,
455
475
  sysCd: __SYS_CD__,
456
476
  fileGrpKey: x.sub[0].fileGrpKey,
457
477
  fileKey: x.sub[0].fileKey,
458
- lgclFileNm: P.name,
459
- fileSize: P.size,
460
- fileExtn: P.name.split(".").pop(),
461
- fileType: P.type
478
+ lgclFileNm: Z.name,
479
+ fileSize: Z.size,
480
+ fileExtn: Z.name.split(".").pop(),
481
+ fileType: Z.type
462
482
  }));
463
- X(n, {
483
+ J(n, {
464
484
  // 파일 목록에 fileKey를 추가합니다.
465
485
  sub: re
466
486
  });
467
487
  }).catch((x) => {
468
- console.error("후처리 서비스 호출 실패:", x), _.error(
469
- `${M.fileNameL} 파일의 후처리 작업에 실패했습니다.`
488
+ console.error("후처리 서비스 호출 실패:", x), N.error(
489
+ `${D.fileNameL} 파일의 후처리 작업에 실패했습니다.`
470
490
  );
471
- }), l && l({
472
- fileNameP: M.fileNameP,
473
- fileNameL: M.fileNameL
491
+ }), s && s({
492
+ fileNameP: D.fileNameP,
493
+ fileNameL: D.fileNameL
474
494
  });
475
495
  });
476
496
  }
477
- } catch (I) {
478
- _.error(I.message || "파일 업로드 중 오류가 발생했습니다.");
497
+ } catch (_) {
498
+ N.error(_.message || "파일 업로드 중 오류가 발생했습니다.");
479
499
  const $ = i.map(
480
- (Y) => h.find((M) => M.uid === Y.uid) ? {
481
- ...Y,
500
+ (C) => g.find((D) => D.uid === C.uid) ? {
501
+ ...C,
482
502
  status: "error",
483
- response: I.message || "파일 업로드 중 오류가 발생했습니다."
484
- } : Y
503
+ response: _.message || "파일 업로드 중 오류가 발생했습니다."
504
+ } : C
485
505
  );
486
506
  m($);
487
507
  } finally {
488
- S(!1);
508
+ L(!1);
489
509
  }
490
510
  }, p = {
491
511
  multiple: !0,
492
512
  fileList: i,
493
- beforeUpload: (h) => V(h) ? u && h.size >= u * 1024 * 1024 ? (_.error(
513
+ beforeUpload: (g) => A(g) ? u && g.size >= u * 1024 * 1024 ? (N.error(
494
514
  `대용량 첨부 파일 최대 크기는 ${(u / 1024).toFixed(
495
515
  1
496
516
  )}GB입니다.`
497
- ), 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);
517
+ ), G.LIST_IGNORE) : !1 : G.LIST_IGNORE,
518
+ onChange: ({ fileList: g }) => {
519
+ const y = new Map(i.map((c) => [c.uid, c]));
520
+ g.forEach((c) => {
521
+ y.set(c.uid, c);
502
522
  }), m(Array.from(y.values()));
503
523
  },
504
- onRemove: (h) => {
505
- const y = i.filter((s) => s.uid !== h.uid);
524
+ onRemove: (g) => {
525
+ const y = i.filter((c) => c.uid !== g.uid);
506
526
  m(y);
507
527
  },
508
528
  showUploadList: !1
@@ -511,17 +531,17 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
511
531
  return /* @__PURE__ */ r(
512
532
  Se,
513
533
  {
514
- spinning: c || g,
515
- tip: g ? "파일 압축 중..." : `파일 업로드 중... ${L}%`,
534
+ spinning: l || f,
535
+ tip: f ? "파일 압축 중..." : `파일 업로드 중... ${Y}%`,
516
536
  children: /* @__PURE__ */ K("div", { className: "bwg-large-uploader-container", children: [
517
537
  /* @__PURE__ */ r(
518
- ye,
538
+ Fe,
519
539
  {
520
540
  title: /* @__PURE__ */ r(oe, { strong: !0, children: t }),
521
- extra: /* @__PURE__ */ r(q, { ...p, children: /* @__PURE__ */ r(Z, { icon: /* @__PURE__ */ r(Ye, {}), children: "파일 선택" }) }),
541
+ extra: /* @__PURE__ */ r(G, { ...p, children: /* @__PURE__ */ r(X, { icon: /* @__PURE__ */ r(Ye, {}), children: "파일 선택" }) }),
522
542
  style: { padding: 0 },
523
543
  children: /* @__PURE__ */ r(
524
- et,
544
+ tt,
525
545
  {
526
546
  ...p,
527
547
  style: {
@@ -534,39 +554,39 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
534
554
  {
535
555
  style: { textAlign: "left" },
536
556
  dataSource: i,
537
- renderItem: (h) => {
538
- const y = h.status === "done", s = h.status === "error";
557
+ renderItem: (g) => {
558
+ const y = g.status === "done", c = g.status === "error";
539
559
  let F;
540
560
  return y ? F = /* @__PURE__ */ r(
541
- Ae,
561
+ $e,
542
562
  {
543
563
  style: { color: "#52c41a", fontSize: 14 }
544
564
  }
545
- ) : s ? F = /* @__PURE__ */ r(
546
- Ie,
565
+ ) : c ? F = /* @__PURE__ */ r(
566
+ _e,
547
567
  {
548
- title: typeof h.response == "string" ? h.response : "업로드 실패",
568
+ title: typeof g.response == "string" ? g.response : "업로드 실패",
549
569
  children: /* @__PURE__ */ r(
550
- $e,
570
+ Te,
551
571
  {
552
572
  style: { color: "#ff4d4f", fontSize: 14 }
553
573
  }
554
574
  )
555
575
  }
556
- ) : F = /* @__PURE__ */ r(Te, { style: { fontSize: 14 } }), /* @__PURE__ */ r(
576
+ ) : F = /* @__PURE__ */ r(Re, { style: { fontSize: 14 } }), /* @__PURE__ */ r(
557
577
  ee.Item,
558
578
  {
559
579
  actions: [
560
- /* @__PURE__ */ r(oe, { type: "secondary", children: rt(h.size || 0) }, "size"),
580
+ /* @__PURE__ */ r(oe, { type: "secondary", children: nt(g.size || 0) }, "size"),
561
581
  /* @__PURE__ */ r(
562
- Z,
582
+ X,
563
583
  {
564
584
  type: "text",
565
585
  icon: /* @__PURE__ */ r(ze, {}),
566
586
  onClick: (w) => {
567
- w.stopPropagation(), p.onRemove?.(h);
587
+ w.stopPropagation(), p.onRemove?.(g);
568
588
  },
569
- disabled: c || g
589
+ disabled: l || f
570
590
  },
571
591
  "delete"
572
592
  )
@@ -575,11 +595,11 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
575
595
  ee.Item.Meta,
576
596
  {
577
597
  avatar: F,
578
- title: /* @__PURE__ */ r(oe, { type: s ? "danger" : void 0, children: h.name })
598
+ title: /* @__PURE__ */ r(oe, { type: c ? "danger" : void 0, children: g.name })
579
599
  }
580
600
  )
581
601
  },
582
- h.uid
602
+ g.uid
583
603
  );
584
604
  }
585
605
  }
@@ -609,13 +629,13 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
609
629
  gap: "large",
610
630
  style: { marginTop: 16 },
611
631
  children: [
612
- c && /* @__PURE__ */ r("div", { style: { width: "250px" }, children: /* @__PURE__ */ r(Le, { percent: L, size: "small" }) }),
632
+ l && /* @__PURE__ */ r("div", { style: { width: "250px" }, children: /* @__PURE__ */ r(we, { percent: Y, size: "small" }) }),
613
633
  /* @__PURE__ */ r(
614
- Z,
634
+ X,
615
635
  {
616
636
  type: "primary",
617
- onClick: N,
618
- disabled: c || g || i.filter((h) => h.status !== "done").length === 0,
637
+ onClick: S,
638
+ disabled: l || f || i.filter((g) => g.status !== "done").length === 0,
619
639
  icon: /* @__PURE__ */ r(Ue, {}),
620
640
  children: "일괄 업로드"
621
641
  }
@@ -626,35 +646,35 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
626
646
  ] })
627
647
  }
628
648
  );
629
- }, nt = (t) => {
649
+ }, ot = (t) => {
630
650
  if (typeof t == "string")
631
651
  return t.replace(/0/g, "_");
632
652
  if (Array.isArray(t))
633
653
  return t[0].replace(/0/g, "_");
634
654
  if (typeof t == "object" && "mask" in t && "blocks" in t) {
635
- const { mask: e, blocks: l } = t;
636
- return e.split(".").map((a) => {
637
- const o = l?.[a]?.maxLength ?? 3;
638
- return "_".repeat(o);
655
+ const { mask: e, blocks: s } = t;
656
+ return e.split(".").map((o) => {
657
+ const a = s?.[o]?.maxLength ?? 3;
658
+ return "_".repeat(a);
639
659
  }).join(".");
640
660
  }
641
661
  return "";
642
- }, Mt = ({
662
+ }, Dt = ({
643
663
  itemProps: t,
644
664
  inputProps: e,
645
- mask: l
665
+ mask: s
646
666
  }) => {
647
- const a = W(null), n = O.useFormInstance(), o = J(() => nt(l), [l]);
667
+ const o = q(null), n = O.useFormInstance(), a = W(() => ot(s), [s]);
648
668
  return H(() => {
649
- if (!a.current?.input) return;
650
- const u = typeof l == "string" || Array.isArray(l) ? { mask: l } : l, i = Ce(a.current.input, u);
669
+ if (!o.current?.input) return;
670
+ const u = typeof s == "string" || Array.isArray(s) ? { mask: s } : s, i = be(o.current.input, u);
651
671
  return i.on("accept", () => {
652
672
  n && t?.name && n.setFieldValue(t.name, i.value);
653
673
  }), () => {
654
674
  i.destroy();
655
675
  };
656
- }, [l, n, t?.name]), /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(te, { ...e, ref: a, placeholder: o }) });
657
- }, ot = (t) => {
676
+ }, [s, n, t?.name]), /* @__PURE__ */ r(B, { ...t, children: /* @__PURE__ */ r(te, { ...e, ref: o, placeholder: a }) });
677
+ }, at = (t) => {
658
678
  switch (t) {
659
679
  case "year":
660
680
  return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
@@ -671,63 +691,63 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
671
691
  }, kt = ({
672
692
  type: t = "date",
673
693
  itemProps: e = { name: "calendar" },
674
- inputProps: l
694
+ inputProps: s
675
695
  }) => {
676
- const { format: a, mask: n, outputFormat: o } = ot(t), u = W(null), i = W(null), m = W(null), c = O.useFormInstance(), [S, g] = R(!1), [C, L] = R(!1), D = e?.name, [V, N] = R(null), p = O.useWatch(D, c);
696
+ const { format: o, mask: n, outputFormat: a } = at(t), u = q(null), i = q(null), m = q(null), l = O.useFormInstance(), [L, f] = R(!1), [M, Y] = R(!1), I = e?.name, [A, S] = R(null), p = O.useWatch(I, l);
677
697
  H(() => {
678
698
  if (!u.current?.input) return;
679
- const s = Ce(u.current.input, {
699
+ const c = be(u.current.input, {
680
700
  mask: n,
681
701
  lazy: !1
682
702
  });
683
- return i.current = s, s.on("accept", () => {
684
- const F = s.value;
685
- F.length > 0 && g(!0);
686
- const w = B(F, a, !0);
687
- F.length === a.length && w.isValid() && (c.setFieldValue(D, s.value), N(w), i.current?.updateValue());
703
+ return i.current = c, c.on("accept", () => {
704
+ const F = c.value;
705
+ F.length > 0 && f(!0);
706
+ const w = E(F, o, !0);
707
+ F.length === o.length && w.isValid() && (l.setFieldValue(I, c.value), S(w), i.current?.updateValue());
688
708
  }), () => {
689
- s.destroy();
709
+ c.destroy();
690
710
  };
691
- }, [a, n]), H(() => {
711
+ }, [o, n]), H(() => {
692
712
  if (!p) {
693
- N(null);
713
+ S(null);
694
714
  return;
695
715
  }
696
- let s = null;
697
- if (typeof p == "string" && p.length === o.length && /^\d+$/.test(p))
716
+ let c = null;
717
+ if (typeof p == "string" && p.length === a.length && /^\d+$/.test(p))
698
718
  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}`, a, !0);
719
+ const F = p.substring(0, 4), w = p.substring(4, 6), _ = p.substring(6, 8);
720
+ c = E(`${F}-${w}-${_}`, o, !0);
701
721
  } else if (t === "month") {
702
722
  const F = p.substring(0, 4), w = p.substring(4, 6);
703
- s = B(`${F}-${w}`, a, !0);
704
- } else t === "year" && (s = B(p, a, !0));
723
+ c = E(`${F}-${w}`, o, !0);
724
+ } else t === "year" && (c = E(p, o, !0));
705
725
  else
706
- s = B(p, a, !0);
707
- s && s.isValid() ? N(s) : N(null), L(!1);
708
- }, [p, a, o, t]);
709
- const h = (s) => {
710
- if (!s) {
711
- N(null), i.current?.updateValue();
726
+ c = E(p, o, !0);
727
+ c && c.isValid() ? S(c) : S(null), Y(!1);
728
+ }, [p, o, a, t]);
729
+ const g = (c) => {
730
+ if (!c) {
731
+ S(null), i.current?.updateValue();
712
732
  return;
713
733
  }
714
- N(s);
715
- const F = s.format(o);
716
- i.current && (i.current.value = F, i.current.updateValue()), L(!1);
717
- }, y = (s) => {
734
+ S(c);
735
+ const F = c.format(a);
736
+ i.current && (i.current.value = F, i.current.updateValue()), Y(!1);
737
+ }, y = (c) => {
718
738
  setTimeout(() => {
719
- const F = document.activeElement, w = m.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 모두 포커스가 없습니다");
739
+ const F = document.activeElement, w = m.current, _ = w?.querySelector(".ant-picker-dropdown");
740
+ !(w && (w.contains(F) || w === F || _?.contains(F))) && !(c !== void 0 ? c : L) && console.log("✅ Input과 DatePicker 모두 포커스가 없습니다");
721
741
  }, 0);
722
742
  };
723
743
  return /* @__PURE__ */ r(
724
- E,
744
+ B,
725
745
  {
726
746
  ...e,
727
747
  name: void 0,
728
- validateStatus: C ? "warning" : void 0,
748
+ validateStatus: M ? "warning" : void 0,
729
749
  children: /* @__PURE__ */ r(
730
- le,
750
+ se,
731
751
  {
732
752
  theme: {
733
753
  components: {
@@ -740,55 +760,55 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
740
760
  /* @__PURE__ */ r(
741
761
  O.Item,
742
762
  {
743
- name: D,
744
- getValueProps: (s) => ({
745
- value: s ? B(s).format(a) : void 0
763
+ name: I,
764
+ getValueProps: (c) => ({
765
+ value: c ? E(c).format(o) : void 0
746
766
  }),
747
- normalize: (s) => s ? B(s).format(o) : void 0,
767
+ normalize: (c) => c ? E(c).format(a) : void 0,
748
768
  noStyle: !0,
749
769
  children: /* @__PURE__ */ r(
750
770
  te,
751
771
  {
752
- ...l,
772
+ ...s,
753
773
  ref: u,
754
774
  onFocus: () => {
755
- g(!S), i.current?.updateValue();
775
+ f(!L), i.current?.updateValue();
756
776
  },
757
777
  onBlur: () => {
758
778
  y();
759
779
  },
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, a, !0);
764
- F.length === a.length && w.isValid() ? (g(!1), L(!1)) : L(!0);
780
+ onKeyDown: (c) => {
781
+ if (c.key === "Backspace" && f(!0), c.key === "Tab" && f(!1), c.key === "Enter")
782
+ if (L) {
783
+ const F = i.current?.value || "", w = E(F, o, !0);
784
+ F.length === o.length && w.isValid() ? (f(!1), Y(!1)) : Y(!0);
765
785
  } else
766
- g(!0);
786
+ f(!0);
767
787
  },
768
788
  allowClear: !0,
769
789
  placeholder: n.replace(/0/g, "_"),
770
- suffix: /* @__PURE__ */ r(Re, { style: { color: "#d9d9d9" } }),
790
+ suffix: /* @__PURE__ */ r(je, { style: { color: "#d9d9d9" } }),
771
791
  autoComplete: "off"
772
792
  }
773
793
  )
774
794
  }
775
795
  ),
776
796
  /* @__PURE__ */ r(
777
- se,
797
+ le,
778
798
  {
779
- open: S,
799
+ open: L,
780
800
  picker: t,
781
801
  format: {
782
- format: a,
802
+ format: o,
783
803
  type: "mask"
784
804
  },
785
805
  showNow: !0,
786
- value: V,
787
- onChange: h,
788
- onOpenChange: (s) => {
789
- g(s), s || y(!1);
806
+ value: A,
807
+ onChange: g,
808
+ onOpenChange: (c) => {
809
+ f(c), c || y(!1);
790
810
  },
791
- renderExtraFooter: () => C ? /* @__PURE__ */ K(
811
+ renderExtraFooter: () => M ? /* @__PURE__ */ K(
792
812
  "div",
793
813
  {
794
814
  style: {
@@ -802,12 +822,12 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
802
822
  backgroundColor: "#fffbe6"
803
823
  },
804
824
  children: [
805
- /* @__PURE__ */ r(je, {}),
825
+ /* @__PURE__ */ r(He, {}),
806
826
  /* @__PURE__ */ r("span", { children: "유효하지 않은 날짜입니다" })
807
827
  ]
808
828
  }
809
829
  ) : null,
810
- getPopupContainer: (s) => s.parentElement,
830
+ getPopupContainer: (c) => c.parentElement,
811
831
  style: {
812
832
  position: "absolute",
813
833
  top: 0,
@@ -823,15 +843,15 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
823
843
  )
824
844
  }
825
845
  );
826
- }, { Option: fe } = ce, Dt = ({ itemProps: t, inputProps: e }) => {
827
- const [l, a] = R([]);
846
+ }, { Option: he } = ce, xt = ({ itemProps: t, inputProps: e }) => {
847
+ const [s, o] = R([]);
828
848
  return H(() => {
829
- e?.addField === "ALL" ? a([
849
+ e?.addField === "ALL" ? o([
830
850
  { label: "전체", value: "" },
831
851
  ...e?.list || []
832
- ]) : e?.addField === "NULL" ? a([{ label: "", value: "" }, ...e?.list || []]) : a(e?.list || []);
852
+ ]) : e?.addField === "NULL" ? o([{ label: "", value: "" }, ...e?.list || []]) : o(e?.list || []);
833
853
  }, [e?.list]), /* @__PURE__ */ r(
834
- E,
854
+ B,
835
855
  {
836
856
  ...t,
837
857
  getValueProps: (n) => n ? {
@@ -840,29 +860,29 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
840
860
  value: []
841
861
  },
842
862
  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: o, label: u } = n;
845
- return e?.printCode ? /* @__PURE__ */ r(fe, { value: o, label: u, children: /* @__PURE__ */ r(ae, { children: `[${o}] ${u}` }) }, o) : /* @__PURE__ */ r(fe, { value: o, label: u, children: /* @__PURE__ */ r(ae, { children: `${u}` }) }, o);
863
+ children: /* @__PURE__ */ r(ce, { ...e, mode: "multiple", children: s.map((n) => {
864
+ const { value: a, label: u } = n;
865
+ return e?.printCode ? /* @__PURE__ */ r(he, { value: a, label: u, children: /* @__PURE__ */ r(ae, { children: `[${a}] ${u}` }) }, a) : /* @__PURE__ */ r(he, { value: a, label: u, children: /* @__PURE__ */ r(ae, { children: `${u}` }) }, a);
846
866
  }) })
847
867
  }
848
868
  );
849
- }, xt = ({ itemProps: t, inputProps: e }) => {
850
- const l = (n) => {
851
- let o = n.toString().split(".");
852
- return e?.decimalPoint != null && o[1] != null && e?.decimalPoint > 0 ? o[1].length > e?.decimalPoint ? o[1] = "." + o[1].substring(0, e?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + o[1];
853
- }, a = (n) => {
854
- let o = n.toString().split(".");
855
- return e?.decimalPoint != null && o[1] != null && e?.decimalPoint > 0 ? o[1].length > e?.decimalPoint ? o[1] = "." + o[1].substring(0, e?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\$\s?|(,*)/g, "") + o[1];
869
+ }, vt = ({ itemProps: t, inputProps: e }) => {
870
+ const s = (n) => {
871
+ let a = n.toString().split(".");
872
+ 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];
873
+ }, o = (n) => {
874
+ let a = n.toString().split(".");
875
+ 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];
856
876
  };
857
- return /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(
858
- _e,
877
+ return /* @__PURE__ */ r(B, { ...t, children: /* @__PURE__ */ r(
878
+ Ne,
859
879
  {
860
880
  ...e,
861
- formatter: (n) => l(n),
862
- parser: (n) => a(n)
881
+ formatter: (n) => s(n),
882
+ parser: (n) => o(n)
863
883
  }
864
884
  ) });
865
- }, vt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(Ne.Group, { ...e }) }), { RangePicker: at } = se, he = {
885
+ }, Bt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(B, { ...t, children: /* @__PURE__ */ r(Me.Group, { ...e }) }), { RangePicker: it } = le, ge = {
866
886
  year: { displayFormat: "YYYY", outputFormat: "YYYY" },
867
887
  month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
868
888
  date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
@@ -874,74 +894,74 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
874
894
  }, Et = ({
875
895
  itemProps: t,
876
896
  inputProps: e,
877
- type: l = "date",
878
- minDate: a,
897
+ type: s = "date",
898
+ minDate: o,
879
899
  maxDate: n,
880
- returnType: o = "string"
900
+ returnType: a = "string"
881
901
  }) => {
882
- const { displayFormat: u, outputFormat: i } = J(
883
- () => he[l],
884
- [l]
885
- ), m = 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;
902
+ const { displayFormat: u, outputFormat: i } = W(
903
+ () => ge[s],
904
+ [s]
905
+ ), m = W(
906
+ () => Object.values(ge).map((l) => l.outputFormat).sort((l, L) => {
907
+ if (l.length === L.length) {
908
+ if (l === i) return -1;
909
+ if (L === i) return 1;
890
910
  }
891
- return S.length - c.length;
911
+ return L.length - l.length;
892
912
  }),
893
913
  [i]
894
914
  // type(outputFormat)이 바뀔 때마다 재정렬
895
915
  );
896
916
  return /* @__PURE__ */ r(
897
- E,
917
+ B,
898
918
  {
899
919
  ...t,
900
- getValueProps: (c) => ({
920
+ getValueProps: (l) => ({
901
921
  // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환
902
- value: c && c.length > 0 ? [
903
- c[0] ? B.isDayjs(c[0]) ? c[0] : B(c[0], m) : null,
904
- c[1] ? B.isDayjs(c[1]) ? c[1] : B(c[1], m) : null
922
+ value: l && l.length > 0 ? [
923
+ l[0] ? E.isDayjs(l[0]) ? l[0] : E(l[0], m) : null,
924
+ l[1] ? E.isDayjs(l[1]) ? l[1] : E(l[1], m) : null
905
925
  ] : null
906
926
  }),
907
- normalize: (c) => c ? o === "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
927
+ normalize: (l) => l ? a === "dayjs" ? [l[0] ?? void 0, l[1] ?? void 0] : [
928
+ l[0] ? l[0].format(i) : void 0,
929
+ l[1] ? l[1].format(i) : void 0
910
930
  ] : [void 0, void 0],
911
931
  children: /* @__PURE__ */ r(
912
- at,
932
+ it,
913
933
  {
914
934
  ...e,
915
935
  order: !0,
916
- minDate: a ? B(a, m) : void 0,
917
- maxDate: n ? B(n, m) : void 0,
918
- picker: l === "datetime" ? "date" : l,
919
- showTime: e?.showTime ?? (l === "datetime" || l === "time"),
936
+ minDate: o ? E(o, m) : void 0,
937
+ maxDate: n ? E(n, m) : void 0,
938
+ picker: s === "datetime" ? "date" : s,
939
+ showTime: e?.showTime ?? (s === "datetime" || s === "time"),
920
940
  format: u
921
941
  }
922
942
  )
923
943
  }
924
944
  );
925
- }, ge = te.Search, Bt = (t) => {
926
- const e = O.useFormInstance(), { openPopup: l } = Ee(), a = t.itemProps?.name || [], n = t.popupConfig || {
945
+ }, pe = te.Search, Ot = (t) => {
946
+ const e = O.useFormInstance(), { openPopup: s } = Ee(), o = t.itemProps?.name || [], n = t.popupConfig || {
927
947
  callback(u) {
928
- console.log("callback data :: ", u), a.length > 1 ? (e.setFieldValue(a[0], u.code), e.setFieldValue(a[1], u.name)) : e.setFieldValue(a, u.code);
948
+ Array.isArray(o) && o.length > 1 ? (e.setFieldValue(o[0], u.code), e.setFieldValue(o[1], u.name)) : e.setFieldValue(o, u.code);
929
949
  }
930
- }, o = {
950
+ }, a = {
931
951
  ...t,
932
952
  placeholder: typeof t.placeholder == "string" ? t.placeholder : t.placeholder?.[0] || "",
933
953
  onChange: (u) => {
934
- a.length > 1 && e.setFieldValue(a[0], ""), t.onChange?.(u);
954
+ Array.isArray(o) && o.length > 1 && e.setFieldValue(o[0], ""), t.onChange?.(u);
935
955
  },
936
956
  onSearch: (u) => {
937
- t.popuCd ? l(t.popuCd, t.popupParams, n) : t.onSearch?.(u);
957
+ t.popuCd ? s(t.popuCd, t.popupParams, n) : t.onSearch?.(u);
938
958
  }
939
959
  };
940
- return a.length > 1 ? /* @__PURE__ */ r(E, { ...t.itemProps, name: void 0, children: /* @__PURE__ */ K(ae.Compact, { block: !0, children: [
960
+ return Array.isArray(o) && o.length > 1 ? /* @__PURE__ */ r(B, { ...t.itemProps, name: void 0, children: /* @__PURE__ */ K(ae.Compact, { block: !0, children: [
941
961
  /* @__PURE__ */ r(
942
962
  O.Item,
943
963
  {
944
- name: a[0],
964
+ name: o[0],
945
965
  rules: t.itemProps?.rules,
946
966
  style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
947
967
  validateStatus: "",
@@ -956,40 +976,40 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
956
976
  )
957
977
  }
958
978
  ),
959
- /* @__PURE__ */ r(O.Item, { name: a[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ r(
960
- ge,
979
+ /* @__PURE__ */ r(O.Item, { name: o[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ r(
980
+ pe,
961
981
  {
962
982
  readOnly: t.readOnly,
963
983
  enterButton: /* @__PURE__ */ r(
964
- Z,
984
+ X,
965
985
  {
966
- icon: /* @__PURE__ */ r(He, {}),
986
+ icon: /* @__PURE__ */ r(Ke, {}),
967
987
  disabled: t.readOnly
968
988
  }
969
989
  ),
970
- ...o
990
+ ...a
971
991
  }
972
992
  ) })
973
- ] }) }) : /* @__PURE__ */ r(E, { ...t.itemProps, children: /* @__PURE__ */ r(ge, { ...o }) });
974
- }, Ot = ({
993
+ ] }) }) : /* @__PURE__ */ r(B, { ...t.itemProps, children: /* @__PURE__ */ r(pe, { ...a }) });
994
+ }, At = ({
975
995
  itemProps: t,
976
996
  selectProps: e = {
977
997
  options: [],
978
998
  allowClear: !0
979
999
  }
980
1000
  }) => {
981
- const l = O.useFormInstance(), a = !!l, n = J(() => e?.addField === "ALL" ? [{ label: "전체", value: "" }, ...e?.options || []] : e?.addField === "NULL" ? [{ label: "", value: "" }, ...e?.options || []] : e?.options || [], [e.options, e.addField]), o = (m) => {
1001
+ const s = O.useFormInstance(), o = !!s, n = W(() => e?.addField === "ALL" ? [{ label: "전체", value: "" }, ...e?.options || []] : e?.addField === "NULL" ? [{ label: "", value: "" }, ...e?.options || []] : e?.options || [], [e.options, e.addField]), a = (m) => {
982
1002
  e.onChange?.(m);
983
1003
  }, u = {
984
1004
  ...e,
985
1005
  allowClear: e.allowClear ?? !0,
986
1006
  options: n,
987
- onChange: o,
1007
+ onChange: a,
988
1008
  variant: e.variant
989
1009
  }, i = /* @__PURE__ */ r(ce, { ...u, disabled: e.disabled });
990
- return e.copyable && !a && console.warn(
1010
+ return e.copyable && !o && console.warn(
991
1011
  "BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
992
- ), e.copyable ? /* @__PURE__ */ r(E, { ...t, name: void 0, children: /* @__PURE__ */ K(ae.Compact, { block: !0, children: [
1012
+ ), e.copyable ? /* @__PURE__ */ r(B, { ...t, name: void 0, children: /* @__PURE__ */ K(ae.Compact, { block: !0, children: [
993
1013
  /* @__PURE__ */ r(
994
1014
  O.Item,
995
1015
  {
@@ -1002,10 +1022,10 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
1002
1022
  }
1003
1023
  ),
1004
1024
  /* @__PURE__ */ r(
1005
- Fe.Paragraph,
1025
+ Ce.Paragraph,
1006
1026
  {
1007
1027
  copyable: {
1008
- text: a && l?.getFieldValue(t?.name)?.toString() || "",
1028
+ text: o && s?.getFieldValue(t?.name)?.toString() || "",
1009
1029
  tooltips: ["코드복사", "코드복사됨"]
1010
1030
  },
1011
1031
  style: {
@@ -1022,26 +1042,26 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
1022
1042
  }
1023
1043
  }
1024
1044
  )
1025
- ] }) }) : /* @__PURE__ */ r(E, { ...t, children: i });
1045
+ ] }) }) : /* @__PURE__ */ r(B, { ...t, children: i });
1026
1046
  }, zt = ({
1027
1047
  itemProps: t,
1028
1048
  inputProps: e = {
1029
1049
  format: "YN"
1030
1050
  }
1031
1051
  }) => {
1032
- const l = O.useFormInstance(), a = (n, o) => {
1033
- e.format === "boolean" ? l.setFieldValue(t?.name, n) : l.setFieldValue(t?.name, n ? "Y" : "N"), e.onChange && e.onChange(n, o);
1052
+ const s = O.useFormInstance(), o = (n, a) => {
1053
+ e.format === "boolean" ? s.setFieldValue(t?.name, n) : s.setFieldValue(t?.name, n ? "Y" : "N"), e.onChange && e.onChange(n, a);
1034
1054
  };
1035
1055
  return /* @__PURE__ */ r(
1036
- E,
1056
+ B,
1037
1057
  {
1038
1058
  ...t,
1039
1059
  getValueProps: (n) => ({ checked: e.format === "boolean" ? !!n : n === "Y" }),
1040
1060
  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, o) => a(n, o) })
1061
+ children: /* @__PURE__ */ r(De, { ...e, onChange: (n, a) => o(n, a) })
1042
1062
  }
1043
1063
  );
1044
- }, { TextArea: it } = te, Vt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(it, { ...e }) }), lt = [
1064
+ }, { TextArea: st } = te, Vt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(B, { ...t, children: /* @__PURE__ */ r(st, { ...e }) }), lt = [
1045
1065
  ".pdf",
1046
1066
  ".xlsx",
1047
1067
  ".xls",
@@ -1059,75 +1079,75 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
1059
1079
  ".gif",
1060
1080
  // 압축
1061
1081
  ".zip"
1062
- ], pe = {
1082
+ ], ye = {
1063
1083
  FILE: "file"
1064
- }, st = ({
1084
+ }, ct = ({
1065
1085
  originNode: t,
1066
1086
  file: e,
1067
- fileList: l,
1068
- moveFile: a,
1087
+ fileList: s,
1088
+ moveFile: o,
1069
1089
  onDrop: n
1070
1090
  }) => {
1071
- const o = W(null), [{ handlerId: u }, i] = Xe({
1072
- accept: pe.FILE,
1073
- collect: (g) => ({
1074
- handlerId: g.getHandlerId()
1091
+ const a = q(null), [{ handlerId: u }, i] = Xe({
1092
+ accept: ye.FILE,
1093
+ collect: (f) => ({
1094
+ handlerId: f.getHandlerId()
1075
1095
  }),
1076
- hover(g, C) {
1077
- if (!o.current)
1096
+ hover(f, M) {
1097
+ if (!a.current)
1078
1098
  return;
1079
- const L = g.uid, D = e.uid;
1080
- if (L === D)
1099
+ const Y = f.uid, I = e.uid;
1100
+ if (Y === I)
1081
1101
  return;
1082
- const V = ne(l, { uid: D }), N = ne(l, { uid: L });
1083
- if (N === -1 || V === -1)
1102
+ const A = ne(s, { uid: I }), S = ne(s, { uid: Y });
1103
+ if (S === -1 || A === -1)
1084
1104
  return;
1085
- const p = o.current.getBoundingClientRect(), h = C.getClientOffset();
1086
- if (!h)
1105
+ const p = a.current.getBoundingClientRect(), g = M.getClientOffset();
1106
+ if (!g)
1087
1107
  return;
1088
- const y = (p.bottom - p.top) / 2, s = h.y - p.top;
1089
- N < V && s < y || N > V && s > y || a(L, D);
1108
+ const y = (p.bottom - p.top) / 2, c = g.y - p.top;
1109
+ S < A && c < y || S > A && c > y || o(Y, I);
1090
1110
  },
1091
1111
  drop() {
1092
1112
  n();
1093
1113
  }
1094
- }), [{ isDragging: m }, c] = Ze({
1095
- type: pe.FILE,
1114
+ }), [{ isDragging: m }, l] = Ze({
1115
+ type: ye.FILE,
1096
1116
  item: () => ({
1097
1117
  uid: e.uid,
1098
- index: ne(l, { uid: e.uid })
1118
+ index: ne(s, { uid: e.uid })
1099
1119
  }),
1100
- collect: (g) => ({
1101
- isDragging: g.isDragging()
1120
+ collect: (f) => ({
1121
+ isDragging: f.isDragging()
1102
1122
  })
1103
- }), S = m ? 0 : 1;
1104
- return c(i(o)), /* @__PURE__ */ r("div", { ref: o, style: { opacity: S }, "data-handler-id": u, children: t });
1123
+ }), L = m ? 0 : 1;
1124
+ return l(i(a)), /* @__PURE__ */ r("div", { ref: a, style: { opacity: L }, "data-handler-id": u, children: t });
1105
1125
  }, Ut = ({
1106
1126
  itemProps: t,
1107
1127
  fileGrpKey: e,
1108
- onUploadComplete: l,
1109
- onFetchFilesTrxCd: a = "SCMFILE00101",
1128
+ onUploadComplete: s,
1129
+ onFetchFilesTrxCd: o = "SCMFILE00101",
1110
1130
  onSuccessTrxCd: n = "SCMFILE00102",
1111
- onDeleteFileTrxCd: o = "SCMFILE00103",
1131
+ onDeleteFileTrxCd: a = "SCMFILE00103",
1112
1132
  onReorderFilesTrxCd: u = "SCMFILE00104",
1113
1133
  allowedExtensions: i = lt,
1114
1134
  maxFileSize: m = 200,
1115
- showButton: c = !0,
1135
+ showButton: l = !0,
1116
1136
  // 기본값으로 true 설정
1117
- multiple: S = !1,
1118
- newFileGrpKeyonModify: g = !1,
1119
- buttonText: C = "파일 선택",
1120
- localOnly: L = !1,
1121
- onFilesChange: D
1137
+ multiple: L = !1,
1138
+ newFileGrpKeyonModify: f = !1,
1139
+ buttonText: M = "파일 선택",
1140
+ localOnly: Y = !1,
1141
+ onFilesChange: I
1122
1142
  }) => {
1123
- const [V, N] = R([]), p = W(e), h = W([]), y = O.useFormInstance(), F = W(
1124
- Ge(() => {
1125
- if (L || h.current.length === 0)
1143
+ const [A, S] = R([]), p = q(e), g = q([]), y = O.useFormInstance(), F = q(
1144
+ Pe(() => {
1145
+ if (Y || g.current.length === 0)
1126
1146
  return;
1127
- const d = [...h.current];
1128
- if (h.current = [], n) {
1147
+ const d = [...g.current];
1148
+ if (g.current = [], n) {
1129
1149
  const k = d.map((b) => ({
1130
- crprCd: G()?.crprCd,
1150
+ crprCd: P()?.crprCd,
1131
1151
  sysCd: __SYS_CD__,
1132
1152
  fileGrpKey: p.current,
1133
1153
  physFileNm: b.fileNameP,
@@ -1137,69 +1157,69 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
1137
1157
  fileSize: b.fileSize,
1138
1158
  mltpYn: "N"
1139
1159
  }));
1140
- console.log("newFileGrpKeyonModify", g), console.log(
1160
+ console.log("newFileGrpKeyonModify", f), console.log(
1141
1161
  "newFileGrpKeyonModify",
1142
- g ? 0 : p.current
1143
- ), X(n, {
1144
- crprCd: G()?.crprCd,
1162
+ f ? 0 : p.current
1163
+ ), J(n, {
1164
+ crprCd: P()?.crprCd,
1145
1165
  sysCd: __SYS_CD__,
1146
- fileGrpKey: g ? 0 : p.current,
1166
+ fileGrpKey: f ? 0 : p.current,
1147
1167
  oldFileGrpKey: p.current,
1148
- newFileGrpKeyonModify: g,
1168
+ newFileGrpKeyonModify: f,
1149
1169
  sub: k
1150
1170
  }).then((b) => {
1151
1171
  if (b?.sub && b.sub.length > 0) {
1152
- const f = b.sub[0].fileGrpKey;
1153
- (!p.current || g) && (p.current = f);
1154
- const U = /* @__PURE__ */ new Map();
1172
+ const h = b.sub[0].fileGrpKey;
1173
+ (!p.current || f) && (p.current = h);
1174
+ const V = /* @__PURE__ */ new Map();
1155
1175
  b.sub.forEach((v) => {
1156
- const A = d.find(
1176
+ const U = d.find(
1157
1177
  (j) => j.fileNameL === v.lgclFileNm
1158
1178
  );
1159
- A && U.set(A.tempId, v);
1179
+ U && V.set(U.tempId, v);
1160
1180
  });
1161
1181
  const Q = t?.name;
1162
1182
  ((v) => {
1163
- if (Y) {
1164
- const A = y?.getFieldValue(Q) || [], j = v(A);
1183
+ if (C) {
1184
+ const U = y?.getFieldValue(Q) || [], j = v(U);
1165
1185
  y?.setFieldValue(Q, j);
1166
1186
  } else
1167
- N((A) => v(A));
1168
- })((v) => v.map((A) => {
1169
- const j = U.get(A.uid);
1187
+ S((U) => v(U));
1188
+ })((v) => v.map((U) => {
1189
+ const j = V.get(U.uid);
1170
1190
  if (j) {
1171
1191
  const de = d.find(
1172
- (be) => be.tempId === A.uid
1192
+ (Le) => Le.tempId === U.uid
1173
1193
  );
1174
- return l && de && l({
1194
+ return s && de && s({
1175
1195
  ...de,
1176
- fileGrpKey: f,
1196
+ fileGrpKey: h,
1177
1197
  fileKey: j.fileKey
1178
1198
  }), {
1179
- ...A,
1199
+ ...U,
1180
1200
  name: j.lgclFileNm,
1181
- fileGrpKey: f,
1201
+ fileGrpKey: h,
1182
1202
  fileKey: j.fileKey,
1183
1203
  uid: j.fileKey,
1184
1204
  status: "done",
1185
1205
  url: `/api/download?filePath=${j.filePath}&logicalName=${j.lgclFileNm}`
1186
1206
  };
1187
1207
  }
1188
- return A;
1208
+ return U;
1189
1209
  }));
1190
1210
  }
1191
1211
  }).catch((b) => {
1192
- console.error("업로드 후처리 서비스 호출 실패:", b), _.error("파일 후처리 중 오류가 발생했습니다.");
1193
- const f = new Set(d.map((T) => T.tempId)), U = t?.name;
1212
+ console.error("업로드 후처리 서비스 호출 실패:", b), N.error("파일 후처리 중 오류가 발생했습니다.");
1213
+ const h = new Set(d.map((T) => T.tempId)), V = t?.name;
1194
1214
  ((T) => {
1195
- if (Y) {
1196
- const v = y?.getFieldValue(U) || [], A = T(v);
1197
- y?.setFieldValue(U, A);
1215
+ if (C) {
1216
+ const v = y?.getFieldValue(V) || [], U = T(v);
1217
+ y?.setFieldValue(V, U);
1198
1218
  } else
1199
- N((v) => T(v));
1219
+ S((v) => T(v));
1200
1220
  })(
1201
1221
  (T) => T.map(
1202
- (v) => f.has(v.uid) ? { ...v, status: "error", error: "후처리 실패" } : v
1222
+ (v) => h.has(v.uid) ? { ...v, status: "error", error: "후처리 실패" } : v
1203
1223
  )
1204
1224
  );
1205
1225
  });
@@ -1211,179 +1231,179 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
1211
1231
  }, [F]), H(() => {
1212
1232
  p.current = e;
1213
1233
  }, [e]), H(() => {
1214
- L || e && a && X(a, {
1215
- crprCd: G()?.crprCd,
1234
+ Y || e && o && J(o, {
1235
+ crprCd: P()?.crprCd,
1216
1236
  sysCd: __SYS_CD__,
1217
1237
  fileGrpKey: e
1218
1238
  }).then((d) => {
1219
1239
  if (d?.sub) {
1220
- const k = d.sub.map((f) => ({
1221
- uid: f.fileKey,
1222
- name: f.lgclFileNm,
1240
+ const k = d.sub.map((h) => ({
1241
+ uid: h.fileKey,
1242
+ name: h.lgclFileNm,
1223
1243
  status: "done",
1224
- url: `/api/download?filePath=${f.filePath}&logicalName=${f.lgclFileNm}`
1244
+ url: `/api/download?filePath=${h.filePath}&logicalName=${h.lgclFileNm}`
1225
1245
  })), b = t?.name;
1226
- Y ? y?.setFieldValue(b, k) : N(k);
1246
+ C ? y?.setFieldValue(b, k) : S(k);
1227
1247
  } else {
1228
1248
  const k = t?.name;
1229
- Y ? y?.setFieldValue(k, []) : N([]);
1249
+ C ? y?.setFieldValue(k, []) : S([]);
1230
1250
  }
1231
1251
  }).catch((d) => {
1232
- console.error("파일 목록 조회 서비스 호출에 실패했습니다.", d), _.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
1252
+ console.error("파일 목록 조회 서비스 호출에 실패했습니다.", d), N.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
1233
1253
  });
1234
- }, [e, a]);
1254
+ }, [e, o]);
1235
1255
  const w = (d, k) => {
1236
- const b = t?.name, f = Y ? y?.getFieldValue(b) || [] : V, U = ne(f, { uid: d }), Q = ne(f, { uid: k });
1237
- if (U < 0 || Q < 0) return;
1238
- const T = [...f], [v] = T.splice(U, 1);
1239
- T.splice(Q, 0, v), Y ? y?.setFieldValue(b, T) : N(T);
1240
- }, I = () => {
1241
- if (!L && e && u) {
1242
- const d = t?.name, b = (Y ? y?.getFieldValue(d) || [] : V).map((f) => f.uid);
1243
- X(u, {
1244
- crprCd: G()?.crprCd,
1256
+ const b = t?.name, h = C ? y?.getFieldValue(b) || [] : A, V = ne(h, { uid: d }), Q = ne(h, { uid: k });
1257
+ if (V < 0 || Q < 0) return;
1258
+ const T = [...h], [v] = T.splice(V, 1);
1259
+ T.splice(Q, 0, v), C ? y?.setFieldValue(b, T) : S(T);
1260
+ }, _ = () => {
1261
+ if (!Y && e && u) {
1262
+ const d = t?.name, b = (C ? y?.getFieldValue(d) || [] : A).map((h) => h.uid);
1263
+ J(u, {
1264
+ crprCd: P()?.crprCd,
1245
1265
  sysCd: __SYS_CD__,
1246
1266
  fileGrpKey: e,
1247
1267
  reorderedFileKeys: b
1248
1268
  }).then(() => {
1249
- _.success("파일 순서가 성공적으로 저장되었습니다.");
1250
- }).catch((f) => {
1251
- console.error("파일 순서 저장 서비스 호출 실패:", f), _.error("파일 순서 저장 중 오류가 발생했습니다.");
1269
+ N.success("파일 순서가 성공적으로 저장되었습니다.");
1270
+ }).catch((h) => {
1271
+ console.error("파일 순서 저장 서비스 호출 실패:", h), N.error("파일 순서 저장 중 오류가 발생했습니다.");
1252
1272
  });
1253
1273
  }
1254
1274
  }, $ = (d) => {
1255
- const k = t?.name, b = Y ? y?.getFieldValue(k) || [] : V;
1256
- if (!S && b.length > 0)
1257
- return _.error("하나의 파일만 업로드할 수 있습니다."), q.LIST_IGNORE;
1275
+ const k = t?.name, b = C ? y?.getFieldValue(k) || [] : A;
1276
+ if (!L && b.length > 0)
1277
+ return N.error("하나의 파일만 업로드할 수 있습니다."), G.LIST_IGNORE;
1258
1278
  if (i && i.length > 0) {
1259
- const f = `.${d.name.split(".").pop()?.toLowerCase()}`;
1260
- if (!i.includes(f))
1261
- return _.error(
1279
+ const h = `.${d.name.split(".").pop()?.toLowerCase()}`;
1280
+ if (!i.includes(h))
1281
+ return N.error(
1262
1282
  `${d.name} 파일은 허용되지 않는 확장자입니다. (${i.join(
1263
1283
  ", "
1264
1284
  )})`
1265
- ), q.LIST_IGNORE;
1285
+ ), G.LIST_IGNORE;
1266
1286
  }
1267
- return m && !(d.size / 1024 / 1024 < m) ? (_.error(`일반업로드의 최대용량은 ${m}MB입니다.`), q.LIST_IGNORE) : !L;
1268
- }, Y = !!t?.name, M = {
1287
+ return m && !(d.size / 1024 / 1024 < m) ? (N.error(`일반업로드의 최대용량은 ${m}MB입니다.`), G.LIST_IGNORE) : !Y;
1288
+ }, C = !!t?.name, D = {
1269
1289
  name: "file",
1270
- multiple: S,
1271
- action: L ? void 0 : "/api/upload",
1290
+ multiple: L,
1291
+ action: Y ? void 0 : "/api/upload",
1272
1292
  beforeUpload: $,
1273
1293
  showUploadList: {
1274
- showRemoveIcon: c
1294
+ showRemoveIcon: l
1275
1295
  // showButton 값에 따라 삭제 버튼 표시/숨김
1276
1296
  },
1277
1297
  onChange(d) {
1278
1298
  const { status: k, uid: b } = d.file;
1279
1299
  if (k === "removed") {
1280
- if (!L && o)
1281
- X(o, {
1282
- crprCd: G()?.crprCd,
1300
+ if (!Y && a)
1301
+ J(a, {
1302
+ crprCd: P()?.crprCd,
1283
1303
  sysCd: __SYS_CD__,
1284
- fileGrpKey: g ? 0 : p.current,
1304
+ fileGrpKey: f ? 0 : p.current,
1285
1305
  fileKey: b,
1286
1306
  oldFileGrpKey: p.current,
1287
- newFileGrpKeyonModify: g
1288
- }).then((f) => {
1289
- if (_.success("파일이 성공적으로 삭제되었습니다."), g && (p.current = f.fileGrpKey), Y) {
1290
- const U = t?.name;
1291
- y?.setFieldValue(U, d.fileList);
1307
+ newFileGrpKeyonModify: f
1308
+ }).then((h) => {
1309
+ if (N.success("파일이 성공적으로 삭제되었습니다."), f && (p.current = h.fileGrpKey), C) {
1310
+ const V = t?.name;
1311
+ y?.setFieldValue(V, d.fileList);
1292
1312
  } else
1293
- N(d.fileList);
1294
- D?.(d.fileList), l?.({
1295
- fileGrpKey: f.fileGrpKey
1313
+ S(d.fileList);
1314
+ I?.(d.fileList), s?.({
1315
+ fileGrpKey: h.fileGrpKey
1296
1316
  });
1297
- }).catch((f) => {
1298
- console.error("파일 삭제 서비스 호출에 실패했습니다.", f), _.error("파일 삭제 중 오류가 발생했습니다.");
1317
+ }).catch((h) => {
1318
+ console.error("파일 삭제 서비스 호출에 실패했습니다.", h), N.error("파일 삭제 중 오류가 발생했습니다.");
1299
1319
  });
1300
1320
  else {
1301
- if (Y) {
1302
- const f = t?.name;
1303
- y?.setFieldValue(f, d.fileList);
1321
+ if (C) {
1322
+ const h = t?.name;
1323
+ y?.setFieldValue(h, d.fileList);
1304
1324
  } else
1305
- N(d.fileList);
1306
- D?.(d.fileList);
1325
+ S(d.fileList);
1326
+ I?.(d.fileList);
1307
1327
  }
1308
1328
  return;
1309
1329
  }
1310
- if (Y) {
1311
- const f = t?.name;
1312
- y?.setFieldValue(f, d.fileList);
1330
+ if (C) {
1331
+ const h = t?.name;
1332
+ y?.setFieldValue(h, d.fileList);
1313
1333
  } else
1314
- N(d.fileList);
1315
- if (D?.(d.fileList), k === "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((U) => {
1319
- U.tempId = d.file.uid, h.current.push(U);
1320
- }), F()), _.success(
1334
+ S(d.fileList);
1335
+ if (I?.(d.fileList), k === "done")
1336
+ if (!Y && d.file.response?.success) {
1337
+ const { uploadedFiles: h } = d.file.response;
1338
+ h && Array.isArray(h) && h.length > 0 && (h.forEach((V) => {
1339
+ V.tempId = d.file.uid, g.current.push(V);
1340
+ }), F()), N.success(
1321
1341
  d.file.response.message || `${d.file.name} 파일이 성공적으로 업로드되었습니다.`
1322
1342
  );
1323
1343
  } else
1324
- _.error(
1344
+ N.error(
1325
1345
  d.file.response?.message || `${d.file.name} 파일 업로드에 실패했습니다.`
1326
1346
  );
1327
- else k === "error" && _.error(
1347
+ else k === "error" && N.error(
1328
1348
  d.file.response?.message || `${d.file.name} 파일 업로드 중 오류가 발생했습니다.`
1329
1349
  );
1330
1350
  },
1331
1351
  itemRender(d, k, b) {
1332
- const f = xe(d, {
1352
+ const h = ve(d, {
1333
1353
  href: k.url || void 0,
1334
1354
  title: void 0
1335
1355
  });
1336
1356
  return /* @__PURE__ */ r(
1337
- st,
1357
+ ct,
1338
1358
  {
1339
- originNode: f,
1359
+ originNode: h,
1340
1360
  file: k,
1341
1361
  fileList: b,
1342
1362
  moveFile: w,
1343
- onDrop: I
1363
+ onDrop: _
1344
1364
  },
1345
1365
  k.uid
1346
1366
  );
1347
1367
  }
1348
1368
  };
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,
1369
+ C || (D.fileList = A);
1370
+ const z = (d) => Array.isArray(d) ? d : d && d.fileList, x = t?.name, re = C ? O.useWatch?.(x, y) : void 0, Z = C ? re || [] : A;
1371
+ return /* @__PURE__ */ r(Je, { backend: Qe, children: /* @__PURE__ */ r(
1372
+ B,
1353
1373
  {
1354
1374
  valuePropName: "fileList",
1355
1375
  getValueFromEvent: z,
1356
1376
  ...t,
1357
1377
  children: /* @__PURE__ */ r(
1358
- q,
1378
+ G,
1359
1379
  {
1360
1380
  headers: { SYSCD: __SYS_CD__ },
1361
- ...M,
1381
+ ...D,
1362
1382
  listType: "picture",
1363
- children: c && (S || P.length === 0) && /* @__PURE__ */ r(Z, { icon: /* @__PURE__ */ r(Ye, {}), children: C })
1383
+ children: l && (L || Z.length === 0) && /* @__PURE__ */ r(X, { icon: /* @__PURE__ */ r(Ye, {}), children: M })
1364
1384
  }
1365
1385
  )
1366
1386
  }
1367
1387
  ) });
1368
1388
  };
1369
1389
  export {
1370
- bt as BwgButton,
1390
+ Lt as BwgButton,
1371
1391
  St as BwgCheck,
1372
- Lt as BwgCheckList,
1373
- wt as BwgDatePicker,
1374
- It as BwgDownload,
1375
- Qe as BwgForm,
1376
- E as BwgFormItem,
1377
- _t as BwgInput,
1378
- Nt as BwgLargeUploader,
1379
- Mt as BwgMaskedInput,
1392
+ wt as BwgCheckList,
1393
+ It as BwgDatePicker,
1394
+ _t as BwgDownload,
1395
+ et as BwgForm,
1396
+ B as BwgFormItem,
1397
+ Nt as BwgInput,
1398
+ Mt as BwgLargeUploader,
1399
+ Dt as BwgMaskedInput,
1380
1400
  kt as BwgMaskedPicker,
1381
- Dt as BwgMultiSelect,
1382
- xt as BwgNumber,
1383
- vt as BwgRadio,
1401
+ xt as BwgMultiSelect,
1402
+ vt as BwgNumber,
1403
+ Bt as BwgRadio,
1384
1404
  Et as BwgRangePicker,
1385
- Bt as BwgSearch,
1386
- Ot as BwgSelect,
1405
+ Ot as BwgSearch,
1406
+ At as BwgSelect,
1387
1407
  zt as BwgSwitch,
1388
1408
  Vt as BwgTextArea,
1389
1409
  Ut as BwgUploader