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