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