@bwg-ui/core 1.2.32 → 1.2.34
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.
- package/dist/chunks/{CMSearchIntfGwP01-uJxdFXUb.cjs → CMSearchIntfGwP01-CmRmK_7Z.cjs} +1 -1
- package/dist/chunks/{CMSearchIntfGwP01-C_y_G3xh.js → CMSearchIntfGwP01-DmVxvizb.js} +1 -1
- package/dist/chunks/MenuReport-D3V5JPQR.cjs +1 -0
- package/dist/chunks/{MenuReport-XwdiwiFn.js → MenuReport-Dsh_obqp.js} +26 -26
- package/dist/chunks/{common-components-Cxh8PLBH.js → common-components-BJrGciHA.js} +14139 -13549
- package/dist/chunks/common-components-BpsIQZ0O.cjs +1057 -0
- package/dist/chunks/{layout-components-Bp6b-T1V.js → layout-components-DuSrPWSr.js} +8 -8
- package/dist/chunks/{layout-components-B4ptqDmC.cjs → layout-components-fFjip5fv.cjs} +2 -2
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +219 -219
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/styles/layout.css +1234 -1234
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/MenuReport-DkWB3Yyc.cjs +0 -1
- package/dist/chunks/common-components-DcTm1Tn1.cjs +0 -1109
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r, jsxs as K } from "react/jsx-runtime";
|
|
2
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
|
|
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
4
|
import { useUserStore as ve, usePopupStore as Ee } from "../../stores/index.js";
|
|
5
5
|
import B from "dayjs";
|
|
6
|
-
import { PaperClipOutlined as Be, DownloadOutlined as Oe, DeleteOutlined as ze, InboxOutlined as Ve, UploadOutlined as Ye, CloudUploadOutlined as
|
|
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
7
|
import { isEmpty as Ke, debounce as Ge, findIndex as ne } from "lodash";
|
|
8
8
|
import { callServiceBySysCd as qe, getUserInfo as G, callService as X } from "../../utils/index.js";
|
|
9
9
|
import We from "jszip";
|
|
@@ -15,7 +15,7 @@ const bt = (t) => {
|
|
|
15
15
|
0: "small",
|
|
16
16
|
1: "middle",
|
|
17
17
|
2: "large"
|
|
18
|
-
}[e], [e, t.size]),
|
|
18
|
+
}[e], [e, t.size]), o = J(() => ({
|
|
19
19
|
0: 12,
|
|
20
20
|
// 작게
|
|
21
21
|
1: 14,
|
|
@@ -29,34 +29,34 @@ const bt = (t) => {
|
|
|
29
29
|
...t,
|
|
30
30
|
size: l,
|
|
31
31
|
className: "bwg-btn",
|
|
32
|
-
style: { fontSize: `${
|
|
32
|
+
style: { fontSize: `${o}px`, ...t.style },
|
|
33
33
|
children: t.children
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
|
-
}, E =
|
|
36
|
+
}, E = De(
|
|
37
37
|
({
|
|
38
38
|
children: t,
|
|
39
39
|
label: e,
|
|
40
40
|
name: l,
|
|
41
|
-
rules:
|
|
41
|
+
rules: o,
|
|
42
42
|
initialValue: n,
|
|
43
|
-
style:
|
|
44
|
-
required:
|
|
43
|
+
style: a,
|
|
44
|
+
required: m,
|
|
45
45
|
...i
|
|
46
46
|
}) => {
|
|
47
|
-
const
|
|
47
|
+
const u = {
|
|
48
48
|
fontWeight: "bold"
|
|
49
49
|
};
|
|
50
|
-
(
|
|
50
|
+
(o == null || o == null) && m && (o = [
|
|
51
51
|
{
|
|
52
52
|
required: !0,
|
|
53
53
|
message: `${e}을(를) 입력해주세요.`
|
|
54
54
|
}
|
|
55
55
|
]);
|
|
56
|
-
const c = Array.isArray(
|
|
56
|
+
const c = Array.isArray(o) && o.some((g) => g.required === !0), S = () => typeof e == "string" ? /* @__PURE__ */ K("span", { style: u, children: [
|
|
57
57
|
e,
|
|
58
58
|
c && /* @__PURE__ */ r("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
|
|
59
|
-
] }) : /* @__PURE__ */ r("span", { style:
|
|
59
|
+
] }) : /* @__PURE__ */ r("span", { style: u, children: e });
|
|
60
60
|
return /* @__PURE__ */ r(
|
|
61
61
|
O.Item,
|
|
62
62
|
{
|
|
@@ -64,10 +64,10 @@ const bt = (t) => {
|
|
|
64
64
|
label: e ? S() : void 0,
|
|
65
65
|
labelAlign: i.labelAlign || "left",
|
|
66
66
|
name: l,
|
|
67
|
-
rules:
|
|
67
|
+
rules: o,
|
|
68
68
|
colon: !1,
|
|
69
69
|
initialValue: n,
|
|
70
|
-
style:
|
|
70
|
+
style: a,
|
|
71
71
|
...i,
|
|
72
72
|
children: t
|
|
73
73
|
}
|
|
@@ -92,21 +92,21 @@ const bt = (t) => {
|
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
}, Lt = ({ itemProps: t, inputProps: e }) => {
|
|
95
|
-
const l = O.useFormInstance(), [
|
|
95
|
+
const l = O.useFormInstance(), [o, n] = R(
|
|
96
96
|
t?.initialValue ?? []
|
|
97
|
-
), [
|
|
97
|
+
), [a, m] = R([]), i = a.length > 0 && a.length == o?.length, u = o?.length > 0 && o.length < a.length;
|
|
98
98
|
H(() => {
|
|
99
|
-
|
|
99
|
+
m(c(e?.options));
|
|
100
100
|
}, [e?.options]), H(() => {
|
|
101
|
-
n(
|
|
102
|
-
}, [
|
|
101
|
+
n(o);
|
|
102
|
+
}, [o]);
|
|
103
103
|
const c = (C) => {
|
|
104
104
|
const L = [];
|
|
105
|
-
return (C || []).map((
|
|
106
|
-
L.push(
|
|
105
|
+
return (C || []).map((k, V) => {
|
|
106
|
+
L.push(k.value);
|
|
107
107
|
}), L;
|
|
108
108
|
}, S = (C) => {
|
|
109
|
-
n(C.target.checked ?
|
|
109
|
+
n(C.target.checked ? a : []), l.setFieldValue(t?.name, C.target.checked ? a : []);
|
|
110
110
|
}, g = (C) => {
|
|
111
111
|
n(C), l.setFieldValue(t?.name, C), e?.onChange && typeof e?.onChange == "function" && e?.onChange(C);
|
|
112
112
|
};
|
|
@@ -122,7 +122,7 @@ const bt = (t) => {
|
|
|
122
122
|
e?.allCheck && /* @__PURE__ */ r(
|
|
123
123
|
ie,
|
|
124
124
|
{
|
|
125
|
-
indeterminate:
|
|
125
|
+
indeterminate: u,
|
|
126
126
|
checked: i,
|
|
127
127
|
onChange: S,
|
|
128
128
|
children: "전체선택"
|
|
@@ -132,7 +132,7 @@ const bt = (t) => {
|
|
|
132
132
|
ie.Group,
|
|
133
133
|
{
|
|
134
134
|
options: e?.options,
|
|
135
|
-
value:
|
|
135
|
+
value: o,
|
|
136
136
|
onChange: g
|
|
137
137
|
}
|
|
138
138
|
)
|
|
@@ -150,20 +150,20 @@ const bt = (t) => {
|
|
|
150
150
|
itemProps: t,
|
|
151
151
|
inputProps: e,
|
|
152
152
|
type: l = "date",
|
|
153
|
-
returnType:
|
|
153
|
+
returnType: o = "string"
|
|
154
154
|
}) => {
|
|
155
|
-
const { displayFormat: n, outputFormat:
|
|
155
|
+
const { displayFormat: n, outputFormat: a } = J(
|
|
156
156
|
() => me[l],
|
|
157
157
|
[l]
|
|
158
|
-
),
|
|
159
|
-
() => Object.values(me).map((i) => i.outputFormat).sort((i,
|
|
160
|
-
if (i.length ===
|
|
161
|
-
if (i ===
|
|
162
|
-
if (
|
|
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;
|
|
163
163
|
}
|
|
164
|
-
return
|
|
164
|
+
return u.length - i.length;
|
|
165
165
|
}),
|
|
166
|
-
[
|
|
166
|
+
[a]
|
|
167
167
|
// type(outputFormat)이 바뀔 때마다 재정렬
|
|
168
168
|
);
|
|
169
169
|
return /* @__PURE__ */ r(
|
|
@@ -172,9 +172,9 @@ const bt = (t) => {
|
|
|
172
172
|
...t,
|
|
173
173
|
getValueProps: (i) => ({
|
|
174
174
|
// 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환
|
|
175
|
-
value: i ? B.isDayjs(i) ? i : B(i,
|
|
175
|
+
value: i ? B.isDayjs(i) ? i : B(i, m) : null
|
|
176
176
|
}),
|
|
177
|
-
normalize: (i) => i ?
|
|
177
|
+
normalize: (i) => i ? o === "dayjs" ? i : i.format(a) : null,
|
|
178
178
|
children: /* @__PURE__ */ r(
|
|
179
179
|
se,
|
|
180
180
|
{
|
|
@@ -190,47 +190,47 @@ const bt = (t) => {
|
|
|
190
190
|
fileGrpKey: t,
|
|
191
191
|
onFetchFilesTrxCd: e = "SCMFILE00101",
|
|
192
192
|
readOnly: l = !1,
|
|
193
|
-
sysCd:
|
|
193
|
+
sysCd: o = __SYS_CD__
|
|
194
194
|
}) => {
|
|
195
|
-
const [n,
|
|
195
|
+
const [n, a] = R([]);
|
|
196
196
|
H(() => {
|
|
197
|
-
t && e ?
|
|
197
|
+
t && e ? o != __SYS_CD__ ? qe(__APP_CD__, e, {
|
|
198
198
|
crprCd: G()?.crprCd,
|
|
199
|
-
sysCd:
|
|
199
|
+
sysCd: o,
|
|
200
200
|
fileGrpKey: t
|
|
201
201
|
}).then((i) => {
|
|
202
202
|
if (i?.sub) {
|
|
203
|
-
const
|
|
203
|
+
const u = i.sub.map((c) => ({
|
|
204
204
|
uid: c.fileKey,
|
|
205
205
|
name: c.lgclFileNm,
|
|
206
206
|
filePath: c.filePath
|
|
207
207
|
}));
|
|
208
|
-
|
|
208
|
+
a(u);
|
|
209
209
|
}
|
|
210
210
|
}).catch((i) => {
|
|
211
211
|
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), _.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
212
212
|
}) : X(e, {
|
|
213
213
|
crprCd: G()?.crprCd,
|
|
214
|
-
sysCd:
|
|
214
|
+
sysCd: o,
|
|
215
215
|
fileGrpKey: t
|
|
216
216
|
}).then((i) => {
|
|
217
217
|
if (i?.sub) {
|
|
218
|
-
const
|
|
218
|
+
const u = i.sub.map((c) => ({
|
|
219
219
|
uid: c.fileKey,
|
|
220
220
|
name: c.lgclFileNm,
|
|
221
221
|
filePath: c.filePath
|
|
222
222
|
}));
|
|
223
|
-
|
|
223
|
+
a(u);
|
|
224
224
|
}
|
|
225
225
|
}).catch((i) => {
|
|
226
226
|
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), _.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
227
|
-
}) :
|
|
227
|
+
}) : a([]);
|
|
228
228
|
}, [t, e]);
|
|
229
|
-
const
|
|
229
|
+
const m = async (i) => {
|
|
230
230
|
try {
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
const c = await fetch(
|
|
231
|
+
let u;
|
|
232
|
+
o != __SYS_CD__ ? u = "/api/download/" + o : u = "/api/download";
|
|
233
|
+
const c = await fetch(u, {
|
|
234
234
|
method: "POST",
|
|
235
235
|
headers: {
|
|
236
236
|
SYSCD: __SYS_CD__,
|
|
@@ -244,14 +244,14 @@ const bt = (t) => {
|
|
|
244
244
|
})
|
|
245
245
|
});
|
|
246
246
|
if (!c.ok) {
|
|
247
|
-
const
|
|
248
|
-
throw new Error(
|
|
247
|
+
const k = (await c.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
|
|
248
|
+
throw new Error(k);
|
|
249
249
|
}
|
|
250
250
|
const S = await c.blob(), g = window.URL.createObjectURL(S), C = document.createElement("a");
|
|
251
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 (
|
|
253
|
-
console.error(
|
|
254
|
-
|
|
252
|
+
} catch (u) {
|
|
253
|
+
console.error(u), _.error(
|
|
254
|
+
u.message || "파일을 다운로드하는 중 오류가 발생했습니다."
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
257
|
};
|
|
@@ -268,7 +268,7 @@ const bt = (t) => {
|
|
|
268
268
|
{
|
|
269
269
|
type: "text",
|
|
270
270
|
icon: /* @__PURE__ */ r(Oe, {}),
|
|
271
|
-
onClick: () =>
|
|
271
|
+
onClick: () => m(i)
|
|
272
272
|
},
|
|
273
273
|
"download"
|
|
274
274
|
)
|
|
@@ -278,8 +278,8 @@ const bt = (t) => {
|
|
|
278
278
|
)
|
|
279
279
|
}
|
|
280
280
|
) });
|
|
281
|
-
}, Qe =
|
|
282
|
-
({ children: t, labelCol: e, style: l, className:
|
|
281
|
+
}, Qe = ke(
|
|
282
|
+
({ children: t, labelCol: e, style: l, className: o, ...n }, a) => /* @__PURE__ */ r(
|
|
283
283
|
le,
|
|
284
284
|
{
|
|
285
285
|
form: {
|
|
@@ -292,12 +292,12 @@ const bt = (t) => {
|
|
|
292
292
|
children: /* @__PURE__ */ r(
|
|
293
293
|
O,
|
|
294
294
|
{
|
|
295
|
-
ref:
|
|
295
|
+
ref: a,
|
|
296
296
|
...n,
|
|
297
297
|
requiredMark: !1,
|
|
298
298
|
labelCol: e || { flex: "100px" },
|
|
299
299
|
style: { padding: "10px", ...l },
|
|
300
|
-
className: `bwg-form ${
|
|
300
|
+
className: `bwg-form ${o ?? ""}`,
|
|
301
301
|
children: t
|
|
302
302
|
}
|
|
303
303
|
)
|
|
@@ -325,28 +325,28 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
325
325
|
".zip"
|
|
326
326
|
], rt = (t, e = 2) => {
|
|
327
327
|
if (t === 0) return "0 Bytes";
|
|
328
|
-
const l = 1024,
|
|
329
|
-
return parseFloat((t / Math.pow(l,
|
|
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];
|
|
330
330
|
}, Nt = ({
|
|
331
331
|
title: t = "첨부파일",
|
|
332
332
|
fileGrpKey: e,
|
|
333
333
|
onUploadComplete: l,
|
|
334
|
-
onSuccessTrxCd:
|
|
334
|
+
onSuccessTrxCd: o = "SCMFILE00102",
|
|
335
335
|
// BwgUploader와 동일한 기본 trxCd 설정
|
|
336
336
|
anotherServiceTrxCd: n = "SCMFILE00105",
|
|
337
|
-
allowedExtensions:
|
|
338
|
-
maxFileSize:
|
|
337
|
+
allowedExtensions: a = tt,
|
|
338
|
+
maxFileSize: m = 2048
|
|
339
339
|
// 기본값 2GB
|
|
340
340
|
}) => {
|
|
341
|
-
const [i,
|
|
342
|
-
if (
|
|
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
343
|
const s = ((F) => {
|
|
344
344
|
const w = F.lastIndexOf(".");
|
|
345
345
|
return w === -1 ? "" : F.substring(w).toLowerCase();
|
|
346
346
|
})(h.name);
|
|
347
|
-
if (!
|
|
347
|
+
if (!a.includes(s))
|
|
348
348
|
return _.error(
|
|
349
|
-
`${h.name} 파일은 허용되지 않는 확장자입니다. (${
|
|
349
|
+
`${h.name} 파일은 허용되지 않는 확장자입니다. (${a.join(
|
|
350
350
|
", "
|
|
351
351
|
)}만 가능)`
|
|
352
352
|
), !1;
|
|
@@ -390,7 +390,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
390
390
|
}
|
|
391
391
|
C(!1);
|
|
392
392
|
const w = new FormData();
|
|
393
|
-
w.append("file", F, "upload.zip"), S(!0),
|
|
393
|
+
w.append("file", F, "upload.zip"), S(!0), k(0);
|
|
394
394
|
try {
|
|
395
395
|
const I = await new Promise((Y, M) => {
|
|
396
396
|
const z = new XMLHttpRequest();
|
|
@@ -399,7 +399,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
399
399
|
const re = Math.round(
|
|
400
400
|
x.loaded / x.total * 100
|
|
401
401
|
);
|
|
402
|
-
|
|
402
|
+
k(re);
|
|
403
403
|
}
|
|
404
404
|
}, z.onload = () => {
|
|
405
405
|
if (z.status >= 200 && z.status < 300)
|
|
@@ -428,7 +428,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
428
428
|
const $ = i.map(
|
|
429
429
|
(Y) => h.find((M) => M.uid === Y.uid) ? { ...Y, status: "done" } : Y
|
|
430
430
|
);
|
|
431
|
-
if (
|
|
431
|
+
if (u($), o && I.uploadedFiles && Array.isArray(I.uploadedFiles)) {
|
|
432
432
|
const Y = G();
|
|
433
433
|
I.uploadedFiles.forEach((M) => {
|
|
434
434
|
const z = {
|
|
@@ -449,7 +449,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
449
449
|
}
|
|
450
450
|
]
|
|
451
451
|
};
|
|
452
|
-
X(
|
|
452
|
+
X(o, z).then((x) => {
|
|
453
453
|
const re = i.map((P) => ({
|
|
454
454
|
crprCd: Y?.crprCd,
|
|
455
455
|
sysCd: __SYS_CD__,
|
|
@@ -483,15 +483,15 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
483
483
|
response: I.message || "파일 업로드 중 오류가 발생했습니다."
|
|
484
484
|
} : Y
|
|
485
485
|
);
|
|
486
|
-
|
|
486
|
+
u($);
|
|
487
487
|
} finally {
|
|
488
488
|
S(!1);
|
|
489
489
|
}
|
|
490
490
|
}, p = {
|
|
491
491
|
multiple: !0,
|
|
492
492
|
fileList: i,
|
|
493
|
-
beforeUpload: (h) => V(h) ?
|
|
494
|
-
`대용량 첨부 파일 최대 크기는 ${(
|
|
493
|
+
beforeUpload: (h) => V(h) ? m && h.size >= m * 1024 * 1024 ? (_.error(
|
|
494
|
+
`대용량 첨부 파일 최대 크기는 ${(m / 1024).toFixed(
|
|
495
495
|
1
|
|
496
496
|
)}GB입니다.`
|
|
497
497
|
), q.LIST_IGNORE) : !1 : q.LIST_IGNORE,
|
|
@@ -499,11 +499,11 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
499
499
|
const y = new Map(i.map((s) => [s.uid, s]));
|
|
500
500
|
h.forEach((s) => {
|
|
501
501
|
y.set(s.uid, s);
|
|
502
|
-
}),
|
|
502
|
+
}), u(Array.from(y.values()));
|
|
503
503
|
},
|
|
504
504
|
onRemove: (h) => {
|
|
505
505
|
const y = i.filter((s) => s.uid !== h.uid);
|
|
506
|
-
|
|
506
|
+
u(y);
|
|
507
507
|
},
|
|
508
508
|
showUploadList: !1
|
|
509
509
|
// 수동으로 목록을 렌더링하므로 antd의 기본 목록은 숨깁니다.
|
|
@@ -538,7 +538,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
538
538
|
const y = h.status === "done", s = h.status === "error";
|
|
539
539
|
let F;
|
|
540
540
|
return y ? F = /* @__PURE__ */ r(
|
|
541
|
-
|
|
541
|
+
Ue,
|
|
542
542
|
{
|
|
543
543
|
style: { color: "#52c41a", fontSize: 14 }
|
|
544
544
|
}
|
|
@@ -616,7 +616,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
616
616
|
type: "primary",
|
|
617
617
|
onClick: N,
|
|
618
618
|
disabled: c || g || i.filter((h) => h.status !== "done").length === 0,
|
|
619
|
-
icon: /* @__PURE__ */ r(
|
|
619
|
+
icon: /* @__PURE__ */ r(Ae, {}),
|
|
620
620
|
children: "일괄 업로드"
|
|
621
621
|
}
|
|
622
622
|
)
|
|
@@ -633,9 +633,9 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
633
633
|
return t[0].replace(/0/g, "_");
|
|
634
634
|
if (typeof t == "object" && "mask" in t && "blocks" in t) {
|
|
635
635
|
const { mask: e, blocks: l } = t;
|
|
636
|
-
return e.split(".").map((
|
|
637
|
-
const
|
|
638
|
-
return "_".repeat(
|
|
636
|
+
return e.split(".").map((o) => {
|
|
637
|
+
const a = l?.[o]?.maxLength ?? 3;
|
|
638
|
+
return "_".repeat(a);
|
|
639
639
|
}).join(".");
|
|
640
640
|
}
|
|
641
641
|
return "";
|
|
@@ -644,16 +644,16 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
644
644
|
inputProps: e,
|
|
645
645
|
mask: l
|
|
646
646
|
}) => {
|
|
647
|
-
const
|
|
647
|
+
const o = W(null), n = O.useFormInstance(), a = J(() => nt(l), [l]);
|
|
648
648
|
return H(() => {
|
|
649
|
-
if (!
|
|
650
|
-
const
|
|
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
651
|
return i.on("accept", () => {
|
|
652
652
|
n && t?.name && n.setFieldValue(t.name, i.value);
|
|
653
653
|
}), () => {
|
|
654
654
|
i.destroy();
|
|
655
655
|
};
|
|
656
|
-
}, [l, n, t?.name]), /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(te, { ...e, ref:
|
|
656
|
+
}, [l, n, t?.name]), /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(te, { ...e, ref: o, placeholder: a }) });
|
|
657
657
|
}, ot = (t) => {
|
|
658
658
|
switch (t) {
|
|
659
659
|
case "year":
|
|
@@ -668,55 +668,55 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
668
668
|
outputFormat: "YYYYMMDD"
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
},
|
|
671
|
+
}, Dt = ({
|
|
672
672
|
type: t = "date",
|
|
673
673
|
itemProps: e = { name: "calendar" },
|
|
674
674
|
inputProps: l
|
|
675
675
|
}) => {
|
|
676
|
-
const { format:
|
|
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
677
|
H(() => {
|
|
678
|
-
if (!
|
|
679
|
-
const s = Ce(
|
|
678
|
+
if (!m.current?.input) return;
|
|
679
|
+
const s = Ce(m.current.input, {
|
|
680
680
|
mask: n,
|
|
681
681
|
lazy: !1
|
|
682
682
|
});
|
|
683
683
|
return i.current = s, s.on("accept", () => {
|
|
684
684
|
const F = s.value;
|
|
685
685
|
F.length > 0 && g(!0);
|
|
686
|
-
const w = B(F,
|
|
687
|
-
F.length ===
|
|
686
|
+
const w = B(F, o, !0);
|
|
687
|
+
F.length === o.length && w.isValid() && (c.setFieldValue(k, s.value), N(w), i.current?.updateValue());
|
|
688
688
|
}), () => {
|
|
689
689
|
s.destroy();
|
|
690
690
|
};
|
|
691
|
-
}, [
|
|
691
|
+
}, [o, n]), H(() => {
|
|
692
692
|
if (!p) {
|
|
693
693
|
N(null);
|
|
694
694
|
return;
|
|
695
695
|
}
|
|
696
696
|
let s = null;
|
|
697
|
-
if (typeof p == "string" && p.length ===
|
|
697
|
+
if (typeof p == "string" && p.length === a.length && /^\d+$/.test(p))
|
|
698
698
|
if (t === "date") {
|
|
699
699
|
const F = p.substring(0, 4), w = p.substring(4, 6), I = p.substring(6, 8);
|
|
700
|
-
s = B(`${F}-${w}-${I}`,
|
|
700
|
+
s = B(`${F}-${w}-${I}`, o, !0);
|
|
701
701
|
} else if (t === "month") {
|
|
702
702
|
const F = p.substring(0, 4), w = p.substring(4, 6);
|
|
703
|
-
s = B(`${F}-${w}`,
|
|
704
|
-
} else t === "year" && (s = B(p,
|
|
703
|
+
s = B(`${F}-${w}`, o, !0);
|
|
704
|
+
} else t === "year" && (s = B(p, o, !0));
|
|
705
705
|
else
|
|
706
|
-
s = B(p,
|
|
706
|
+
s = B(p, o, !0);
|
|
707
707
|
s && s.isValid() ? N(s) : N(null), L(!1);
|
|
708
|
-
}, [p,
|
|
708
|
+
}, [p, o, a, t]);
|
|
709
709
|
const h = (s) => {
|
|
710
710
|
if (!s) {
|
|
711
711
|
N(null), i.current?.updateValue();
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
714
|
N(s);
|
|
715
|
-
const F = s.format(
|
|
715
|
+
const F = s.format(a);
|
|
716
716
|
i.current && (i.current.value = F, i.current.updateValue()), L(!1);
|
|
717
717
|
}, y = (s) => {
|
|
718
718
|
setTimeout(() => {
|
|
719
|
-
const F = document.activeElement, w =
|
|
719
|
+
const F = document.activeElement, w = u.current, I = w?.querySelector(".ant-picker-dropdown");
|
|
720
720
|
!(w && (w.contains(F) || w === F || I?.contains(F))) && !(s !== void 0 ? s : S) && console.log("✅ Input과 DatePicker 모두 포커스가 없습니다");
|
|
721
721
|
}, 0);
|
|
722
722
|
};
|
|
@@ -736,21 +736,21 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
},
|
|
739
|
-
children: /* @__PURE__ */ K("div", { ref:
|
|
739
|
+
children: /* @__PURE__ */ K("div", { ref: u, style: { position: "relative" }, children: [
|
|
740
740
|
/* @__PURE__ */ r(
|
|
741
741
|
O.Item,
|
|
742
742
|
{
|
|
743
|
-
name:
|
|
743
|
+
name: k,
|
|
744
744
|
getValueProps: (s) => ({
|
|
745
|
-
value: s ? B(s).format(
|
|
745
|
+
value: s ? B(s).format(o) : void 0
|
|
746
746
|
}),
|
|
747
|
-
normalize: (s) => s ? B(s).format(
|
|
747
|
+
normalize: (s) => s ? B(s).format(a) : void 0,
|
|
748
748
|
noStyle: !0,
|
|
749
749
|
children: /* @__PURE__ */ r(
|
|
750
750
|
te,
|
|
751
751
|
{
|
|
752
752
|
...l,
|
|
753
|
-
ref:
|
|
753
|
+
ref: m,
|
|
754
754
|
onFocus: () => {
|
|
755
755
|
g(!S), i.current?.updateValue();
|
|
756
756
|
},
|
|
@@ -760,8 +760,8 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
760
760
|
onKeyDown: (s) => {
|
|
761
761
|
if (s.key === "Backspace" && g(!0), s.key === "Tab" && g(!1), s.key === "Enter")
|
|
762
762
|
if (S) {
|
|
763
|
-
const F = i.current?.value || "", w = B(F,
|
|
764
|
-
F.length ===
|
|
763
|
+
const F = i.current?.value || "", w = B(F, o, !0);
|
|
764
|
+
F.length === o.length && w.isValid() ? (g(!1), L(!1)) : L(!0);
|
|
765
765
|
} else
|
|
766
766
|
g(!0);
|
|
767
767
|
},
|
|
@@ -779,7 +779,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
779
779
|
open: S,
|
|
780
780
|
picker: t,
|
|
781
781
|
format: {
|
|
782
|
-
format:
|
|
782
|
+
format: o,
|
|
783
783
|
type: "mask"
|
|
784
784
|
},
|
|
785
785
|
showNow: !0,
|
|
@@ -823,13 +823,13 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
823
823
|
)
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
}, { Option: fe } = ce,
|
|
827
|
-
const [l,
|
|
826
|
+
}, { Option: fe } = ce, kt = ({ itemProps: t, inputProps: e }) => {
|
|
827
|
+
const [l, o] = R([]);
|
|
828
828
|
return H(() => {
|
|
829
|
-
e?.addField === "ALL" ?
|
|
829
|
+
e?.addField === "ALL" ? o([
|
|
830
830
|
{ label: "전체", value: "" },
|
|
831
831
|
...e?.list || []
|
|
832
|
-
]) : e?.addField === "NULL" ?
|
|
832
|
+
]) : e?.addField === "NULL" ? o([{ label: "", value: "" }, ...e?.list || []]) : o(e?.list || []);
|
|
833
833
|
}, [e?.list]), /* @__PURE__ */ r(
|
|
834
834
|
E,
|
|
835
835
|
{
|
|
@@ -841,25 +841,25 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
841
841
|
},
|
|
842
842
|
normalize: (n) => n != null && n != null && n.length > 0 ? n.toString() : "",
|
|
843
843
|
children: /* @__PURE__ */ r(ce, { ...e, mode: "multiple", children: l.map((n) => {
|
|
844
|
-
const { value:
|
|
845
|
-
return e?.printCode ? /* @__PURE__ */ r(fe, { value:
|
|
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);
|
|
846
846
|
}) })
|
|
847
847
|
}
|
|
848
848
|
);
|
|
849
849
|
}, xt = ({ itemProps: t, inputProps: e }) => {
|
|
850
850
|
const l = (n) => {
|
|
851
|
-
let
|
|
852
|
-
return e?.decimalPoint != null &&
|
|
853
|
-
},
|
|
854
|
-
let
|
|
855
|
-
return e?.decimalPoint != null &&
|
|
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];
|
|
856
856
|
};
|
|
857
857
|
return /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(
|
|
858
858
|
_e,
|
|
859
859
|
{
|
|
860
860
|
...e,
|
|
861
861
|
formatter: (n) => l(n),
|
|
862
|
-
parser: (n) =>
|
|
862
|
+
parser: (n) => o(n)
|
|
863
863
|
}
|
|
864
864
|
) });
|
|
865
865
|
}, vt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(Ne.Group, { ...e }) }), { RangePicker: at } = se, he = {
|
|
@@ -875,14 +875,14 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
875
875
|
itemProps: t,
|
|
876
876
|
inputProps: e,
|
|
877
877
|
type: l = "date",
|
|
878
|
-
minDate:
|
|
878
|
+
minDate: o,
|
|
879
879
|
maxDate: n,
|
|
880
|
-
returnType:
|
|
880
|
+
returnType: a = "string"
|
|
881
881
|
}) => {
|
|
882
|
-
const { displayFormat:
|
|
882
|
+
const { displayFormat: m, outputFormat: i } = J(
|
|
883
883
|
() => he[l],
|
|
884
884
|
[l]
|
|
885
|
-
),
|
|
885
|
+
), u = J(
|
|
886
886
|
() => Object.values(he).map((c) => c.outputFormat).sort((c, S) => {
|
|
887
887
|
if (c.length === S.length) {
|
|
888
888
|
if (c === i) return -1;
|
|
@@ -900,11 +900,11 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
900
900
|
getValueProps: (c) => ({
|
|
901
901
|
// 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환
|
|
902
902
|
value: c && c.length > 0 ? [
|
|
903
|
-
c[0] ? B.isDayjs(c[0]) ? c[0] : B(c[0],
|
|
904
|
-
c[1] ? B.isDayjs(c[1]) ? c[1] : B(c[1],
|
|
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
|
|
905
905
|
] : null
|
|
906
906
|
}),
|
|
907
|
-
normalize: (c) => c ?
|
|
907
|
+
normalize: (c) => c ? a === "dayjs" ? [c[0] ?? void 0, c[1] ?? void 0] : [
|
|
908
908
|
c[0] ? c[0].format(i) : void 0,
|
|
909
909
|
c[1] ? c[1].format(i) : void 0
|
|
910
910
|
] : [void 0, void 0],
|
|
@@ -913,35 +913,35 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
913
913
|
{
|
|
914
914
|
...e,
|
|
915
915
|
order: !0,
|
|
916
|
-
minDate:
|
|
917
|
-
maxDate: n ? B(n,
|
|
916
|
+
minDate: o ? B(o, u) : void 0,
|
|
917
|
+
maxDate: n ? B(n, u) : void 0,
|
|
918
918
|
picker: l === "datetime" ? "date" : l,
|
|
919
919
|
showTime: e?.showTime ?? (l === "datetime" || l === "time"),
|
|
920
|
-
format:
|
|
920
|
+
format: m
|
|
921
921
|
}
|
|
922
922
|
)
|
|
923
923
|
}
|
|
924
924
|
);
|
|
925
925
|
}, ge = te.Search, Bt = (t) => {
|
|
926
|
-
const e = O.useFormInstance(), { openPopup: l } = Ee(),
|
|
927
|
-
callback(
|
|
928
|
-
|
|
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);
|
|
929
929
|
}
|
|
930
|
-
},
|
|
930
|
+
}, a = {
|
|
931
931
|
...t,
|
|
932
932
|
placeholder: typeof t.placeholder == "string" ? t.placeholder : t.placeholder?.[0] || "",
|
|
933
|
-
onChange: (
|
|
934
|
-
|
|
933
|
+
onChange: (m) => {
|
|
934
|
+
Array.isArray(o) && o.length > 1 && e.setFieldValue(o[0], ""), t.onChange?.(m);
|
|
935
935
|
},
|
|
936
|
-
onSearch: (
|
|
937
|
-
t.popuCd ? l(t.popuCd, t.popupParams, n) : t.onSearch?.(
|
|
936
|
+
onSearch: (m) => {
|
|
937
|
+
t.popuCd ? l(t.popuCd, t.popupParams, n) : t.onSearch?.(m);
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
|
-
return
|
|
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
941
|
/* @__PURE__ */ r(
|
|
942
942
|
O.Item,
|
|
943
943
|
{
|
|
944
|
-
name:
|
|
944
|
+
name: o[0],
|
|
945
945
|
rules: t.itemProps?.rules,
|
|
946
946
|
style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
|
|
947
947
|
validateStatus: "",
|
|
@@ -956,7 +956,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
956
956
|
)
|
|
957
957
|
}
|
|
958
958
|
),
|
|
959
|
-
/* @__PURE__ */ r(O.Item, { name:
|
|
959
|
+
/* @__PURE__ */ r(O.Item, { name: o[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ r(
|
|
960
960
|
ge,
|
|
961
961
|
{
|
|
962
962
|
readOnly: t.readOnly,
|
|
@@ -967,10 +967,10 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
967
967
|
disabled: t.readOnly
|
|
968
968
|
}
|
|
969
969
|
),
|
|
970
|
-
...
|
|
970
|
+
...a
|
|
971
971
|
}
|
|
972
972
|
) })
|
|
973
|
-
] }) }) : /* @__PURE__ */ r(E, { ...t.itemProps, children: /* @__PURE__ */ r(ge, { ...
|
|
973
|
+
] }) }) : /* @__PURE__ */ r(E, { ...t.itemProps, children: /* @__PURE__ */ r(ge, { ...a }) });
|
|
974
974
|
}, Ot = ({
|
|
975
975
|
itemProps: t,
|
|
976
976
|
selectProps: e = {
|
|
@@ -978,16 +978,16 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
978
978
|
allowClear: !0
|
|
979
979
|
}
|
|
980
980
|
}) => {
|
|
981
|
-
const l = O.useFormInstance(),
|
|
982
|
-
e.onChange?.(
|
|
983
|
-
},
|
|
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
984
|
...e,
|
|
985
985
|
allowClear: e.allowClear ?? !0,
|
|
986
986
|
options: n,
|
|
987
|
-
onChange:
|
|
987
|
+
onChange: a,
|
|
988
988
|
variant: e.variant
|
|
989
|
-
}, i = /* @__PURE__ */ r(ce, { ...
|
|
990
|
-
return e.copyable && !
|
|
989
|
+
}, i = /* @__PURE__ */ r(ce, { ...m, disabled: e.disabled });
|
|
990
|
+
return e.copyable && !o && console.warn(
|
|
991
991
|
"BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
|
|
992
992
|
), e.copyable ? /* @__PURE__ */ r(E, { ...t, name: void 0, children: /* @__PURE__ */ K(ae.Compact, { block: !0, children: [
|
|
993
993
|
/* @__PURE__ */ r(
|
|
@@ -1005,7 +1005,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1005
1005
|
Fe.Paragraph,
|
|
1006
1006
|
{
|
|
1007
1007
|
copyable: {
|
|
1008
|
-
text:
|
|
1008
|
+
text: o && l?.getFieldValue(t?.name)?.toString() || "",
|
|
1009
1009
|
tooltips: ["코드복사", "코드복사됨"]
|
|
1010
1010
|
},
|
|
1011
1011
|
style: {
|
|
@@ -1029,8 +1029,8 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1029
1029
|
format: "YN"
|
|
1030
1030
|
}
|
|
1031
1031
|
}) => {
|
|
1032
|
-
const l = O.useFormInstance(),
|
|
1033
|
-
e.format === "boolean" ? l.setFieldValue(t?.name, n) : l.setFieldValue(t?.name, n ? "Y" : "N"), e.onChange && e.onChange(n,
|
|
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);
|
|
1034
1034
|
};
|
|
1035
1035
|
return /* @__PURE__ */ r(
|
|
1036
1036
|
E,
|
|
@@ -1038,7 +1038,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1038
1038
|
...t,
|
|
1039
1039
|
getValueProps: (n) => ({ checked: e.format === "boolean" ? !!n : n === "Y" }),
|
|
1040
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,
|
|
1041
|
+
children: /* @__PURE__ */ r(Me, { ...e, onChange: (n, a) => o(n, a) })
|
|
1042
1042
|
}
|
|
1043
1043
|
);
|
|
1044
1044
|
}, { TextArea: it } = te, Vt = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, children: /* @__PURE__ */ r(it, { ...e }) }), lt = [
|
|
@@ -1065,33 +1065,33 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1065
1065
|
originNode: t,
|
|
1066
1066
|
file: e,
|
|
1067
1067
|
fileList: l,
|
|
1068
|
-
moveFile:
|
|
1068
|
+
moveFile: o,
|
|
1069
1069
|
onDrop: n
|
|
1070
1070
|
}) => {
|
|
1071
|
-
const
|
|
1071
|
+
const a = W(null), [{ handlerId: m }, i] = Xe({
|
|
1072
1072
|
accept: pe.FILE,
|
|
1073
1073
|
collect: (g) => ({
|
|
1074
1074
|
handlerId: g.getHandlerId()
|
|
1075
1075
|
}),
|
|
1076
1076
|
hover(g, C) {
|
|
1077
|
-
if (!
|
|
1077
|
+
if (!a.current)
|
|
1078
1078
|
return;
|
|
1079
|
-
const L = g.uid,
|
|
1080
|
-
if (L ===
|
|
1079
|
+
const L = g.uid, k = e.uid;
|
|
1080
|
+
if (L === k)
|
|
1081
1081
|
return;
|
|
1082
|
-
const V = ne(l, { uid:
|
|
1082
|
+
const V = ne(l, { uid: k }), N = ne(l, { uid: L });
|
|
1083
1083
|
if (N === -1 || V === -1)
|
|
1084
1084
|
return;
|
|
1085
|
-
const p =
|
|
1085
|
+
const p = a.current.getBoundingClientRect(), h = C.getClientOffset();
|
|
1086
1086
|
if (!h)
|
|
1087
1087
|
return;
|
|
1088
1088
|
const y = (p.bottom - p.top) / 2, s = h.y - p.top;
|
|
1089
|
-
N < V && s < y || N > V && s > y ||
|
|
1089
|
+
N < V && s < y || N > V && s > y || o(L, k);
|
|
1090
1090
|
},
|
|
1091
1091
|
drop() {
|
|
1092
1092
|
n();
|
|
1093
1093
|
}
|
|
1094
|
-
}), [{ isDragging:
|
|
1094
|
+
}), [{ isDragging: u }, c] = Ze({
|
|
1095
1095
|
type: pe.FILE,
|
|
1096
1096
|
item: () => ({
|
|
1097
1097
|
uid: e.uid,
|
|
@@ -1100,25 +1100,25 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1100
1100
|
collect: (g) => ({
|
|
1101
1101
|
isDragging: g.isDragging()
|
|
1102
1102
|
})
|
|
1103
|
-
}), S =
|
|
1104
|
-
return c(i(
|
|
1105
|
-
},
|
|
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 = ({
|
|
1106
1106
|
itemProps: t,
|
|
1107
1107
|
fileGrpKey: e,
|
|
1108
1108
|
onUploadComplete: l,
|
|
1109
|
-
onFetchFilesTrxCd:
|
|
1109
|
+
onFetchFilesTrxCd: o = "SCMFILE00101",
|
|
1110
1110
|
onSuccessTrxCd: n = "SCMFILE00102",
|
|
1111
|
-
onDeleteFileTrxCd:
|
|
1112
|
-
onReorderFilesTrxCd:
|
|
1111
|
+
onDeleteFileTrxCd: a = "SCMFILE00103",
|
|
1112
|
+
onReorderFilesTrxCd: m = "SCMFILE00104",
|
|
1113
1113
|
allowedExtensions: i = lt,
|
|
1114
|
-
maxFileSize:
|
|
1114
|
+
maxFileSize: u = 200,
|
|
1115
1115
|
showButton: c = !0,
|
|
1116
1116
|
// 기본값으로 true 설정
|
|
1117
1117
|
multiple: S = !1,
|
|
1118
1118
|
newFileGrpKeyonModify: g = !1,
|
|
1119
1119
|
buttonText: C = "파일 선택",
|
|
1120
1120
|
localOnly: L = !1,
|
|
1121
|
-
onFilesChange:
|
|
1121
|
+
onFilesChange: k
|
|
1122
1122
|
}) => {
|
|
1123
1123
|
const [V, N] = R([]), p = W(e), h = W([]), y = O.useFormInstance(), F = W(
|
|
1124
1124
|
Ge(() => {
|
|
@@ -1126,7 +1126,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1126
1126
|
return;
|
|
1127
1127
|
const d = [...h.current];
|
|
1128
1128
|
if (h.current = [], n) {
|
|
1129
|
-
const
|
|
1129
|
+
const D = d.map((b) => ({
|
|
1130
1130
|
crprCd: G()?.crprCd,
|
|
1131
1131
|
sysCd: __SYS_CD__,
|
|
1132
1132
|
fileGrpKey: p.current,
|
|
@@ -1146,37 +1146,37 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1146
1146
|
fileGrpKey: g ? 0 : p.current,
|
|
1147
1147
|
oldFileGrpKey: p.current,
|
|
1148
1148
|
newFileGrpKeyonModify: g,
|
|
1149
|
-
sub:
|
|
1149
|
+
sub: D
|
|
1150
1150
|
}).then((b) => {
|
|
1151
1151
|
if (b?.sub && b.sub.length > 0) {
|
|
1152
1152
|
const f = b.sub[0].fileGrpKey;
|
|
1153
1153
|
(!p.current || g) && (p.current = f);
|
|
1154
|
-
const
|
|
1154
|
+
const A = /* @__PURE__ */ new Map();
|
|
1155
1155
|
b.sub.forEach((v) => {
|
|
1156
|
-
const
|
|
1156
|
+
const U = d.find(
|
|
1157
1157
|
(j) => j.fileNameL === v.lgclFileNm
|
|
1158
1158
|
);
|
|
1159
|
-
|
|
1159
|
+
U && A.set(U.tempId, v);
|
|
1160
1160
|
});
|
|
1161
1161
|
const Q = t?.name;
|
|
1162
1162
|
((v) => {
|
|
1163
1163
|
if (Y) {
|
|
1164
|
-
const
|
|
1164
|
+
const U = y?.getFieldValue(Q) || [], j = v(U);
|
|
1165
1165
|
y?.setFieldValue(Q, j);
|
|
1166
1166
|
} else
|
|
1167
|
-
N((
|
|
1168
|
-
})((v) => v.map((
|
|
1169
|
-
const j =
|
|
1167
|
+
N((U) => v(U));
|
|
1168
|
+
})((v) => v.map((U) => {
|
|
1169
|
+
const j = A.get(U.uid);
|
|
1170
1170
|
if (j) {
|
|
1171
1171
|
const de = d.find(
|
|
1172
|
-
(be) => be.tempId ===
|
|
1172
|
+
(be) => be.tempId === U.uid
|
|
1173
1173
|
);
|
|
1174
1174
|
return l && de && l({
|
|
1175
1175
|
...de,
|
|
1176
1176
|
fileGrpKey: f,
|
|
1177
1177
|
fileKey: j.fileKey
|
|
1178
1178
|
}), {
|
|
1179
|
-
...
|
|
1179
|
+
...U,
|
|
1180
1180
|
name: j.lgclFileNm,
|
|
1181
1181
|
fileGrpKey: f,
|
|
1182
1182
|
fileKey: j.fileKey,
|
|
@@ -1185,16 +1185,16 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1185
1185
|
url: `/api/download?filePath=${j.filePath}&logicalName=${j.lgclFileNm}`
|
|
1186
1186
|
};
|
|
1187
1187
|
}
|
|
1188
|
-
return
|
|
1188
|
+
return U;
|
|
1189
1189
|
}));
|
|
1190
1190
|
}
|
|
1191
1191
|
}).catch((b) => {
|
|
1192
1192
|
console.error("업로드 후처리 서비스 호출 실패:", b), _.error("파일 후처리 중 오류가 발생했습니다.");
|
|
1193
|
-
const f = new Set(d.map((T) => T.tempId)),
|
|
1193
|
+
const f = new Set(d.map((T) => T.tempId)), A = t?.name;
|
|
1194
1194
|
((T) => {
|
|
1195
1195
|
if (Y) {
|
|
1196
|
-
const v = y?.getFieldValue(
|
|
1197
|
-
y?.setFieldValue(
|
|
1196
|
+
const v = y?.getFieldValue(A) || [], U = T(v);
|
|
1197
|
+
y?.setFieldValue(A, U);
|
|
1198
1198
|
} else
|
|
1199
1199
|
N((v) => T(v));
|
|
1200
1200
|
})(
|
|
@@ -1211,36 +1211,36 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1211
1211
|
}, [F]), H(() => {
|
|
1212
1212
|
p.current = e;
|
|
1213
1213
|
}, [e]), H(() => {
|
|
1214
|
-
L || e &&
|
|
1214
|
+
L || e && o && X(o, {
|
|
1215
1215
|
crprCd: G()?.crprCd,
|
|
1216
1216
|
sysCd: __SYS_CD__,
|
|
1217
1217
|
fileGrpKey: e
|
|
1218
1218
|
}).then((d) => {
|
|
1219
1219
|
if (d?.sub) {
|
|
1220
|
-
const
|
|
1220
|
+
const D = d.sub.map((f) => ({
|
|
1221
1221
|
uid: f.fileKey,
|
|
1222
1222
|
name: f.lgclFileNm,
|
|
1223
1223
|
status: "done",
|
|
1224
1224
|
url: `/api/download?filePath=${f.filePath}&logicalName=${f.lgclFileNm}`
|
|
1225
1225
|
})), b = t?.name;
|
|
1226
|
-
Y ? y?.setFieldValue(b,
|
|
1226
|
+
Y ? y?.setFieldValue(b, D) : N(D);
|
|
1227
1227
|
} else {
|
|
1228
|
-
const
|
|
1229
|
-
Y ? y?.setFieldValue(
|
|
1228
|
+
const D = t?.name;
|
|
1229
|
+
Y ? y?.setFieldValue(D, []) : N([]);
|
|
1230
1230
|
}
|
|
1231
1231
|
}).catch((d) => {
|
|
1232
1232
|
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", d), _.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
1233
1233
|
});
|
|
1234
|
-
}, [e,
|
|
1235
|
-
const w = (d,
|
|
1236
|
-
const b = t?.name, f = Y ? y?.getFieldValue(b) || [] : V,
|
|
1237
|
-
if (
|
|
1238
|
-
const T = [...f], [v] = T.splice(
|
|
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
1239
|
T.splice(Q, 0, v), Y ? y?.setFieldValue(b, T) : N(T);
|
|
1240
1240
|
}, I = () => {
|
|
1241
|
-
if (!L && e &&
|
|
1241
|
+
if (!L && e && m) {
|
|
1242
1242
|
const d = t?.name, b = (Y ? y?.getFieldValue(d) || [] : V).map((f) => f.uid);
|
|
1243
|
-
X(
|
|
1243
|
+
X(m, {
|
|
1244
1244
|
crprCd: G()?.crprCd,
|
|
1245
1245
|
sysCd: __SYS_CD__,
|
|
1246
1246
|
fileGrpKey: e,
|
|
@@ -1252,7 +1252,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1252
1252
|
});
|
|
1253
1253
|
}
|
|
1254
1254
|
}, $ = (d) => {
|
|
1255
|
-
const
|
|
1255
|
+
const D = t?.name, b = Y ? y?.getFieldValue(D) || [] : V;
|
|
1256
1256
|
if (!S && b.length > 0)
|
|
1257
1257
|
return _.error("하나의 파일만 업로드할 수 있습니다."), q.LIST_IGNORE;
|
|
1258
1258
|
if (i && i.length > 0) {
|
|
@@ -1264,7 +1264,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1264
1264
|
)})`
|
|
1265
1265
|
), q.LIST_IGNORE;
|
|
1266
1266
|
}
|
|
1267
|
-
return
|
|
1267
|
+
return u && !(d.size / 1024 / 1024 < u) ? (_.error(`일반업로드의 최대용량은 ${u}MB입니다.`), q.LIST_IGNORE) : !L;
|
|
1268
1268
|
}, Y = !!t?.name, M = {
|
|
1269
1269
|
name: "file",
|
|
1270
1270
|
multiple: S,
|
|
@@ -1275,10 +1275,10 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1275
1275
|
// showButton 값에 따라 삭제 버튼 표시/숨김
|
|
1276
1276
|
},
|
|
1277
1277
|
onChange(d) {
|
|
1278
|
-
const { status:
|
|
1279
|
-
if (
|
|
1280
|
-
if (!L &&
|
|
1281
|
-
X(
|
|
1278
|
+
const { status: D, uid: b } = d.file;
|
|
1279
|
+
if (D === "removed") {
|
|
1280
|
+
if (!L && a)
|
|
1281
|
+
X(a, {
|
|
1282
1282
|
crprCd: G()?.crprCd,
|
|
1283
1283
|
sysCd: __SYS_CD__,
|
|
1284
1284
|
fileGrpKey: g ? 0 : p.current,
|
|
@@ -1287,11 +1287,11 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1287
1287
|
newFileGrpKeyonModify: g
|
|
1288
1288
|
}).then((f) => {
|
|
1289
1289
|
if (_.success("파일이 성공적으로 삭제되었습니다."), g && (p.current = f.fileGrpKey), Y) {
|
|
1290
|
-
const
|
|
1291
|
-
y?.setFieldValue(
|
|
1290
|
+
const A = t?.name;
|
|
1291
|
+
y?.setFieldValue(A, d.fileList);
|
|
1292
1292
|
} else
|
|
1293
1293
|
N(d.fileList);
|
|
1294
|
-
|
|
1294
|
+
k?.(d.fileList), l?.({
|
|
1295
1295
|
fileGrpKey: f.fileGrpKey
|
|
1296
1296
|
});
|
|
1297
1297
|
}).catch((f) => {
|
|
@@ -1303,7 +1303,7 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1303
1303
|
y?.setFieldValue(f, d.fileList);
|
|
1304
1304
|
} else
|
|
1305
1305
|
N(d.fileList);
|
|
1306
|
-
|
|
1306
|
+
k?.(d.fileList);
|
|
1307
1307
|
}
|
|
1308
1308
|
return;
|
|
1309
1309
|
}
|
|
@@ -1312,11 +1312,11 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1312
1312
|
y?.setFieldValue(f, d.fileList);
|
|
1313
1313
|
} else
|
|
1314
1314
|
N(d.fileList);
|
|
1315
|
-
if (
|
|
1315
|
+
if (k?.(d.fileList), D === "done")
|
|
1316
1316
|
if (!L && d.file.response?.success) {
|
|
1317
1317
|
const { uploadedFiles: f } = d.file.response;
|
|
1318
|
-
f && Array.isArray(f) && f.length > 0 && (f.forEach((
|
|
1319
|
-
|
|
1318
|
+
f && Array.isArray(f) && f.length > 0 && (f.forEach((A) => {
|
|
1319
|
+
A.tempId = d.file.uid, h.current.push(A);
|
|
1320
1320
|
}), F()), _.success(
|
|
1321
1321
|
d.file.response.message || `${d.file.name} 파일이 성공적으로 업로드되었습니다.`
|
|
1322
1322
|
);
|
|
@@ -1324,25 +1324,25 @@ const _t = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ r(E, { ...t, chi
|
|
|
1324
1324
|
_.error(
|
|
1325
1325
|
d.file.response?.message || `${d.file.name} 파일 업로드에 실패했습니다.`
|
|
1326
1326
|
);
|
|
1327
|
-
else
|
|
1327
|
+
else D === "error" && _.error(
|
|
1328
1328
|
d.file.response?.message || `${d.file.name} 파일 업로드 중 오류가 발생했습니다.`
|
|
1329
1329
|
);
|
|
1330
1330
|
},
|
|
1331
|
-
itemRender(d,
|
|
1331
|
+
itemRender(d, D, b) {
|
|
1332
1332
|
const f = xe(d, {
|
|
1333
|
-
href:
|
|
1333
|
+
href: D.url || void 0,
|
|
1334
1334
|
title: void 0
|
|
1335
1335
|
});
|
|
1336
1336
|
return /* @__PURE__ */ r(
|
|
1337
1337
|
st,
|
|
1338
1338
|
{
|
|
1339
1339
|
originNode: f,
|
|
1340
|
-
file:
|
|
1340
|
+
file: D,
|
|
1341
1341
|
fileList: b,
|
|
1342
1342
|
moveFile: w,
|
|
1343
1343
|
onDrop: I
|
|
1344
1344
|
},
|
|
1345
|
-
|
|
1345
|
+
D.uid
|
|
1346
1346
|
);
|
|
1347
1347
|
}
|
|
1348
1348
|
};
|
|
@@ -1377,8 +1377,8 @@ export {
|
|
|
1377
1377
|
_t as BwgInput,
|
|
1378
1378
|
Nt as BwgLargeUploader,
|
|
1379
1379
|
Mt as BwgMaskedInput,
|
|
1380
|
-
|
|
1381
|
-
|
|
1380
|
+
Dt as BwgMaskedPicker,
|
|
1381
|
+
kt as BwgMultiSelect,
|
|
1382
1382
|
xt as BwgNumber,
|
|
1383
1383
|
vt as BwgRadio,
|
|
1384
1384
|
Et as BwgRangePicker,
|
|
@@ -1386,5 +1386,5 @@ export {
|
|
|
1386
1386
|
Ot as BwgSelect,
|
|
1387
1387
|
zt as BwgSwitch,
|
|
1388
1388
|
Vt as BwgTextArea,
|
|
1389
|
-
|
|
1389
|
+
At as BwgUploader
|
|
1390
1390
|
};
|