@bwg-ui/core 1.3.7 → 1.3.9
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/CMPrgrMstrP02-CIPnCdt3.cjs +1 -0
- package/dist/chunks/CMPrgrMstrP02-jC3zDeFU.js +154 -0
- package/dist/chunks/CMSearchIntfGwP01-D4qj6J2N.cjs +1 -0
- package/dist/chunks/{CMSearchIntfGwP01-DCHZJn2H.js → CMSearchIntfGwP01-DzTHXQi3.js} +31 -31
- package/dist/chunks/MenuReport-BtP1uAmq.cjs +1 -0
- package/dist/chunks/{MenuReport-IBdoU2S3.js → MenuReport-DgMjx5Hs.js} +5 -5
- package/dist/chunks/SearchAddressP01-B25Exa9E.cjs +1 -0
- package/dist/chunks/SearchAddressP01-B_D3nrkn.js +605 -0
- package/dist/chunks/SearchDepartmentP01-D5ihO3l8.cjs +1 -0
- package/dist/chunks/SearchDepartmentP01-pUAav3Xp.js +352 -0
- package/dist/chunks/SearchDepartmentP02-B3oL1B-h.js +518 -0
- package/dist/chunks/SearchDepartmentP02-CWs8sLuu.cjs +1 -0
- package/dist/chunks/SearchHolidayP01-SuuyAk9T.js +188 -0
- package/dist/chunks/SearchHolidayP01-cJ8Wlkwr.cjs +1 -0
- package/dist/chunks/SearchOrganizationP01-3nDwrB08.cjs +1 -0
- package/dist/chunks/SearchOrganizationP01-ChwLBfVt.js +420 -0
- package/dist/chunks/SearchOrganizationP02-0Suj4DLH.cjs +1 -0
- package/dist/chunks/SearchOrganizationP02-DI0V4Bdz.js +516 -0
- package/dist/chunks/UploadMultiFileP01-CffgcIXm.cjs +1 -0
- package/dist/chunks/UploadMultiFileP01-Cy2LeYfy.js +38 -0
- package/dist/chunks/{layout-components-DnuV2Psp.js → layout-components-Cpzy8mH1.js} +1053 -951
- package/dist/chunks/layout-components-y9YpQQbx.cjs +38 -0
- package/dist/chunks/provider-DrmM0H4o.cjs +1 -0
- package/dist/chunks/provider-ff4RVDYo.js +711 -0
- package/dist/components/common/ButtonAccessController.d.ts +2 -3
- package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
- package/dist/components/common/BwgButtonGroup.d.ts +1 -1
- package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
- package/dist/components/common/BwgCol.d.ts +1 -1
- package/dist/components/common/BwgCol.d.ts.map +1 -1
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgModal.d.ts +10 -0
- package/dist/components/common/BwgModal.d.ts.map +1 -0
- 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 +2 -1
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +4887 -28
- package/dist/components/core/BwgCmnFileItems.d.ts +47 -0
- package/dist/components/core/BwgCmnFileItems.d.ts.map +1 -0
- package/dist/components/core/BwgDeptSearch.d.ts +38 -0
- package/dist/components/core/BwgDeptSearch.d.ts.map +1 -0
- package/dist/components/core/BwgDraggerUploader.d.ts +13 -0
- package/dist/components/core/BwgDraggerUploader.d.ts.map +1 -0
- package/dist/components/core/BwgEmpSearch.d.ts +12 -4
- package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
- package/dist/components/core/BwgUploader.d.ts +6 -92
- package/dist/components/core/BwgUploader.d.ts.map +1 -1
- package/dist/components/core/BwgUploader_bak.d.ts +98 -0
- package/dist/components/core/BwgUploader_bak.d.ts.map +1 -0
- package/dist/components/core/BwgXlsxUploader.d.ts +25 -0
- package/dist/components/core/BwgXlsxUploader.d.ts.map +1 -0
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.d.ts +11 -2
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +1318 -1164
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +17 -17
- package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
- package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
- package/dist/components/layout/custom/ConfigurableSidebar.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/auth/AuthManagement.d.ts +8 -0
- package/dist/components/pages/auth/AuthManagement.d.ts.map +1 -0
- package/dist/components/pages/auth/AuthSelector.d.ts +28 -0
- package/dist/components/pages/auth/AuthSelector.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleAuthMapper.d.ts +8 -0
- package/dist/components/pages/auth/RoleAuthMapper.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleDashBoard.d.ts +13 -0
- package/dist/components/pages/auth/RoleDashBoard.d.ts.map +1 -0
- package/dist/components/pages/auth/RoleView.d.ts +17 -0
- package/dist/components/pages/auth/RoleView.d.ts.map +1 -0
- package/dist/components/pages/board/AdminBoard.d.ts +6 -0
- package/dist/components/pages/board/AdminBoard.d.ts.map +1 -0
- package/dist/components/pages/board/BoardComment.d.ts +8 -0
- package/dist/components/pages/board/BoardComment.d.ts.map +1 -0
- package/dist/components/pages/board/MyBoard.d.ts +6 -0
- package/dist/components/pages/board/MyBoard.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +10 -10
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/pages/rsrc/MenuManagement.d.ts +4 -0
- package/dist/components/pages/rsrc/MenuManagement.d.ts.map +1 -0
- package/dist/components/pages/rsrc/{CMMenuPrntSelectModal.d.ts → MenuSelector.d.ts} +5 -4
- package/dist/components/pages/rsrc/MenuSelector.d.ts.map +1 -0
- package/dist/components/pages/rsrc/ProgramManagement.d.ts +4 -0
- package/dist/components/pages/rsrc/ProgramManagement.d.ts.map +1 -0
- package/dist/components/pages/rsrc/{CMMenuPrgrSelectModal.d.ts → ProgramSelector.d.ts} +5 -4
- package/dist/components/pages/rsrc/ProgramSelector.d.ts.map +1 -0
- package/dist/components/pages/syst/CommonCodeManagement.d.ts +4 -0
- package/dist/components/pages/syst/CommonCodeManagement.d.ts.map +1 -0
- package/dist/components/pages/syst/CommonCodeTester.d.ts +7 -0
- package/dist/components/pages/syst/CommonCodeTester.d.ts.map +1 -0
- package/dist/components/pages/types.d.ts +5 -1
- package/dist/components/pages/types.d.ts.map +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
- package/dist/components/popup/UploadMultiFileP01.d.ts +14 -0
- package/dist/components/popup/UploadMultiFileP01.d.ts.map +1 -0
- 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 +1 -0
- package/dist/components/popup/index.d.ts.map +1 -1
- package/dist/components/popup/index.js +16 -8
- package/dist/index.cjs +186 -1
- package/dist/index.js +32378 -290
- package/dist/provider/contexts/BwgViewContext.d.ts +8 -1
- package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -1
- package/dist/provider/contexts/CommonCodeContext.d.ts +15 -28
- package/dist/provider/contexts/CommonCodeContext.d.ts.map +1 -1
- package/dist/provider/contexts/MenuButtonContentx.d.ts +1 -0
- package/dist/provider/contexts/MenuButtonContentx.d.ts.map +1 -0
- package/dist/provider/contexts/MenuButtonContext.d.ts +42 -0
- package/dist/provider/contexts/MenuButtonContext.d.ts.map +1 -0
- package/dist/provider/hooks/index.d.ts +1 -0
- package/dist/provider/hooks/index.d.ts.map +1 -1
- package/dist/provider/hooks/useFileUploader.d.ts +74 -0
- package/dist/provider/hooks/useFileUploader.d.ts.map +1 -0
- package/dist/provider/hooks/useSizeConfig.d.ts +2 -2
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +8 -7
- package/dist/stores/codeStore.d.ts +65 -128
- package/dist/stores/codeStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.d.ts +3 -3
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +815 -1625
- package/dist/stores/menuModelStore.d.ts +22 -7
- package/dist/stores/menuModelStore.d.ts.map +1 -1
- package/dist/stores/menuViewStore.d.ts +3 -3
- package/dist/stores/menuViewStore.d.ts.map +1 -1
- package/dist/stores/systemStore.d.ts +50 -17
- package/dist/stores/systemStore.d.ts.map +1 -1
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/styles/assets/images/menus/ico1-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico1-design.png +0 -0
- package/dist/styles/assets/images/menus/ico1-dev.png +0 -0
- package/dist/styles/assets/images/menus/ico2-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico2-design.png +0 -0
- package/dist/styles/assets/images/menus/ico2-dev.png +0 -0
- package/dist/styles/assets/images/menus/ico3-completed.png +0 -0
- package/dist/styles/assets/images/menus/ico3-design.png +0 -0
- package/dist/styles/assets/images/menus/ico3-dev.png +0 -0
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/colorFormat.d.ts.map +1 -1
- package/dist/utils/commonUtils.d.ts +1 -2
- package/dist/utils/commonUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +9 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1118 -1962
- package/dist/utils/serviceConfig.d.ts +9 -3
- package/dist/utils/serviceConfig.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunks/CMSearchIntfGwP01-0t3umcc_.cjs +0 -1
- package/dist/chunks/MenuReport-C70mGz2g.cjs +0 -1
- package/dist/chunks/common-components-DNgQR-Ge.cjs +0 -1109
- package/dist/chunks/common-components-DeYL3J6X.js +0 -52604
- package/dist/chunks/layout-components-Bf9IsLUS.cjs +0 -38
- package/dist/chunks/provider-Bi5OYngn.cjs +0 -1
- package/dist/chunks/provider-Bx4VpaFf.js +0 -465
- package/dist/components/pages/board/CMAdminBoardM01.d.ts +0 -6
- package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +0 -1
- package/dist/components/pages/board/CMBoardS01.d.ts +0 -8
- package/dist/components/pages/board/CMBoardS01.d.ts.map +0 -1
- package/dist/components/pages/board/CMMyBoardM01.d.ts +0 -6
- package/dist/components/pages/board/CMMyBoardM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgComponentGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgComponentGuideM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgDeveloperGuideM01.d.ts.map +0 -1
- package/dist/components/pages/guide/BwgReactGuideM01.d.ts +0 -3
- package/dist/components/pages/guide/BwgReactGuideM01.d.ts.map +0 -1
- package/dist/components/pages/rsrc/CMMenuPrgrSelectModal.d.ts.map +0 -1
- package/dist/components/pages/rsrc/CMMenuPrntSelectModal.d.ts.map +0 -1
- package/dist/components/pages/syst/CMSystCodeM01.d.ts +0 -4
- package/dist/components/pages/syst/CMSystCodeM01.d.ts.map +0 -1
|
@@ -1,117 +1,118 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { useUserStore as
|
|
5
|
-
import
|
|
6
|
-
import { PaperClipOutlined as
|
|
7
|
-
import { getApiDeps as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { d as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { HTML5Backend as
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as t, jsxs as T, Fragment as _e } from "react/jsx-runtime";
|
|
2
|
+
import { Button as J, Form as D, Checkbox as ue, ConfigProvider as ie, DatePicker as ce, message as x, Card as Ve, List as ne, Input as X, Spin as Ee, Upload as ee, Typography as fe, Flex as ye, Progress as Ue, notification as ze, Tooltip as Re, Select as he, Space as j, InputNumber as Pe, Radio as $e, Switch as He, Popover as Fe } from "antd";
|
|
3
|
+
import { useMemo as q, memo as We, useState as z, useEffect as G, forwardRef as je, useRef as K, useCallback as Q, cloneElement as Ge } from "react";
|
|
4
|
+
import { useUserStore as Xe, usePopupStore as Ke } from "../../stores/index.js";
|
|
5
|
+
import N from "dayjs";
|
|
6
|
+
import { PaperClipOutlined as qe, DownloadOutlined as Je, DeleteOutlined as Ze, InboxOutlined as De, UploadOutlined as ae, CloudUploadOutlined as Qe, CheckCircleOutlined as et, CloseCircleOutlined as tt, FileTextOutlined as nt, CalendarOutlined as me, ExclamationCircleOutlined as Ie, SearchOutlined as ge, PlayCircleOutlined as rt, RedoOutlined as ot, ExclamationCircleFilled as at, FilePdfTwoTone as lt, FileWordTwoTone as st, FileExcelTwoTone as it, FilePptTwoTone as ct, FileTwoTone as dt, LinkOutlined as ut, FileOutlined as mt } from "@ant-design/icons";
|
|
7
|
+
import { getApiDeps as Ce, callServiceByAppCd as ft, getCrprCd as Ne, callService as te, getUserInfo as ve } from "../../utils/index.js";
|
|
8
|
+
import ht from "jszip";
|
|
9
|
+
import se from "imask";
|
|
10
|
+
import { d as xe, e as Le, h as Ae } from "../../chunks/provider-ff4RVDYo.js";
|
|
11
|
+
import { findIndex as de } from "lodash";
|
|
12
|
+
import { useDrop as gt, useDrag as pt, DndProvider as Me } from "react-dnd";
|
|
13
|
+
import { HTML5Backend as Oe } from "react-dnd-html5-backend";
|
|
14
|
+
import yt from "antd/es/upload/Dragger";
|
|
15
|
+
const oe = (e) => {
|
|
16
|
+
const { componentSize: r } = Xe(), u = q(() => e.size ? e.size : {
|
|
16
17
|
0: "small",
|
|
17
18
|
1: "middle",
|
|
18
19
|
2: "large"
|
|
19
|
-
}[
|
|
20
|
+
}[r], [r, e.size]), l = q(() => ({
|
|
20
21
|
0: 12,
|
|
21
22
|
// 작게
|
|
22
23
|
1: 14,
|
|
23
24
|
// 보통
|
|
24
25
|
2: 16
|
|
25
26
|
// 크게
|
|
26
|
-
})[
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
27
|
+
})[r], [r]);
|
|
28
|
+
return /* @__PURE__ */ t(
|
|
29
|
+
J,
|
|
29
30
|
{
|
|
30
31
|
...e,
|
|
31
|
-
size:
|
|
32
|
+
size: u,
|
|
32
33
|
className: "bwg-btn",
|
|
33
|
-
style: { fontSize: `${
|
|
34
|
+
style: { fontSize: `${l}px`, ...e.style },
|
|
34
35
|
children: e.children
|
|
35
36
|
}
|
|
36
37
|
);
|
|
37
|
-
},
|
|
38
|
+
}, R = We(
|
|
38
39
|
({
|
|
39
40
|
children: e,
|
|
40
|
-
label:
|
|
41
|
-
name:
|
|
42
|
-
rules:
|
|
43
|
-
initialValue:
|
|
44
|
-
style:
|
|
45
|
-
required:
|
|
41
|
+
label: r,
|
|
42
|
+
name: u,
|
|
43
|
+
rules: l,
|
|
44
|
+
initialValue: n,
|
|
45
|
+
style: o,
|
|
46
|
+
required: d,
|
|
46
47
|
...i
|
|
47
48
|
}) => {
|
|
48
|
-
const
|
|
49
|
+
const f = {
|
|
49
50
|
fontWeight: "bold"
|
|
50
51
|
};
|
|
51
|
-
(
|
|
52
|
+
(l == null || l == null) && d && (l = [
|
|
52
53
|
{
|
|
53
54
|
required: !0,
|
|
54
|
-
message: `${
|
|
55
|
+
message: `${r}을(를) 입력해주세요.`
|
|
55
56
|
}
|
|
56
57
|
]);
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
] }) : /* @__PURE__ */
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
|
|
58
|
+
const s = Array.isArray(l) && l.some((y) => y.required === !0), c = () => typeof r == "string" ? /* @__PURE__ */ T("span", { style: f, children: [
|
|
59
|
+
r,
|
|
60
|
+
s && /* @__PURE__ */ t("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
|
|
61
|
+
] }) : /* @__PURE__ */ t("span", { style: f, children: r });
|
|
62
|
+
return /* @__PURE__ */ t(
|
|
63
|
+
D.Item,
|
|
63
64
|
{
|
|
64
65
|
className: "bwg-form-item",
|
|
65
|
-
label:
|
|
66
|
+
label: r ? c() : void 0,
|
|
66
67
|
labelAlign: i.labelAlign || "left",
|
|
67
|
-
name:
|
|
68
|
-
rules:
|
|
68
|
+
name: u,
|
|
69
|
+
rules: l,
|
|
69
70
|
colon: !1,
|
|
70
|
-
initialValue:
|
|
71
|
-
style:
|
|
71
|
+
initialValue: n,
|
|
72
|
+
style: o,
|
|
72
73
|
...i,
|
|
73
74
|
children: e
|
|
74
75
|
}
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
|
-
),
|
|
78
|
+
), jt = ({
|
|
78
79
|
itemProps: e,
|
|
79
|
-
inputProps:
|
|
80
|
+
inputProps: r = {
|
|
80
81
|
format: "YN"
|
|
81
82
|
}
|
|
82
83
|
}) => {
|
|
83
|
-
const
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
84
|
+
const u = D.useFormInstance();
|
|
85
|
+
return /* @__PURE__ */ t(
|
|
86
|
+
R,
|
|
86
87
|
{
|
|
87
88
|
...e,
|
|
88
|
-
getValueProps: (
|
|
89
|
-
normalize: (
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
|
|
92
|
-
}, children:
|
|
89
|
+
getValueProps: (n) => ({ checked: r.format === "boolean" ? !!n : n === "Y" }),
|
|
90
|
+
normalize: (n) => typeof n == "boolean" ? r.format === "boolean" ? n : n ? "Y" : "N" : r.format === "boolean" ? !!n : n ? "Y" : "N",
|
|
91
|
+
children: /* @__PURE__ */ t(ue, { ...r, onChange: (n) => {
|
|
92
|
+
r.format === "boolean" ? u.setFieldValue(e?.name, n.target.checked) : u.setFieldValue(e?.name, n.target.checked ? "Y" : "N"), r.onChange && r.onChange(n);
|
|
93
|
+
}, children: r?.title })
|
|
93
94
|
}
|
|
94
95
|
);
|
|
95
|
-
},
|
|
96
|
-
const
|
|
96
|
+
}, Gt = ({ itemProps: e, inputProps: r }) => {
|
|
97
|
+
const u = D.useFormInstance(), [l, n] = z(
|
|
97
98
|
e?.initialValue ?? []
|
|
98
|
-
), [
|
|
99
|
+
), [o, d] = z([]), i = o.length > 0 && o.length == l?.length, f = l?.length > 0 && l.length < o.length;
|
|
99
100
|
G(() => {
|
|
100
|
-
|
|
101
|
-
}, [
|
|
102
|
-
|
|
103
|
-
}, [
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
101
|
+
d(s(r?.options));
|
|
102
|
+
}, [r?.options]), G(() => {
|
|
103
|
+
n(l);
|
|
104
|
+
}, [l]);
|
|
105
|
+
const s = (g) => {
|
|
106
|
+
const Y = [];
|
|
107
|
+
return (g || []).map((C, O) => {
|
|
108
|
+
Y.push(C.value);
|
|
109
|
+
}), Y;
|
|
110
|
+
}, c = (g) => {
|
|
111
|
+
n(g.target.checked ? o : []), u.setFieldValue(e?.name, g.target.checked ? o : []);
|
|
112
|
+
}, y = (g) => {
|
|
113
|
+
n(g), u.setFieldValue(e?.name, g), r?.onChange && typeof r?.onChange == "function" && r?.onChange(g);
|
|
113
114
|
};
|
|
114
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ T(ie, { theme: {
|
|
115
116
|
components: {
|
|
116
117
|
Checkbox: {
|
|
117
118
|
colorPrimary: "var(--check-primary)",
|
|
@@ -120,25 +121,25 @@ const vt = (e) => {
|
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
}, children: [
|
|
123
|
-
|
|
124
|
+
r?.allCheck && /* @__PURE__ */ t(
|
|
124
125
|
ue,
|
|
125
126
|
{
|
|
126
|
-
indeterminate:
|
|
127
|
+
indeterminate: f,
|
|
127
128
|
checked: i,
|
|
128
|
-
onChange:
|
|
129
|
+
onChange: c,
|
|
129
130
|
children: "전체선택"
|
|
130
131
|
}
|
|
131
132
|
),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ t(
|
|
133
134
|
ue.Group,
|
|
134
135
|
{
|
|
135
|
-
options:
|
|
136
|
-
value:
|
|
137
|
-
onChange:
|
|
136
|
+
options: r?.options,
|
|
137
|
+
value: l,
|
|
138
|
+
onChange: y
|
|
138
139
|
}
|
|
139
140
|
)
|
|
140
141
|
] }) });
|
|
141
|
-
},
|
|
142
|
+
}, ke = {
|
|
142
143
|
year: { displayFormat: "YYYY", outputFormat: "YYYY" },
|
|
143
144
|
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
144
145
|
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
|
|
@@ -147,111 +148,111 @@ const vt = (e) => {
|
|
|
147
148
|
displayFormat: "YYYY-MM-DD HH:mm",
|
|
148
149
|
outputFormat: "YYYYMMDDHHmm"
|
|
149
150
|
}
|
|
150
|
-
},
|
|
151
|
+
}, Xt = ({
|
|
151
152
|
itemProps: e,
|
|
152
|
-
inputProps:
|
|
153
|
-
type:
|
|
154
|
-
returnType:
|
|
153
|
+
inputProps: r,
|
|
154
|
+
type: u = "date",
|
|
155
|
+
returnType: l = "string"
|
|
155
156
|
}) => {
|
|
156
|
-
const { displayFormat:
|
|
157
|
-
() =>
|
|
158
|
-
[
|
|
159
|
-
),
|
|
160
|
-
() => Object.values(
|
|
161
|
-
if (i.length ===
|
|
162
|
-
if (i ===
|
|
163
|
-
if (
|
|
157
|
+
const { displayFormat: n, outputFormat: o } = q(
|
|
158
|
+
() => ke[u],
|
|
159
|
+
[u]
|
|
160
|
+
), d = q(
|
|
161
|
+
() => Object.values(ke).map((i) => i.outputFormat).sort((i, f) => {
|
|
162
|
+
if (i.length === f.length) {
|
|
163
|
+
if (i === o) return -1;
|
|
164
|
+
if (f === o) return 1;
|
|
164
165
|
}
|
|
165
|
-
return
|
|
166
|
+
return f.length - i.length;
|
|
166
167
|
}),
|
|
167
|
-
[
|
|
168
|
+
[o]
|
|
168
169
|
// type(outputFormat)이 바뀔 때마다 재정렬
|
|
169
170
|
);
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
|
|
171
|
+
return /* @__PURE__ */ t(
|
|
172
|
+
R,
|
|
172
173
|
{
|
|
173
174
|
...e,
|
|
174
175
|
getValueProps: (i) => ({
|
|
175
176
|
// 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환
|
|
176
|
-
value: i ?
|
|
177
|
+
value: i ? N.isDayjs(i) ? i : N(i, d) : null
|
|
177
178
|
}),
|
|
178
|
-
normalize: (i) => i ?
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
|
|
179
|
+
normalize: (i) => i ? l === "dayjs" ? i : i.format(o) : null,
|
|
180
|
+
children: /* @__PURE__ */ t(
|
|
181
|
+
ce,
|
|
181
182
|
{
|
|
182
|
-
...
|
|
183
|
-
picker:
|
|
184
|
-
showTime:
|
|
185
|
-
format:
|
|
183
|
+
...r,
|
|
184
|
+
picker: u === "datetime" ? "date" : u,
|
|
185
|
+
showTime: r?.showTime ?? (u === "datetime" || u === "time"),
|
|
186
|
+
format: r?.format ?? n
|
|
186
187
|
}
|
|
187
188
|
)
|
|
188
189
|
}
|
|
189
190
|
);
|
|
190
|
-
},
|
|
191
|
+
}, Kt = ({
|
|
191
192
|
fileGrpKey: e,
|
|
192
|
-
onFetchFilesTrxCd:
|
|
193
|
-
readOnly:
|
|
194
|
-
appCd:
|
|
193
|
+
onFetchFilesTrxCd: r = "SCMFILE00101",
|
|
194
|
+
readOnly: u = !1,
|
|
195
|
+
appCd: l = __APP_CD__
|
|
195
196
|
}) => {
|
|
196
|
-
const [
|
|
197
|
+
const [n, o] = z([]);
|
|
197
198
|
G(() => {
|
|
198
|
-
if (
|
|
199
|
-
if (
|
|
200
|
-
const
|
|
201
|
-
if (!
|
|
202
|
-
console.error("해당 앱코드는 존재하지 않습니다.",
|
|
199
|
+
if (r)
|
|
200
|
+
if (l != __APP_CD__) {
|
|
201
|
+
const f = Ce().findSystemByAppCd?.(l ?? __APP_CD__);
|
|
202
|
+
if (!f || !f.sysCd) {
|
|
203
|
+
console.error("해당 앱코드는 존재하지 않습니다.", l);
|
|
203
204
|
return;
|
|
204
205
|
}
|
|
205
|
-
|
|
206
|
-
{ trxCd:
|
|
206
|
+
ft(
|
|
207
|
+
{ trxCd: r, appCd: l },
|
|
207
208
|
{
|
|
208
|
-
crprCd:
|
|
209
|
-
sysCd:
|
|
209
|
+
crprCd: Ne(),
|
|
210
|
+
sysCd: f.sysCd,
|
|
210
211
|
fileGrpKey: e
|
|
211
212
|
}
|
|
212
|
-
).then((
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
uid:
|
|
216
|
-
name:
|
|
217
|
-
filePath:
|
|
213
|
+
).then((s) => {
|
|
214
|
+
if (s?.sub) {
|
|
215
|
+
const c = s.sub.map((y) => ({
|
|
216
|
+
uid: y.fileKey,
|
|
217
|
+
name: y.lgclFileNm,
|
|
218
|
+
filePath: y.filePath
|
|
218
219
|
}));
|
|
219
|
-
|
|
220
|
+
o(c);
|
|
220
221
|
}
|
|
221
|
-
}).catch((
|
|
222
|
-
console.error("파일 목록 조회 서비스 호출에 실패했습니다.",
|
|
222
|
+
}).catch((s) => {
|
|
223
|
+
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", s), x.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
223
224
|
});
|
|
224
225
|
} else
|
|
225
|
-
|
|
226
|
-
crprCd:
|
|
226
|
+
te(r, {
|
|
227
|
+
crprCd: ve()?.crprCd,
|
|
227
228
|
sysCd: __SYS_CD__,
|
|
228
229
|
fileGrpKey: e
|
|
229
230
|
}).then((i) => {
|
|
230
231
|
if (i?.sub) {
|
|
231
|
-
const
|
|
232
|
-
uid:
|
|
233
|
-
name:
|
|
234
|
-
filePath:
|
|
232
|
+
const f = i.sub.map((s) => ({
|
|
233
|
+
uid: s.fileKey,
|
|
234
|
+
name: s.lgclFileNm,
|
|
235
|
+
filePath: s.filePath
|
|
235
236
|
}));
|
|
236
|
-
|
|
237
|
+
o(f);
|
|
237
238
|
}
|
|
238
239
|
}).catch((i) => {
|
|
239
|
-
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i),
|
|
240
|
+
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", i), x.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
240
241
|
});
|
|
241
242
|
else
|
|
242
|
-
|
|
243
|
-
}, [e,
|
|
244
|
-
const
|
|
243
|
+
o([]);
|
|
244
|
+
}, [e, r, l]);
|
|
245
|
+
const d = async (i) => {
|
|
245
246
|
try {
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
248
|
-
console.error("해당 앱코드는 존재하지 않습니다.",
|
|
247
|
+
const s = Ce().findSystemByAppCd?.(l ?? __APP_CD__);
|
|
248
|
+
if (!s || !s.sysCd) {
|
|
249
|
+
console.error("해당 앱코드는 존재하지 않습니다.", l);
|
|
249
250
|
return;
|
|
250
251
|
}
|
|
251
|
-
const
|
|
252
|
+
const y = await fetch("/api/download", {
|
|
252
253
|
method: "POST",
|
|
253
254
|
headers: {
|
|
254
|
-
SYSCD:
|
|
255
|
+
SYSCD: s.sysCd,
|
|
255
256
|
"Content-Type": "application/json"
|
|
256
257
|
// 여기에 필요한 다른 헤더(예: 인증 토큰)를 추가할 수 있습니다.
|
|
257
258
|
},
|
|
@@ -261,44 +262,44 @@ const vt = (e) => {
|
|
|
261
262
|
fileKey: i.uid
|
|
262
263
|
})
|
|
263
264
|
});
|
|
264
|
-
if (!
|
|
265
|
-
const
|
|
266
|
-
throw new Error(
|
|
265
|
+
if (!y.ok) {
|
|
266
|
+
const p = (await y.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
|
|
267
|
+
throw new Error(p);
|
|
267
268
|
}
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
} catch (
|
|
271
|
-
console.error(
|
|
272
|
-
|
|
269
|
+
const g = await y.blob(), Y = window.URL.createObjectURL(g), C = document.createElement("a");
|
|
270
|
+
C.href = Y, C.setAttribute("download", i.name), document.body.appendChild(C), C.click(), document.body.removeChild(C), window.URL.revokeObjectURL(Y);
|
|
271
|
+
} catch (f) {
|
|
272
|
+
console.error(f), x.error(
|
|
273
|
+
f.message || "파일을 다운로드하는 중 오류가 발생했습니다."
|
|
273
274
|
);
|
|
274
275
|
}
|
|
275
276
|
};
|
|
276
|
-
return /* @__PURE__ */
|
|
277
|
-
|
|
277
|
+
return /* @__PURE__ */ t(Ve, { title: "파일 목록", children: /* @__PURE__ */ t(
|
|
278
|
+
ne,
|
|
278
279
|
{
|
|
279
|
-
dataSource:
|
|
280
|
-
renderItem: (i) => /* @__PURE__ */
|
|
281
|
-
|
|
280
|
+
dataSource: n,
|
|
281
|
+
renderItem: (i) => /* @__PURE__ */ t(
|
|
282
|
+
ne.Item,
|
|
282
283
|
{
|
|
283
|
-
actions:
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
|
|
284
|
+
actions: u ? [] : [
|
|
285
|
+
/* @__PURE__ */ t(
|
|
286
|
+
J,
|
|
286
287
|
{
|
|
287
288
|
type: "text",
|
|
288
|
-
icon: /* @__PURE__ */
|
|
289
|
-
onClick: () =>
|
|
289
|
+
icon: /* @__PURE__ */ t(Je, {}),
|
|
290
|
+
onClick: () => d(i)
|
|
290
291
|
},
|
|
291
292
|
"download"
|
|
292
293
|
)
|
|
293
294
|
],
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ t(ne.Item.Meta, { avatar: /* @__PURE__ */ t(qe, {}), title: i.name })
|
|
295
296
|
}
|
|
296
297
|
)
|
|
297
298
|
}
|
|
298
299
|
) });
|
|
299
|
-
},
|
|
300
|
-
({ children: e, labelCol:
|
|
301
|
-
|
|
300
|
+
}, Ft = je(
|
|
301
|
+
({ children: e, labelCol: r, style: u, className: l, ...n }, o) => /* @__PURE__ */ t(
|
|
302
|
+
ie,
|
|
302
303
|
{
|
|
303
304
|
form: {
|
|
304
305
|
/**
|
|
@@ -307,23 +308,23 @@ const vt = (e) => {
|
|
|
307
308
|
*/
|
|
308
309
|
// validateMessages: { required: "'${label}을(를) 입력해주세요.'" },
|
|
309
310
|
},
|
|
310
|
-
children: /* @__PURE__ */
|
|
311
|
-
|
|
311
|
+
children: /* @__PURE__ */ t(
|
|
312
|
+
D,
|
|
312
313
|
{
|
|
313
|
-
ref:
|
|
314
|
-
...
|
|
314
|
+
ref: o,
|
|
315
|
+
...n,
|
|
315
316
|
requiredMark: !1,
|
|
316
|
-
labelCol:
|
|
317
|
-
style: { padding: "10px", ...
|
|
318
|
-
className: `bwg-form ${
|
|
317
|
+
labelCol: r || { flex: "100px" },
|
|
318
|
+
style: { padding: "10px", ...u },
|
|
319
|
+
className: `bwg-form ${l ?? ""}`,
|
|
319
320
|
children: e
|
|
320
321
|
}
|
|
321
322
|
)
|
|
322
323
|
}
|
|
323
324
|
)
|
|
324
325
|
);
|
|
325
|
-
|
|
326
|
-
const
|
|
326
|
+
Ft.displayName = "BwgForm";
|
|
327
|
+
const qt = ({ itemProps: e, inputProps: r }) => /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(X, { ...r }) }), { Text: le } = fe, { Dragger: Ct } = ee, kt = [
|
|
327
328
|
".pdf",
|
|
328
329
|
".xlsx",
|
|
329
330
|
".xls",
|
|
@@ -341,60 +342,60 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
341
342
|
".gif",
|
|
342
343
|
// 압축
|
|
343
344
|
".zip"
|
|
344
|
-
],
|
|
345
|
+
], wt = (e, r = 2) => {
|
|
345
346
|
if (e === 0) return "0 Bytes";
|
|
346
|
-
const
|
|
347
|
-
return parseFloat((e / Math.pow(
|
|
348
|
-
},
|
|
347
|
+
const u = 1024, l = r < 0 ? 0 : r, n = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(e) / Math.log(u));
|
|
348
|
+
return parseFloat((e / Math.pow(u, o)).toFixed(l)) + " " + n[o];
|
|
349
|
+
}, Jt = ({
|
|
349
350
|
title: e = "첨부파일",
|
|
350
|
-
fileGrpKey:
|
|
351
|
-
onUploadComplete:
|
|
352
|
-
onSuccessTrxCd:
|
|
351
|
+
fileGrpKey: r,
|
|
352
|
+
onUploadComplete: u,
|
|
353
|
+
onSuccessTrxCd: l = "SCMFILE00102",
|
|
353
354
|
// BwgUploader와 동일한 기본 trxCd 설정
|
|
354
|
-
anotherServiceTrxCd:
|
|
355
|
-
allowedExtensions:
|
|
356
|
-
maxFileSize:
|
|
355
|
+
anotherServiceTrxCd: n = "SCMFILE00105",
|
|
356
|
+
allowedExtensions: o = kt,
|
|
357
|
+
maxFileSize: d = 2048
|
|
357
358
|
// 기본값 2GB
|
|
358
359
|
}) => {
|
|
359
|
-
const [i,
|
|
360
|
-
if (
|
|
361
|
-
const
|
|
362
|
-
const
|
|
363
|
-
return
|
|
360
|
+
const [i, f] = z([]), [s, c] = z(!1), [y, g] = z(!1), [Y, C] = z(0), O = (h) => {
|
|
361
|
+
if (o && o.length > 0) {
|
|
362
|
+
const L = ((U) => {
|
|
363
|
+
const a = U.lastIndexOf(".");
|
|
364
|
+
return a === -1 ? "" : U.substring(a).toLowerCase();
|
|
364
365
|
})(h.name);
|
|
365
|
-
if (!
|
|
366
|
-
return
|
|
367
|
-
`${h.name} 파일은 허용되지 않는 확장자입니다. (${
|
|
366
|
+
if (!o.includes(L))
|
|
367
|
+
return x.error(
|
|
368
|
+
`${h.name} 파일은 허용되지 않는 확장자입니다. (${o.join(
|
|
368
369
|
", "
|
|
369
370
|
)}만 가능)`
|
|
370
371
|
), !1;
|
|
371
372
|
}
|
|
372
373
|
return !0;
|
|
373
|
-
},
|
|
374
|
-
const h = i.filter((
|
|
375
|
-
(
|
|
374
|
+
}, p = async () => {
|
|
375
|
+
const h = i.filter((k) => k.status !== "done"), P = h.reduce(
|
|
376
|
+
(k, b) => k + (b.size || 0),
|
|
376
377
|
0
|
|
377
|
-
),
|
|
378
|
-
if (
|
|
379
|
-
|
|
378
|
+
), L = 2 * 1024 * 1024 * 1024;
|
|
379
|
+
if (P > L) {
|
|
380
|
+
ze.error({
|
|
380
381
|
message: "업로드 용량 초과",
|
|
381
382
|
description: "한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."
|
|
382
383
|
});
|
|
383
384
|
return;
|
|
384
385
|
}
|
|
385
386
|
if (h.length === 0) {
|
|
386
|
-
|
|
387
|
+
x.warning(
|
|
387
388
|
"업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다."
|
|
388
389
|
);
|
|
389
390
|
return;
|
|
390
391
|
}
|
|
391
|
-
|
|
392
|
-
let
|
|
392
|
+
g(!0);
|
|
393
|
+
let U;
|
|
393
394
|
try {
|
|
394
|
-
const
|
|
395
|
-
h.forEach((
|
|
396
|
-
|
|
397
|
-
}),
|
|
395
|
+
const k = new ht();
|
|
396
|
+
h.forEach((b) => {
|
|
397
|
+
b.originFileObj && k.file(b.name, b.originFileObj);
|
|
398
|
+
}), U = await k.generateAsync({
|
|
398
399
|
type: "blob",
|
|
399
400
|
compression: "DEFLATE",
|
|
400
401
|
compressionOptions: {
|
|
@@ -402,198 +403,198 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
402
403
|
// 높은 압축률 설정
|
|
403
404
|
}
|
|
404
405
|
});
|
|
405
|
-
} catch (
|
|
406
|
-
|
|
406
|
+
} catch (k) {
|
|
407
|
+
g(!1), x.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", k);
|
|
407
408
|
return;
|
|
408
409
|
}
|
|
409
|
-
|
|
410
|
-
const
|
|
411
|
-
|
|
410
|
+
g(!1);
|
|
411
|
+
const a = new FormData();
|
|
412
|
+
a.append("file", U, "upload.zip"), c(!0), C(0);
|
|
412
413
|
try {
|
|
413
|
-
const
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
if (
|
|
417
|
-
const
|
|
418
|
-
|
|
414
|
+
const k = await new Promise((B, A) => {
|
|
415
|
+
const M = new XMLHttpRequest();
|
|
416
|
+
M.open("POST", "/api/upload-large", !0), M.upload.onprogress = ($) => {
|
|
417
|
+
if ($.lengthComputable) {
|
|
418
|
+
const re = Math.round(
|
|
419
|
+
$.loaded / $.total * 100
|
|
419
420
|
);
|
|
420
|
-
|
|
421
|
+
C(re);
|
|
421
422
|
}
|
|
422
|
-
},
|
|
423
|
-
if (
|
|
423
|
+
}, M.onload = () => {
|
|
424
|
+
if (M.status >= 200 && M.status < 300)
|
|
424
425
|
try {
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
new Error(
|
|
426
|
+
const $ = JSON.parse(M.responseText);
|
|
427
|
+
$.success ? B($) : A(
|
|
428
|
+
new Error($.message || "파일 업로드에 실패했습니다.")
|
|
428
429
|
);
|
|
429
430
|
} catch {
|
|
430
|
-
|
|
431
|
+
A(new Error("잘못된 서버 응답입니다."));
|
|
431
432
|
}
|
|
432
433
|
else
|
|
433
434
|
try {
|
|
434
|
-
const
|
|
435
|
-
|
|
435
|
+
const $ = JSON.parse(M.responseText);
|
|
436
|
+
A(new Error($.message || `서버 오류: ${M.status}`));
|
|
436
437
|
} catch {
|
|
437
|
-
|
|
438
|
+
A(new Error(`서버 오류: ${M.status}`));
|
|
438
439
|
}
|
|
439
|
-
},
|
|
440
|
-
|
|
441
|
-
},
|
|
440
|
+
}, M.onerror = () => {
|
|
441
|
+
A(new Error("네트워크 오류가 발생했습니다."));
|
|
442
|
+
}, M.send(a);
|
|
442
443
|
});
|
|
443
|
-
|
|
444
|
-
|
|
444
|
+
x.success(
|
|
445
|
+
k.message || "압축 파일이 성공적으로 업로드되었습니다."
|
|
445
446
|
);
|
|
446
|
-
const
|
|
447
|
-
(
|
|
447
|
+
const b = i.map(
|
|
448
|
+
(B) => h.find((A) => A.uid === B.uid) ? { ...B, status: "done" } : B
|
|
448
449
|
);
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
crprCd:
|
|
450
|
+
if (f(b), l && k.uploadedFiles && Array.isArray(k.uploadedFiles)) {
|
|
451
|
+
const B = ve();
|
|
452
|
+
k.uploadedFiles.forEach((A) => {
|
|
453
|
+
const M = {
|
|
454
|
+
crprCd: B?.crprCd,
|
|
454
455
|
sysCd: __SYS_CD__,
|
|
455
|
-
fileGrpKey:
|
|
456
|
+
fileGrpKey: r,
|
|
456
457
|
sub: [
|
|
457
458
|
{
|
|
458
|
-
crprCd:
|
|
459
|
+
crprCd: B?.crprCd,
|
|
459
460
|
sysCd: __SYS_CD__,
|
|
460
|
-
fileGrpKey:
|
|
461
|
-
physFileNm:
|
|
462
|
-
lgclFileNm:
|
|
463
|
-
filePath:
|
|
464
|
-
fileExtn:
|
|
465
|
-
fileSize:
|
|
461
|
+
fileGrpKey: r,
|
|
462
|
+
physFileNm: A.fileNameP,
|
|
463
|
+
lgclFileNm: A.fileNameL,
|
|
464
|
+
filePath: A.filePath,
|
|
465
|
+
fileExtn: A.fileExt,
|
|
466
|
+
fileSize: A.fileSize,
|
|
466
467
|
mltpYn: "Y"
|
|
467
468
|
}
|
|
468
469
|
]
|
|
469
470
|
};
|
|
470
|
-
|
|
471
|
-
const
|
|
472
|
-
crprCd:
|
|
471
|
+
te(l, M).then(($) => {
|
|
472
|
+
const re = i.map((Z) => ({
|
|
473
|
+
crprCd: B?.crprCd,
|
|
473
474
|
sysCd: __SYS_CD__,
|
|
474
|
-
fileGrpKey:
|
|
475
|
-
fileKey:
|
|
476
|
-
lgclFileNm:
|
|
477
|
-
fileSize:
|
|
478
|
-
fileExtn:
|
|
479
|
-
fileType:
|
|
475
|
+
fileGrpKey: $.sub[0].fileGrpKey,
|
|
476
|
+
fileKey: $.sub[0].fileKey,
|
|
477
|
+
lgclFileNm: Z.name,
|
|
478
|
+
fileSize: Z.size,
|
|
479
|
+
fileExtn: Z.name.split(".").pop(),
|
|
480
|
+
fileType: Z.type
|
|
480
481
|
}));
|
|
481
|
-
|
|
482
|
+
te(n, {
|
|
482
483
|
// 파일 목록에 fileKey를 추가합니다.
|
|
483
|
-
sub:
|
|
484
|
+
sub: re
|
|
484
485
|
});
|
|
485
|
-
}).catch((
|
|
486
|
-
console.error("후처리 서비스 호출 실패:",
|
|
487
|
-
`${
|
|
486
|
+
}).catch(($) => {
|
|
487
|
+
console.error("후처리 서비스 호출 실패:", $), x.error(
|
|
488
|
+
`${A.fileNameL} 파일의 후처리 작업에 실패했습니다.`
|
|
488
489
|
);
|
|
489
|
-
}),
|
|
490
|
-
fileNameP:
|
|
491
|
-
fileNameL:
|
|
490
|
+
}), u && u({
|
|
491
|
+
fileNameP: A.fileNameP,
|
|
492
|
+
fileNameL: A.fileNameL
|
|
492
493
|
});
|
|
493
494
|
});
|
|
494
495
|
}
|
|
495
|
-
} catch (
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
(
|
|
499
|
-
...
|
|
496
|
+
} catch (k) {
|
|
497
|
+
x.error(k.message || "파일 업로드 중 오류가 발생했습니다.");
|
|
498
|
+
const b = i.map(
|
|
499
|
+
(B) => h.find((A) => A.uid === B.uid) ? {
|
|
500
|
+
...B,
|
|
500
501
|
status: "error",
|
|
501
|
-
response:
|
|
502
|
-
} :
|
|
502
|
+
response: k.message || "파일 업로드 중 오류가 발생했습니다."
|
|
503
|
+
} : B
|
|
503
504
|
);
|
|
504
|
-
|
|
505
|
+
f(b);
|
|
505
506
|
} finally {
|
|
506
|
-
|
|
507
|
+
c(!1);
|
|
507
508
|
}
|
|
508
|
-
},
|
|
509
|
+
}, E = {
|
|
509
510
|
multiple: !0,
|
|
510
511
|
fileList: i,
|
|
511
|
-
beforeUpload: (h) =>
|
|
512
|
-
`대용량 첨부 파일 최대 크기는 ${(
|
|
512
|
+
beforeUpload: (h) => O(h) ? d && h.size >= d * 1024 * 1024 ? (x.error(
|
|
513
|
+
`대용량 첨부 파일 최대 크기는 ${(d / 1024).toFixed(
|
|
513
514
|
1
|
|
514
515
|
)}GB입니다.`
|
|
515
|
-
),
|
|
516
|
+
), ee.LIST_IGNORE) : !1 : ee.LIST_IGNORE,
|
|
516
517
|
onChange: ({ fileList: h }) => {
|
|
517
|
-
const
|
|
518
|
-
h.forEach((
|
|
519
|
-
|
|
520
|
-
}),
|
|
518
|
+
const P = new Map(i.map((L) => [L.uid, L]));
|
|
519
|
+
h.forEach((L) => {
|
|
520
|
+
P.set(L.uid, L);
|
|
521
|
+
}), f(Array.from(P.values()));
|
|
521
522
|
},
|
|
522
523
|
onRemove: (h) => {
|
|
523
|
-
const
|
|
524
|
-
|
|
524
|
+
const P = i.filter((L) => L.uid !== h.uid);
|
|
525
|
+
f(P);
|
|
525
526
|
},
|
|
526
527
|
showUploadList: !1
|
|
527
528
|
// 수동으로 목록을 렌더링하므로 antd의 기본 목록은 숨깁니다.
|
|
528
529
|
};
|
|
529
|
-
return /* @__PURE__ */
|
|
530
|
-
|
|
530
|
+
return /* @__PURE__ */ t(
|
|
531
|
+
Ee,
|
|
531
532
|
{
|
|
532
|
-
spinning:
|
|
533
|
-
tip:
|
|
534
|
-
children: /* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
533
|
+
spinning: s || y,
|
|
534
|
+
tip: y ? "파일 압축 중..." : `파일 업로드 중... ${Y}%`,
|
|
535
|
+
children: /* @__PURE__ */ T("div", { className: "bwg-large-uploader-container", children: [
|
|
536
|
+
/* @__PURE__ */ t(
|
|
536
537
|
Ve,
|
|
537
538
|
{
|
|
538
|
-
title: /* @__PURE__ */
|
|
539
|
-
extra: /* @__PURE__ */
|
|
539
|
+
title: /* @__PURE__ */ t(le, { strong: !0, children: e }),
|
|
540
|
+
extra: /* @__PURE__ */ t(ee, { ...E, children: /* @__PURE__ */ t(J, { icon: /* @__PURE__ */ t(ae, {}), children: "파일 선택" }) }),
|
|
540
541
|
style: { padding: 0 },
|
|
541
|
-
children: /* @__PURE__ */
|
|
542
|
-
|
|
542
|
+
children: /* @__PURE__ */ t(
|
|
543
|
+
Ct,
|
|
543
544
|
{
|
|
544
|
-
...
|
|
545
|
+
...E,
|
|
545
546
|
style: {
|
|
546
547
|
border: "none",
|
|
547
548
|
background: "transparent",
|
|
548
549
|
padding: 0
|
|
549
550
|
},
|
|
550
|
-
children: /* @__PURE__ */
|
|
551
|
-
|
|
551
|
+
children: /* @__PURE__ */ t("div", { className: "upload-list-container", children: i.length > 0 ? /* @__PURE__ */ t(
|
|
552
|
+
ne,
|
|
552
553
|
{
|
|
553
554
|
style: { textAlign: "left" },
|
|
554
555
|
dataSource: i,
|
|
555
556
|
renderItem: (h) => {
|
|
556
|
-
const
|
|
557
|
-
let
|
|
558
|
-
return
|
|
559
|
-
|
|
557
|
+
const P = h.status === "done", L = h.status === "error";
|
|
558
|
+
let U;
|
|
559
|
+
return P ? U = /* @__PURE__ */ t(
|
|
560
|
+
et,
|
|
560
561
|
{
|
|
561
562
|
style: { color: "#52c41a", fontSize: 14 }
|
|
562
563
|
}
|
|
563
|
-
) :
|
|
564
|
-
|
|
564
|
+
) : L ? U = /* @__PURE__ */ t(
|
|
565
|
+
Re,
|
|
565
566
|
{
|
|
566
567
|
title: typeof h.response == "string" ? h.response : "업로드 실패",
|
|
567
|
-
children: /* @__PURE__ */
|
|
568
|
-
|
|
568
|
+
children: /* @__PURE__ */ t(
|
|
569
|
+
tt,
|
|
569
570
|
{
|
|
570
571
|
style: { color: "#ff4d4f", fontSize: 14 }
|
|
571
572
|
}
|
|
572
573
|
)
|
|
573
574
|
}
|
|
574
|
-
) :
|
|
575
|
-
|
|
575
|
+
) : U = /* @__PURE__ */ t(nt, { style: { fontSize: 14 } }), /* @__PURE__ */ t(
|
|
576
|
+
ne.Item,
|
|
576
577
|
{
|
|
577
578
|
actions: [
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
|
|
579
|
+
/* @__PURE__ */ t(le, { type: "secondary", children: wt(h.size || 0) }, "size"),
|
|
580
|
+
/* @__PURE__ */ t(
|
|
581
|
+
J,
|
|
581
582
|
{
|
|
582
583
|
type: "text",
|
|
583
|
-
icon: /* @__PURE__ */
|
|
584
|
-
onClick: (
|
|
585
|
-
|
|
584
|
+
icon: /* @__PURE__ */ t(Ze, {}),
|
|
585
|
+
onClick: (a) => {
|
|
586
|
+
a.stopPropagation(), E.onRemove?.(h);
|
|
586
587
|
},
|
|
587
|
-
disabled:
|
|
588
|
+
disabled: s || y
|
|
588
589
|
},
|
|
589
590
|
"delete"
|
|
590
591
|
)
|
|
591
592
|
],
|
|
592
|
-
children: /* @__PURE__ */
|
|
593
|
-
|
|
593
|
+
children: /* @__PURE__ */ t(
|
|
594
|
+
ne.Item.Meta,
|
|
594
595
|
{
|
|
595
|
-
avatar:
|
|
596
|
-
title: /* @__PURE__ */
|
|
596
|
+
avatar: U,
|
|
597
|
+
title: /* @__PURE__ */ t(le, { type: L ? "danger" : void 0, children: h.name })
|
|
597
598
|
}
|
|
598
599
|
)
|
|
599
600
|
},
|
|
@@ -601,8 +602,8 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
601
602
|
);
|
|
602
603
|
}
|
|
603
604
|
}
|
|
604
|
-
) : /* @__PURE__ */
|
|
605
|
-
|
|
605
|
+
) : /* @__PURE__ */ T(
|
|
606
|
+
ye,
|
|
606
607
|
{
|
|
607
608
|
gap: "middle",
|
|
608
609
|
align: "center",
|
|
@@ -610,8 +611,8 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
610
611
|
vertical: !0,
|
|
611
612
|
style: { padding: "20px 0", minHeight: "120px" },
|
|
612
613
|
children: [
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ t(De, { style: { fontSize: "32px", color: "#999" } }),
|
|
615
|
+
/* @__PURE__ */ t(le, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
|
|
615
616
|
]
|
|
616
617
|
}
|
|
617
618
|
) })
|
|
@@ -619,22 +620,22 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
619
620
|
)
|
|
620
621
|
}
|
|
621
622
|
),
|
|
622
|
-
i.length > 0 && /* @__PURE__ */
|
|
623
|
-
|
|
623
|
+
i.length > 0 && /* @__PURE__ */ T(
|
|
624
|
+
ye,
|
|
624
625
|
{
|
|
625
626
|
justify: "flex-end",
|
|
626
627
|
align: "center",
|
|
627
628
|
gap: "large",
|
|
628
629
|
style: { marginTop: 16 },
|
|
629
630
|
children: [
|
|
630
|
-
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
|
|
631
|
+
s && /* @__PURE__ */ t("div", { style: { width: "250px" }, children: /* @__PURE__ */ t(Ue, { percent: Y, size: "small" }) }),
|
|
632
|
+
/* @__PURE__ */ t(
|
|
633
|
+
J,
|
|
633
634
|
{
|
|
634
635
|
type: "primary",
|
|
635
|
-
onClick:
|
|
636
|
-
disabled:
|
|
637
|
-
icon: /* @__PURE__ */
|
|
636
|
+
onClick: p,
|
|
637
|
+
disabled: s || y || i.filter((h) => h.status !== "done").length === 0,
|
|
638
|
+
icon: /* @__PURE__ */ t(Qe, {}),
|
|
638
639
|
children: "일괄 업로드"
|
|
639
640
|
}
|
|
640
641
|
)
|
|
@@ -644,35 +645,35 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
644
645
|
] })
|
|
645
646
|
}
|
|
646
647
|
);
|
|
647
|
-
},
|
|
648
|
+
}, Yt = (e) => {
|
|
648
649
|
if (typeof e == "string")
|
|
649
650
|
return e.replace(/0/g, "_");
|
|
650
651
|
if (Array.isArray(e))
|
|
651
652
|
return e[0].replace(/0/g, "_");
|
|
652
653
|
if (typeof e == "object" && "mask" in e && "blocks" in e) {
|
|
653
|
-
const { mask:
|
|
654
|
-
return
|
|
655
|
-
const
|
|
656
|
-
return "_".repeat(
|
|
654
|
+
const { mask: r, blocks: u } = e;
|
|
655
|
+
return r.split(".").map((l) => {
|
|
656
|
+
const o = u?.[l]?.maxLength ?? 3;
|
|
657
|
+
return "_".repeat(o);
|
|
657
658
|
}).join(".");
|
|
658
659
|
}
|
|
659
660
|
return "";
|
|
660
|
-
},
|
|
661
|
+
}, Zt = ({
|
|
661
662
|
itemProps: e,
|
|
662
|
-
inputProps:
|
|
663
|
-
mask:
|
|
663
|
+
inputProps: r,
|
|
664
|
+
mask: u
|
|
664
665
|
}) => {
|
|
665
|
-
const
|
|
666
|
+
const l = K(null), n = D.useFormInstance(), o = q(() => Yt(u), [u]);
|
|
666
667
|
return G(() => {
|
|
667
|
-
if (!
|
|
668
|
-
const
|
|
668
|
+
if (!l.current?.input) return;
|
|
669
|
+
const d = typeof u == "string" || Array.isArray(u) ? { mask: u } : u, i = se(l.current.input, d);
|
|
669
670
|
return i.on("accept", () => {
|
|
670
|
-
|
|
671
|
+
n && e?.name && n.setFieldValue(e.name, i.value);
|
|
671
672
|
}), () => {
|
|
672
673
|
i.destroy();
|
|
673
674
|
};
|
|
674
|
-
}, [
|
|
675
|
-
},
|
|
675
|
+
}, [u, n, e?.name]), /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(X, { ...r, ref: l, placeholder: o }) });
|
|
676
|
+
}, bt = (e) => {
|
|
676
677
|
switch (e) {
|
|
677
678
|
case "year":
|
|
678
679
|
return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
|
|
@@ -686,69 +687,69 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
686
687
|
outputFormat: "YYYYMMDD"
|
|
687
688
|
};
|
|
688
689
|
}
|
|
689
|
-
},
|
|
690
|
+
}, Qt = ({
|
|
690
691
|
type: e = "date",
|
|
691
|
-
itemProps:
|
|
692
|
-
inputProps:
|
|
693
|
-
pickerProps:
|
|
692
|
+
itemProps: r = { name: "calendar" },
|
|
693
|
+
inputProps: u,
|
|
694
|
+
pickerProps: l
|
|
694
695
|
}) => {
|
|
695
|
-
const { format:
|
|
696
|
+
const { format: n, mask: o, outputFormat: d } = bt(e), i = K(null), f = K(null), s = K(null), c = D.useFormInstance(), [y, g] = z(!1), [Y, C] = z(!1), O = r?.name, [p, E] = z(null), h = D.useWatch(O, c), P = xe();
|
|
696
697
|
G(() => {
|
|
697
698
|
if (!i.current?.input) return;
|
|
698
|
-
const
|
|
699
|
-
mask:
|
|
699
|
+
const a = se(i.current.input, {
|
|
700
|
+
mask: o,
|
|
700
701
|
lazy: !1
|
|
701
702
|
});
|
|
702
|
-
return
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
|
|
703
|
+
return f.current = a, a.on("accept", () => {
|
|
704
|
+
const k = a.value;
|
|
705
|
+
k.length > 0 && g(!0);
|
|
706
|
+
const b = N(k, n, !0);
|
|
707
|
+
k.length === n.length && b.isValid() && (c.setFieldValue(O, b.format(d)), E(b), f.current?.updateValue());
|
|
707
708
|
}), () => {
|
|
708
|
-
|
|
709
|
+
a.destroy();
|
|
709
710
|
};
|
|
710
|
-
}, [
|
|
711
|
+
}, [n, o]), G(() => {
|
|
711
712
|
if (!h) {
|
|
712
|
-
|
|
713
|
+
E(null);
|
|
713
714
|
return;
|
|
714
715
|
}
|
|
715
|
-
let
|
|
716
|
-
if (typeof h == "string" && h.length ===
|
|
716
|
+
let a = null;
|
|
717
|
+
if (typeof h == "string" && h.length === d.length && /^\d+$/.test(h))
|
|
717
718
|
if (e === "date") {
|
|
718
|
-
const
|
|
719
|
-
|
|
719
|
+
const k = h.substring(0, 4), b = h.substring(4, 6), B = h.substring(6, 8);
|
|
720
|
+
a = N(`${k}-${b}-${B}`, n, !0);
|
|
720
721
|
} else if (e === "month") {
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
} else e === "year" && (
|
|
722
|
+
const k = h.substring(0, 4), b = h.substring(4, 6);
|
|
723
|
+
a = N(`${k}-${b}`, n, !0);
|
|
724
|
+
} else e === "year" && (a = N(h, n, !0));
|
|
724
725
|
else
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}, [h,
|
|
728
|
-
const
|
|
729
|
-
if (!
|
|
730
|
-
|
|
726
|
+
a = N(h, n, !0);
|
|
727
|
+
a && a.isValid() ? E(a) : E(null), C(!1);
|
|
728
|
+
}, [h, n, d, e]);
|
|
729
|
+
const L = (a) => {
|
|
730
|
+
if (!a) {
|
|
731
|
+
c.setFieldValue(O, void 0), E(null), f.current?.updateValue();
|
|
731
732
|
return;
|
|
732
733
|
}
|
|
733
|
-
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
},
|
|
734
|
+
E(a);
|
|
735
|
+
const k = a.format(d);
|
|
736
|
+
c.setFieldValue(O, k), f.current && (f.current.value = a.format(n), f.current.updateValue()), C(!1);
|
|
737
|
+
}, U = (a) => {
|
|
737
738
|
setTimeout(() => {
|
|
738
|
-
const
|
|
739
|
-
!(
|
|
739
|
+
const k = document.activeElement, b = s.current, B = b?.querySelector(".ant-picker-dropdown");
|
|
740
|
+
!(b && (b.contains(k) || b === k || B?.contains(k))) && !(a !== void 0 ? a : y) && console.log("✅ Input과 DatePicker 모두 포커스가 없습니다");
|
|
740
741
|
}, 0);
|
|
741
742
|
};
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
|
|
743
|
+
return /* @__PURE__ */ t(
|
|
744
|
+
R,
|
|
744
745
|
{
|
|
745
|
-
...
|
|
746
|
+
...r,
|
|
746
747
|
name: void 0,
|
|
747
|
-
validateStatus:
|
|
748
|
-
children: /* @__PURE__ */
|
|
749
|
-
|
|
748
|
+
validateStatus: Y ? "warning" : void 0,
|
|
749
|
+
children: /* @__PURE__ */ T(
|
|
750
|
+
ie,
|
|
750
751
|
{
|
|
751
|
-
componentSize:
|
|
752
|
+
componentSize: P.componentSize,
|
|
752
753
|
theme: {
|
|
753
754
|
components: {
|
|
754
755
|
Input: {
|
|
@@ -757,63 +758,63 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
757
758
|
}
|
|
758
759
|
},
|
|
759
760
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
|
|
761
|
+
/* @__PURE__ */ t(
|
|
762
|
+
D.Item,
|
|
762
763
|
{
|
|
763
|
-
name:
|
|
764
|
-
getValueProps: (
|
|
765
|
-
value:
|
|
764
|
+
name: O,
|
|
765
|
+
getValueProps: (a) => ({
|
|
766
|
+
value: a ? N(a).format(n) : void 0
|
|
766
767
|
}),
|
|
767
|
-
normalize: (
|
|
768
|
+
normalize: (a) => a ? N(a).format(d) : void 0,
|
|
768
769
|
noStyle: !0,
|
|
769
|
-
rules:
|
|
770
|
-
children: /* @__PURE__ */
|
|
771
|
-
|
|
770
|
+
rules: r?.rules ?? [],
|
|
771
|
+
children: /* @__PURE__ */ t(
|
|
772
|
+
X,
|
|
772
773
|
{
|
|
773
|
-
...
|
|
774
|
+
...u,
|
|
774
775
|
ref: i,
|
|
775
776
|
onFocus: () => {
|
|
776
|
-
|
|
777
|
+
g(!y), f.current?.updateValue();
|
|
777
778
|
},
|
|
778
779
|
onBlur: () => {
|
|
779
|
-
|
|
780
|
+
U();
|
|
780
781
|
},
|
|
781
|
-
onKeyDown: (
|
|
782
|
-
if (
|
|
783
|
-
if (
|
|
784
|
-
const
|
|
785
|
-
|
|
782
|
+
onKeyDown: (a) => {
|
|
783
|
+
if (a.key === "Backspace" && g(!0), a.key === "Tab" && g(!1), a.key === "Enter")
|
|
784
|
+
if (y) {
|
|
785
|
+
const k = f.current?.value || "", b = N(k, n, !0);
|
|
786
|
+
k.length === n.length && b.isValid() ? (g(!1), C(!1)) : C(!0);
|
|
786
787
|
} else
|
|
787
|
-
|
|
788
|
+
g(!0);
|
|
788
789
|
},
|
|
789
790
|
style: {
|
|
790
791
|
width: "65%"
|
|
791
792
|
},
|
|
792
793
|
allowClear: !0,
|
|
793
|
-
placeholder:
|
|
794
|
-
suffix: /* @__PURE__ */
|
|
794
|
+
placeholder: o.replace(/0/g, "_"),
|
|
795
|
+
suffix: /* @__PURE__ */ t(me, { style: { color: "#d9d9d9" } }),
|
|
795
796
|
autoComplete: "off"
|
|
796
797
|
}
|
|
797
798
|
)
|
|
798
799
|
}
|
|
799
800
|
),
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
|
|
801
|
+
/* @__PURE__ */ t(
|
|
802
|
+
ce,
|
|
802
803
|
{
|
|
803
|
-
...
|
|
804
|
-
open:
|
|
804
|
+
...l,
|
|
805
|
+
open: y,
|
|
805
806
|
picker: e,
|
|
806
807
|
format: {
|
|
807
|
-
format:
|
|
808
|
+
format: n,
|
|
808
809
|
type: "mask"
|
|
809
810
|
},
|
|
810
811
|
showNow: !0,
|
|
811
|
-
value:
|
|
812
|
-
onChange:
|
|
813
|
-
onOpenChange: (
|
|
814
|
-
|
|
812
|
+
value: p,
|
|
813
|
+
onChange: L,
|
|
814
|
+
onOpenChange: (a) => {
|
|
815
|
+
g(a), a || U(!1);
|
|
815
816
|
},
|
|
816
|
-
renderExtraFooter: () =>
|
|
817
|
+
renderExtraFooter: () => Y ? /* @__PURE__ */ T(
|
|
817
818
|
"div",
|
|
818
819
|
{
|
|
819
820
|
style: {
|
|
@@ -827,12 +828,12 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
827
828
|
backgroundColor: "#fffbe6"
|
|
828
829
|
},
|
|
829
830
|
children: [
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ t(Ie, {}),
|
|
832
|
+
/* @__PURE__ */ t("span", { children: "유효하지 않은 날짜입니다" })
|
|
832
833
|
]
|
|
833
834
|
}
|
|
834
835
|
) : null,
|
|
835
|
-
getPopupContainer: (
|
|
836
|
+
getPopupContainer: (a) => a.parentElement,
|
|
836
837
|
style: {
|
|
837
838
|
position: "absolute",
|
|
838
839
|
top: 0,
|
|
@@ -848,7 +849,7 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
848
849
|
)
|
|
849
850
|
}
|
|
850
851
|
);
|
|
851
|
-
}, { RangePicker:
|
|
852
|
+
}, { RangePicker: St } = ce, Vt = (e) => {
|
|
852
853
|
switch (e) {
|
|
853
854
|
case "year":
|
|
854
855
|
return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
|
|
@@ -862,231 +863,231 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
862
863
|
outputFormat: "YYYYMMDD"
|
|
863
864
|
};
|
|
864
865
|
}
|
|
865
|
-
},
|
|
866
|
+
}, en = ({
|
|
866
867
|
type: e = "date",
|
|
867
|
-
itemProps:
|
|
868
|
-
inputProps:
|
|
869
|
-
pickerProps:
|
|
868
|
+
itemProps: r = { name: "dateRange" },
|
|
869
|
+
inputProps: u,
|
|
870
|
+
pickerProps: l
|
|
870
871
|
}) => {
|
|
871
|
-
const { format:
|
|
872
|
+
const { format: n, mask: o, outputFormat: d } = Vt(e), i = K(null), f = K(null), s = K(null), c = K(null), y = K(null), g = D.useFormInstance(), [Y, C] = z(!1), [O, p] = z(!1), [E, h] = z(null), [P, L] = z(!1), U = K(!1), a = r?.name, [k, b] = z([
|
|
872
873
|
null,
|
|
873
874
|
null
|
|
874
|
-
]),
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
),
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
),
|
|
875
|
+
]), B = D.useWatch(
|
|
876
|
+
a ? Array.isArray(a) ? [...a, 0] : [a, 0] : void 0,
|
|
877
|
+
g
|
|
878
|
+
), A = D.useWatch(
|
|
879
|
+
a ? Array.isArray(a) ? [...a, 1] : [a, 1] : void 0,
|
|
880
|
+
g
|
|
881
|
+
), M = D.useWatch(a, g), $ = xe();
|
|
881
882
|
G(() => {
|
|
882
883
|
if (!i.current?.input) return;
|
|
883
|
-
const
|
|
884
|
-
mask:
|
|
884
|
+
const m = se(i.current.input, {
|
|
885
|
+
mask: o,
|
|
885
886
|
lazy: !1
|
|
886
887
|
});
|
|
887
|
-
return
|
|
888
|
-
const
|
|
888
|
+
return s.current = m, m.on("accept", () => {
|
|
889
|
+
const F = m.value, V = m.unmaskedValue || "";
|
|
889
890
|
if (console.log("🔵 [시작일] accept 이벤트:", {
|
|
890
|
-
maskValue:
|
|
891
|
-
unmaskedValue:
|
|
892
|
-
length:
|
|
893
|
-
formatLength:
|
|
894
|
-
}),
|
|
895
|
-
const
|
|
896
|
-
if (
|
|
891
|
+
maskValue: F,
|
|
892
|
+
unmaskedValue: V,
|
|
893
|
+
length: F.length,
|
|
894
|
+
formatLength: n.length
|
|
895
|
+
}), F.length > 0 && (h("start"), C(!0), L(!1)), V.length === d.length) {
|
|
896
|
+
const w = N(F, n, !0);
|
|
897
|
+
if (w.isValid()) {
|
|
897
898
|
console.log("🔵 [시작일] 입력 완료 및 검증 통과:", {
|
|
898
|
-
parsed:
|
|
899
|
+
parsed: w.format(n)
|
|
899
900
|
});
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
if (
|
|
908
|
-
const
|
|
909
|
-
!(
|
|
901
|
+
const H = w.format(d);
|
|
902
|
+
U.current = !0;
|
|
903
|
+
const S = Array.isArray(a) ? [...a, 0] : [a, 0];
|
|
904
|
+
g.setFieldValue(S, H), b([w, k[1]]), s.current && s.current.updateValue(), p(!1), setTimeout(() => {
|
|
905
|
+
c.current && (c.current.value = "", c.current.unmaskedValue = "", c.current.updateValue());
|
|
906
|
+
const I = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
907
|
+
g.getFieldValue(I) || g.setFieldValue(I, void 0), f.current?.focus(), setTimeout(() => {
|
|
908
|
+
if (c.current) {
|
|
909
|
+
const W = c.current.value || "";
|
|
910
|
+
!(c.current.unmaskedValue || "") && !W.replace(/[^0-9]/g, "") && (c.current.value = "", c.current.updateValue());
|
|
910
911
|
}
|
|
911
|
-
}, 10), h("end"),
|
|
912
|
+
}, 10), h("end"), C(!0), U.current = !1;
|
|
912
913
|
}, 0);
|
|
913
914
|
} else
|
|
914
|
-
|
|
915
|
+
l?.allowEmpty ? p(!1) : (console.log("🔵 [시작일] 검증 실패:", { val: F, parsed: w }), p(!0));
|
|
915
916
|
}
|
|
916
917
|
}), () => {
|
|
917
|
-
|
|
918
|
+
m.destroy();
|
|
918
919
|
};
|
|
919
|
-
}, [
|
|
920
|
-
if (!
|
|
921
|
-
const
|
|
922
|
-
mask:
|
|
920
|
+
}, [n, o, a]), G(() => {
|
|
921
|
+
if (!f.current?.input) return;
|
|
922
|
+
const m = se(f.current.input, {
|
|
923
|
+
mask: o,
|
|
923
924
|
lazy: !1
|
|
924
925
|
});
|
|
925
|
-
return
|
|
926
|
-
const
|
|
926
|
+
return c.current = m, m.on("accept", () => {
|
|
927
|
+
const F = m.value, V = m.unmaskedValue || "";
|
|
927
928
|
if (console.log("🟢 [종료일] accept 이벤트:", {
|
|
928
|
-
maskValue:
|
|
929
|
-
unmaskedValue:
|
|
930
|
-
length:
|
|
931
|
-
formatLength:
|
|
932
|
-
}),
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
i.current?.focus(), h("start"),
|
|
929
|
+
maskValue: F,
|
|
930
|
+
unmaskedValue: V,
|
|
931
|
+
length: F.length,
|
|
932
|
+
formatLength: n.length
|
|
933
|
+
}), V === "" || V.length === 0) {
|
|
934
|
+
const w = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
935
|
+
g.setFieldValue(w, void 0), b([k[0], null]), c.current && (c.current.value = "", c.current.updateValue()), setTimeout(() => {
|
|
936
|
+
i.current?.focus(), h("start"), C(!0);
|
|
936
937
|
}, 0);
|
|
937
938
|
return;
|
|
938
939
|
}
|
|
939
|
-
if (
|
|
940
|
-
|
|
940
|
+
if (F.length > 0 && (h("end"), C(!0)), F.length < n.length) {
|
|
941
|
+
p(!1);
|
|
941
942
|
return;
|
|
942
943
|
}
|
|
943
|
-
if (
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
946
|
-
const
|
|
944
|
+
if (V.length === d.length) {
|
|
945
|
+
const w = N(F, n, !0);
|
|
946
|
+
if (w.isValid()) {
|
|
947
|
+
const H = w.format(d);
|
|
947
948
|
console.log("🟢 [종료일] 입력 완료:", {
|
|
948
|
-
parsed:
|
|
949
|
-
formatted:
|
|
950
|
-
}),
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
949
|
+
parsed: w.format(n),
|
|
950
|
+
formatted: H
|
|
951
|
+
}), U.current = !0;
|
|
952
|
+
const S = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
953
|
+
g.setFieldValue(S, H), b([k[0], w]), c.current?.updateValue(), setTimeout(() => {
|
|
954
|
+
U.current = !1;
|
|
954
955
|
}, 0);
|
|
955
956
|
} else
|
|
956
|
-
|
|
957
|
+
l?.allowEmpty ? p(!1) : (console.log("🟢 [종료일] 검증 실패:", { val: F, parsed: w }), p(!0));
|
|
957
958
|
}
|
|
958
959
|
}), () => {
|
|
959
|
-
|
|
960
|
+
m.destroy();
|
|
960
961
|
};
|
|
961
|
-
}, [
|
|
962
|
+
}, [n, o, a]), G(() => {
|
|
962
963
|
console.log("🟡 [useEffect] form 값 변경 감지:", {
|
|
963
|
-
startFormValue:
|
|
964
|
-
endFormValue:
|
|
965
|
-
formValue:
|
|
964
|
+
startFormValue: B,
|
|
965
|
+
endFormValue: A,
|
|
966
|
+
formValue: M
|
|
966
967
|
});
|
|
967
|
-
const
|
|
968
|
-
if (
|
|
969
|
-
|
|
968
|
+
const m = B ?? (Array.isArray(M) ? M[0] : null), F = A ?? (Array.isArray(M) ? M[1] : null);
|
|
969
|
+
if (m === void 0 && F === void 0 && (!M || !Array.isArray(M))) {
|
|
970
|
+
b([null, null]);
|
|
970
971
|
return;
|
|
971
972
|
}
|
|
972
|
-
const
|
|
973
|
-
if (!
|
|
974
|
-
let
|
|
975
|
-
if (typeof
|
|
973
|
+
const V = (S) => {
|
|
974
|
+
if (!S) return null;
|
|
975
|
+
let I = null;
|
|
976
|
+
if (typeof S == "string" && S.length === d.length && /^\d+$/.test(S))
|
|
976
977
|
if (e === "date") {
|
|
977
|
-
const
|
|
978
|
-
|
|
978
|
+
const _ = S.substring(0, 4), W = S.substring(4, 6), pe = S.substring(6, 8);
|
|
979
|
+
I = N(`${_}-${W}-${pe}`, n, !0);
|
|
979
980
|
} else if (e === "month") {
|
|
980
|
-
const
|
|
981
|
-
|
|
982
|
-
} else e === "year" && (
|
|
981
|
+
const _ = S.substring(0, 4), W = S.substring(4, 6);
|
|
982
|
+
I = N(`${_}-${W}`, n, !0);
|
|
983
|
+
} else e === "year" && (I = N(S, n, !0));
|
|
983
984
|
else
|
|
984
|
-
|
|
985
|
-
return
|
|
986
|
-
},
|
|
985
|
+
I = N(S, n, !0);
|
|
986
|
+
return I && I.isValid() ? I : null;
|
|
987
|
+
}, w = V(m), H = V(F);
|
|
987
988
|
if (console.log("🟡 [useEffect] 파싱 결과:", {
|
|
988
|
-
startParsed:
|
|
989
|
-
endParsed:
|
|
990
|
-
isStartDateFromPicker:
|
|
991
|
-
}),
|
|
992
|
-
console.log("🟡 [useEffect] 사용자 입력 중 - 마스크 값 업데이트 스킵"),
|
|
989
|
+
startParsed: w ? w.format(n) : null,
|
|
990
|
+
endParsed: H ? H.format(n) : null,
|
|
991
|
+
isStartDateFromPicker: P
|
|
992
|
+
}), b([w, H]), U.current) {
|
|
993
|
+
console.log("🟡 [useEffect] 사용자 입력 중 - 마스크 값 업데이트 스킵"), p(!1);
|
|
993
994
|
return;
|
|
994
995
|
}
|
|
995
|
-
if (!
|
|
996
|
-
const
|
|
996
|
+
if (!P && s.current) {
|
|
997
|
+
const S = s.current.value || "", I = w ? w.format(n) : "", _ = s.current.unmaskedValue || "", W = w ? w.format(d) : "";
|
|
997
998
|
console.log("🟡 [useEffect] 시작일 마스크 값 체크:", {
|
|
998
|
-
currentMaskValue:
|
|
999
|
-
expectedMaskValue:
|
|
1000
|
-
unmaskedValue:
|
|
1001
|
-
expectedUnmasked:
|
|
1002
|
-
shouldUpdate:
|
|
1003
|
-
canUpdate:
|
|
1004
|
-
}), (
|
|
1005
|
-
before:
|
|
1006
|
-
after:
|
|
1007
|
-
}),
|
|
999
|
+
currentMaskValue: S,
|
|
1000
|
+
expectedMaskValue: I,
|
|
1001
|
+
unmaskedValue: _,
|
|
1002
|
+
expectedUnmasked: W,
|
|
1003
|
+
shouldUpdate: S === "" || S !== I,
|
|
1004
|
+
canUpdate: _ === "" || _ === W
|
|
1005
|
+
}), (S === "" || S !== I) && (_ === "" || _ === W ? (console.log("🟡 [useEffect] 시작일 마스크 값 업데이트:", {
|
|
1006
|
+
before: S,
|
|
1007
|
+
after: w ? w.format(n) : ""
|
|
1008
|
+
}), w ? (s.current.value = w.format(n), s.current.updateValue()) : (s.current.value = "", s.current.updateValue())) : console.log(
|
|
1008
1009
|
"🟡 [useEffect] 시작일 마스크 값 업데이트 스킵 (사용자 입력 중)"
|
|
1009
1010
|
));
|
|
1010
1011
|
}
|
|
1011
|
-
if (
|
|
1012
|
-
const
|
|
1012
|
+
if (c.current) {
|
|
1013
|
+
const S = c.current.value || "", I = H ? H.format(n) : "", _ = c.current.unmaskedValue || "", W = H ? H.format(d) : "";
|
|
1013
1014
|
console.log("🟡 [useEffect] 종료일 마스크 값 체크:", {
|
|
1014
|
-
currentMaskValue:
|
|
1015
|
-
expectedMaskValue:
|
|
1016
|
-
unmaskedValue:
|
|
1017
|
-
expectedUnmasked:
|
|
1018
|
-
shouldUpdate:
|
|
1019
|
-
canUpdate:
|
|
1020
|
-
}), (
|
|
1021
|
-
before:
|
|
1022
|
-
after:
|
|
1023
|
-
}),
|
|
1015
|
+
currentMaskValue: S,
|
|
1016
|
+
expectedMaskValue: I,
|
|
1017
|
+
unmaskedValue: _,
|
|
1018
|
+
expectedUnmasked: W,
|
|
1019
|
+
shouldUpdate: S === "" || S !== I,
|
|
1020
|
+
canUpdate: _ === "" || _ === W
|
|
1021
|
+
}), (S === "" || S !== I) && (_ === "" || _ === W ? (console.log("🟡 [useEffect] 종료일 마스크 값 업데이트:", {
|
|
1022
|
+
before: S,
|
|
1023
|
+
after: I
|
|
1024
|
+
}), H ? (c.current.value = H.format(n), c.current.updateValue()) : (c.current.value = "", c.current.updateValue())) : console.log(
|
|
1024
1025
|
"🟡 [useEffect] 종료일 마스크 값 업데이트 스킵 (사용자 입력 중)"
|
|
1025
1026
|
));
|
|
1026
1027
|
}
|
|
1027
|
-
|
|
1028
|
-
}, [
|
|
1029
|
-
const
|
|
1028
|
+
p(!1);
|
|
1029
|
+
}, [B, A, M, n, d, e]);
|
|
1030
|
+
const re = (m) => {
|
|
1030
1031
|
if (console.log("🔴 [RangePicker] 날짜 변경:", {
|
|
1031
|
-
dates:
|
|
1032
|
-
|
|
1033
|
-
|
|
1032
|
+
dates: m ? [
|
|
1033
|
+
m[0] ? m[0].format(n) : null,
|
|
1034
|
+
m[1] ? m[1].format(n) : null
|
|
1034
1035
|
] : null,
|
|
1035
1036
|
prevRange: [
|
|
1036
|
-
|
|
1037
|
-
|
|
1037
|
+
k[0] ? k[0].format(n) : null,
|
|
1038
|
+
k[1] ? k[1].format(n) : null
|
|
1038
1039
|
]
|
|
1039
|
-
}), !
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1040
|
+
}), !m) {
|
|
1041
|
+
b([null, null]);
|
|
1042
|
+
const I = Array.isArray(a) ? [...a, 0] : [a, 0], _ = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
1043
|
+
g.setFieldValue(I, void 0), g.setFieldValue(_, void 0), s.current?.updateValue(), c.current?.updateValue();
|
|
1043
1044
|
return;
|
|
1044
1045
|
}
|
|
1045
|
-
const [
|
|
1046
|
-
|
|
1046
|
+
const [F, V] = m, w = k[0], H = F && (!w || !F.isSame(
|
|
1047
|
+
w,
|
|
1047
1048
|
e === "year" ? "year" : e === "month" ? "month" : "day"
|
|
1048
1049
|
));
|
|
1049
1050
|
if (console.log("🔴 [RangePicker] 시작일 변경 여부:", {
|
|
1050
|
-
isStartDateChanged:
|
|
1051
|
-
startDate:
|
|
1052
|
-
prevStartDate:
|
|
1053
|
-
}),
|
|
1054
|
-
console.log("🔴 [RangePicker] 시작일 선택됨 - input 비우기"),
|
|
1055
|
-
const
|
|
1051
|
+
isStartDateChanged: H,
|
|
1052
|
+
startDate: F ? F.format(n) : null,
|
|
1053
|
+
prevStartDate: w ? w.format(n) : null
|
|
1054
|
+
}), b([F, V]), H) {
|
|
1055
|
+
console.log("🔴 [RangePicker] 시작일 선택됨 - input 비우기"), L(!0), s.current && (s.current.value = "", s.current.updateValue());
|
|
1056
|
+
const I = F.format(d);
|
|
1056
1057
|
console.log("🔴 [RangePicker] form 값 업데이트:", {
|
|
1057
|
-
formatted:
|
|
1058
|
+
formatted: I
|
|
1058
1059
|
});
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1061
|
-
} else if (!
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1060
|
+
const _ = Array.isArray(a) ? [...a, 0] : [a, 0];
|
|
1061
|
+
g.setFieldValue(_, I);
|
|
1062
|
+
} else if (!F && s.current) {
|
|
1063
|
+
L(!1), s.current.value = "", s.current.updateValue();
|
|
1064
|
+
const I = Array.isArray(a) ? [...a, 0] : [a, 0];
|
|
1065
|
+
g.setFieldValue(I, void 0);
|
|
1065
1066
|
} else
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
const
|
|
1070
|
-
|
|
1067
|
+
L(!1);
|
|
1068
|
+
const S = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
1069
|
+
if (V) {
|
|
1070
|
+
const I = V.format(d);
|
|
1071
|
+
g.setFieldValue(S, I), c.current && (c.current.value = V.format(n), c.current.updateValue());
|
|
1071
1072
|
} else
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
},
|
|
1073
|
+
g.setFieldValue(S, void 0), c.current && (c.current.value = "", c.current.updateValue());
|
|
1074
|
+
p(!1);
|
|
1075
|
+
}, Z = (m) => {
|
|
1075
1076
|
setTimeout(() => {
|
|
1076
|
-
const
|
|
1077
|
-
!(
|
|
1077
|
+
const F = document.activeElement, V = y.current, w = V?.querySelector(".ant-picker-dropdown");
|
|
1078
|
+
!(V && (V.contains(F) || V === F || w?.contains(F))) && !(m !== void 0 ? m : Y) && (console.log("✅ Input과 RangePicker 모두 포커스가 없습니다"), C(!1));
|
|
1078
1079
|
}, 0);
|
|
1079
1080
|
};
|
|
1080
|
-
return /* @__PURE__ */
|
|
1081
|
-
|
|
1081
|
+
return /* @__PURE__ */ t(
|
|
1082
|
+
R,
|
|
1082
1083
|
{
|
|
1083
|
-
...
|
|
1084
|
+
...r,
|
|
1084
1085
|
name: void 0,
|
|
1085
|
-
validateStatus:
|
|
1086
|
-
children: /* @__PURE__ */
|
|
1087
|
-
|
|
1086
|
+
validateStatus: O ? "warning" : void 0,
|
|
1087
|
+
children: /* @__PURE__ */ T(
|
|
1088
|
+
ie,
|
|
1088
1089
|
{
|
|
1089
|
-
componentSize:
|
|
1090
|
+
componentSize: $.componentSize,
|
|
1090
1091
|
theme: {
|
|
1091
1092
|
components: {
|
|
1092
1093
|
Input: {
|
|
@@ -1095,10 +1096,10 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1095
1096
|
}
|
|
1096
1097
|
},
|
|
1097
1098
|
children: [
|
|
1098
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ T(
|
|
1099
1100
|
"div",
|
|
1100
1101
|
{
|
|
1101
|
-
ref:
|
|
1102
|
+
ref: y,
|
|
1102
1103
|
style: {
|
|
1103
1104
|
display: "flex",
|
|
1104
1105
|
alignItems: "center",
|
|
@@ -1106,130 +1107,130 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1106
1107
|
width: "100%"
|
|
1107
1108
|
},
|
|
1108
1109
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
|
|
1110
|
+
/* @__PURE__ */ t(
|
|
1111
|
+
D.Item,
|
|
1111
1112
|
{
|
|
1112
|
-
name:
|
|
1113
|
-
getValueProps: (
|
|
1114
|
-
if (!
|
|
1115
|
-
if (typeof
|
|
1113
|
+
name: a ? Array.isArray(a) ? [...a, 0] : [a, 0] : void 0,
|
|
1114
|
+
getValueProps: (m) => {
|
|
1115
|
+
if (!m) return { value: void 0 };
|
|
1116
|
+
if (typeof m == "string" && m.length === d.length && /^\d+$/.test(m)) {
|
|
1116
1117
|
if (e === "date") {
|
|
1117
|
-
const
|
|
1118
|
-
return { value: `${
|
|
1118
|
+
const F = m.substring(0, 4), V = m.substring(4, 6), w = m.substring(6, 8);
|
|
1119
|
+
return { value: `${F}-${V}-${w}` };
|
|
1119
1120
|
} else if (e === "month") {
|
|
1120
|
-
const
|
|
1121
|
-
return { value: `${
|
|
1121
|
+
const F = m.substring(0, 4), V = m.substring(4, 6);
|
|
1122
|
+
return { value: `${F}-${V}` };
|
|
1122
1123
|
} else if (e === "year")
|
|
1123
|
-
return { value:
|
|
1124
|
+
return { value: m };
|
|
1124
1125
|
}
|
|
1125
|
-
return { value:
|
|
1126
|
+
return { value: N(m).format(n) };
|
|
1126
1127
|
},
|
|
1127
|
-
normalize: (
|
|
1128
|
+
normalize: (m) => m ? N(m).format(d) : (l?.allowEmpty, void 0),
|
|
1128
1129
|
noStyle: !0,
|
|
1129
|
-
rules:
|
|
1130
|
-
children: /* @__PURE__ */
|
|
1131
|
-
|
|
1130
|
+
rules: r?.rules ?? [],
|
|
1131
|
+
children: /* @__PURE__ */ t(
|
|
1132
|
+
X,
|
|
1132
1133
|
{
|
|
1133
|
-
...
|
|
1134
|
+
...u,
|
|
1134
1135
|
value: void 0,
|
|
1135
1136
|
ref: i,
|
|
1136
1137
|
onFocus: () => {
|
|
1137
|
-
if (h("start"),
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1138
|
+
if (h("start"), C(!Y), L(!1), s.current) {
|
|
1139
|
+
const m = Array.isArray(a) ? [...a, 0] : [a, 0];
|
|
1140
|
+
g.getFieldValue(m) || (s.current.value = "", s.current.unmaskedValue = ""), s.current.updateValue();
|
|
1140
1141
|
}
|
|
1141
1142
|
},
|
|
1142
1143
|
onBlur: () => {
|
|
1143
|
-
|
|
1144
|
+
Z();
|
|
1144
1145
|
},
|
|
1145
|
-
onKeyDown: (
|
|
1146
|
-
if (
|
|
1147
|
-
if (
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1146
|
+
onKeyDown: (m) => {
|
|
1147
|
+
if (m.key === "Backspace" && (h("start"), C(!0)), m.key === "Enter")
|
|
1148
|
+
if (Y && E === "start") {
|
|
1149
|
+
const F = s.current?.value || "";
|
|
1150
|
+
F.length === n.length ? N(F, n, !0).isValid() ? (C(!1), p(!1)) : l?.allowEmpty ? p(!1) : p(!0) : p(!1);
|
|
1150
1151
|
} else
|
|
1151
|
-
h("start"),
|
|
1152
|
+
h("start"), C(!0);
|
|
1152
1153
|
},
|
|
1153
1154
|
style: {
|
|
1154
1155
|
flex: 1
|
|
1155
1156
|
},
|
|
1156
1157
|
allowClear: !0,
|
|
1157
|
-
placeholder:
|
|
1158
|
-
suffix: /* @__PURE__ */
|
|
1158
|
+
placeholder: o.replace(/0/g, "_"),
|
|
1159
|
+
suffix: /* @__PURE__ */ t(me, { style: { color: "#d9d9d9" } }),
|
|
1159
1160
|
autoComplete: "off"
|
|
1160
1161
|
}
|
|
1161
1162
|
)
|
|
1162
1163
|
}
|
|
1163
1164
|
),
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
|
|
1165
|
+
/* @__PURE__ */ t("span", { style: { color: "#d9d9d9", userSelect: "none" }, children: "~" }),
|
|
1166
|
+
/* @__PURE__ */ t(
|
|
1167
|
+
D.Item,
|
|
1167
1168
|
{
|
|
1168
|
-
name:
|
|
1169
|
-
getValueProps: (
|
|
1170
|
-
if (!
|
|
1171
|
-
if (typeof
|
|
1169
|
+
name: a ? Array.isArray(a) ? [...a, 1] : [a, 1] : void 0,
|
|
1170
|
+
getValueProps: (m) => {
|
|
1171
|
+
if (!m) return { value: void 0 };
|
|
1172
|
+
if (typeof m == "string" && m.length === d.length && /^\d+$/.test(m)) {
|
|
1172
1173
|
if (e === "date") {
|
|
1173
|
-
const
|
|
1174
|
-
return { value: `${
|
|
1174
|
+
const F = m.substring(0, 4), V = m.substring(4, 6), w = m.substring(6, 8);
|
|
1175
|
+
return { value: `${F}-${V}-${w}` };
|
|
1175
1176
|
} else if (e === "month") {
|
|
1176
|
-
const
|
|
1177
|
-
return { value: `${
|
|
1177
|
+
const F = m.substring(0, 4), V = m.substring(4, 6);
|
|
1178
|
+
return { value: `${F}-${V}` };
|
|
1178
1179
|
} else if (e === "year")
|
|
1179
|
-
return { value:
|
|
1180
|
+
return { value: m };
|
|
1180
1181
|
}
|
|
1181
|
-
return { value:
|
|
1182
|
+
return { value: N(m).format(n) };
|
|
1182
1183
|
},
|
|
1183
|
-
normalize: (
|
|
1184
|
+
normalize: (m) => m ? N(m).format(d) : (l?.allowEmpty, void 0),
|
|
1184
1185
|
noStyle: !0,
|
|
1185
|
-
rules:
|
|
1186
|
-
children: /* @__PURE__ */
|
|
1187
|
-
|
|
1186
|
+
rules: r?.rules ?? [],
|
|
1187
|
+
children: /* @__PURE__ */ t(
|
|
1188
|
+
X,
|
|
1188
1189
|
{
|
|
1189
|
-
...
|
|
1190
|
-
ref:
|
|
1190
|
+
...u,
|
|
1191
|
+
ref: f,
|
|
1191
1192
|
onFocus: () => {
|
|
1192
|
-
if (h("end"),
|
|
1193
|
-
|
|
1194
|
-
const
|
|
1195
|
-
!(
|
|
1193
|
+
if (h("end"), C(!Y), c.current) {
|
|
1194
|
+
c.current.updateValue();
|
|
1195
|
+
const m = c.current.value || "";
|
|
1196
|
+
!(c.current.unmaskedValue || "") && !m.replace(/[^0-9]/g, "") && (c.current.value = "", c.current.updateValue());
|
|
1196
1197
|
}
|
|
1197
1198
|
},
|
|
1198
1199
|
onBlur: () => {
|
|
1199
|
-
|
|
1200
|
+
Z();
|
|
1200
1201
|
},
|
|
1201
|
-
onKeyDown: (
|
|
1202
|
-
if (
|
|
1203
|
-
const
|
|
1204
|
-
if (
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1208
|
-
i.current?.focus(), h("start"),
|
|
1202
|
+
onKeyDown: (m) => {
|
|
1203
|
+
if (m.key === "Backspace") {
|
|
1204
|
+
const F = c.current?.value || "", V = c.current?.unmaskedValue || "";
|
|
1205
|
+
if (F === "" || V === "" || F.replace(/[^0-9]/g, "").length <= 1) {
|
|
1206
|
+
m.preventDefault();
|
|
1207
|
+
const w = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
1208
|
+
g.setFieldValue(w, void 0), b([k[0], null]), c.current && (c.current.value = "", c.current.updateValue()), setTimeout(() => {
|
|
1209
|
+
i.current?.focus(), h("start"), C(!0);
|
|
1209
1210
|
}, 0);
|
|
1210
1211
|
return;
|
|
1211
1212
|
}
|
|
1212
|
-
h("end"),
|
|
1213
|
+
h("end"), C(!0);
|
|
1213
1214
|
}
|
|
1214
|
-
if (
|
|
1215
|
-
if (
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1215
|
+
if (m.key === "Tab" && C(!1), m.key === "Enter")
|
|
1216
|
+
if (Y && E === "end") {
|
|
1217
|
+
const F = c.current?.value || "";
|
|
1218
|
+
F.length === n.length ? N(F, n, !0).isValid() ? (C(!1), p(!1)) : l?.allowEmpty ? p(!1) : p(!0) : p(!1);
|
|
1218
1219
|
} else
|
|
1219
|
-
h("end"),
|
|
1220
|
+
h("end"), C(!0);
|
|
1220
1221
|
},
|
|
1221
1222
|
style: {
|
|
1222
1223
|
flex: 1
|
|
1223
1224
|
},
|
|
1224
1225
|
allowClear: !0,
|
|
1225
1226
|
onClear: () => {
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1228
|
-
i.current?.focus(), h("start"),
|
|
1227
|
+
const m = Array.isArray(a) ? [...a, 1] : [a, 1];
|
|
1228
|
+
g.setFieldValue(m, void 0), b([k[0], null]), c.current && (c.current.value = "", c.current.updateValue()), setTimeout(() => {
|
|
1229
|
+
i.current?.focus(), h("start"), C(!0);
|
|
1229
1230
|
}, 0);
|
|
1230
1231
|
},
|
|
1231
|
-
placeholder:
|
|
1232
|
-
suffix: /* @__PURE__ */
|
|
1232
|
+
placeholder: o.replace(/0/g, "_"),
|
|
1233
|
+
suffix: /* @__PURE__ */ t(me, { style: { color: "#d9d9d9" } }),
|
|
1233
1234
|
autoComplete: "off"
|
|
1234
1235
|
}
|
|
1235
1236
|
)
|
|
@@ -1238,23 +1239,23 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1238
1239
|
]
|
|
1239
1240
|
}
|
|
1240
1241
|
),
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
|
|
1242
|
+
/* @__PURE__ */ t(
|
|
1243
|
+
St,
|
|
1243
1244
|
{
|
|
1244
|
-
...
|
|
1245
|
-
open:
|
|
1245
|
+
...l,
|
|
1246
|
+
open: Y,
|
|
1246
1247
|
picker: e,
|
|
1247
1248
|
format: {
|
|
1248
|
-
format:
|
|
1249
|
+
format: n,
|
|
1249
1250
|
type: "mask"
|
|
1250
1251
|
},
|
|
1251
1252
|
showNow: !0,
|
|
1252
|
-
value:
|
|
1253
|
-
onChange:
|
|
1254
|
-
onOpenChange: (
|
|
1255
|
-
|
|
1253
|
+
value: k,
|
|
1254
|
+
onChange: re,
|
|
1255
|
+
onOpenChange: (m) => {
|
|
1256
|
+
C(m), m || Z(!1);
|
|
1256
1257
|
},
|
|
1257
|
-
renderExtraFooter: () =>
|
|
1258
|
+
renderExtraFooter: () => O ? /* @__PURE__ */ T(
|
|
1258
1259
|
"div",
|
|
1259
1260
|
{
|
|
1260
1261
|
style: {
|
|
@@ -1268,12 +1269,12 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1268
1269
|
backgroundColor: "#fffbe6"
|
|
1269
1270
|
},
|
|
1270
1271
|
children: [
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ t(Ie, {}),
|
|
1273
|
+
/* @__PURE__ */ t("span", { children: "유효하지 않은 날짜입니다" })
|
|
1273
1274
|
]
|
|
1274
1275
|
}
|
|
1275
1276
|
) : null,
|
|
1276
|
-
getPopupContainer: (
|
|
1277
|
+
getPopupContainer: (m) => m.parentElement,
|
|
1277
1278
|
style: {
|
|
1278
1279
|
position: "absolute",
|
|
1279
1280
|
top: 0,
|
|
@@ -1289,46 +1290,46 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1289
1290
|
)
|
|
1290
1291
|
}
|
|
1291
1292
|
);
|
|
1292
|
-
}, { Option:
|
|
1293
|
-
const [
|
|
1293
|
+
}, { Option: we } = he, tn = ({ itemProps: e, inputProps: r }) => {
|
|
1294
|
+
const [u, l] = z([]);
|
|
1294
1295
|
return G(() => {
|
|
1295
|
-
|
|
1296
|
+
r?.addField === "ALL" ? l([
|
|
1296
1297
|
{ label: "전체", value: "" },
|
|
1297
|
-
...
|
|
1298
|
-
]) :
|
|
1299
|
-
}, [
|
|
1300
|
-
|
|
1298
|
+
...r?.list || []
|
|
1299
|
+
]) : r?.addField === "NULL" ? l([{ label: "", value: "" }, ...r?.list || []]) : l(r?.list || []);
|
|
1300
|
+
}, [r?.list]), /* @__PURE__ */ t(
|
|
1301
|
+
R,
|
|
1301
1302
|
{
|
|
1302
1303
|
...e,
|
|
1303
|
-
getValueProps: (
|
|
1304
|
-
value:
|
|
1304
|
+
getValueProps: (n) => n ? {
|
|
1305
|
+
value: n && n.indexOf(",") > 0 ? n.split(",") : [n]
|
|
1305
1306
|
} : {
|
|
1306
1307
|
value: []
|
|
1307
1308
|
},
|
|
1308
|
-
normalize: (
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1310
|
-
const { value:
|
|
1311
|
-
return
|
|
1309
|
+
normalize: (n) => n != null && n != null && n.length > 0 ? n.toString() : "",
|
|
1310
|
+
children: /* @__PURE__ */ t(he, { ...r, mode: "multiple", children: u.map((n) => {
|
|
1311
|
+
const { value: o, label: d } = n;
|
|
1312
|
+
return r?.printCode ? /* @__PURE__ */ t(we, { value: o, label: d, children: /* @__PURE__ */ t(j, { children: `[${o}] ${d}` }) }, o) : /* @__PURE__ */ t(we, { value: o, label: d, children: /* @__PURE__ */ t(j, { children: `${d}` }) }, o);
|
|
1312
1313
|
}) })
|
|
1313
1314
|
}
|
|
1314
1315
|
);
|
|
1315
|
-
},
|
|
1316
|
-
const
|
|
1317
|
-
let
|
|
1318
|
-
return
|
|
1319
|
-
},
|
|
1320
|
-
let
|
|
1321
|
-
return
|
|
1316
|
+
}, nn = ({ itemProps: e, inputProps: r }) => {
|
|
1317
|
+
const u = (n) => {
|
|
1318
|
+
let o = n.toString().split(".");
|
|
1319
|
+
return r?.decimalPoint != null && o[1] != null && r?.decimalPoint > 0 ? o[1].length > r?.decimalPoint ? o[1] = "." + o[1].substring(0, r?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + o[1];
|
|
1320
|
+
}, l = (n) => {
|
|
1321
|
+
let o = n.toString().split(".");
|
|
1322
|
+
return r?.decimalPoint != null && o[1] != null && r?.decimalPoint > 0 ? o[1].length > r?.decimalPoint ? o[1] = "." + o[1].substring(0, r?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\$\s?|(,*)/g, "") + o[1];
|
|
1322
1323
|
};
|
|
1323
|
-
return /* @__PURE__ */
|
|
1324
|
-
|
|
1324
|
+
return /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(
|
|
1325
|
+
Pe,
|
|
1325
1326
|
{
|
|
1326
|
-
...
|
|
1327
|
-
formatter: (
|
|
1328
|
-
parser: (
|
|
1327
|
+
...r,
|
|
1328
|
+
formatter: (n) => u(n),
|
|
1329
|
+
parser: (n) => l(n)
|
|
1329
1330
|
}
|
|
1330
1331
|
) });
|
|
1331
|
-
},
|
|
1332
|
+
}, rn = ({ itemProps: e, inputProps: r }) => /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t($e.Group, { ...r }) }), { RangePicker: Et } = ce, Ye = {
|
|
1332
1333
|
year: { displayFormat: "YYYY", outputFormat: "YYYY" },
|
|
1333
1334
|
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
1334
1335
|
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
|
|
@@ -1337,83 +1338,83 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1337
1338
|
displayFormat: "YYYY-MM-DD HH:mm",
|
|
1338
1339
|
outputFormat: "YYYYMMDDHHmm"
|
|
1339
1340
|
}
|
|
1340
|
-
},
|
|
1341
|
+
}, on = ({
|
|
1341
1342
|
itemProps: e,
|
|
1342
|
-
inputProps:
|
|
1343
|
-
type:
|
|
1344
|
-
minDate:
|
|
1345
|
-
maxDate:
|
|
1346
|
-
returnType:
|
|
1343
|
+
inputProps: r,
|
|
1344
|
+
type: u = "date",
|
|
1345
|
+
minDate: l,
|
|
1346
|
+
maxDate: n,
|
|
1347
|
+
returnType: o = "string"
|
|
1347
1348
|
}) => {
|
|
1348
|
-
const { displayFormat:
|
|
1349
|
-
() =>
|
|
1350
|
-
[
|
|
1351
|
-
),
|
|
1352
|
-
() => Object.values(
|
|
1353
|
-
if (
|
|
1354
|
-
if (
|
|
1355
|
-
if (
|
|
1349
|
+
const { displayFormat: d, outputFormat: i } = q(
|
|
1350
|
+
() => Ye[u],
|
|
1351
|
+
[u]
|
|
1352
|
+
), f = q(
|
|
1353
|
+
() => Object.values(Ye).map((s) => s.outputFormat).sort((s, c) => {
|
|
1354
|
+
if (s.length === c.length) {
|
|
1355
|
+
if (s === i) return -1;
|
|
1356
|
+
if (c === i) return 1;
|
|
1356
1357
|
}
|
|
1357
|
-
return
|
|
1358
|
+
return c.length - s.length;
|
|
1358
1359
|
}),
|
|
1359
1360
|
[i]
|
|
1360
1361
|
// type(outputFormat)이 바뀔 때마다 재정렬
|
|
1361
1362
|
);
|
|
1362
|
-
return /* @__PURE__ */
|
|
1363
|
-
|
|
1363
|
+
return /* @__PURE__ */ t(
|
|
1364
|
+
R,
|
|
1364
1365
|
{
|
|
1365
1366
|
...e,
|
|
1366
|
-
getValueProps: (
|
|
1367
|
+
getValueProps: (s) => ({
|
|
1367
1368
|
// 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환
|
|
1368
|
-
value:
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
value: s && s.length > 0 ? [
|
|
1370
|
+
s[0] ? N.isDayjs(s[0]) ? s[0] : N(s[0], f) : null,
|
|
1371
|
+
s[1] ? N.isDayjs(s[1]) ? s[1] : N(s[1], f) : null
|
|
1371
1372
|
] : null
|
|
1372
1373
|
}),
|
|
1373
|
-
normalize: (
|
|
1374
|
-
|
|
1375
|
-
|
|
1374
|
+
normalize: (s) => s ? o === "dayjs" ? [s[0] ?? void 0, s[1] ?? void 0] : [
|
|
1375
|
+
s[0] ? s[0].format(i) : void 0,
|
|
1376
|
+
s[1] ? s[1].format(i) : void 0
|
|
1376
1377
|
] : [void 0, void 0],
|
|
1377
|
-
children: /* @__PURE__ */
|
|
1378
|
-
|
|
1378
|
+
children: /* @__PURE__ */ t(
|
|
1379
|
+
Et,
|
|
1379
1380
|
{
|
|
1380
|
-
...
|
|
1381
|
+
...r,
|
|
1381
1382
|
order: !0,
|
|
1382
|
-
minDate:
|
|
1383
|
-
maxDate:
|
|
1384
|
-
picker:
|
|
1385
|
-
showTime:
|
|
1386
|
-
format:
|
|
1383
|
+
minDate: l ? N(l, f) : void 0,
|
|
1384
|
+
maxDate: n ? N(n, f) : void 0,
|
|
1385
|
+
picker: u === "datetime" ? "date" : u,
|
|
1386
|
+
showTime: r?.showTime ?? (u === "datetime" || u === "time"),
|
|
1387
|
+
format: d
|
|
1387
1388
|
}
|
|
1388
1389
|
)
|
|
1389
1390
|
}
|
|
1390
1391
|
);
|
|
1391
|
-
},
|
|
1392
|
-
const
|
|
1393
|
-
callback(
|
|
1394
|
-
Array.isArray(
|
|
1392
|
+
}, be = X.Search, an = (e) => {
|
|
1393
|
+
const r = D.useFormInstance(), { openPopup: u } = Ke(), l = e.itemProps?.name || [], n = e.popupConfig || {
|
|
1394
|
+
callback(d) {
|
|
1395
|
+
Array.isArray(l) && l.length > 1 ? (r.setFieldValue(l[0], d.code), r.setFieldValue(l[1], d.name)) : r.setFieldValue(l, d.code);
|
|
1395
1396
|
}
|
|
1396
|
-
},
|
|
1397
|
+
}, o = {
|
|
1397
1398
|
...e,
|
|
1398
1399
|
placeholder: typeof e.placeholder == "string" ? e.placeholder : e.placeholder?.[0] || "",
|
|
1399
|
-
onChange: (
|
|
1400
|
-
Array.isArray(
|
|
1400
|
+
onChange: (d) => {
|
|
1401
|
+
Array.isArray(l) && l.length > 1 && r.setFieldValue(l[0], ""), e.onChange?.(d);
|
|
1401
1402
|
},
|
|
1402
|
-
onSearch: (
|
|
1403
|
-
e.popuCd ?
|
|
1403
|
+
onSearch: (d) => {
|
|
1404
|
+
e.popuCd ? u(e.popuCd, e.popupParams, n) : e.onSearch?.(d);
|
|
1404
1405
|
}
|
|
1405
1406
|
};
|
|
1406
|
-
return Array.isArray(
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
|
|
1407
|
+
return Array.isArray(l) && l.length > 1 ? /* @__PURE__ */ t(R, { ...e.itemProps, name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
|
|
1408
|
+
/* @__PURE__ */ t(
|
|
1409
|
+
D.Item,
|
|
1409
1410
|
{
|
|
1410
|
-
name:
|
|
1411
|
+
name: l[0],
|
|
1411
1412
|
rules: e.itemProps?.rules,
|
|
1412
1413
|
style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
|
|
1413
1414
|
validateStatus: "",
|
|
1414
1415
|
help: "",
|
|
1415
|
-
children: /* @__PURE__ */
|
|
1416
|
-
|
|
1416
|
+
children: /* @__PURE__ */ t(
|
|
1417
|
+
X,
|
|
1417
1418
|
{
|
|
1418
1419
|
style: { color: "#999", backgroundColor: "#f5f5f5" },
|
|
1419
1420
|
placeholder: e.placeholder?.[0] || "",
|
|
@@ -1422,42 +1423,42 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1422
1423
|
)
|
|
1423
1424
|
}
|
|
1424
1425
|
),
|
|
1425
|
-
/* @__PURE__ */
|
|
1426
|
-
|
|
1426
|
+
/* @__PURE__ */ t(D.Item, { name: l[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ t(
|
|
1427
|
+
be,
|
|
1427
1428
|
{
|
|
1428
1429
|
readOnly: e.readOnly,
|
|
1429
|
-
enterButton: /* @__PURE__ */
|
|
1430
|
-
|
|
1430
|
+
enterButton: /* @__PURE__ */ t(
|
|
1431
|
+
J,
|
|
1431
1432
|
{
|
|
1432
|
-
icon: /* @__PURE__ */
|
|
1433
|
+
icon: /* @__PURE__ */ t(ge, {}),
|
|
1433
1434
|
disabled: e.readOnly
|
|
1434
1435
|
}
|
|
1435
1436
|
),
|
|
1436
|
-
...
|
|
1437
|
+
...o
|
|
1437
1438
|
}
|
|
1438
1439
|
) })
|
|
1439
|
-
] }) }) : /* @__PURE__ */
|
|
1440
|
-
},
|
|
1440
|
+
] }) }) : /* @__PURE__ */ t(R, { ...e.itemProps, children: /* @__PURE__ */ t(be, { ...o }) });
|
|
1441
|
+
}, ln = ({
|
|
1441
1442
|
itemProps: e,
|
|
1442
|
-
selectProps:
|
|
1443
|
+
selectProps: r = {
|
|
1443
1444
|
options: [],
|
|
1444
1445
|
allowClear: !0
|
|
1445
1446
|
}
|
|
1446
1447
|
}) => {
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
},
|
|
1450
|
-
...
|
|
1451
|
-
allowClear:
|
|
1452
|
-
options:
|
|
1453
|
-
onChange:
|
|
1454
|
-
variant:
|
|
1455
|
-
}, i = /* @__PURE__ */
|
|
1456
|
-
return
|
|
1448
|
+
const u = D.useFormInstance(), l = !!u, n = q(() => r?.addField === "ALL" ? [{ label: "전체", value: "" }, ...r?.options || []] : r?.addField === "NULL" ? [{ label: "", value: "" }, ...r?.options || []] : r?.options || [], [r.options, r.addField]), o = (f) => {
|
|
1449
|
+
r.onChange?.(f);
|
|
1450
|
+
}, d = {
|
|
1451
|
+
...r,
|
|
1452
|
+
allowClear: r.allowClear ?? !0,
|
|
1453
|
+
options: n,
|
|
1454
|
+
onChange: o,
|
|
1455
|
+
variant: r.variant
|
|
1456
|
+
}, i = /* @__PURE__ */ t(he, { ...d, disabled: r.disabled });
|
|
1457
|
+
return r.copyable && !l && console.warn(
|
|
1457
1458
|
"BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
|
|
1458
|
-
),
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
|
|
1459
|
+
), r.copyable ? /* @__PURE__ */ t(R, { ...e, name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
|
|
1460
|
+
/* @__PURE__ */ t(
|
|
1461
|
+
D.Item,
|
|
1461
1462
|
{
|
|
1462
1463
|
name: e?.name,
|
|
1463
1464
|
rules: e?.rules,
|
|
@@ -1467,11 +1468,11 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1467
1468
|
children: i
|
|
1468
1469
|
}
|
|
1469
1470
|
),
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
|
|
1471
|
+
/* @__PURE__ */ t(
|
|
1472
|
+
fe.Paragraph,
|
|
1472
1473
|
{
|
|
1473
1474
|
copyable: {
|
|
1474
|
-
text:
|
|
1475
|
+
text: l && u?.getFieldValue(e?.name)?.toString() || "",
|
|
1475
1476
|
tooltips: ["코드복사", "코드복사됨"]
|
|
1476
1477
|
},
|
|
1477
1478
|
style: {
|
|
@@ -1488,491 +1489,644 @@ const Et = ({ itemProps: e, inputProps: t }) => /* @__PURE__ */ a(T, { ...e, chi
|
|
|
1488
1489
|
}
|
|
1489
1490
|
}
|
|
1490
1491
|
)
|
|
1491
|
-
] }) }) : /* @__PURE__ */
|
|
1492
|
-
},
|
|
1492
|
+
] }) }) : /* @__PURE__ */ t(R, { ...e, children: i });
|
|
1493
|
+
}, sn = ({
|
|
1493
1494
|
itemProps: e,
|
|
1494
|
-
inputProps:
|
|
1495
|
+
inputProps: r = {
|
|
1495
1496
|
format: "YN"
|
|
1496
1497
|
}
|
|
1497
1498
|
}) => {
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1499
|
+
const u = D.useFormInstance(), l = (n, o) => {
|
|
1500
|
+
r.format === "boolean" ? u.setFieldValue(e?.name, n) : u.setFieldValue(e?.name, n ? "Y" : "N"), r.onChange && r.onChange(n, o);
|
|
1500
1501
|
};
|
|
1501
|
-
return /* @__PURE__ */
|
|
1502
|
-
|
|
1502
|
+
return /* @__PURE__ */ t(
|
|
1503
|
+
R,
|
|
1503
1504
|
{
|
|
1504
1505
|
...e,
|
|
1505
|
-
getValueProps: (
|
|
1506
|
-
normalize: (
|
|
1507
|
-
children: /* @__PURE__ */
|
|
1506
|
+
getValueProps: (n) => ({ checked: r.format === "boolean" ? !!n : n === "Y" }),
|
|
1507
|
+
normalize: (n) => typeof n == "boolean" ? r.format === "boolean" ? n : n ? "Y" : "N" : r.format === "boolean" ? !!n : n ? "Y" : "N",
|
|
1508
|
+
children: /* @__PURE__ */ t(He, { ...r, onChange: (n, o) => l(n, o) })
|
|
1508
1509
|
}
|
|
1509
1510
|
);
|
|
1510
|
-
}, { TextArea:
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
], Ye = {
|
|
1529
|
-
FILE: "file"
|
|
1530
|
-
}, gt = ({
|
|
1531
|
-
originNode: e,
|
|
1532
|
-
file: t,
|
|
1533
|
-
fileList: f,
|
|
1534
|
-
moveFile: s,
|
|
1535
|
-
onDrop: r
|
|
1536
|
-
}) => {
|
|
1537
|
-
const l = K(null), [{ handlerId: g }, i] = et({
|
|
1538
|
-
accept: Ye.FILE,
|
|
1539
|
-
collect: (Y) => ({
|
|
1540
|
-
handlerId: Y.getHandlerId()
|
|
1541
|
-
}),
|
|
1542
|
-
hover(Y, F) {
|
|
1543
|
-
if (!l.current)
|
|
1544
|
-
return;
|
|
1545
|
-
const v = Y.uid, V = t.uid;
|
|
1546
|
-
if (v === V)
|
|
1547
|
-
return;
|
|
1548
|
-
const R = ne(f, { uid: V }), N = ne(f, { uid: v });
|
|
1549
|
-
if (N === -1 || R === -1)
|
|
1550
|
-
return;
|
|
1551
|
-
const M = l.current.getBoundingClientRect(), h = F.getClientOffset();
|
|
1552
|
-
if (!h)
|
|
1553
|
-
return;
|
|
1554
|
-
const L = (M.bottom - M.top) / 2, x = h.y - M.top;
|
|
1555
|
-
N < R && x < L || N > R && x > L || s(v, V);
|
|
1511
|
+
}, { TextArea: Dt } = X, cn = ({ itemProps: e, inputProps: r }) => /* @__PURE__ */ t(R, { ...e, children: /* @__PURE__ */ t(Dt, { ...r }) }), It = X.Search, dn = (e) => {
|
|
1512
|
+
const r = D.useFormInstance(), { openCorePopup: u } = Le(), l = {
|
|
1513
|
+
value: "deptNm",
|
|
1514
|
+
fieldName: "deptNm",
|
|
1515
|
+
placeholder: "부서명"
|
|
1516
|
+
}, n = {
|
|
1517
|
+
value: "empNm",
|
|
1518
|
+
fieldName: "empNm",
|
|
1519
|
+
placeholder: "사원명 입력"
|
|
1520
|
+
}, o = e.field1 || l, d = e.field2 || n, i = Q(
|
|
1521
|
+
(c) => {
|
|
1522
|
+
r.setFieldValue(e.employeeFieldName || "employee", c), r.setFieldValue(e.empNoFieldName || "empNo", c.empNo ?? ""), r.setFieldValue(
|
|
1523
|
+
o.fieldName,
|
|
1524
|
+
c[o.value || "deptNm"] ?? ""
|
|
1525
|
+
), r.setFieldValue(
|
|
1526
|
+
d.fieldName,
|
|
1527
|
+
c[d.value || "empNm"] ?? ""
|
|
1528
|
+
), e.onFinish?.();
|
|
1556
1529
|
},
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
fileGrpKey: d,
|
|
1648
|
-
fileKey: H.fileKey,
|
|
1649
|
-
uid: H.fileKey,
|
|
1650
|
-
status: "done",
|
|
1651
|
-
url: `/api/download?filePath=${H.filePath}&logicalName=${H.lgclFileNm}`
|
|
1652
|
-
};
|
|
1530
|
+
[r, o, d, e.employeeFieldName]
|
|
1531
|
+
), f = Q(
|
|
1532
|
+
(c) => {
|
|
1533
|
+
u("CORE_ORGANIZATION_01", {
|
|
1534
|
+
onSelect: (y) => {
|
|
1535
|
+
i(y);
|
|
1536
|
+
},
|
|
1537
|
+
defaultParams: {
|
|
1538
|
+
keyword: c
|
|
1539
|
+
}
|
|
1540
|
+
});
|
|
1541
|
+
},
|
|
1542
|
+
[i, u]
|
|
1543
|
+
), s = Q(
|
|
1544
|
+
async (c) => {
|
|
1545
|
+
const y = c?.trim();
|
|
1546
|
+
if (y)
|
|
1547
|
+
try {
|
|
1548
|
+
const g = await te(
|
|
1549
|
+
"SCMUTIL00101",
|
|
1550
|
+
{
|
|
1551
|
+
keyword: y
|
|
1552
|
+
},
|
|
1553
|
+
{ showLoading: !1 }
|
|
1554
|
+
), Y = g?.empList || [];
|
|
1555
|
+
if (g?.empCnt === 0) {
|
|
1556
|
+
x.warning(
|
|
1557
|
+
"일치하는 사원을 찾을 수 없어 팝업을 열립니다. 사원을 선택해주세요."
|
|
1558
|
+
), f();
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
if (g?.empCnt > 1) {
|
|
1562
|
+
x.info(
|
|
1563
|
+
"여러 건이 검색되어 팝업이 열립니다. 사원을 선택해주세요."
|
|
1564
|
+
), f(y);
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
const C = Y[0];
|
|
1568
|
+
i(C);
|
|
1569
|
+
} catch (g) {
|
|
1570
|
+
console.error("사원 검색 서비스 실패:", g), x.error("사원 검색 중 오류가 발생했습니다.");
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
[i, f]
|
|
1574
|
+
);
|
|
1575
|
+
return /* @__PURE__ */ t(R, { label: e.label || "사원", name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
|
|
1576
|
+
/* @__PURE__ */ t(
|
|
1577
|
+
D.Item,
|
|
1578
|
+
{
|
|
1579
|
+
name: o.fieldName,
|
|
1580
|
+
style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
|
|
1581
|
+
validateStatus: "",
|
|
1582
|
+
help: "",
|
|
1583
|
+
children: /* @__PURE__ */ t(
|
|
1584
|
+
X,
|
|
1585
|
+
{
|
|
1586
|
+
style: { color: "#999", backgroundColor: "#f5f5f5" },
|
|
1587
|
+
placeholder: o.placeholder,
|
|
1588
|
+
readOnly: !0
|
|
1589
|
+
}
|
|
1590
|
+
)
|
|
1591
|
+
}
|
|
1592
|
+
),
|
|
1593
|
+
/* @__PURE__ */ t(
|
|
1594
|
+
D.Item,
|
|
1595
|
+
{
|
|
1596
|
+
name: e.employeeFieldName || "employee",
|
|
1597
|
+
hidden: !0
|
|
1598
|
+
}
|
|
1599
|
+
),
|
|
1600
|
+
/* @__PURE__ */ t(D.Item, { name: e.empNoFieldName || "empNo", hidden: !0 }),
|
|
1601
|
+
/* @__PURE__ */ t(
|
|
1602
|
+
D.Item,
|
|
1603
|
+
{
|
|
1604
|
+
name: d.fieldName,
|
|
1605
|
+
style: { width: "60%", marginBottom: 0 },
|
|
1606
|
+
children: /* @__PURE__ */ t(
|
|
1607
|
+
It,
|
|
1608
|
+
{
|
|
1609
|
+
allowClear: !0,
|
|
1610
|
+
readOnly: e.readOnly,
|
|
1611
|
+
placeholder: d.placeholder,
|
|
1612
|
+
enterButton: /* @__PURE__ */ t(
|
|
1613
|
+
J,
|
|
1614
|
+
{
|
|
1615
|
+
icon: /* @__PURE__ */ t(ge, {}),
|
|
1616
|
+
disabled: e.readOnly,
|
|
1617
|
+
onClick: () => {
|
|
1618
|
+
f();
|
|
1619
|
+
}
|
|
1653
1620
|
}
|
|
1654
|
-
|
|
1655
|
-
|
|
1621
|
+
),
|
|
1622
|
+
onSearch: s,
|
|
1623
|
+
onChange: (c) => {
|
|
1624
|
+
r.setFieldValue(o.fieldName, ""), r.setFieldValue(e.employeeFieldName || "employee", null), r.setFieldValue(e.empNoFieldName || "empNo", "");
|
|
1625
|
+
}
|
|
1656
1626
|
}
|
|
1657
|
-
|
|
1658
|
-
console.error("업로드 후처리 서비스 호출 실패:", p), z.error("파일 후처리 중 오류가 발생했습니다.");
|
|
1659
|
-
const d = new Set(n.map((b) => b.tempId)), A = e?.name;
|
|
1660
|
-
((b) => {
|
|
1661
|
-
if (I) {
|
|
1662
|
-
const S = L?.getFieldValue(A) || [], D = b(S);
|
|
1663
|
-
L?.setFieldValue(A, D);
|
|
1664
|
-
} else
|
|
1665
|
-
N((S) => b(S));
|
|
1666
|
-
})(
|
|
1667
|
-
(b) => b.map(
|
|
1668
|
-
(S) => d.has(S.uid) ? { ...S, status: "error", error: "후처리 실패" } : S
|
|
1669
|
-
)
|
|
1670
|
-
);
|
|
1671
|
-
});
|
|
1627
|
+
)
|
|
1672
1628
|
}
|
|
1673
|
-
|
|
1674
|
-
)
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1629
|
+
)
|
|
1630
|
+
] }) });
|
|
1631
|
+
}, { Text: Se } = fe, v = {
|
|
1632
|
+
IDLE: "idle",
|
|
1633
|
+
UPLOADING: "uploading",
|
|
1634
|
+
UPLOADED: "uploaded",
|
|
1635
|
+
EXECUTING: "executing",
|
|
1636
|
+
COMPLETED: "completed",
|
|
1637
|
+
FAILED: "failed"
|
|
1638
|
+
}, Nt = {
|
|
1639
|
+
[v.IDLE]: "엑셀 파일을 선택해 업로드 해 주세요. (xlsx, xls, csv만 가능)",
|
|
1640
|
+
[v.UPLOADING]: "엑셀 업로드 중입니다. 잠시만 기다려 주세요.",
|
|
1641
|
+
[v.UPLOADED]: "엑셀 업로드가 완료되었습니다.",
|
|
1642
|
+
[v.EXECUTING]: "배치 작업 실행 중입니다. 잠시만 기다려 주세요.",
|
|
1643
|
+
[v.COMPLETED]: "배치 작업이 완료되었습니다.",
|
|
1644
|
+
[v.FAILED]: "배치 작업이 실패했습니다."
|
|
1645
|
+
}, un = ({
|
|
1646
|
+
label: e = "엑셀 업로드",
|
|
1647
|
+
jobId: r,
|
|
1648
|
+
extraParams: u,
|
|
1649
|
+
onFinish: l,
|
|
1650
|
+
disabled: n = !1
|
|
1651
|
+
}) => {
|
|
1652
|
+
const [o, d] = z(v.IDLE), [i, f] = z(null), [s, c] = z(null), y = Q(async () => {
|
|
1653
|
+
if (!(!i || !s)) {
|
|
1654
|
+
if (!r) {
|
|
1655
|
+
x.warning("실행 job id(jobId)가 설정되어 있지 않습니다.");
|
|
1656
|
+
return;
|
|
1657
|
+
}
|
|
1658
|
+
try {
|
|
1659
|
+
if (!s.filePath) {
|
|
1660
|
+
x.error("파일 URL 정보가 없습니다.");
|
|
1661
|
+
return;
|
|
1662
|
+
}
|
|
1663
|
+
d(v.EXECUTING);
|
|
1664
|
+
const p = {
|
|
1665
|
+
crprCd: Ne(),
|
|
1666
|
+
sysCd: window.__SYS_CD__ || "",
|
|
1667
|
+
fileKey: s.fileKey,
|
|
1668
|
+
filePath: s.filePath,
|
|
1669
|
+
jobId: r
|
|
1670
|
+
}, E = await te("SCMUTIL00301", {
|
|
1671
|
+
...p,
|
|
1672
|
+
...u
|
|
1673
|
+
});
|
|
1674
|
+
E?.success ? (g(), x.success(
|
|
1675
|
+
E?.message || "배치 실행 요청이 성공적으로 완료되었습니다."
|
|
1676
|
+
)) : (d(v.FAILED), x.error(E?.message || "배치 실행 요청에 실패했습니다."));
|
|
1677
|
+
} catch (p) {
|
|
1678
|
+
console.error("배치 실행 요청에 실패했습니다.", p), x.error("배치 실행 요청에 실패했습니다."), d(v.FAILED);
|
|
1696
1679
|
}
|
|
1697
|
-
}).catch((n) => {
|
|
1698
|
-
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", n), z.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
1699
|
-
});
|
|
1700
|
-
}, [t, s]);
|
|
1701
|
-
const o = (n, m) => {
|
|
1702
|
-
const p = e?.name, d = I ? L?.getFieldValue(p) || [] : R, A = ne(d, { uid: n }), k = ne(d, { uid: m });
|
|
1703
|
-
if (A < 0 || k < 0) return;
|
|
1704
|
-
const b = [...d], [S] = b.splice(A, 1);
|
|
1705
|
-
b.splice(k, 0, S), I ? L?.setFieldValue(p, b) : N(b);
|
|
1706
|
-
}, C = () => {
|
|
1707
|
-
if (!v && t && g) {
|
|
1708
|
-
const n = e?.name, p = (I ? L?.getFieldValue(n) || [] : R).map((d) => d.uid);
|
|
1709
|
-
J(g, {
|
|
1710
|
-
crprCd: te()?.crprCd,
|
|
1711
|
-
sysCd: __SYS_CD__,
|
|
1712
|
-
fileGrpKey: t,
|
|
1713
|
-
reorderedFileKeys: p
|
|
1714
|
-
}).then(() => {
|
|
1715
|
-
z.success("파일 순서가 성공적으로 저장되었습니다.");
|
|
1716
|
-
}).catch((d) => {
|
|
1717
|
-
console.error("파일 순서 저장 서비스 호출 실패:", d), z.error("파일 순서 저장 중 오류가 발생했습니다.");
|
|
1718
|
-
});
|
|
1719
|
-
}
|
|
1720
|
-
}, w = (n) => {
|
|
1721
|
-
const m = e?.name, p = I ? L?.getFieldValue(m) || [] : R;
|
|
1722
|
-
if (!u && p.length > 0)
|
|
1723
|
-
return z.error("하나의 파일만 업로드할 수 있습니다."), Z.LIST_IGNORE;
|
|
1724
|
-
if (i && i.length > 0) {
|
|
1725
|
-
const d = `.${n.name.split(".").pop()?.toLowerCase()}`;
|
|
1726
|
-
if (!i.includes(d))
|
|
1727
|
-
return z.error(
|
|
1728
|
-
`${n.name} 파일은 허용되지 않는 확장자입니다. (${i.join(
|
|
1729
|
-
", "
|
|
1730
|
-
)})`
|
|
1731
|
-
), Z.LIST_IGNORE;
|
|
1732
1680
|
}
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1681
|
+
}, [i, s, r, u]), g = Q(async () => {
|
|
1682
|
+
setTimeout(async () => {
|
|
1683
|
+
try {
|
|
1684
|
+
const p = await te("SCMUTIL00302", {
|
|
1685
|
+
jobId: r
|
|
1686
|
+
});
|
|
1687
|
+
if (p?.status === "COMPLETED") {
|
|
1688
|
+
d(v.COMPLETED), x.success("배치 작업이 완료되었습니다."), l?.();
|
|
1689
|
+
return;
|
|
1690
|
+
} else if (p?.status === "FAILED") {
|
|
1691
|
+
d(v.FAILED), x.error("배치 작업이 실패했습니다.");
|
|
1692
|
+
return;
|
|
1693
|
+
} else {
|
|
1694
|
+
setTimeout(g, 1e3);
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
} catch (p) {
|
|
1698
|
+
console.error("배치 작업 상태 확인 오류:", p), d(v.FAILED), x.error("배치 작업 상태 확인 중 오류가 발생했습니다.");
|
|
1699
|
+
}
|
|
1700
|
+
}, 3e3);
|
|
1701
|
+
}, [r, l]), Y = q(
|
|
1702
|
+
() => ({
|
|
1703
|
+
name: "file",
|
|
1704
|
+
accept: ".xlsx, .xls, .csv",
|
|
1705
|
+
listType: "picture",
|
|
1706
|
+
multiple: !1,
|
|
1707
|
+
action: "/api/upload",
|
|
1708
|
+
showUploadList: {
|
|
1709
|
+
showRemoveIcon: !0
|
|
1710
|
+
},
|
|
1711
|
+
beforeUpload: (p) => {
|
|
1712
|
+
const E = `.${p.name.split(".").pop()?.toLowerCase()}`;
|
|
1713
|
+
if (![".xlsx", ".xls", ".csv"].includes(E))
|
|
1714
|
+
return x.error(
|
|
1715
|
+
`${p.name} 파일은 허용되지 않는 확장자입니다. (xlsx, xls, csv만 가능)`
|
|
1716
|
+
), ee.LIST_IGNORE;
|
|
1717
|
+
},
|
|
1718
|
+
onChange: (p) => {
|
|
1719
|
+
const { status: E } = p.file;
|
|
1720
|
+
if (E === "removed") {
|
|
1721
|
+
f(null), d(v.IDLE), c(null);
|
|
1722
|
+
return;
|
|
1723
|
+
}
|
|
1724
|
+
if (f(p.file), E === "uploading") {
|
|
1725
|
+
d(v.UPLOADING);
|
|
1726
|
+
return;
|
|
1727
|
+
}
|
|
1728
|
+
if (E === "done") {
|
|
1729
|
+
if (p.file.response?.success) {
|
|
1730
|
+
d(v.UPLOADED);
|
|
1731
|
+
const h = p.file.response.uploadedFiles[0] || {};
|
|
1732
|
+
c({
|
|
1733
|
+
fileKey: h.fileKey,
|
|
1734
|
+
filePath: h.filePath,
|
|
1735
|
+
fileNameL: h.fileNameL,
|
|
1736
|
+
fileNameP: h.fileNameP,
|
|
1737
|
+
fileSize: h.fileSize,
|
|
1738
|
+
fileExt: h.fileExt
|
|
1762
1739
|
});
|
|
1763
|
-
}).catch((d) => {
|
|
1764
|
-
console.error("파일 삭제 서비스 호출에 실패했습니다.", d), z.error("파일 삭제 중 오류가 발생했습니다.");
|
|
1765
|
-
});
|
|
1766
|
-
else {
|
|
1767
|
-
if (I) {
|
|
1768
|
-
const d = e?.name;
|
|
1769
|
-
L?.setFieldValue(d, n.fileList);
|
|
1770
1740
|
} else
|
|
1771
|
-
|
|
1772
|
-
|
|
1741
|
+
d(v.IDLE), x.error(
|
|
1742
|
+
p.file.response?.message || `${p.file.name} 파일 업로드에 실패했습니다.`
|
|
1743
|
+
);
|
|
1744
|
+
return;
|
|
1773
1745
|
}
|
|
1774
|
-
|
|
1746
|
+
E === "error" && (d(v.IDLE), x.error(
|
|
1747
|
+
p.file.response?.message || `${p.file.name} 파일 업로드 중 오류가 발생했습니다.`
|
|
1748
|
+
));
|
|
1775
1749
|
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
n.file.response.message || `${n.file.name} 파일이 성공적으로 업로드되었습니다.`
|
|
1788
|
-
);
|
|
1789
|
-
} else
|
|
1790
|
-
z.error(
|
|
1791
|
-
n.file.response?.message || `${n.file.name} 파일 업로드에 실패했습니다.`
|
|
1792
|
-
);
|
|
1793
|
-
else m === "error" && z.error(
|
|
1794
|
-
n.file.response?.message || `${n.file.name} 파일 업로드 중 오류가 발생했습니다.`
|
|
1795
|
-
);
|
|
1796
|
-
},
|
|
1797
|
-
itemRender(n, m, p) {
|
|
1798
|
-
const d = Oe(n, {
|
|
1799
|
-
href: m.url || void 0,
|
|
1800
|
-
title: void 0
|
|
1801
|
-
});
|
|
1802
|
-
return /* @__PURE__ */ a(
|
|
1803
|
-
gt,
|
|
1750
|
+
}),
|
|
1751
|
+
[]
|
|
1752
|
+
), C = q(
|
|
1753
|
+
() => /* @__PURE__ */ T(j, { direction: "vertical", style: { width: 400 }, children: [
|
|
1754
|
+
/* @__PURE__ */ T(j, { children: [
|
|
1755
|
+
o === v.EXECUTING && /* @__PURE__ */ t(Ee, { size: "small" }),
|
|
1756
|
+
/* @__PURE__ */ t(Se, { type: o === v.FAILED ? "danger" : "secondary", children: Nt[o] })
|
|
1757
|
+
] }),
|
|
1758
|
+
o !== v.EXECUTING && o !== v.COMPLETED && o !== v.FAILED && /* @__PURE__ */ t(ee, { ...Y, children: !i && /* @__PURE__ */ t(oe, { icon: /* @__PURE__ */ t(ae, {}), children: "파일 선택" }) }),
|
|
1759
|
+
o === v.UPLOADED && /* @__PURE__ */ t(j, { direction: "vertical", children: /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(
|
|
1760
|
+
oe,
|
|
1804
1761
|
{
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
)
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1762
|
+
type: "primary",
|
|
1763
|
+
icon: /* @__PURE__ */ t(rt, {}),
|
|
1764
|
+
onClick: y,
|
|
1765
|
+
disabled: !i,
|
|
1766
|
+
children: "실행하기"
|
|
1767
|
+
}
|
|
1768
|
+
) }) }),
|
|
1769
|
+
(o === v.COMPLETED || o === v.FAILED) && /* @__PURE__ */ t(j, { direction: "vertical", children: /* @__PURE__ */ T(j, { children: [
|
|
1770
|
+
/* @__PURE__ */ t(oe, { icon: /* @__PURE__ */ t(ot, {}), onClick: y, children: "다시 실행하기" }),
|
|
1771
|
+
/* @__PURE__ */ t(
|
|
1772
|
+
oe,
|
|
1773
|
+
{
|
|
1774
|
+
icon: /* @__PURE__ */ t(ae, {}),
|
|
1775
|
+
onClick: () => {
|
|
1776
|
+
d(v.IDLE), f(null), c(null);
|
|
1777
|
+
},
|
|
1778
|
+
children: "다른 파일 업로드"
|
|
1779
|
+
}
|
|
1780
|
+
)
|
|
1781
|
+
] }) })
|
|
1782
|
+
] }),
|
|
1783
|
+
[o, i, y, Y]
|
|
1784
|
+
), O = /* @__PURE__ */ t(oe, { icon: /* @__PURE__ */ t(ae, {}), disabled: n, children: e });
|
|
1785
|
+
return n ? /* @__PURE__ */ t(
|
|
1786
|
+
Fe,
|
|
1819
1787
|
{
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1788
|
+
title: /* @__PURE__ */ T("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
1789
|
+
/* @__PURE__ */ t(at, { style: { color: "#faad14", fontSize: 16 } }),
|
|
1790
|
+
/* @__PURE__ */ t("span", { style: { fontWeight: 600 }, children: "'엑셀 업로드' 버튼에 대한 사용 권한이 없습니다." })
|
|
1791
|
+
] }),
|
|
1792
|
+
content: /* @__PURE__ */ t(
|
|
1793
|
+
"div",
|
|
1825
1794
|
{
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1795
|
+
style: {
|
|
1796
|
+
display: "flex",
|
|
1797
|
+
flexDirection: "column",
|
|
1798
|
+
gap: 4,
|
|
1799
|
+
paddingLeft: 24
|
|
1800
|
+
},
|
|
1801
|
+
children: /* @__PURE__ */ t("span", { style: { fontSize: 12 }, children: "관리자에게 문의하세요." })
|
|
1830
1802
|
}
|
|
1831
|
-
)
|
|
1803
|
+
),
|
|
1804
|
+
placement: "bottom",
|
|
1805
|
+
styles: { body: { backgroundColor: "#fffbe6" } },
|
|
1806
|
+
children: /* @__PURE__ */ t("span", { children: O })
|
|
1832
1807
|
}
|
|
1833
|
-
)
|
|
1834
|
-
|
|
1835
|
-
|
|
1808
|
+
) : /* @__PURE__ */ t(
|
|
1809
|
+
Fe,
|
|
1810
|
+
{
|
|
1811
|
+
content: C,
|
|
1812
|
+
title: /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", marginBottom: 0 }, children: /* @__PURE__ */ t(Se, { strong: !0, children: "엑셀 업로드" }) }),
|
|
1813
|
+
trigger: "click",
|
|
1814
|
+
placement: "bottom",
|
|
1815
|
+
children: O
|
|
1816
|
+
}
|
|
1817
|
+
);
|
|
1818
|
+
}, vt = X.Search, mn = (e) => {
|
|
1819
|
+
const r = D.useFormInstance(), { openCorePopup: u } = Le(), l = {
|
|
1836
1820
|
value: "deptNm",
|
|
1837
1821
|
fieldName: "deptNm",
|
|
1838
1822
|
placeholder: "부서명"
|
|
1839
|
-
},
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
u[l.value || "deptNm"] ?? ""
|
|
1848
|
-
), t.setFieldValue(
|
|
1849
|
-
g.fieldName,
|
|
1850
|
-
u[g.value || "empNm"] ?? ""
|
|
1823
|
+
}, n = e.field || l, o = Q(
|
|
1824
|
+
(f) => {
|
|
1825
|
+
r.setFieldValue(e.departmentFieldName || "department", f), r.setFieldValue(
|
|
1826
|
+
n.fieldName,
|
|
1827
|
+
f[n.value || "deptNm"] ?? ""
|
|
1828
|
+
), r.setFieldValue(
|
|
1829
|
+
e.deptCdFieldName || "deptCd",
|
|
1830
|
+
f.deptCd ?? ""
|
|
1851
1831
|
), e.onFinish?.();
|
|
1852
1832
|
},
|
|
1853
|
-
[
|
|
1854
|
-
),
|
|
1855
|
-
(
|
|
1856
|
-
|
|
1857
|
-
onSelect: (
|
|
1858
|
-
|
|
1833
|
+
[r, n, e.departmentFieldName, e.deptCdFieldName]
|
|
1834
|
+
), d = Q(
|
|
1835
|
+
(f) => {
|
|
1836
|
+
u("CORE_DEPARTMENT_01", {
|
|
1837
|
+
onSelect: (s) => {
|
|
1838
|
+
o(s);
|
|
1859
1839
|
},
|
|
1860
1840
|
defaultParams: {
|
|
1861
|
-
keyword:
|
|
1841
|
+
keyword: f
|
|
1862
1842
|
}
|
|
1863
1843
|
});
|
|
1864
1844
|
},
|
|
1865
|
-
[
|
|
1866
|
-
),
|
|
1867
|
-
async (
|
|
1868
|
-
const
|
|
1869
|
-
if (
|
|
1845
|
+
[o, u]
|
|
1846
|
+
), i = Q(
|
|
1847
|
+
async (f) => {
|
|
1848
|
+
const s = f?.trim();
|
|
1849
|
+
if (s)
|
|
1870
1850
|
try {
|
|
1871
|
-
const
|
|
1872
|
-
"
|
|
1851
|
+
const c = await te(
|
|
1852
|
+
"SCMUTIL00103",
|
|
1873
1853
|
{
|
|
1874
|
-
keyword:
|
|
1854
|
+
keyword: s
|
|
1875
1855
|
},
|
|
1876
1856
|
{ showLoading: !1 }
|
|
1877
|
-
),
|
|
1878
|
-
if (
|
|
1879
|
-
|
|
1880
|
-
"일치하는
|
|
1881
|
-
),
|
|
1857
|
+
), y = c?.deptCnt ?? 0, g = c?.deptList || [];
|
|
1858
|
+
if (y === 0 || g.length === 0) {
|
|
1859
|
+
x.warning(
|
|
1860
|
+
"일치하는 부서를 찾을 수 없어 팝업을 열립니다. 부서를 선택해주세요."
|
|
1861
|
+
), d(s);
|
|
1882
1862
|
return;
|
|
1883
1863
|
}
|
|
1884
|
-
if (
|
|
1885
|
-
|
|
1886
|
-
"여러 건이 검색되어 팝업이 열립니다.
|
|
1887
|
-
),
|
|
1864
|
+
if (y > 1 || g.length > 1) {
|
|
1865
|
+
x.info(
|
|
1866
|
+
"여러 건이 검색되어 팝업이 열립니다. 부서를 선택해주세요."
|
|
1867
|
+
), d(s);
|
|
1888
1868
|
return;
|
|
1889
1869
|
}
|
|
1890
|
-
const
|
|
1891
|
-
|
|
1892
|
-
} catch (
|
|
1893
|
-
console.error("
|
|
1870
|
+
const Y = g[0];
|
|
1871
|
+
o(Y);
|
|
1872
|
+
} catch (c) {
|
|
1873
|
+
console.error("부서 검색 서비스 실패:", c), x.error("부서 검색 중 오류가 발생했습니다.");
|
|
1894
1874
|
}
|
|
1895
1875
|
},
|
|
1896
|
-
[
|
|
1876
|
+
[o, d]
|
|
1897
1877
|
);
|
|
1898
|
-
return /* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
|
|
1878
|
+
return /* @__PURE__ */ t(R, { label: e.label || "부서", name: void 0, children: /* @__PURE__ */ T(j.Compact, { block: !0, children: [
|
|
1879
|
+
/* @__PURE__ */ t(
|
|
1880
|
+
D.Item,
|
|
1901
1881
|
{
|
|
1902
|
-
name:
|
|
1882
|
+
name: e.deptCdFieldName || "deptCd",
|
|
1903
1883
|
style: { width: "40%", marginBottom: 0, marginInlineEnd: 0 },
|
|
1904
1884
|
validateStatus: "",
|
|
1905
1885
|
help: "",
|
|
1906
|
-
children: /* @__PURE__ */
|
|
1907
|
-
|
|
1886
|
+
children: /* @__PURE__ */ t(
|
|
1887
|
+
X,
|
|
1908
1888
|
{
|
|
1909
1889
|
style: { color: "#999", backgroundColor: "#f5f5f5" },
|
|
1910
|
-
placeholder:
|
|
1890
|
+
placeholder: "부서코드",
|
|
1911
1891
|
readOnly: !0
|
|
1912
1892
|
}
|
|
1913
1893
|
)
|
|
1914
1894
|
}
|
|
1915
1895
|
),
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
|
|
1896
|
+
/* @__PURE__ */ t(
|
|
1897
|
+
D.Item,
|
|
1918
1898
|
{
|
|
1919
|
-
name: e.
|
|
1899
|
+
name: e.departmentFieldName || "department",
|
|
1920
1900
|
hidden: !0
|
|
1921
1901
|
}
|
|
1922
1902
|
),
|
|
1923
|
-
/* @__PURE__ */
|
|
1924
|
-
|
|
1925
|
-
E.Item,
|
|
1903
|
+
/* @__PURE__ */ t(
|
|
1904
|
+
D.Item,
|
|
1926
1905
|
{
|
|
1927
|
-
name:
|
|
1906
|
+
name: n.fieldName,
|
|
1928
1907
|
style: { width: "60%", marginBottom: 0 },
|
|
1929
|
-
children: /* @__PURE__ */
|
|
1930
|
-
|
|
1908
|
+
children: /* @__PURE__ */ t(
|
|
1909
|
+
vt,
|
|
1931
1910
|
{
|
|
1932
1911
|
allowClear: !0,
|
|
1933
1912
|
readOnly: e.readOnly,
|
|
1934
|
-
placeholder:
|
|
1935
|
-
enterButton: /* @__PURE__ */
|
|
1936
|
-
|
|
1913
|
+
placeholder: n.placeholder,
|
|
1914
|
+
enterButton: /* @__PURE__ */ t(
|
|
1915
|
+
J,
|
|
1937
1916
|
{
|
|
1938
|
-
icon: /* @__PURE__ */
|
|
1917
|
+
icon: /* @__PURE__ */ t(ge, {}),
|
|
1939
1918
|
disabled: e.readOnly,
|
|
1940
1919
|
onClick: () => {
|
|
1941
|
-
|
|
1920
|
+
d();
|
|
1942
1921
|
}
|
|
1943
1922
|
}
|
|
1944
1923
|
),
|
|
1945
|
-
onSearch:
|
|
1946
|
-
onChange: (
|
|
1947
|
-
|
|
1924
|
+
onSearch: i,
|
|
1925
|
+
onChange: (f) => {
|
|
1926
|
+
r.setFieldValue(e.deptCdFieldName || "deptCd", ""), r.setFieldValue(
|
|
1927
|
+
e.departmentFieldName || "department",
|
|
1928
|
+
null
|
|
1929
|
+
);
|
|
1948
1930
|
}
|
|
1949
1931
|
}
|
|
1950
1932
|
)
|
|
1951
1933
|
}
|
|
1952
1934
|
)
|
|
1953
1935
|
] }) });
|
|
1936
|
+
}, xt = ({
|
|
1937
|
+
originNode: e,
|
|
1938
|
+
file: r,
|
|
1939
|
+
fileList: u,
|
|
1940
|
+
moveFile: l,
|
|
1941
|
+
onDrop: n
|
|
1942
|
+
}) => {
|
|
1943
|
+
const o = K(null), [{ handlerId: d }, i] = gt({
|
|
1944
|
+
accept: "file",
|
|
1945
|
+
collect: (y) => ({
|
|
1946
|
+
handlerId: y.getHandlerId()
|
|
1947
|
+
}),
|
|
1948
|
+
hover(y, g) {
|
|
1949
|
+
if (!o.current)
|
|
1950
|
+
return;
|
|
1951
|
+
const Y = y.uid, C = r.uid;
|
|
1952
|
+
if (Y === C)
|
|
1953
|
+
return;
|
|
1954
|
+
const O = de(u, { uid: C }), p = de(u, { uid: Y });
|
|
1955
|
+
if (p === -1 || O === -1)
|
|
1956
|
+
return;
|
|
1957
|
+
const E = o.current.getBoundingClientRect(), h = g.getClientOffset();
|
|
1958
|
+
if (!h)
|
|
1959
|
+
return;
|
|
1960
|
+
const P = (E.bottom - E.top) / 2, L = h.y - E.top;
|
|
1961
|
+
p < O && L < P || p > O && L > P || l(Y, C);
|
|
1962
|
+
},
|
|
1963
|
+
drop() {
|
|
1964
|
+
n();
|
|
1965
|
+
}
|
|
1966
|
+
}), [{ isDragging: f }, s] = pt({
|
|
1967
|
+
type: "file",
|
|
1968
|
+
item: () => ({
|
|
1969
|
+
uid: r.uid,
|
|
1970
|
+
index: de(u, { uid: r.uid })
|
|
1971
|
+
}),
|
|
1972
|
+
collect: (y) => ({
|
|
1973
|
+
isDragging: y.isDragging()
|
|
1974
|
+
})
|
|
1975
|
+
}), c = f ? 0 : 1;
|
|
1976
|
+
return s(i(o)), /* @__PURE__ */ t("div", { ref: o, style: { opacity: c }, "data-handler-id": d, children: e });
|
|
1977
|
+
}, Be = (e, r, u, l, n) => {
|
|
1978
|
+
const o = u[0]?.uid === r.uid, d = Ge(e, {
|
|
1979
|
+
href: r.url || void 0,
|
|
1980
|
+
title: void 0
|
|
1981
|
+
});
|
|
1982
|
+
return /* @__PURE__ */ T(_e, { children: [
|
|
1983
|
+
o && /* @__PURE__ */ T(
|
|
1984
|
+
"div",
|
|
1985
|
+
{
|
|
1986
|
+
style: {
|
|
1987
|
+
fontSize: 12,
|
|
1988
|
+
color: "var(--text-secondary, #666)",
|
|
1989
|
+
marginBottom: 4
|
|
1990
|
+
},
|
|
1991
|
+
children: [
|
|
1992
|
+
"총 ",
|
|
1993
|
+
u.length,
|
|
1994
|
+
"건"
|
|
1995
|
+
]
|
|
1996
|
+
}
|
|
1997
|
+
),
|
|
1998
|
+
/* @__PURE__ */ t(
|
|
1999
|
+
xt,
|
|
2000
|
+
{
|
|
2001
|
+
originNode: d,
|
|
2002
|
+
file: r,
|
|
2003
|
+
fileList: u,
|
|
2004
|
+
moveFile: l,
|
|
2005
|
+
onDrop: n
|
|
2006
|
+
}
|
|
2007
|
+
)
|
|
2008
|
+
] });
|
|
2009
|
+
}, Te = (e, r) => {
|
|
2010
|
+
const u = String(r || "");
|
|
2011
|
+
return u.startsWith("picture") ? e.name.endsWith(".pdf") ? /* @__PURE__ */ t(lt, {}) : e.name.endsWith(".docx") || e.name.endsWith(".doc") ? /* @__PURE__ */ t(st, {}) : e.name.endsWith(".xlsx") || e.name.endsWith(".xls") ? /* @__PURE__ */ t(it, {}) : e.name.endsWith(".pptx") || e.name.endsWith(".ppt") ? /* @__PURE__ */ t(ct, {}) : /* @__PURE__ */ t(dt, {}) : u.startsWith("text") ? /* @__PURE__ */ t(ut, {}) : /* @__PURE__ */ t(mt, {});
|
|
2012
|
+
}, fn = ({
|
|
2013
|
+
listType: e = "picture",
|
|
2014
|
+
buttonText: r = "파일 선택",
|
|
2015
|
+
permissions: u,
|
|
2016
|
+
multiple: l = !1,
|
|
2017
|
+
fileGrpKey: n,
|
|
2018
|
+
uploadProps: o,
|
|
2019
|
+
heights: d,
|
|
2020
|
+
...i
|
|
2021
|
+
}) => {
|
|
2022
|
+
const {
|
|
2023
|
+
defaultUploadProps: f,
|
|
2024
|
+
fileList: s,
|
|
2025
|
+
fetchFileList: c,
|
|
2026
|
+
reorderFiles: y,
|
|
2027
|
+
saveFileOrder: g
|
|
2028
|
+
} = Ae({ multiple: l, fileGrpKey: n, ...i });
|
|
2029
|
+
G(() => {
|
|
2030
|
+
n && c();
|
|
2031
|
+
}, [n]);
|
|
2032
|
+
const Y = !!u?.fileAdd, C = {
|
|
2033
|
+
...f,
|
|
2034
|
+
listType: e,
|
|
2035
|
+
styles: {
|
|
2036
|
+
root: { height: d?.root },
|
|
2037
|
+
list: { height: d?.list }
|
|
2038
|
+
},
|
|
2039
|
+
iconRender: Te,
|
|
2040
|
+
itemRender(O, p, E) {
|
|
2041
|
+
return Be(
|
|
2042
|
+
O,
|
|
2043
|
+
p,
|
|
2044
|
+
E,
|
|
2045
|
+
y,
|
|
2046
|
+
g
|
|
2047
|
+
);
|
|
2048
|
+
},
|
|
2049
|
+
...o
|
|
2050
|
+
};
|
|
2051
|
+
return /* @__PURE__ */ t(Me, { backend: Oe, children: /* @__PURE__ */ t(
|
|
2052
|
+
ee,
|
|
2053
|
+
{
|
|
2054
|
+
headers: { SYSCD: __SYS_CD__ },
|
|
2055
|
+
style: { height: d?.root },
|
|
2056
|
+
...C,
|
|
2057
|
+
children: Y && l || (Y && !l || s.length === 0) && /* @__PURE__ */ t(J, { icon: /* @__PURE__ */ t(ae, {}), children: r })
|
|
2058
|
+
}
|
|
2059
|
+
) });
|
|
2060
|
+
}, hn = ({
|
|
2061
|
+
listType: e = "picture",
|
|
2062
|
+
permissions: r,
|
|
2063
|
+
multiple: u = !1,
|
|
2064
|
+
fileGrpKey: l,
|
|
2065
|
+
uploadProps: n,
|
|
2066
|
+
heights: o,
|
|
2067
|
+
...d
|
|
2068
|
+
}) => {
|
|
2069
|
+
const { defaultUploadProps: i, fetchFileList: f, reorderFiles: s, saveFileOrder: c } = Ae({ multiple: u, fileGrpKey: l, ...d }), y = {
|
|
2070
|
+
...i,
|
|
2071
|
+
listType: e,
|
|
2072
|
+
// styles: {
|
|
2073
|
+
// root: { height: heights?.root },
|
|
2074
|
+
// list: { height: heights?.list, overflowY: 'auto' },
|
|
2075
|
+
// },
|
|
2076
|
+
iconRender: Te,
|
|
2077
|
+
itemRender(g, Y, C) {
|
|
2078
|
+
return Be(
|
|
2079
|
+
g,
|
|
2080
|
+
Y,
|
|
2081
|
+
C,
|
|
2082
|
+
s,
|
|
2083
|
+
c
|
|
2084
|
+
);
|
|
2085
|
+
},
|
|
2086
|
+
...n
|
|
2087
|
+
};
|
|
2088
|
+
return G(() => {
|
|
2089
|
+
l && f();
|
|
2090
|
+
}, [l]), /* @__PURE__ */ t(Me, { backend: Oe, children: /* @__PURE__ */ T(
|
|
2091
|
+
yt,
|
|
2092
|
+
{
|
|
2093
|
+
style: { marginBottom: 10 },
|
|
2094
|
+
height: o?.dragger || 100,
|
|
2095
|
+
...y,
|
|
2096
|
+
children: [
|
|
2097
|
+
/* @__PURE__ */ t("p", { className: "ant-upload-drag-icon", style: { marginBottom: 10 }, children: /* @__PURE__ */ t(De, { style: { fontSize: 25 } }) }),
|
|
2098
|
+
/* @__PURE__ */ t("p", { className: "ant-upload-hint", children: "첨부할 파일을 여기에 끌어다 놓거나, 영역을 클릭하여 파일을 직접 선택해주세요." })
|
|
2099
|
+
]
|
|
2100
|
+
}
|
|
2101
|
+
) });
|
|
1954
2102
|
};
|
|
1955
2103
|
export {
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
2104
|
+
oe as BwgButton,
|
|
2105
|
+
jt as BwgCheck,
|
|
2106
|
+
Gt as BwgCheckList,
|
|
2107
|
+
Xt as BwgDatePicker,
|
|
2108
|
+
mn as BwgDeptSearch,
|
|
2109
|
+
Kt as BwgDownload,
|
|
2110
|
+
hn as BwgDraggerUploader,
|
|
2111
|
+
dn as BwgEmpSearch,
|
|
2112
|
+
Ft as BwgForm,
|
|
2113
|
+
R as BwgFormItem,
|
|
2114
|
+
qt as BwgInput,
|
|
2115
|
+
Jt as BwgLargeUploader,
|
|
2116
|
+
Qt as BwgMaskedDate,
|
|
2117
|
+
Zt as BwgMaskedInput,
|
|
2118
|
+
en as BwgMaskedRange,
|
|
2119
|
+
tn as BwgMultiSelect,
|
|
2120
|
+
nn as BwgNumber,
|
|
2121
|
+
rn as BwgRadio,
|
|
2122
|
+
on as BwgRangePicker,
|
|
2123
|
+
an as BwgSearch,
|
|
2124
|
+
ln as BwgSelect,
|
|
2125
|
+
sn as BwgSwitch,
|
|
2126
|
+
cn as BwgTextArea,
|
|
2127
|
+
fn as BwgUploader,
|
|
2128
|
+
un as BwgXlsxUploader,
|
|
2129
|
+
xt as DraggableUploadListItem,
|
|
2130
|
+
Te as defaultIconRender,
|
|
2131
|
+
Be as defaultItemRender
|
|
1978
2132
|
};
|