@bwg-ui/core 1.1.17 → 1.1.19
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/BwgCheck-BDt8r0gn.js +200 -0
- package/dist/chunks/BwgCheck-BDt8r0gn.js.map +1 -0
- package/dist/chunks/BwgCheck-Dtzr-6rg.cjs +2 -0
- package/dist/chunks/BwgCheck-Dtzr-6rg.cjs.map +1 -0
- package/dist/chunks/BwgDownload-Cm_XfYl_.cjs +3 -0
- package/dist/chunks/BwgDownload-Cm_XfYl_.cjs.map +1 -0
- package/dist/chunks/{BwgLargeUploader-CBwGaHh6.js → BwgDownload-Qhs6jJxM.js} +770 -869
- package/dist/chunks/BwgDownload-Qhs6jJxM.js.map +1 -0
- package/dist/chunks/{SSOHandler-BfRH51hZ.js → SSOHandler-B4yYaeJF.js} +10739 -8720
- package/dist/chunks/SSOHandler-B4yYaeJF.js.map +1 -0
- package/dist/chunks/SSOHandler-C-pcl0On.cjs +236 -0
- package/dist/chunks/SSOHandler-C-pcl0On.cjs.map +1 -0
- package/dist/chunks/{SearchBoxContext-CNoEc4uu.cjs → SearchBoxContext-BgAzWZQl.cjs} +2 -2
- package/dist/chunks/{SearchBoxContext-CNoEc4uu.cjs.map → SearchBoxContext-BgAzWZQl.cjs.map} +1 -1
- package/dist/chunks/{SearchBoxContext-CjdCL1e9.js → SearchBoxContext-CyTyFuB5.js} +9 -9
- package/dist/chunks/{SearchBoxContext-CjdCL1e9.js.map → SearchBoxContext-CyTyFuB5.js.map} +1 -1
- package/dist/chunks/{ViewContainer-Du3IzFYo.js → ViewContainer-CbO6vSvW.js} +121 -81
- package/dist/chunks/{ViewContainer-Du3IzFYo.js.map → ViewContainer-CbO6vSvW.js.map} +1 -1
- package/dist/chunks/{ViewContainer-DUjKBgcl.cjs → ViewContainer-pwafdfAs.cjs} +3 -3
- package/dist/chunks/{ViewContainer-DUjKBgcl.cjs.map → ViewContainer-pwafdfAs.cjs.map} +1 -1
- package/dist/chunks/apiUtils-CH40MvpT.js +1402 -0
- package/dist/chunks/apiUtils-CH40MvpT.js.map +1 -0
- package/dist/chunks/apiUtils-D9cBQG0u.cjs +3 -0
- package/dist/chunks/apiUtils-D9cBQG0u.cjs.map +1 -0
- package/dist/chunks/{codeStore-Dsjc4uXs.js → codeStore-CC9_8nmU.js} +2 -2
- package/dist/chunks/{codeStore-Dsjc4uXs.js.map → codeStore-CC9_8nmU.js.map} +1 -1
- package/dist/chunks/{codeStore-HfLmmkAL.cjs → codeStore-DVUySb7V.cjs} +2 -2
- package/dist/chunks/{codeStore-HfLmmkAL.cjs.map → codeStore-DVUySb7V.cjs.map} +1 -1
- package/dist/chunks/favoriteStore-Byy7k_UI.cjs +2 -0
- package/dist/chunks/favoriteStore-Byy7k_UI.cjs.map +1 -0
- package/dist/chunks/favoriteStore-DYiTW7cU.js +439 -0
- package/dist/chunks/favoriteStore-DYiTW7cU.js.map +1 -0
- package/dist/chunks/{popupStore-D6b6b5-T.js → popupStore-C8-CPKwz.js} +5 -5
- package/dist/chunks/{popupStore-D6b6b5-T.js.map → popupStore-C8-CPKwz.js.map} +1 -1
- package/dist/chunks/{popupStore-Cm5utmtA.cjs → popupStore-wA4nh-mr.cjs} +2 -2
- package/dist/chunks/{popupStore-Cm5utmtA.cjs.map → popupStore-wA4nh-mr.cjs.map} +1 -1
- package/dist/chunks/{usePopup-BG24CocH.cjs → usePopup-6-TNfqyf.cjs} +2 -2
- package/dist/chunks/{usePopup-BG24CocH.cjs.map → usePopup-6-TNfqyf.cjs.map} +1 -1
- package/dist/chunks/{usePopup-Dm-UyUbV.js → usePopup-D7c9t7AW.js} +3 -3
- package/dist/chunks/{usePopup-Dm-UyUbV.js.map → usePopup-D7c9t7AW.js.map} +1 -1
- package/dist/components/common/BookmarkMngModal.d.ts +16 -0
- package/dist/components/common/BookmarkMngModal.d.ts.map +1 -0
- package/dist/components/common/BookmarkPopver.d.ts +7 -0
- package/dist/components/common/BookmarkPopver.d.ts.map +1 -0
- package/dist/components/common/BwgDraggable.d.ts +25 -0
- package/dist/components/common/BwgDraggable.d.ts.map +1 -0
- package/dist/components/common/BwgEditor.d.ts +4 -0
- package/dist/components/common/BwgEditor.d.ts.map +1 -1
- package/dist/components/common/BwgGrid.d.ts +15 -3
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/BwgPagination.d.ts +13 -0
- package/dist/components/common/BwgPagination.d.ts.map +1 -0
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/SearchBox.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgDatePicker.d.ts +2 -2
- package/dist/components/core/BwgDatePicker.d.ts.map +1 -1
- package/dist/components/core/BwgDownload.d.ts +33 -0
- package/dist/components/core/BwgDownload.d.ts.map +1 -0
- package/dist/components/core/BwgRangePicker.d.ts +2 -2
- package/dist/components/core/BwgRangePicker.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.d.ts +2 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +21 -19
- package/dist/components/core/index.js.map +1 -1
- package/dist/components/layout/ViewContainer.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/popup/MenuReport.d.ts +8 -0
- package/dist/components/popup/MenuReport.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +184 -182
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +2 -2
- package/dist/stores/favoriteStore.d.ts +81 -17
- package/dist/stores/favoriteStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +9 -9
- 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/utils/apiUtils.d.ts +8 -0
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +118 -119
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/BwgLargeUploader-CBwGaHh6.js.map +0 -1
- package/dist/chunks/BwgLargeUploader-CVdp_rxx.cjs +0 -3
- package/dist/chunks/BwgLargeUploader-CVdp_rxx.cjs.map +0 -1
- package/dist/chunks/SSOHandler-BfRH51hZ.js.map +0 -1
- package/dist/chunks/SSOHandler-DoidypM2.cjs +0 -236
- package/dist/chunks/SSOHandler-DoidypM2.cjs.map +0 -1
- package/dist/chunks/apiUtils-DlsnkCO4.cjs +0 -3
- package/dist/chunks/apiUtils-DlsnkCO4.cjs.map +0 -1
- package/dist/chunks/apiUtils-IzgDPO-1.js +0 -1277
- package/dist/chunks/apiUtils-IzgDPO-1.js.map +0 -1
- package/dist/chunks/envUtils-C4Yv5Nfg.cjs +0 -2
- package/dist/chunks/envUtils-C4Yv5Nfg.cjs.map +0 -1
- package/dist/chunks/envUtils-Ck_DT0s_.js +0 -43
- package/dist/chunks/envUtils-Ck_DT0s_.js.map +0 -1
- package/dist/chunks/favoriteStore-C0o6Sj55.js +0 -112
- package/dist/chunks/favoriteStore-C0o6Sj55.js.map +0 -1
- package/dist/chunks/favoriteStore-DOz2rAJu.cjs +0 -2
- package/dist/chunks/favoriteStore-DOz2rAJu.cjs.map +0 -1
|
@@ -1,123 +1,16 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-Dpn_P65e.js";
|
|
2
|
-
import { Form as
|
|
3
|
-
import
|
|
4
|
-
import { u as
|
|
5
|
-
import { SearchOutlined as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import $t from "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
label: e,
|
|
15
|
-
name: r,
|
|
16
|
-
rules: n,
|
|
17
|
-
initialValue: i,
|
|
18
|
-
style: o,
|
|
19
|
-
...a
|
|
20
|
-
}) => {
|
|
21
|
-
const s = {
|
|
22
|
-
fontWeight: "bold"
|
|
23
|
-
}, l = Array.isArray(n) && n.some((g) => g.required === !0), u = () => typeof e == "string" ? /* @__PURE__ */ c.jsxs("span", { style: s, children: [
|
|
24
|
-
e,
|
|
25
|
-
l && /* @__PURE__ */ c.jsx("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
|
|
26
|
-
] }) : /* @__PURE__ */ c.jsx("span", { style: s, children: e });
|
|
27
|
-
return /* @__PURE__ */ c.jsx(
|
|
28
|
-
k.Item,
|
|
29
|
-
{
|
|
30
|
-
className: "bwg-form-item",
|
|
31
|
-
label: e ? u() : void 0,
|
|
32
|
-
labelAlign: "left",
|
|
33
|
-
name: r,
|
|
34
|
-
rules: n,
|
|
35
|
-
colon: !1,
|
|
36
|
-
initialValue: i,
|
|
37
|
-
style: o,
|
|
38
|
-
...a,
|
|
39
|
-
children: t
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
), zt = wt(
|
|
44
|
-
({ children: t, labelCol: e, style: r, className: n, ...i }, o) => /* @__PURE__ */ c.jsx(
|
|
45
|
-
Je,
|
|
46
|
-
{
|
|
47
|
-
form: {
|
|
48
|
-
//기존 rule.message의 default message인 $name을를 입력해주세요를 변경
|
|
49
|
-
validateMessages: { required: "'${label}을(를) 입력해주세요.'" }
|
|
50
|
-
},
|
|
51
|
-
children: /* @__PURE__ */ c.jsx(
|
|
52
|
-
k,
|
|
53
|
-
{
|
|
54
|
-
ref: o,
|
|
55
|
-
...i,
|
|
56
|
-
requiredMark: !1,
|
|
57
|
-
labelCol: e || { flex: "100px" },
|
|
58
|
-
style: { padding: "10px", ...r },
|
|
59
|
-
className: `bwg-form ${n ?? ""}`,
|
|
60
|
-
children: t
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
);
|
|
66
|
-
zt.displayName = "BwgForm";
|
|
67
|
-
const Ei = ({
|
|
68
|
-
itemProps: t,
|
|
69
|
-
selectProps: e = {
|
|
70
|
-
options: [],
|
|
71
|
-
allowClear: !0
|
|
72
|
-
}
|
|
73
|
-
}) => {
|
|
74
|
-
const r = k.useFormInstance(), n = !!r, i = R(() => e?.addField === "ALL" ? [{ label: "전체", value: "" }, ...e?.options || []] : e?.addField === "NULL" ? [{ label: "", value: "" }, ...e?.options || []] : e?.options || [], [e.options, e.addField]), o = (l) => {
|
|
75
|
-
e.onChange?.(l);
|
|
76
|
-
}, a = {
|
|
77
|
-
...e,
|
|
78
|
-
allowClear: e.allowClear ?? !0,
|
|
79
|
-
options: i,
|
|
80
|
-
onChange: o,
|
|
81
|
-
variant: e.variant
|
|
82
|
-
}, s = /* @__PURE__ */ c.jsx(be, { ...a, disabled: e.disabled });
|
|
83
|
-
return e.copyable && !n && console.warn(
|
|
84
|
-
"BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
|
|
85
|
-
), e.copyable ? /* @__PURE__ */ c.jsx(j, { ...t, children: /* @__PURE__ */ c.jsxs(ne.Compact, { block: !0, children: [
|
|
86
|
-
/* @__PURE__ */ c.jsx(
|
|
87
|
-
k.Item,
|
|
88
|
-
{
|
|
89
|
-
name: t?.name,
|
|
90
|
-
rules: t?.rules,
|
|
91
|
-
style: { width: "100%", marginBottom: 0 },
|
|
92
|
-
validateStatus: "",
|
|
93
|
-
help: "",
|
|
94
|
-
children: s
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ c.jsx(
|
|
98
|
-
Ze.Paragraph,
|
|
99
|
-
{
|
|
100
|
-
copyable: {
|
|
101
|
-
text: n && r?.getFieldValue(t?.name)?.toString() || "",
|
|
102
|
-
tooltips: ["코드복사", "코드복사됨"]
|
|
103
|
-
},
|
|
104
|
-
style: {
|
|
105
|
-
margin: 0,
|
|
106
|
-
backgroundColor: "#f5f5f5",
|
|
107
|
-
borderRadius: "4px",
|
|
108
|
-
border: "1px solid #d9d9d9",
|
|
109
|
-
fontSize: "12px",
|
|
110
|
-
color: "#666",
|
|
111
|
-
display: "flex",
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
height: "30px",
|
|
114
|
-
padding: "0 8px"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
] }) }) : /* @__PURE__ */ c.jsx(j, { ...t, children: s });
|
|
119
|
-
}, Re = K.Search, wi = (t) => {
|
|
120
|
-
const e = k.useFormInstance(), { openPopup: r } = _t(), n = t.itemProps?.name || [], i = t.popupConfig || {
|
|
2
|
+
import { Form as U, Space as pe, Input as ee, Button as B, DatePicker as Xe, Radio as vt, ConfigProvider as Dt, Checkbox as we, InputNumber as yt, Select as We, message as P, Upload as Y, Spin as St, Card as Ke, List as K, Tooltip as Ot, Typography as Tt, Flex as xe, Progress as bt, notification as It } from "antd";
|
|
3
|
+
import { B as k } from "./BwgCheck-BDt8r0gn.js";
|
|
4
|
+
import { u as Et } from "./popupStore-C8-CPKwz.js";
|
|
5
|
+
import { SearchOutlined as Ct, UploadOutlined as Je, CloseCircleOutlined as wt, DeleteOutlined as xt, InboxOutlined as Nt, CloudUploadOutlined as Pt, CheckCircleOutlined as _t, FileTextOutlined as Rt, PaperClipOutlined as Mt, DownloadOutlined as Lt } from "@ant-design/icons";
|
|
6
|
+
import Ze from "imask";
|
|
7
|
+
import jt, { useRef as V, useMemo as R, useEffect as M, useState as L, createContext as Ft, memo as kt, useLayoutEffect as At, useCallback as Yt, isValidElement as Ht, cloneElement as Ne, useContext as Ut } from "react";
|
|
8
|
+
import W from "dayjs";
|
|
9
|
+
import { aQ as Bt, c as H, aB as A, b as Vt } from "./apiUtils-CH40MvpT.js";
|
|
10
|
+
import { debounce as $t, findIndex as Z, isEmpty as zt } from "lodash";
|
|
11
|
+
import qt from "jszip";
|
|
12
|
+
const Pe = ee.Search, wi = (t) => {
|
|
13
|
+
const e = U.useFormInstance(), { openPopup: r } = Et(), n = t.itemProps?.name || [], i = t.popupConfig || {
|
|
121
14
|
callback(a) {
|
|
122
15
|
console.log("callback data :: ", a), n.length > 1 ? (e.setFieldValue(n[0], a.code), e.setFieldValue(n[1], a.name)) : e.setFieldValue(n, a.code);
|
|
123
16
|
}
|
|
@@ -131,9 +24,9 @@ const Ei = ({
|
|
|
131
24
|
t.popuCd ? r(t.popuCd, t.popupParams, i) : t.onSearch?.(a);
|
|
132
25
|
}
|
|
133
26
|
};
|
|
134
|
-
return n.length > 1 ? /* @__PURE__ */ c.jsx(
|
|
27
|
+
return n.length > 1 ? /* @__PURE__ */ c.jsx(k, { ...t.itemProps, name: void 0, children: /* @__PURE__ */ c.jsxs(pe.Compact, { block: !0, children: [
|
|
135
28
|
/* @__PURE__ */ c.jsx(
|
|
136
|
-
|
|
29
|
+
U.Item,
|
|
137
30
|
{
|
|
138
31
|
name: n[0],
|
|
139
32
|
rules: t.itemProps?.rules,
|
|
@@ -141,7 +34,7 @@ const Ei = ({
|
|
|
141
34
|
validateStatus: "",
|
|
142
35
|
help: "",
|
|
143
36
|
children: /* @__PURE__ */ c.jsx(
|
|
144
|
-
|
|
37
|
+
ee,
|
|
145
38
|
{
|
|
146
39
|
style: { color: "#999", backgroundColor: "#f5f5f5" },
|
|
147
40
|
placeholder: t.placeholder?.[0] || "",
|
|
@@ -150,22 +43,22 @@ const Ei = ({
|
|
|
150
43
|
)
|
|
151
44
|
}
|
|
152
45
|
),
|
|
153
|
-
/* @__PURE__ */ c.jsx(
|
|
154
|
-
|
|
46
|
+
/* @__PURE__ */ c.jsx(U.Item, { name: n[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ c.jsx(
|
|
47
|
+
Pe,
|
|
155
48
|
{
|
|
156
49
|
readOnly: t.readOnly,
|
|
157
50
|
enterButton: /* @__PURE__ */ c.jsx(
|
|
158
|
-
|
|
51
|
+
B,
|
|
159
52
|
{
|
|
160
|
-
icon: /* @__PURE__ */ c.jsx(
|
|
53
|
+
icon: /* @__PURE__ */ c.jsx(Ct, {}),
|
|
161
54
|
disabled: t.readOnly
|
|
162
55
|
}
|
|
163
56
|
),
|
|
164
57
|
...o
|
|
165
58
|
}
|
|
166
59
|
) })
|
|
167
|
-
] }) }) : /* @__PURE__ */ c.jsx(
|
|
168
|
-
},
|
|
60
|
+
] }) }) : /* @__PURE__ */ c.jsx(k, { ...t.itemProps, children: /* @__PURE__ */ c.jsx(Pe, { ...o }) });
|
|
61
|
+
}, Gt = (t) => {
|
|
169
62
|
if (typeof t == "string")
|
|
170
63
|
return t.replace(/0/g, "_");
|
|
171
64
|
if (Array.isArray(t))
|
|
@@ -183,17 +76,17 @@ const Ei = ({
|
|
|
183
76
|
inputProps: e,
|
|
184
77
|
mask: r
|
|
185
78
|
}) => {
|
|
186
|
-
const n =
|
|
187
|
-
return
|
|
79
|
+
const n = V(null), i = U.useFormInstance(), o = R(() => Gt(r), [r]);
|
|
80
|
+
return M(() => {
|
|
188
81
|
if (!n.current?.input) return;
|
|
189
|
-
const a = typeof r == "string" || Array.isArray(r) ? { mask: r } : r, s =
|
|
82
|
+
const a = typeof r == "string" || Array.isArray(r) ? { mask: r } : r, s = Ze(n.current.input, a);
|
|
190
83
|
return s.on("accept", () => {
|
|
191
84
|
i && t?.name && i.setFieldValue(t.name, s.value);
|
|
192
85
|
}), () => {
|
|
193
86
|
s.destroy();
|
|
194
87
|
};
|
|
195
|
-
}, [r, i, t?.name]), /* @__PURE__ */ c.jsx(
|
|
196
|
-
},
|
|
88
|
+
}, [r, i, t?.name]), /* @__PURE__ */ c.jsx(k, { ...t, children: /* @__PURE__ */ c.jsx(ee, { ...e, ref: n, placeholder: o }) });
|
|
89
|
+
}, Xt = (t) => {
|
|
197
90
|
switch (t) {
|
|
198
91
|
case "year":
|
|
199
92
|
return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
|
|
@@ -212,58 +105,58 @@ const Ei = ({
|
|
|
212
105
|
itemProps: e = { name: "calendar" },
|
|
213
106
|
inputProps: r
|
|
214
107
|
}) => {
|
|
215
|
-
const { format: n, mask: i, outputFormat: o } =
|
|
216
|
-
|
|
108
|
+
const { format: n, mask: i, outputFormat: o } = Xt(t), a = V(null), s = V(null), u = U.useFormInstance(), [l, p] = L(!1), [m, g] = L(!1), d = e?.name, [b, D] = L(null);
|
|
109
|
+
M(() => {
|
|
217
110
|
if (!a.current?.input) return;
|
|
218
|
-
const
|
|
111
|
+
const v = Ze(a.current.input, {
|
|
219
112
|
mask: i,
|
|
220
113
|
lazy: !1
|
|
221
114
|
});
|
|
222
|
-
return s.current =
|
|
223
|
-
console.log("input :: ",
|
|
224
|
-
const h =
|
|
225
|
-
console.log("input :: ",
|
|
115
|
+
return s.current = v, v.on("accept", () => {
|
|
116
|
+
console.log("input :: ", v.value);
|
|
117
|
+
const h = v.value, I = W(h, n, !0);
|
|
118
|
+
console.log("input :: ", I), h.length === n.length && I.isValid() && (console.log("parsed :: ", I.format(o)), u.setFieldValue(d, I.format(o)), s.current?.updateValue(), p(!1));
|
|
226
119
|
}), () => {
|
|
227
|
-
|
|
120
|
+
v.destroy();
|
|
228
121
|
};
|
|
229
|
-
}, [n, i]),
|
|
230
|
-
|
|
231
|
-
}, [
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
122
|
+
}, [n, i]), M(() => {
|
|
123
|
+
D(W(u.getFieldValue(d)));
|
|
124
|
+
}, [u.getFieldValue(d)]);
|
|
125
|
+
const E = (v) => {
|
|
126
|
+
if (!v) {
|
|
234
127
|
s.current?.updateValue();
|
|
235
128
|
return;
|
|
236
129
|
}
|
|
237
|
-
const h =
|
|
238
|
-
console.log("formatted :: ", h), s.current && (s.current.value = h, s.current.updateValue()),
|
|
130
|
+
const h = v.format(o);
|
|
131
|
+
console.log("formatted :: ", h), s.current && (s.current.value = h, s.current.updateValue()), g(!1);
|
|
239
132
|
};
|
|
240
133
|
return /* @__PURE__ */ c.jsx(
|
|
241
|
-
|
|
134
|
+
k,
|
|
242
135
|
{
|
|
243
136
|
...e,
|
|
244
137
|
name: void 0,
|
|
245
|
-
validateStatus:
|
|
246
|
-
help:
|
|
138
|
+
validateStatus: m ? "warning" : void 0,
|
|
139
|
+
help: m ? "유효하지 않은 날짜입니다" : void 0,
|
|
247
140
|
children: /* @__PURE__ */ c.jsxs("div", { style: { position: "relative" }, children: [
|
|
248
141
|
/* @__PURE__ */ c.jsx(
|
|
249
|
-
|
|
142
|
+
U.Item,
|
|
250
143
|
{
|
|
251
144
|
name: d,
|
|
252
|
-
getValueProps: (
|
|
253
|
-
value:
|
|
145
|
+
getValueProps: (v) => ({
|
|
146
|
+
value: v ? W(v).format(n) : void 0
|
|
254
147
|
}),
|
|
255
|
-
normalize: (
|
|
148
|
+
normalize: (v) => v ? W(v).format(o) : void 0,
|
|
256
149
|
noStyle: !0,
|
|
257
150
|
children: /* @__PURE__ */ c.jsx(
|
|
258
|
-
|
|
151
|
+
ee,
|
|
259
152
|
{
|
|
260
153
|
...r,
|
|
261
154
|
ref: a,
|
|
262
155
|
onFocus: () => {
|
|
263
|
-
|
|
156
|
+
p(!l), s.current?.updateValue();
|
|
264
157
|
},
|
|
265
|
-
onKeyDown: (
|
|
266
|
-
|
|
158
|
+
onKeyDown: (v) => {
|
|
159
|
+
v.key === "Backspace" && p(!0), v.key === "Tab" && p(!1);
|
|
267
160
|
},
|
|
268
161
|
allowClear: !0,
|
|
269
162
|
placeholder: i.replace(/0/g, "_"),
|
|
@@ -273,14 +166,14 @@ const Ei = ({
|
|
|
273
166
|
}
|
|
274
167
|
),
|
|
275
168
|
/* @__PURE__ */ c.jsx(
|
|
276
|
-
|
|
169
|
+
Xe,
|
|
277
170
|
{
|
|
278
|
-
open:
|
|
171
|
+
open: l,
|
|
279
172
|
picker: t,
|
|
280
173
|
format: n,
|
|
281
|
-
value:
|
|
282
|
-
onChange:
|
|
283
|
-
getPopupContainer: (
|
|
174
|
+
value: b,
|
|
175
|
+
onChange: E,
|
|
176
|
+
getPopupContainer: (v) => v.parentElement,
|
|
284
177
|
style: {
|
|
285
178
|
position: "absolute",
|
|
286
179
|
top: 0,
|
|
@@ -294,7 +187,7 @@ const Ei = ({
|
|
|
294
187
|
] })
|
|
295
188
|
}
|
|
296
189
|
);
|
|
297
|
-
},
|
|
190
|
+
}, _e = {
|
|
298
191
|
year: { displayFormat: "YYYY", outputFormat: "YYYY" },
|
|
299
192
|
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
300
193
|
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
|
|
@@ -303,37 +196,37 @@ const Ei = ({
|
|
|
303
196
|
displayFormat: "YYYY-MM-DD HH:mm",
|
|
304
197
|
outputFormat: "YYYYMMDDHHmm"
|
|
305
198
|
}
|
|
306
|
-
},
|
|
199
|
+
}, Pi = ({
|
|
307
200
|
itemProps: t,
|
|
308
201
|
inputProps: e,
|
|
309
202
|
type: r = "date",
|
|
310
|
-
|
|
203
|
+
returnType: n = "string"
|
|
311
204
|
}) => {
|
|
312
205
|
const { displayFormat: i, outputFormat: o } = R(
|
|
313
|
-
() =>
|
|
206
|
+
() => _e[r],
|
|
314
207
|
[r]
|
|
315
208
|
), a = R(
|
|
316
|
-
() => Object.values(
|
|
317
|
-
if (s.length ===
|
|
209
|
+
() => Object.values(_e).map((s) => s.outputFormat).sort((s, u) => {
|
|
210
|
+
if (s.length === u.length) {
|
|
318
211
|
if (s === o) return -1;
|
|
319
|
-
if (
|
|
212
|
+
if (u === o) return 1;
|
|
320
213
|
}
|
|
321
|
-
return
|
|
214
|
+
return u.length - s.length;
|
|
322
215
|
}),
|
|
323
216
|
[o]
|
|
324
217
|
// type(outputFormat)이 바뀔 때마다 재정렬
|
|
325
218
|
);
|
|
326
219
|
return /* @__PURE__ */ c.jsx(
|
|
327
|
-
|
|
220
|
+
k,
|
|
328
221
|
{
|
|
329
222
|
...t,
|
|
330
223
|
getValueProps: (s) => ({
|
|
331
|
-
//
|
|
332
|
-
value: s ?
|
|
224
|
+
// 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환
|
|
225
|
+
value: s ? W.isDayjs(s) ? s : W(s, a) : null
|
|
333
226
|
}),
|
|
334
|
-
normalize: (s) => s ? s.format(o) : null,
|
|
227
|
+
normalize: (s) => s ? n === "dayjs" ? s : s.format(o) : null,
|
|
335
228
|
children: /* @__PURE__ */ c.jsx(
|
|
336
|
-
|
|
229
|
+
Xe,
|
|
337
230
|
{
|
|
338
231
|
...e,
|
|
339
232
|
picker: r === "datetime" ? "date" : r,
|
|
@@ -343,104 +236,26 @@ const Ei = ({
|
|
|
343
236
|
)
|
|
344
237
|
}
|
|
345
238
|
);
|
|
346
|
-
}, {
|
|
347
|
-
|
|
348
|
-
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
349
|
-
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
|
|
350
|
-
time: { displayFormat: "HH:mm", outputFormat: "HHmm" },
|
|
351
|
-
datetime: {
|
|
352
|
-
displayFormat: "YYYY-MM-DD HH:mm",
|
|
353
|
-
outputFormat: "YYYYMMDDHHmm"
|
|
354
|
-
}
|
|
355
|
-
}, Ri = ({
|
|
356
|
-
itemProps: t,
|
|
357
|
-
inputProps: e,
|
|
358
|
-
type: r = "date",
|
|
359
|
-
minDate: n,
|
|
360
|
-
maxDate: i,
|
|
361
|
-
useMask: o = !1
|
|
362
|
-
}) => {
|
|
363
|
-
const { displayFormat: a, outputFormat: s } = R(
|
|
364
|
-
() => _e[r],
|
|
365
|
-
[r]
|
|
366
|
-
), l = R(
|
|
367
|
-
() => Object.values(_e).map((u) => u.outputFormat).sort((u, g) => {
|
|
368
|
-
if (u.length === g.length) {
|
|
369
|
-
if (u === s) return -1;
|
|
370
|
-
if (g === s) return 1;
|
|
371
|
-
}
|
|
372
|
-
return g.length - u.length;
|
|
373
|
-
}),
|
|
374
|
-
[s]
|
|
375
|
-
// type(outputFormat)이 바뀔 때마다 재정렬
|
|
376
|
-
);
|
|
377
|
-
return /* @__PURE__ */ c.jsx(
|
|
378
|
-
j,
|
|
379
|
-
{
|
|
380
|
-
...t,
|
|
381
|
-
getValueProps: (u) => ({
|
|
382
|
-
// value가 있을 경우, 모든 가능한 outputFormat으로 파싱을 시도합니다.
|
|
383
|
-
value: u && u.length > 0 ? [
|
|
384
|
-
u[0] ? A(u[0], l) : null,
|
|
385
|
-
u[1] ? A(u[1], l) : null
|
|
386
|
-
] : null
|
|
387
|
-
}),
|
|
388
|
-
normalize: (u) => u ? [
|
|
389
|
-
u[0] ? u[0].format(s) : void 0,
|
|
390
|
-
u[1] ? u[1].format(s) : void 0
|
|
391
|
-
] : [void 0, void 0],
|
|
392
|
-
children: /* @__PURE__ */ c.jsx(
|
|
393
|
-
Xt,
|
|
394
|
-
{
|
|
395
|
-
...e,
|
|
396
|
-
order: !0,
|
|
397
|
-
minDate: n ? A(n, l) : void 0,
|
|
398
|
-
maxDate: i ? A(i, l) : void 0,
|
|
399
|
-
picker: r === "datetime" ? "date" : r,
|
|
400
|
-
showTime: e?.showTime ?? (r === "datetime" || r === "time"),
|
|
401
|
-
format: a
|
|
402
|
-
}
|
|
403
|
-
)
|
|
404
|
-
}
|
|
405
|
-
);
|
|
406
|
-
}, ji = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(j, { ...t, children: /* @__PURE__ */ c.jsx(St.Group, { ...e }) }), _i = ({
|
|
407
|
-
itemProps: t,
|
|
408
|
-
inputProps: e = {
|
|
409
|
-
format: "YN"
|
|
410
|
-
}
|
|
411
|
-
}) => {
|
|
412
|
-
const r = k.useFormInstance(), n = (i) => {
|
|
413
|
-
e.format === "boolean" ? r.setFieldValue(t?.name, i.target.checked) : r.setFieldValue(t?.name, i.target.checked ? "Y" : "N"), e.onChange && e.onChange(i);
|
|
414
|
-
};
|
|
415
|
-
return /* @__PURE__ */ c.jsx(
|
|
416
|
-
j,
|
|
417
|
-
{
|
|
418
|
-
...t,
|
|
419
|
-
getValueProps: (i) => (console.log("getValueProps :: ", i), { checked: e.format === "boolean" ? !!i : i === "Y" }),
|
|
420
|
-
normalize: (i) => (console.log("normalize :: ", i), typeof i == "boolean" ? e.format === "boolean" ? i : i ? "Y" : "N" : e.format === "boolean" ? !!i : i ? "Y" : "N"),
|
|
421
|
-
children: /* @__PURE__ */ c.jsx(me, { ...e, onChange: n, children: e?.title })
|
|
422
|
-
}
|
|
423
|
-
);
|
|
424
|
-
}, Li = ({ itemProps: t, inputProps: e }) => {
|
|
425
|
-
const r = k.useFormInstance(), [n, i] = Y(
|
|
239
|
+
}, _i = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(k, { ...t, children: /* @__PURE__ */ c.jsx(vt.Group, { ...e }) }), Ri = ({ itemProps: t, inputProps: e }) => {
|
|
240
|
+
const r = U.useFormInstance(), [n, i] = L(
|
|
426
241
|
t?.initialValue ?? []
|
|
427
|
-
), [o, a] =
|
|
428
|
-
|
|
429
|
-
a(
|
|
430
|
-
}, [e?.options]),
|
|
242
|
+
), [o, a] = L([]), s = o.length > 0 && o.length == n?.length, u = n?.length > 0 && n.length < o.length;
|
|
243
|
+
M(() => {
|
|
244
|
+
a(l(e?.options));
|
|
245
|
+
}, [e?.options]), M(() => {
|
|
431
246
|
i(n);
|
|
432
247
|
}, [n]);
|
|
433
|
-
const
|
|
248
|
+
const l = (g) => {
|
|
434
249
|
const d = [];
|
|
435
|
-
return (
|
|
436
|
-
d.push(
|
|
250
|
+
return (g || []).map((b, D) => {
|
|
251
|
+
d.push(b.value);
|
|
437
252
|
}), d;
|
|
438
|
-
},
|
|
439
|
-
i(
|
|
440
|
-
},
|
|
441
|
-
i(
|
|
253
|
+
}, p = (g) => {
|
|
254
|
+
i(g.target.checked ? o : []), r.setFieldValue(t?.name, g.target.checked ? o : []);
|
|
255
|
+
}, m = (g) => {
|
|
256
|
+
i(g), r.setFieldValue(t?.name, g), e?.onChange && typeof e?.onChange == "function" && e?.onChange(g);
|
|
442
257
|
};
|
|
443
|
-
return /* @__PURE__ */ c.jsx(
|
|
258
|
+
return /* @__PURE__ */ c.jsx(k, { ...t, children: /* @__PURE__ */ c.jsxs(Dt, { theme: {
|
|
444
259
|
components: {
|
|
445
260
|
Checkbox: {
|
|
446
261
|
colorPrimary: "var(--check-primary)",
|
|
@@ -450,24 +265,24 @@ const Ei = ({
|
|
|
450
265
|
}
|
|
451
266
|
}, children: [
|
|
452
267
|
e?.allCheck && /* @__PURE__ */ c.jsx(
|
|
453
|
-
|
|
268
|
+
we,
|
|
454
269
|
{
|
|
455
|
-
indeterminate:
|
|
270
|
+
indeterminate: u,
|
|
456
271
|
checked: s,
|
|
457
|
-
onChange:
|
|
272
|
+
onChange: p,
|
|
458
273
|
children: "전체선택"
|
|
459
274
|
}
|
|
460
275
|
),
|
|
461
276
|
/* @__PURE__ */ c.jsx(
|
|
462
|
-
|
|
277
|
+
we.Group,
|
|
463
278
|
{
|
|
464
279
|
options: e?.options,
|
|
465
280
|
value: n,
|
|
466
|
-
onChange:
|
|
281
|
+
onChange: m
|
|
467
282
|
}
|
|
468
283
|
)
|
|
469
284
|
] }) });
|
|
470
|
-
}, { TextArea: Wt } =
|
|
285
|
+
}, { TextArea: Wt } = ee, Mi = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(k, { ...t, children: /* @__PURE__ */ c.jsx(Wt, { ...e }) }), Li = ({ itemProps: t, inputProps: e }) => {
|
|
471
286
|
const r = (i) => {
|
|
472
287
|
let o = i.toString().split(".");
|
|
473
288
|
return e?.decimalPoint != null && o[1] != null && e?.decimalPoint > 0 ? o[1].length > e?.decimalPoint ? o[1] = "." + o[1].substring(0, e?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + o[1];
|
|
@@ -475,23 +290,23 @@ const Ei = ({
|
|
|
475
290
|
let o = i.toString().split(".");
|
|
476
291
|
return e?.decimalPoint != null && o[1] != null && e?.decimalPoint > 0 ? o[1].length > e?.decimalPoint ? o[1] = "." + o[1].substring(0, e?.decimalPoint) : o[1] = "." + o[1] : o[1] = "", o[0].replace(/\$\s?|(,*)/g, "") + o[1];
|
|
477
292
|
};
|
|
478
|
-
return /* @__PURE__ */ c.jsx(
|
|
479
|
-
|
|
293
|
+
return /* @__PURE__ */ c.jsx(k, { ...t, children: /* @__PURE__ */ c.jsx(
|
|
294
|
+
yt,
|
|
480
295
|
{
|
|
481
296
|
...e,
|
|
482
297
|
formatter: (i) => r(i),
|
|
483
298
|
parser: (i) => n(i)
|
|
484
299
|
}
|
|
485
300
|
) });
|
|
486
|
-
}, { Option:
|
|
487
|
-
const [r, n] =
|
|
488
|
-
return
|
|
301
|
+
}, { Option: Re } = We, ji = ({ itemProps: t, inputProps: e }) => {
|
|
302
|
+
const [r, n] = L([]);
|
|
303
|
+
return M(() => {
|
|
489
304
|
e?.addField === "ALL" ? n([
|
|
490
305
|
{ label: "전체", value: "" },
|
|
491
306
|
...e?.list || []
|
|
492
307
|
]) : e?.addField === "NULL" ? n([{ label: "", value: "" }, ...e?.list || []]) : n(e?.list || []);
|
|
493
308
|
}, [e?.list]), /* @__PURE__ */ c.jsx(
|
|
494
|
-
|
|
309
|
+
k,
|
|
495
310
|
{
|
|
496
311
|
...t,
|
|
497
312
|
getValueProps: (i) => i ? {
|
|
@@ -500,25 +315,25 @@ const Ei = ({
|
|
|
500
315
|
value: []
|
|
501
316
|
},
|
|
502
317
|
normalize: (i) => i != null && i != null && i.length > 0 ? i.toString() : "",
|
|
503
|
-
children: /* @__PURE__ */ c.jsx(
|
|
318
|
+
children: /* @__PURE__ */ c.jsx(We, { ...e, mode: "multiple", children: r.map((i) => {
|
|
504
319
|
const { value: o, label: a } = i;
|
|
505
|
-
return e?.printCode ? /* @__PURE__ */ c.jsx(
|
|
320
|
+
return e?.printCode ? /* @__PURE__ */ c.jsx(Re, { value: o, label: a, children: /* @__PURE__ */ c.jsx(pe, { children: `[${o}] ${a}` }) }, o) : /* @__PURE__ */ c.jsx(Re, { value: o, label: a, children: /* @__PURE__ */ c.jsx(pe, { children: `${a}` }) }, o);
|
|
506
321
|
}) })
|
|
507
322
|
}
|
|
508
323
|
);
|
|
509
|
-
},
|
|
324
|
+
}, Fi = (t) => /* @__PURE__ */ c.jsx(B, { ...t, className: "bwg-btn" }), Qe = Ft({
|
|
510
325
|
dragDropManager: void 0
|
|
511
326
|
});
|
|
512
|
-
function
|
|
327
|
+
function j(t) {
|
|
513
328
|
return "Minified Redux error #" + t + "; visit https://redux.js.org/Errors?code=" + t + " for the full message or use the non-minified dev environment for full errors. ";
|
|
514
329
|
}
|
|
515
|
-
var
|
|
330
|
+
var Me = (function() {
|
|
516
331
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
517
|
-
})(),
|
|
332
|
+
})(), Le = function() {
|
|
518
333
|
return Math.random().toString(36).substring(7).split("").join(".");
|
|
519
|
-
},
|
|
520
|
-
INIT: "@@redux/INIT" +
|
|
521
|
-
REPLACE: "@@redux/REPLACE" +
|
|
334
|
+
}, je = {
|
|
335
|
+
INIT: "@@redux/INIT" + Le(),
|
|
336
|
+
REPLACE: "@@redux/REPLACE" + Le()
|
|
522
337
|
};
|
|
523
338
|
function Kt(t) {
|
|
524
339
|
if (typeof t != "object" || t === null) return !1;
|
|
@@ -562,74 +377,74 @@ function Qt(t) {
|
|
|
562
377
|
function er(t) {
|
|
563
378
|
return t instanceof Date ? !0 : typeof t.toDateString == "function" && typeof t.getDate == "function" && typeof t.setDate == "function";
|
|
564
379
|
}
|
|
565
|
-
function
|
|
380
|
+
function G(t) {
|
|
566
381
|
var e = typeof t;
|
|
567
382
|
return process.env.NODE_ENV !== "production" && (e = Jt(t)), e;
|
|
568
383
|
}
|
|
569
|
-
function
|
|
384
|
+
function et(t, e, r) {
|
|
570
385
|
var n;
|
|
571
386
|
if (typeof e == "function" && typeof r == "function" || typeof r == "function" && typeof arguments[3] == "function")
|
|
572
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
387
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
|
|
573
388
|
if (typeof e == "function" && typeof r > "u" && (r = e, e = void 0), typeof r < "u") {
|
|
574
389
|
if (typeof r != "function")
|
|
575
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
576
|
-
return r(
|
|
390
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(1) : "Expected the enhancer to be a function. Instead, received: '" + G(r) + "'");
|
|
391
|
+
return r(et)(t, e);
|
|
577
392
|
}
|
|
578
393
|
if (typeof t != "function")
|
|
579
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
580
|
-
var i = t, o = e, a = [], s = a,
|
|
581
|
-
function
|
|
394
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(2) : "Expected the root reducer to be a function. Instead, received: '" + G(t) + "'");
|
|
395
|
+
var i = t, o = e, a = [], s = a, u = !1;
|
|
396
|
+
function l() {
|
|
582
397
|
s === a && (s = a.slice());
|
|
583
398
|
}
|
|
584
|
-
function
|
|
585
|
-
if (
|
|
586
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
399
|
+
function p() {
|
|
400
|
+
if (u)
|
|
401
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
|
|
587
402
|
return o;
|
|
588
403
|
}
|
|
589
|
-
function
|
|
590
|
-
if (typeof
|
|
591
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
592
|
-
if (
|
|
593
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
594
|
-
var
|
|
595
|
-
return
|
|
596
|
-
if (
|
|
597
|
-
if (
|
|
598
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
599
|
-
|
|
600
|
-
var h = s.indexOf(
|
|
404
|
+
function m(D) {
|
|
405
|
+
if (typeof D != "function")
|
|
406
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(4) : "Expected the listener to be a function. Instead, received: '" + G(D) + "'");
|
|
407
|
+
if (u)
|
|
408
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
409
|
+
var E = !0;
|
|
410
|
+
return l(), s.push(D), function() {
|
|
411
|
+
if (E) {
|
|
412
|
+
if (u)
|
|
413
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
414
|
+
E = !1, l();
|
|
415
|
+
var h = s.indexOf(D);
|
|
601
416
|
s.splice(h, 1), a = null;
|
|
602
417
|
}
|
|
603
418
|
};
|
|
604
419
|
}
|
|
605
|
-
function
|
|
606
|
-
if (!Kt(
|
|
607
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
608
|
-
if (typeof
|
|
609
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
610
|
-
if (
|
|
611
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
420
|
+
function g(D) {
|
|
421
|
+
if (!Kt(D))
|
|
422
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(7) : "Actions must be plain objects. Instead, the actual type was: '" + G(D) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
|
|
423
|
+
if (typeof D.type > "u")
|
|
424
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
|
|
425
|
+
if (u)
|
|
426
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(9) : "Reducers may not dispatch actions.");
|
|
612
427
|
try {
|
|
613
|
-
|
|
428
|
+
u = !0, o = i(o, D);
|
|
614
429
|
} finally {
|
|
615
|
-
|
|
430
|
+
u = !1;
|
|
616
431
|
}
|
|
617
|
-
for (var
|
|
618
|
-
var h =
|
|
432
|
+
for (var E = a = s, v = 0; v < E.length; v++) {
|
|
433
|
+
var h = E[v];
|
|
619
434
|
h();
|
|
620
435
|
}
|
|
621
|
-
return
|
|
436
|
+
return D;
|
|
622
437
|
}
|
|
623
|
-
function d(
|
|
624
|
-
if (typeof
|
|
625
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
626
|
-
i =
|
|
627
|
-
type:
|
|
438
|
+
function d(D) {
|
|
439
|
+
if (typeof D != "function")
|
|
440
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(10) : "Expected the nextReducer to be a function. Instead, received: '" + G(D));
|
|
441
|
+
i = D, g({
|
|
442
|
+
type: je.REPLACE
|
|
628
443
|
});
|
|
629
444
|
}
|
|
630
|
-
function
|
|
631
|
-
var
|
|
632
|
-
return
|
|
445
|
+
function b() {
|
|
446
|
+
var D, E = m;
|
|
447
|
+
return D = {
|
|
633
448
|
/**
|
|
634
449
|
* The minimal observable subscription method.
|
|
635
450
|
* @param {Object} observer Any object that can be used as an observer.
|
|
@@ -640,30 +455,30 @@ function nt(t, e, r) {
|
|
|
640
455
|
*/
|
|
641
456
|
subscribe: function(h) {
|
|
642
457
|
if (typeof h != "object" || h === null)
|
|
643
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
644
|
-
function
|
|
645
|
-
h.next && h.next(
|
|
458
|
+
throw new Error(process.env.NODE_ENV === "production" ? j(11) : "Expected the observer to be an object. Instead, received: '" + G(h) + "'");
|
|
459
|
+
function I() {
|
|
460
|
+
h.next && h.next(p());
|
|
646
461
|
}
|
|
647
|
-
|
|
648
|
-
var f =
|
|
462
|
+
I();
|
|
463
|
+
var f = E(I);
|
|
649
464
|
return {
|
|
650
465
|
unsubscribe: f
|
|
651
466
|
};
|
|
652
467
|
}
|
|
653
|
-
},
|
|
468
|
+
}, D[Me] = function() {
|
|
654
469
|
return this;
|
|
655
|
-
},
|
|
470
|
+
}, D;
|
|
656
471
|
}
|
|
657
|
-
return
|
|
658
|
-
type:
|
|
472
|
+
return g({
|
|
473
|
+
type: je.INIT
|
|
659
474
|
}), n = {
|
|
660
|
-
dispatch:
|
|
661
|
-
subscribe:
|
|
662
|
-
getState:
|
|
475
|
+
dispatch: g,
|
|
476
|
+
subscribe: m,
|
|
477
|
+
getState: p,
|
|
663
478
|
replaceReducer: d
|
|
664
|
-
}, n[
|
|
479
|
+
}, n[Me] = b, n;
|
|
665
480
|
}
|
|
666
|
-
function
|
|
481
|
+
function y(t, e, ...r) {
|
|
667
482
|
if (tr() && e === void 0)
|
|
668
483
|
throw new Error("invariant requires an error message argument");
|
|
669
484
|
if (!t) {
|
|
@@ -693,7 +508,7 @@ function nr(t, e) {
|
|
|
693
508
|
(r) => r !== e
|
|
694
509
|
);
|
|
695
510
|
}
|
|
696
|
-
function
|
|
511
|
+
function tt(t) {
|
|
697
512
|
return typeof t == "object";
|
|
698
513
|
}
|
|
699
514
|
function ir(t, e) {
|
|
@@ -711,10 +526,10 @@ function or(t, e) {
|
|
|
711
526
|
(r) => e.indexOf(r) > -1
|
|
712
527
|
);
|
|
713
528
|
}
|
|
714
|
-
const
|
|
715
|
-
function
|
|
529
|
+
const Oe = "dnd-core/INIT_COORDS", ie = "dnd-core/BEGIN_DRAG", Te = "dnd-core/PUBLISH_DRAG_SOURCE", oe = "dnd-core/HOVER", se = "dnd-core/DROP", ae = "dnd-core/END_DRAG";
|
|
530
|
+
function Fe(t, e) {
|
|
716
531
|
return {
|
|
717
|
-
type:
|
|
532
|
+
type: Oe,
|
|
718
533
|
payload: {
|
|
719
534
|
sourceClientOffset: e || null,
|
|
720
535
|
clientOffset: t || null
|
|
@@ -722,7 +537,7 @@ function Ae(t, e) {
|
|
|
722
537
|
};
|
|
723
538
|
}
|
|
724
539
|
const sr = {
|
|
725
|
-
type:
|
|
540
|
+
type: Oe,
|
|
726
541
|
payload: {
|
|
727
542
|
clientOffset: null,
|
|
728
543
|
sourceClientOffset: null
|
|
@@ -732,48 +547,48 @@ function ar(t) {
|
|
|
732
547
|
return function(r = [], n = {
|
|
733
548
|
publishSource: !0
|
|
734
549
|
}) {
|
|
735
|
-
const { publishSource: i = !0, clientOffset: o, getSourceClientOffset: a } = n, s = t.getMonitor(),
|
|
736
|
-
t.dispatch(
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
550
|
+
const { publishSource: i = !0, clientOffset: o, getSourceClientOffset: a } = n, s = t.getMonitor(), u = t.getRegistry();
|
|
551
|
+
t.dispatch(Fe(o)), cr(r, s, u);
|
|
552
|
+
const l = dr(r, s);
|
|
553
|
+
if (l == null) {
|
|
739
554
|
t.dispatch(sr);
|
|
740
555
|
return;
|
|
741
556
|
}
|
|
742
|
-
let
|
|
557
|
+
let p = null;
|
|
743
558
|
if (o) {
|
|
744
559
|
if (!a)
|
|
745
560
|
throw new Error("getSourceClientOffset must be defined");
|
|
746
|
-
ur(a),
|
|
561
|
+
ur(a), p = a(l);
|
|
747
562
|
}
|
|
748
|
-
t.dispatch(
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
563
|
+
t.dispatch(Fe(o, p));
|
|
564
|
+
const g = u.getSource(l).beginDrag(s, l);
|
|
565
|
+
if (g == null)
|
|
751
566
|
return;
|
|
752
|
-
lr(
|
|
753
|
-
const d =
|
|
567
|
+
lr(g), u.pinSource(l);
|
|
568
|
+
const d = u.getSourceType(l);
|
|
754
569
|
return {
|
|
755
570
|
type: ie,
|
|
756
571
|
payload: {
|
|
757
572
|
itemType: d,
|
|
758
|
-
item:
|
|
759
|
-
sourceId:
|
|
573
|
+
item: g,
|
|
574
|
+
sourceId: l,
|
|
760
575
|
clientOffset: o || null,
|
|
761
|
-
sourceClientOffset:
|
|
576
|
+
sourceClientOffset: p || null,
|
|
762
577
|
isSourcePublic: !!i
|
|
763
578
|
}
|
|
764
579
|
};
|
|
765
580
|
};
|
|
766
581
|
}
|
|
767
582
|
function cr(t, e, r) {
|
|
768
|
-
|
|
769
|
-
|
|
583
|
+
y(!e.isDragging(), "Cannot call beginDrag while dragging."), t.forEach(function(n) {
|
|
584
|
+
y(r.getSource(n), "Expected sourceIds to be registered.");
|
|
770
585
|
});
|
|
771
586
|
}
|
|
772
587
|
function ur(t) {
|
|
773
|
-
|
|
588
|
+
y(typeof t == "function", "When clientOffset is provided, getSourceClientOffset must be a function.");
|
|
774
589
|
}
|
|
775
590
|
function lr(t) {
|
|
776
|
-
|
|
591
|
+
y(tt(t), "Item must be an object.");
|
|
777
592
|
}
|
|
778
593
|
function dr(t, e) {
|
|
779
594
|
let r = null;
|
|
@@ -806,19 +621,19 @@ function gr(t) {
|
|
|
806
621
|
function hr(t) {
|
|
807
622
|
return function(r = {}) {
|
|
808
623
|
const n = t.getMonitor(), i = t.getRegistry();
|
|
809
|
-
pr(n),
|
|
810
|
-
const
|
|
624
|
+
pr(n), Dr(n).forEach((a, s) => {
|
|
625
|
+
const u = mr(a, s, i, n), l = {
|
|
811
626
|
type: se,
|
|
812
627
|
payload: {
|
|
813
|
-
dropResult: gr({}, r,
|
|
628
|
+
dropResult: gr({}, r, u)
|
|
814
629
|
}
|
|
815
630
|
};
|
|
816
|
-
t.dispatch(
|
|
631
|
+
t.dispatch(l);
|
|
817
632
|
});
|
|
818
633
|
};
|
|
819
634
|
}
|
|
820
635
|
function pr(t) {
|
|
821
|
-
|
|
636
|
+
y(t.isDragging(), "Cannot call drop while not dragging."), y(!t.didDrop(), "Cannot call drop twice during one drag operation.");
|
|
822
637
|
}
|
|
823
638
|
function mr(t, e, r, n) {
|
|
824
639
|
const i = r.getTarget(t);
|
|
@@ -826,13 +641,13 @@ function mr(t, e, r, n) {
|
|
|
826
641
|
return vr(o), typeof o > "u" && (o = e === 0 ? {} : n.getDropResult()), o;
|
|
827
642
|
}
|
|
828
643
|
function vr(t) {
|
|
829
|
-
|
|
644
|
+
y(typeof t > "u" || tt(t), "Drop result must either be an object or undefined.");
|
|
830
645
|
}
|
|
831
|
-
function
|
|
646
|
+
function Dr(t) {
|
|
832
647
|
const e = t.getTargetIds().filter(t.canDropOnTarget, t);
|
|
833
648
|
return e.reverse(), e;
|
|
834
649
|
}
|
|
835
|
-
function
|
|
650
|
+
function yr(t) {
|
|
836
651
|
return function() {
|
|
837
652
|
const r = t.getMonitor(), n = t.getRegistry();
|
|
838
653
|
Sr(r);
|
|
@@ -843,18 +658,18 @@ function Dr(t) {
|
|
|
843
658
|
};
|
|
844
659
|
}
|
|
845
660
|
function Sr(t) {
|
|
846
|
-
|
|
661
|
+
y(t.isDragging(), "Cannot call endDrag while not dragging.");
|
|
847
662
|
}
|
|
848
|
-
function
|
|
663
|
+
function me(t, e) {
|
|
849
664
|
return e === null ? t === null : Array.isArray(t) ? t.some(
|
|
850
665
|
(r) => r === e
|
|
851
666
|
) : t === e;
|
|
852
667
|
}
|
|
853
668
|
function Or(t) {
|
|
854
669
|
return function(r, { clientOffset: n } = {}) {
|
|
855
|
-
|
|
670
|
+
Tr(r);
|
|
856
671
|
const i = r.slice(0), o = t.getMonitor(), a = t.getRegistry(), s = o.getItemType();
|
|
857
|
-
return Ir(i, a, s),
|
|
672
|
+
return Ir(i, a, s), br(i, o, a), Er(i, o, a), {
|
|
858
673
|
type: oe,
|
|
859
674
|
payload: {
|
|
860
675
|
targetIds: i,
|
|
@@ -863,44 +678,44 @@ function Or(t) {
|
|
|
863
678
|
};
|
|
864
679
|
};
|
|
865
680
|
}
|
|
866
|
-
function
|
|
867
|
-
|
|
681
|
+
function Tr(t) {
|
|
682
|
+
y(Array.isArray(t), "Expected targetIds to be an array.");
|
|
868
683
|
}
|
|
869
|
-
function
|
|
870
|
-
|
|
684
|
+
function br(t, e, r) {
|
|
685
|
+
y(e.isDragging(), "Cannot call hover while not dragging."), y(!e.didDrop(), "Cannot call hover after drop.");
|
|
871
686
|
for (let n = 0; n < t.length; n++) {
|
|
872
687
|
const i = t[n];
|
|
873
|
-
|
|
688
|
+
y(t.lastIndexOf(i) === n, "Expected targetIds to be unique in the passed array.");
|
|
874
689
|
const o = r.getTarget(i);
|
|
875
|
-
|
|
690
|
+
y(o, "Expected targetIds to be registered.");
|
|
876
691
|
}
|
|
877
692
|
}
|
|
878
693
|
function Ir(t, e, r) {
|
|
879
694
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
880
695
|
const i = t[n], o = e.getTargetType(i);
|
|
881
|
-
|
|
696
|
+
me(o, r) || t.splice(n, 1);
|
|
882
697
|
}
|
|
883
698
|
}
|
|
884
|
-
function
|
|
699
|
+
function Er(t, e, r) {
|
|
885
700
|
t.forEach(function(n) {
|
|
886
701
|
r.getTarget(n).hover(e, n);
|
|
887
702
|
});
|
|
888
703
|
}
|
|
889
|
-
function
|
|
704
|
+
function Cr(t) {
|
|
890
705
|
return function() {
|
|
891
706
|
if (t.getMonitor().isDragging())
|
|
892
707
|
return {
|
|
893
|
-
type:
|
|
708
|
+
type: Te
|
|
894
709
|
};
|
|
895
710
|
};
|
|
896
711
|
}
|
|
897
712
|
function wr(t) {
|
|
898
713
|
return {
|
|
899
714
|
beginDrag: ar(t),
|
|
900
|
-
publishDragSource:
|
|
715
|
+
publishDragSource: Cr(t),
|
|
901
716
|
hover: Or(t),
|
|
902
717
|
drop: hr(t),
|
|
903
|
-
endDrag:
|
|
718
|
+
endDrag: yr(t)
|
|
904
719
|
};
|
|
905
720
|
}
|
|
906
721
|
class xr {
|
|
@@ -946,7 +761,7 @@ function Nr(t, e) {
|
|
|
946
761
|
y: t.y + e.y
|
|
947
762
|
};
|
|
948
763
|
}
|
|
949
|
-
function
|
|
764
|
+
function rt(t, e) {
|
|
950
765
|
return {
|
|
951
766
|
x: t.x - e.x,
|
|
952
767
|
y: t.y - e.y
|
|
@@ -954,22 +769,22 @@ function ot(t, e) {
|
|
|
954
769
|
}
|
|
955
770
|
function Pr(t) {
|
|
956
771
|
const { clientOffset: e, initialClientOffset: r, initialSourceClientOffset: n } = t;
|
|
957
|
-
return !e || !r || !n ? null :
|
|
772
|
+
return !e || !r || !n ? null : rt(Nr(e, n), r);
|
|
958
773
|
}
|
|
959
|
-
function
|
|
774
|
+
function _r(t) {
|
|
960
775
|
const { clientOffset: e, initialClientOffset: r } = t;
|
|
961
|
-
return !e || !r ? null :
|
|
776
|
+
return !e || !r ? null : rt(e, r);
|
|
962
777
|
}
|
|
963
|
-
const Q = [],
|
|
778
|
+
const Q = [], be = [];
|
|
964
779
|
Q.__IS_NONE__ = !0;
|
|
965
|
-
|
|
780
|
+
be.__IS_ALL__ = !0;
|
|
966
781
|
function Rr(t, e) {
|
|
967
|
-
return t === Q ? !1 : t ===
|
|
782
|
+
return t === Q ? !1 : t === be || typeof e > "u" ? !0 : or(e, t).length > 0;
|
|
968
783
|
}
|
|
969
|
-
class
|
|
784
|
+
class Mr {
|
|
970
785
|
subscribeToStateChange(e, r = {}) {
|
|
971
786
|
const { handlerIds: n } = r;
|
|
972
|
-
|
|
787
|
+
y(typeof e == "function", "listener must be a function."), y(typeof n > "u" || Array.isArray(n), "handlerIds, when specified, must be an array of strings.");
|
|
973
788
|
let i = this.store.getState().stateId;
|
|
974
789
|
const o = () => {
|
|
975
790
|
const a = this.store.getState(), s = a.stateId;
|
|
@@ -982,7 +797,7 @@ class jr {
|
|
|
982
797
|
return this.store.subscribe(o);
|
|
983
798
|
}
|
|
984
799
|
subscribeToOffsetChange(e) {
|
|
985
|
-
|
|
800
|
+
y(typeof e == "function", "listener must be a function.");
|
|
986
801
|
let r = this.store.getState().dragOffset;
|
|
987
802
|
const n = () => {
|
|
988
803
|
const i = this.store.getState().dragOffset;
|
|
@@ -994,16 +809,16 @@ class jr {
|
|
|
994
809
|
if (!e)
|
|
995
810
|
return !1;
|
|
996
811
|
const r = this.registry.getSource(e);
|
|
997
|
-
return
|
|
812
|
+
return y(r, `Expected to find a valid source. sourceId=${e}`), this.isDragging() ? !1 : r.canDrag(this, e);
|
|
998
813
|
}
|
|
999
814
|
canDropOnTarget(e) {
|
|
1000
815
|
if (!e)
|
|
1001
816
|
return !1;
|
|
1002
817
|
const r = this.registry.getTarget(e);
|
|
1003
|
-
if (
|
|
818
|
+
if (y(r, `Expected to find a valid target. targetId=${e}`), !this.isDragging() || this.didDrop())
|
|
1004
819
|
return !1;
|
|
1005
820
|
const n = this.registry.getTargetType(e), i = this.getItemType();
|
|
1006
|
-
return
|
|
821
|
+
return me(n, i) && r.canDrop(this, e);
|
|
1007
822
|
}
|
|
1008
823
|
isDragging() {
|
|
1009
824
|
return !!this.getItemType();
|
|
@@ -1012,7 +827,7 @@ class jr {
|
|
|
1012
827
|
if (!e)
|
|
1013
828
|
return !1;
|
|
1014
829
|
const r = this.registry.getSource(e, !0);
|
|
1015
|
-
if (
|
|
830
|
+
if (y(r, `Expected to find a valid source. sourceId=${e}`), !this.isDragging() || !this.isSourcePublic())
|
|
1016
831
|
return !1;
|
|
1017
832
|
const n = this.registry.getSourceType(e), i = this.getItemType();
|
|
1018
833
|
return n !== i ? !1 : r.isDragging(this, e);
|
|
@@ -1026,7 +841,7 @@ class jr {
|
|
|
1026
841
|
if (!this.isDragging())
|
|
1027
842
|
return !1;
|
|
1028
843
|
const i = this.registry.getTargetType(e), o = this.getItemType();
|
|
1029
|
-
if (o && !
|
|
844
|
+
if (o && !me(i, o))
|
|
1030
845
|
return !1;
|
|
1031
846
|
const a = this.getTargetIds();
|
|
1032
847
|
if (!a.length)
|
|
@@ -1068,14 +883,14 @@ class jr {
|
|
|
1068
883
|
return Pr(this.store.getState().dragOffset);
|
|
1069
884
|
}
|
|
1070
885
|
getDifferenceFromInitialOffset() {
|
|
1071
|
-
return
|
|
886
|
+
return _r(this.store.getState().dragOffset);
|
|
1072
887
|
}
|
|
1073
888
|
constructor(e, r) {
|
|
1074
889
|
this.store = e, this.registry = r;
|
|
1075
890
|
}
|
|
1076
891
|
}
|
|
1077
|
-
const
|
|
1078
|
-
function
|
|
892
|
+
const ke = typeof global < "u" ? global : self, nt = ke.MutationObserver || ke.WebKitMutationObserver;
|
|
893
|
+
function it(t) {
|
|
1079
894
|
return function() {
|
|
1080
895
|
const r = setTimeout(i, 0), n = setInterval(i, 50);
|
|
1081
896
|
function i() {
|
|
@@ -1083,16 +898,16 @@ function at(t) {
|
|
|
1083
898
|
}
|
|
1084
899
|
};
|
|
1085
900
|
}
|
|
1086
|
-
function
|
|
901
|
+
function Lr(t) {
|
|
1087
902
|
let e = 1;
|
|
1088
|
-
const r = new
|
|
903
|
+
const r = new nt(t), n = document.createTextNode("");
|
|
1089
904
|
return r.observe(n, {
|
|
1090
905
|
characterData: !0
|
|
1091
906
|
}), function() {
|
|
1092
907
|
e = -e, n.data = e;
|
|
1093
908
|
};
|
|
1094
909
|
}
|
|
1095
|
-
const
|
|
910
|
+
const jr = typeof nt == "function" ? (
|
|
1096
911
|
// reliably everywhere they are implemented.
|
|
1097
912
|
// They are implemented in all modern browsers.
|
|
1098
913
|
//
|
|
@@ -1103,7 +918,7 @@ const Lr = typeof st == "function" ? (
|
|
|
1103
918
|
// - iPad Safari 6-7.1
|
|
1104
919
|
// - iPhone Safari 7-7.1
|
|
1105
920
|
// - Safari 6-7
|
|
1106
|
-
|
|
921
|
+
Lr
|
|
1107
922
|
) : (
|
|
1108
923
|
// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
|
|
1109
924
|
// 11-12, and in web workers in many engines.
|
|
@@ -1129,7 +944,7 @@ const Lr = typeof st == "function" ? (
|
|
|
1129
944
|
// - Internet Explorer 6-9
|
|
1130
945
|
// - iPad Safari 4.3
|
|
1131
946
|
// - Lynx 2.8.7
|
|
1132
|
-
|
|
947
|
+
it
|
|
1133
948
|
);
|
|
1134
949
|
class Fr {
|
|
1135
950
|
// Use the fastest means possible to execute a task in its own turn, with
|
|
@@ -1160,13 +975,13 @@ class Fr {
|
|
|
1160
975
|
e.length = 0, this.index = 0, this.flushing = !1;
|
|
1161
976
|
}, this.registerPendingError = (e) => {
|
|
1162
977
|
this.pendingErrors.push(e), this.requestErrorThrow();
|
|
1163
|
-
}, this.requestFlush =
|
|
978
|
+
}, this.requestFlush = jr(this.flush), this.requestErrorThrow = it(() => {
|
|
1164
979
|
if (this.pendingErrors.length)
|
|
1165
980
|
throw this.pendingErrors.shift();
|
|
1166
981
|
});
|
|
1167
982
|
}
|
|
1168
983
|
}
|
|
1169
|
-
class
|
|
984
|
+
class kr {
|
|
1170
985
|
call() {
|
|
1171
986
|
try {
|
|
1172
987
|
this.task && this.task();
|
|
@@ -1180,9 +995,9 @@ class Yr {
|
|
|
1180
995
|
this.onError = e, this.release = r, this.task = null;
|
|
1181
996
|
}
|
|
1182
997
|
}
|
|
1183
|
-
class
|
|
998
|
+
class Ar {
|
|
1184
999
|
create(e) {
|
|
1185
|
-
const r = this.freeTasks, n = r.length ? r.pop() : new
|
|
1000
|
+
const r = this.freeTasks, n = r.length ? r.pop() : new kr(
|
|
1186
1001
|
this.onError,
|
|
1187
1002
|
(i) => r[r.length] = i
|
|
1188
1003
|
);
|
|
@@ -1192,14 +1007,14 @@ class kr {
|
|
|
1192
1007
|
this.onError = e, this.freeTasks = [];
|
|
1193
1008
|
}
|
|
1194
1009
|
}
|
|
1195
|
-
const
|
|
1010
|
+
const ot = new Fr(), Yr = new Ar(ot.registerPendingError);
|
|
1196
1011
|
function Hr(t) {
|
|
1197
|
-
|
|
1012
|
+
ot.enqueueTask(Yr.create(t));
|
|
1198
1013
|
}
|
|
1199
|
-
const
|
|
1014
|
+
const Ie = "dnd-core/ADD_SOURCE", Ee = "dnd-core/ADD_TARGET", Ce = "dnd-core/REMOVE_SOURCE", ce = "dnd-core/REMOVE_TARGET";
|
|
1200
1015
|
function Ur(t) {
|
|
1201
1016
|
return {
|
|
1202
|
-
type:
|
|
1017
|
+
type: Ie,
|
|
1203
1018
|
payload: {
|
|
1204
1019
|
sourceId: t
|
|
1205
1020
|
}
|
|
@@ -1207,7 +1022,7 @@ function Ur(t) {
|
|
|
1207
1022
|
}
|
|
1208
1023
|
function Br(t) {
|
|
1209
1024
|
return {
|
|
1210
|
-
type:
|
|
1025
|
+
type: Ee,
|
|
1211
1026
|
payload: {
|
|
1212
1027
|
targetId: t
|
|
1213
1028
|
}
|
|
@@ -1215,7 +1030,7 @@ function Br(t) {
|
|
|
1215
1030
|
}
|
|
1216
1031
|
function Vr(t) {
|
|
1217
1032
|
return {
|
|
1218
|
-
type:
|
|
1033
|
+
type: Ce,
|
|
1219
1034
|
payload: {
|
|
1220
1035
|
sourceId: t
|
|
1221
1036
|
}
|
|
@@ -1230,19 +1045,19 @@ function $r(t) {
|
|
|
1230
1045
|
};
|
|
1231
1046
|
}
|
|
1232
1047
|
function zr(t) {
|
|
1233
|
-
|
|
1048
|
+
y(typeof t.canDrag == "function", "Expected canDrag to be a function."), y(typeof t.beginDrag == "function", "Expected beginDrag to be a function."), y(typeof t.endDrag == "function", "Expected endDrag to be a function.");
|
|
1234
1049
|
}
|
|
1235
1050
|
function qr(t) {
|
|
1236
|
-
|
|
1051
|
+
y(typeof t.canDrop == "function", "Expected canDrop to be a function."), y(typeof t.hover == "function", "Expected hover to be a function."), y(typeof t.drop == "function", "Expected beginDrag to be a function.");
|
|
1237
1052
|
}
|
|
1238
|
-
function
|
|
1053
|
+
function ve(t, e) {
|
|
1239
1054
|
if (e && Array.isArray(t)) {
|
|
1240
1055
|
t.forEach(
|
|
1241
|
-
(r) =>
|
|
1056
|
+
(r) => ve(r, !1)
|
|
1242
1057
|
);
|
|
1243
1058
|
return;
|
|
1244
1059
|
}
|
|
1245
|
-
|
|
1060
|
+
y(typeof t == "string" || typeof t == "symbol", e ? "Type can only be a string, a symbol, or an array of either." : "Type can only be a string or a symbol.");
|
|
1246
1061
|
}
|
|
1247
1062
|
var F;
|
|
1248
1063
|
(function(t) {
|
|
@@ -1263,7 +1078,7 @@ function Wr(t) {
|
|
|
1263
1078
|
throw new Error(`Unknown Handler Role: ${t}`);
|
|
1264
1079
|
}
|
|
1265
1080
|
}
|
|
1266
|
-
function
|
|
1081
|
+
function Ae(t) {
|
|
1267
1082
|
switch (t[0]) {
|
|
1268
1083
|
case "S":
|
|
1269
1084
|
return F.SOURCE;
|
|
@@ -1273,7 +1088,7 @@ function Ue(t) {
|
|
|
1273
1088
|
throw new Error(`Cannot parse handler ID: ${t}`);
|
|
1274
1089
|
}
|
|
1275
1090
|
}
|
|
1276
|
-
function
|
|
1091
|
+
function Ye(t, e) {
|
|
1277
1092
|
const r = t.entries();
|
|
1278
1093
|
let n = !1;
|
|
1279
1094
|
do {
|
|
@@ -1286,50 +1101,50 @@ function Be(t, e) {
|
|
|
1286
1101
|
}
|
|
1287
1102
|
class Kr {
|
|
1288
1103
|
addSource(e, r) {
|
|
1289
|
-
|
|
1104
|
+
ve(e), zr(r);
|
|
1290
1105
|
const n = this.addHandler(F.SOURCE, e, r);
|
|
1291
1106
|
return this.store.dispatch(Ur(n)), n;
|
|
1292
1107
|
}
|
|
1293
1108
|
addTarget(e, r) {
|
|
1294
|
-
|
|
1109
|
+
ve(e, !0), qr(r);
|
|
1295
1110
|
const n = this.addHandler(F.TARGET, e, r);
|
|
1296
1111
|
return this.store.dispatch(Br(n)), n;
|
|
1297
1112
|
}
|
|
1298
1113
|
containsHandler(e) {
|
|
1299
|
-
return
|
|
1114
|
+
return Ye(this.dragSources, e) || Ye(this.dropTargets, e);
|
|
1300
1115
|
}
|
|
1301
1116
|
getSource(e, r = !1) {
|
|
1302
|
-
return
|
|
1117
|
+
return y(this.isSourceId(e), "Expected a valid source ID."), r && e === this.pinnedSourceId ? this.pinnedSource : this.dragSources.get(e);
|
|
1303
1118
|
}
|
|
1304
1119
|
getTarget(e) {
|
|
1305
|
-
return
|
|
1120
|
+
return y(this.isTargetId(e), "Expected a valid target ID."), this.dropTargets.get(e);
|
|
1306
1121
|
}
|
|
1307
1122
|
getSourceType(e) {
|
|
1308
|
-
return
|
|
1123
|
+
return y(this.isSourceId(e), "Expected a valid source ID."), this.types.get(e);
|
|
1309
1124
|
}
|
|
1310
1125
|
getTargetType(e) {
|
|
1311
|
-
return
|
|
1126
|
+
return y(this.isTargetId(e), "Expected a valid target ID."), this.types.get(e);
|
|
1312
1127
|
}
|
|
1313
1128
|
isSourceId(e) {
|
|
1314
|
-
return
|
|
1129
|
+
return Ae(e) === F.SOURCE;
|
|
1315
1130
|
}
|
|
1316
1131
|
isTargetId(e) {
|
|
1317
|
-
return
|
|
1132
|
+
return Ae(e) === F.TARGET;
|
|
1318
1133
|
}
|
|
1319
1134
|
removeSource(e) {
|
|
1320
|
-
|
|
1135
|
+
y(this.getSource(e), "Expected an existing source."), this.store.dispatch(Vr(e)), Hr(() => {
|
|
1321
1136
|
this.dragSources.delete(e), this.types.delete(e);
|
|
1322
1137
|
});
|
|
1323
1138
|
}
|
|
1324
1139
|
removeTarget(e) {
|
|
1325
|
-
|
|
1140
|
+
y(this.getTarget(e), "Expected an existing target."), this.store.dispatch($r(e)), this.dropTargets.delete(e), this.types.delete(e);
|
|
1326
1141
|
}
|
|
1327
1142
|
pinSource(e) {
|
|
1328
1143
|
const r = this.getSource(e);
|
|
1329
|
-
|
|
1144
|
+
y(r, "Expected an existing source."), this.pinnedSourceId = e, this.pinnedSource = r;
|
|
1330
1145
|
}
|
|
1331
1146
|
unpinSource() {
|
|
1332
|
-
|
|
1147
|
+
y(this.pinnedSource, "No source is pinned at the time."), this.pinnedSourceId = null, this.pinnedSource = null;
|
|
1333
1148
|
}
|
|
1334
1149
|
addHandler(e, r, n) {
|
|
1335
1150
|
const i = Wr(e);
|
|
@@ -1355,17 +1170,17 @@ function en(t = Q, e) {
|
|
|
1355
1170
|
switch (e.type) {
|
|
1356
1171
|
case oe:
|
|
1357
1172
|
break;
|
|
1358
|
-
case
|
|
1359
|
-
case
|
|
1173
|
+
case Ie:
|
|
1174
|
+
case Ee:
|
|
1360
1175
|
case ce:
|
|
1361
|
-
case
|
|
1176
|
+
case Ce:
|
|
1362
1177
|
return Q;
|
|
1363
1178
|
case ie:
|
|
1364
|
-
case
|
|
1179
|
+
case Te:
|
|
1365
1180
|
case ae:
|
|
1366
1181
|
case se:
|
|
1367
1182
|
default:
|
|
1368
|
-
return
|
|
1183
|
+
return be;
|
|
1369
1184
|
}
|
|
1370
1185
|
const { targetIds: r = [], prevTargetIds: n = [] } = e.payload, i = ir(r, n);
|
|
1371
1186
|
if (!(i.length > 0 || !Qr(r, n)))
|
|
@@ -1392,15 +1207,15 @@ function rn(t) {
|
|
|
1392
1207
|
}
|
|
1393
1208
|
return t;
|
|
1394
1209
|
}
|
|
1395
|
-
const
|
|
1210
|
+
const He = {
|
|
1396
1211
|
initialSourceClientOffset: null,
|
|
1397
1212
|
initialClientOffset: null,
|
|
1398
1213
|
clientOffset: null
|
|
1399
1214
|
};
|
|
1400
|
-
function nn(t =
|
|
1215
|
+
function nn(t = He, e) {
|
|
1401
1216
|
const { payload: r } = e;
|
|
1402
1217
|
switch (e.type) {
|
|
1403
|
-
case
|
|
1218
|
+
case Oe:
|
|
1404
1219
|
case ie:
|
|
1405
1220
|
return {
|
|
1406
1221
|
initialSourceClientOffset: r.sourceClientOffset,
|
|
@@ -1413,7 +1228,7 @@ function nn(t = Ve, e) {
|
|
|
1413
1228
|
});
|
|
1414
1229
|
case ae:
|
|
1415
1230
|
case se:
|
|
1416
|
-
return
|
|
1231
|
+
return He;
|
|
1417
1232
|
default:
|
|
1418
1233
|
return t;
|
|
1419
1234
|
}
|
|
@@ -1426,7 +1241,7 @@ function on(t, e, r) {
|
|
|
1426
1241
|
writable: !0
|
|
1427
1242
|
}) : t[e] = r, t;
|
|
1428
1243
|
}
|
|
1429
|
-
function
|
|
1244
|
+
function X(t) {
|
|
1430
1245
|
for (var e = 1; e < arguments.length; e++) {
|
|
1431
1246
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
1432
1247
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
@@ -1450,7 +1265,7 @@ function an(t = sn, e) {
|
|
|
1450
1265
|
const { payload: r } = e;
|
|
1451
1266
|
switch (e.type) {
|
|
1452
1267
|
case ie:
|
|
1453
|
-
return
|
|
1268
|
+
return X({}, t, {
|
|
1454
1269
|
itemType: r.itemType,
|
|
1455
1270
|
item: r.item,
|
|
1456
1271
|
sourceId: r.sourceId,
|
|
@@ -1458,26 +1273,26 @@ function an(t = sn, e) {
|
|
|
1458
1273
|
dropResult: null,
|
|
1459
1274
|
didDrop: !1
|
|
1460
1275
|
});
|
|
1461
|
-
case
|
|
1462
|
-
return
|
|
1276
|
+
case Te:
|
|
1277
|
+
return X({}, t, {
|
|
1463
1278
|
isSourcePublic: !0
|
|
1464
1279
|
});
|
|
1465
1280
|
case oe:
|
|
1466
|
-
return
|
|
1281
|
+
return X({}, t, {
|
|
1467
1282
|
targetIds: r.targetIds
|
|
1468
1283
|
});
|
|
1469
1284
|
case ce:
|
|
1470
|
-
return t.targetIds.indexOf(r.targetId) === -1 ? t :
|
|
1285
|
+
return t.targetIds.indexOf(r.targetId) === -1 ? t : X({}, t, {
|
|
1471
1286
|
targetIds: nr(t.targetIds, r.targetId)
|
|
1472
1287
|
});
|
|
1473
1288
|
case se:
|
|
1474
|
-
return
|
|
1289
|
+
return X({}, t, {
|
|
1475
1290
|
dropResult: r.dropResult,
|
|
1476
1291
|
didDrop: !0,
|
|
1477
1292
|
targetIds: []
|
|
1478
1293
|
});
|
|
1479
1294
|
case ae:
|
|
1480
|
-
return
|
|
1295
|
+
return X({}, t, {
|
|
1481
1296
|
itemType: null,
|
|
1482
1297
|
item: null,
|
|
1483
1298
|
sourceId: null,
|
|
@@ -1492,10 +1307,10 @@ function an(t = sn, e) {
|
|
|
1492
1307
|
}
|
|
1493
1308
|
function cn(t = 0, e) {
|
|
1494
1309
|
switch (e.type) {
|
|
1495
|
-
case
|
|
1496
|
-
case
|
|
1310
|
+
case Ie:
|
|
1311
|
+
case Ee:
|
|
1497
1312
|
return t + 1;
|
|
1498
|
-
case
|
|
1313
|
+
case Ce:
|
|
1499
1314
|
case ce:
|
|
1500
1315
|
return t - 1;
|
|
1501
1316
|
default:
|
|
@@ -1539,12 +1354,12 @@ function fn(t = {}, e) {
|
|
|
1539
1354
|
};
|
|
1540
1355
|
}
|
|
1541
1356
|
function gn(t, e = void 0, r = {}, n = !1) {
|
|
1542
|
-
const i = hn(n), o = new
|
|
1357
|
+
const i = hn(n), o = new Mr(i, new Kr(i)), a = new xr(i, o), s = t(a, e, r);
|
|
1543
1358
|
return a.receiveBackend(s), a;
|
|
1544
1359
|
}
|
|
1545
1360
|
function hn(t) {
|
|
1546
1361
|
const e = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
1547
|
-
return
|
|
1362
|
+
return et(fn, t && e && e({
|
|
1548
1363
|
name: "dnd-core",
|
|
1549
1364
|
instanceId: "dnd-core"
|
|
1550
1365
|
}));
|
|
@@ -1566,26 +1381,26 @@ function mn(t, e) {
|
|
|
1566
1381
|
i = n[o], !(e.indexOf(i) >= 0) && (r[i] = t[i]);
|
|
1567
1382
|
return r;
|
|
1568
1383
|
}
|
|
1569
|
-
let
|
|
1570
|
-
const
|
|
1571
|
-
var vn = /* @__PURE__ */
|
|
1384
|
+
let Ue = 0;
|
|
1385
|
+
const ne = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
1386
|
+
var vn = /* @__PURE__ */ kt(function(e) {
|
|
1572
1387
|
var { children: r } = e, n = pn(e, [
|
|
1573
1388
|
"children"
|
|
1574
1389
|
]);
|
|
1575
|
-
const [i, o] =
|
|
1576
|
-
return
|
|
1390
|
+
const [i, o] = Dn(n);
|
|
1391
|
+
return M(() => {
|
|
1577
1392
|
if (o) {
|
|
1578
|
-
const a =
|
|
1579
|
-
return
|
|
1580
|
-
|
|
1393
|
+
const a = st();
|
|
1394
|
+
return ++Ue, () => {
|
|
1395
|
+
--Ue === 0 && (a[ne] = null);
|
|
1581
1396
|
};
|
|
1582
1397
|
}
|
|
1583
|
-
}, []), /* @__PURE__ */ c.jsx(
|
|
1398
|
+
}, []), /* @__PURE__ */ c.jsx(Qe.Provider, {
|
|
1584
1399
|
value: i,
|
|
1585
1400
|
children: r
|
|
1586
1401
|
});
|
|
1587
1402
|
});
|
|
1588
|
-
function
|
|
1403
|
+
function Dn(t) {
|
|
1589
1404
|
if ("manager" in t)
|
|
1590
1405
|
return [
|
|
1591
1406
|
{
|
|
@@ -1593,24 +1408,24 @@ function yn(t) {
|
|
|
1593
1408
|
},
|
|
1594
1409
|
!1
|
|
1595
1410
|
];
|
|
1596
|
-
const e =
|
|
1411
|
+
const e = yn(t.backend, t.context, t.options, t.debugMode), r = !t.context;
|
|
1597
1412
|
return [
|
|
1598
1413
|
e,
|
|
1599
1414
|
r
|
|
1600
1415
|
];
|
|
1601
1416
|
}
|
|
1602
|
-
function
|
|
1417
|
+
function yn(t, e = st(), r, n) {
|
|
1603
1418
|
const i = e;
|
|
1604
|
-
return i[
|
|
1419
|
+
return i[ne] || (i[ne] = {
|
|
1605
1420
|
dragDropManager: gn(t, e, r, n)
|
|
1606
|
-
}), i[
|
|
1421
|
+
}), i[ne];
|
|
1607
1422
|
}
|
|
1608
|
-
function
|
|
1423
|
+
function st() {
|
|
1609
1424
|
return typeof global < "u" ? global : window;
|
|
1610
1425
|
}
|
|
1611
|
-
var
|
|
1426
|
+
var ue, Be;
|
|
1612
1427
|
function Sn() {
|
|
1613
|
-
return
|
|
1428
|
+
return Be || (Be = 1, ue = function t(e, r) {
|
|
1614
1429
|
if (e === r) return !0;
|
|
1615
1430
|
if (e && r && typeof e == "object" && typeof r == "object") {
|
|
1616
1431
|
if (e.constructor !== r.constructor) return !1;
|
|
@@ -1634,29 +1449,29 @@ function Sn() {
|
|
|
1634
1449
|
return !0;
|
|
1635
1450
|
}
|
|
1636
1451
|
return e !== e && r !== r;
|
|
1637
|
-
}),
|
|
1452
|
+
}), ue;
|
|
1638
1453
|
}
|
|
1639
1454
|
var On = Sn();
|
|
1640
|
-
const
|
|
1641
|
-
function
|
|
1642
|
-
const [n, i] =
|
|
1455
|
+
const Tn = /* @__PURE__ */ Bt(On), $ = typeof window < "u" ? At : M;
|
|
1456
|
+
function bn(t, e, r) {
|
|
1457
|
+
const [n, i] = L(
|
|
1643
1458
|
() => e(t)
|
|
1644
|
-
), o =
|
|
1459
|
+
), o = Yt(() => {
|
|
1645
1460
|
const a = e(t);
|
|
1646
|
-
|
|
1461
|
+
Tn(n, a) || (i(a), r && r());
|
|
1647
1462
|
}, [
|
|
1648
1463
|
n,
|
|
1649
1464
|
t,
|
|
1650
1465
|
r
|
|
1651
1466
|
]);
|
|
1652
|
-
return
|
|
1467
|
+
return $(o), [
|
|
1653
1468
|
n,
|
|
1654
1469
|
o
|
|
1655
1470
|
];
|
|
1656
1471
|
}
|
|
1657
1472
|
function In(t, e, r) {
|
|
1658
|
-
const [n, i] =
|
|
1659
|
-
return
|
|
1473
|
+
const [n, i] = bn(t, e, r);
|
|
1474
|
+
return $(function() {
|
|
1660
1475
|
const a = t.getHandlerId();
|
|
1661
1476
|
if (a != null)
|
|
1662
1477
|
return t.subscribeToStateChange(i, {
|
|
@@ -1669,18 +1484,18 @@ function In(t, e, r) {
|
|
|
1669
1484
|
i
|
|
1670
1485
|
]), n;
|
|
1671
1486
|
}
|
|
1672
|
-
function
|
|
1487
|
+
function at(t, e, r) {
|
|
1673
1488
|
return In(
|
|
1674
1489
|
e,
|
|
1675
1490
|
t || (() => ({})),
|
|
1676
1491
|
() => r.reconnect()
|
|
1677
1492
|
);
|
|
1678
1493
|
}
|
|
1679
|
-
function
|
|
1494
|
+
function ct(t, e) {
|
|
1680
1495
|
const r = [];
|
|
1681
1496
|
return typeof t != "function" && r.push(t), R(() => typeof t == "function" ? t() : t, r);
|
|
1682
1497
|
}
|
|
1683
|
-
function
|
|
1498
|
+
function En(t) {
|
|
1684
1499
|
return R(
|
|
1685
1500
|
() => t.hooks.dragSource(),
|
|
1686
1501
|
[
|
|
@@ -1688,7 +1503,7 @@ function Cn(t) {
|
|
|
1688
1503
|
]
|
|
1689
1504
|
);
|
|
1690
1505
|
}
|
|
1691
|
-
function
|
|
1506
|
+
function Cn(t) {
|
|
1692
1507
|
return R(
|
|
1693
1508
|
() => t.hooks.dragPreview(),
|
|
1694
1509
|
[
|
|
@@ -1696,7 +1511,7 @@ function En(t) {
|
|
|
1696
1511
|
]
|
|
1697
1512
|
);
|
|
1698
1513
|
}
|
|
1699
|
-
let
|
|
1514
|
+
let le = !1, de = !1;
|
|
1700
1515
|
class wn {
|
|
1701
1516
|
receiveHandlerId(e) {
|
|
1702
1517
|
this.sourceId = e;
|
|
@@ -1705,21 +1520,21 @@ class wn {
|
|
|
1705
1520
|
return this.sourceId;
|
|
1706
1521
|
}
|
|
1707
1522
|
canDrag() {
|
|
1708
|
-
|
|
1523
|
+
y(!le, "You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
|
|
1709
1524
|
try {
|
|
1710
|
-
return
|
|
1525
|
+
return le = !0, this.internalMonitor.canDragSource(this.sourceId);
|
|
1711
1526
|
} finally {
|
|
1712
|
-
|
|
1527
|
+
le = !1;
|
|
1713
1528
|
}
|
|
1714
1529
|
}
|
|
1715
1530
|
isDragging() {
|
|
1716
1531
|
if (!this.sourceId)
|
|
1717
1532
|
return !1;
|
|
1718
|
-
|
|
1533
|
+
y(!de, "You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
|
|
1719
1534
|
try {
|
|
1720
|
-
return
|
|
1535
|
+
return de = !0, this.internalMonitor.isDraggingSource(this.sourceId);
|
|
1721
1536
|
} finally {
|
|
1722
|
-
|
|
1537
|
+
de = !1;
|
|
1723
1538
|
}
|
|
1724
1539
|
}
|
|
1725
1540
|
subscribeToStateChange(e, r) {
|
|
@@ -1780,7 +1595,7 @@ class wn {
|
|
|
1780
1595
|
this.sourceId = null, this.internalMonitor = e.getMonitor();
|
|
1781
1596
|
}
|
|
1782
1597
|
}
|
|
1783
|
-
let
|
|
1598
|
+
let fe = !1;
|
|
1784
1599
|
class xn {
|
|
1785
1600
|
receiveHandlerId(e) {
|
|
1786
1601
|
this.targetId = e;
|
|
@@ -1794,11 +1609,11 @@ class xn {
|
|
|
1794
1609
|
canDrop() {
|
|
1795
1610
|
if (!this.targetId)
|
|
1796
1611
|
return !1;
|
|
1797
|
-
|
|
1612
|
+
y(!fe, "You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");
|
|
1798
1613
|
try {
|
|
1799
|
-
return
|
|
1614
|
+
return fe = !0, this.internalMonitor.canDropOnTarget(this.targetId);
|
|
1800
1615
|
} finally {
|
|
1801
|
-
|
|
1616
|
+
fe = !1;
|
|
1802
1617
|
}
|
|
1803
1618
|
}
|
|
1804
1619
|
isOver(e) {
|
|
@@ -1861,23 +1676,23 @@ function De(t, e, r, n) {
|
|
|
1861
1676
|
if (o.length !== a.length)
|
|
1862
1677
|
return !1;
|
|
1863
1678
|
const s = Object.prototype.hasOwnProperty.bind(e);
|
|
1864
|
-
for (let
|
|
1865
|
-
const
|
|
1866
|
-
if (!s(
|
|
1679
|
+
for (let u = 0; u < o.length; u++) {
|
|
1680
|
+
const l = o[u];
|
|
1681
|
+
if (!s(l))
|
|
1867
1682
|
return !1;
|
|
1868
|
-
const
|
|
1869
|
-
if (i = void 0, i === !1 || i === void 0 &&
|
|
1683
|
+
const p = t[l], m = e[l];
|
|
1684
|
+
if (i = void 0, i === !1 || i === void 0 && p !== m)
|
|
1870
1685
|
return !1;
|
|
1871
1686
|
}
|
|
1872
1687
|
return !0;
|
|
1873
1688
|
}
|
|
1874
|
-
function
|
|
1689
|
+
function ye(t) {
|
|
1875
1690
|
return (
|
|
1876
1691
|
// eslint-disable-next-line no-prototype-builtins
|
|
1877
1692
|
t !== null && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current")
|
|
1878
1693
|
);
|
|
1879
1694
|
}
|
|
1880
|
-
function
|
|
1695
|
+
function _n(t) {
|
|
1881
1696
|
if (typeof t.type == "string")
|
|
1882
1697
|
return;
|
|
1883
1698
|
const e = t.type.displayName || t.type.name || "the component";
|
|
@@ -1885,15 +1700,15 @@ function Mn(t) {
|
|
|
1885
1700
|
}
|
|
1886
1701
|
function Rn(t) {
|
|
1887
1702
|
return (e = null, r = null) => {
|
|
1888
|
-
if (!
|
|
1703
|
+
if (!Ht(e)) {
|
|
1889
1704
|
const o = e;
|
|
1890
1705
|
return t(o, r), o;
|
|
1891
1706
|
}
|
|
1892
1707
|
const n = e;
|
|
1893
|
-
return
|
|
1708
|
+
return _n(n), Mn(n, r ? (o) => t(o, r) : t);
|
|
1894
1709
|
};
|
|
1895
1710
|
}
|
|
1896
|
-
function
|
|
1711
|
+
function ut(t) {
|
|
1897
1712
|
const e = {};
|
|
1898
1713
|
return Object.keys(t).forEach((r) => {
|
|
1899
1714
|
const n = t[r];
|
|
@@ -1905,20 +1720,20 @@ function ft(t) {
|
|
|
1905
1720
|
}
|
|
1906
1721
|
}), e;
|
|
1907
1722
|
}
|
|
1908
|
-
function
|
|
1723
|
+
function Ve(t, e) {
|
|
1909
1724
|
typeof t == "function" ? t(e) : t.current = e;
|
|
1910
1725
|
}
|
|
1911
|
-
function
|
|
1726
|
+
function Mn(t, e) {
|
|
1912
1727
|
const r = t.ref;
|
|
1913
|
-
return
|
|
1728
|
+
return y(typeof r != "string", "Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"), r ? Ne(t, {
|
|
1914
1729
|
ref: (n) => {
|
|
1915
|
-
|
|
1730
|
+
Ve(r, n), Ve(e, n);
|
|
1916
1731
|
}
|
|
1917
|
-
}) :
|
|
1732
|
+
}) : Ne(t, {
|
|
1918
1733
|
ref: e
|
|
1919
1734
|
});
|
|
1920
1735
|
}
|
|
1921
|
-
class
|
|
1736
|
+
class Ln {
|
|
1922
1737
|
receiveHandlerId(e) {
|
|
1923
1738
|
this.handlerId !== e && (this.handlerId = e, this.reconnect());
|
|
1924
1739
|
}
|
|
@@ -1989,17 +1804,17 @@ class _n {
|
|
|
1989
1804
|
this.dragPreviewNode = null, this.dragPreviewRef = null;
|
|
1990
1805
|
}
|
|
1991
1806
|
constructor(e) {
|
|
1992
|
-
this.hooks =
|
|
1807
|
+
this.hooks = ut({
|
|
1993
1808
|
dragSource: (r, n) => {
|
|
1994
|
-
this.clearDragSource(), this.dragSourceOptions = n || null,
|
|
1809
|
+
this.clearDragSource(), this.dragSourceOptions = n || null, ye(r) ? this.dragSourceRef = r : this.dragSourceNode = r, this.reconnectDragSource();
|
|
1995
1810
|
},
|
|
1996
1811
|
dragPreview: (r, n) => {
|
|
1997
|
-
this.clearDragPreview(), this.dragPreviewOptions = n || null,
|
|
1812
|
+
this.clearDragPreview(), this.dragPreviewOptions = n || null, ye(r) ? this.dragPreviewRef = r : this.dragPreviewNode = r, this.reconnectDragPreview();
|
|
1998
1813
|
}
|
|
1999
1814
|
}), this.handlerId = null, this.dragSourceRef = null, this.dragSourceOptionsInternal = null, this.dragPreviewRef = null, this.dragPreviewOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDragSource = null, this.lastConnectedDragSourceOptions = null, this.lastConnectedDragPreview = null, this.lastConnectedDragPreviewOptions = null, this.backend = e;
|
|
2000
1815
|
}
|
|
2001
1816
|
}
|
|
2002
|
-
class
|
|
1817
|
+
class jn {
|
|
2003
1818
|
get connectTarget() {
|
|
2004
1819
|
return this.dropTarget;
|
|
2005
1820
|
}
|
|
@@ -2043,33 +1858,33 @@ class Ln {
|
|
|
2043
1858
|
this.dropTargetRef = null, this.dropTargetNode = null;
|
|
2044
1859
|
}
|
|
2045
1860
|
constructor(e) {
|
|
2046
|
-
this.hooks =
|
|
1861
|
+
this.hooks = ut({
|
|
2047
1862
|
dropTarget: (r, n) => {
|
|
2048
|
-
this.clearDropTarget(), this.dropTargetOptions = n,
|
|
1863
|
+
this.clearDropTarget(), this.dropTargetOptions = n, ye(r) ? this.dropTargetRef = r : this.dropTargetNode = r, this.reconnect();
|
|
2049
1864
|
}
|
|
2050
1865
|
}), this.handlerId = null, this.dropTargetRef = null, this.dropTargetOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDropTarget = null, this.lastConnectedDropTargetOptions = null, this.backend = e;
|
|
2051
1866
|
}
|
|
2052
1867
|
}
|
|
2053
1868
|
function J() {
|
|
2054
|
-
const { dragDropManager: t } =
|
|
2055
|
-
return
|
|
1869
|
+
const { dragDropManager: t } = Ut(Qe);
|
|
1870
|
+
return y(t != null, "Expected drag drop context"), t;
|
|
2056
1871
|
}
|
|
2057
1872
|
function Fn(t, e) {
|
|
2058
1873
|
const r = J(), n = R(
|
|
2059
|
-
() => new
|
|
1874
|
+
() => new Ln(r.getBackend()),
|
|
2060
1875
|
[
|
|
2061
1876
|
r
|
|
2062
1877
|
]
|
|
2063
1878
|
);
|
|
2064
|
-
return
|
|
1879
|
+
return $(() => (n.dragSourceOptions = t || null, n.reconnect(), () => n.disconnectDragSource()), [
|
|
2065
1880
|
n,
|
|
2066
1881
|
t
|
|
2067
|
-
]),
|
|
1882
|
+
]), $(() => (n.dragPreviewOptions = e || null, n.reconnect(), () => n.disconnectDragPreview()), [
|
|
2068
1883
|
n,
|
|
2069
1884
|
e
|
|
2070
1885
|
]), n;
|
|
2071
1886
|
}
|
|
2072
|
-
function
|
|
1887
|
+
function kn() {
|
|
2073
1888
|
const t = J();
|
|
2074
1889
|
return R(
|
|
2075
1890
|
() => new wn(t),
|
|
@@ -2078,7 +1893,7 @@ function Yn() {
|
|
|
2078
1893
|
]
|
|
2079
1894
|
);
|
|
2080
1895
|
}
|
|
2081
|
-
class
|
|
1896
|
+
class An {
|
|
2082
1897
|
beginDrag() {
|
|
2083
1898
|
const e = this.spec, r = this.monitor;
|
|
2084
1899
|
let n = null;
|
|
@@ -2100,15 +1915,15 @@ class kn {
|
|
|
2100
1915
|
this.spec = e, this.monitor = r, this.connector = n;
|
|
2101
1916
|
}
|
|
2102
1917
|
}
|
|
2103
|
-
function
|
|
1918
|
+
function Yn(t, e, r) {
|
|
2104
1919
|
const n = R(
|
|
2105
|
-
() => new
|
|
1920
|
+
() => new An(t, e, r),
|
|
2106
1921
|
[
|
|
2107
1922
|
e,
|
|
2108
1923
|
r
|
|
2109
1924
|
]
|
|
2110
1925
|
);
|
|
2111
|
-
return
|
|
1926
|
+
return M(() => {
|
|
2112
1927
|
n.spec = t;
|
|
2113
1928
|
}, [
|
|
2114
1929
|
t
|
|
@@ -2117,17 +1932,17 @@ function An(t, e, r) {
|
|
|
2117
1932
|
function Hn(t) {
|
|
2118
1933
|
return R(() => {
|
|
2119
1934
|
const e = t.type;
|
|
2120
|
-
return
|
|
1935
|
+
return y(e != null, "spec.type must be defined"), e;
|
|
2121
1936
|
}, [
|
|
2122
1937
|
t
|
|
2123
1938
|
]);
|
|
2124
1939
|
}
|
|
2125
1940
|
function Un(t, e, r) {
|
|
2126
|
-
const n = J(), i =
|
|
2127
|
-
|
|
1941
|
+
const n = J(), i = Yn(t, e, r), o = Hn(t);
|
|
1942
|
+
$(function() {
|
|
2128
1943
|
if (o != null) {
|
|
2129
|
-
const [s,
|
|
2130
|
-
return e.receiveHandlerId(s), r.receiveHandlerId(s),
|
|
1944
|
+
const [s, u] = Pn(o, i, n);
|
|
1945
|
+
return e.receiveHandlerId(s), r.receiveHandlerId(s), u;
|
|
2131
1946
|
}
|
|
2132
1947
|
}, [
|
|
2133
1948
|
n,
|
|
@@ -2138,13 +1953,13 @@ function Un(t, e, r) {
|
|
|
2138
1953
|
]);
|
|
2139
1954
|
}
|
|
2140
1955
|
function Bn(t, e) {
|
|
2141
|
-
const r =
|
|
2142
|
-
|
|
2143
|
-
const n =
|
|
1956
|
+
const r = ct(t);
|
|
1957
|
+
y(!r.begin, "useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");
|
|
1958
|
+
const n = kn(), i = Fn(r.options, r.previewOptions);
|
|
2144
1959
|
return Un(r, n, i), [
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
1960
|
+
at(r.collect, n, i),
|
|
1961
|
+
En(i),
|
|
1962
|
+
Cn(i)
|
|
2148
1963
|
];
|
|
2149
1964
|
}
|
|
2150
1965
|
function Vn(t) {
|
|
@@ -2157,12 +1972,12 @@ function Vn(t) {
|
|
|
2157
1972
|
}
|
|
2158
1973
|
function $n(t) {
|
|
2159
1974
|
const e = J(), r = R(
|
|
2160
|
-
() => new
|
|
1975
|
+
() => new jn(e.getBackend()),
|
|
2161
1976
|
[
|
|
2162
1977
|
e
|
|
2163
1978
|
]
|
|
2164
1979
|
);
|
|
2165
|
-
return
|
|
1980
|
+
return $(() => (r.dropTargetOptions = t || null, r.reconnect(), () => r.disconnectDropTarget()), [
|
|
2166
1981
|
t
|
|
2167
1982
|
]), r;
|
|
2168
1983
|
}
|
|
@@ -2177,7 +1992,7 @@ function zn() {
|
|
|
2177
1992
|
}
|
|
2178
1993
|
function qn(t) {
|
|
2179
1994
|
const { accept: e } = t;
|
|
2180
|
-
return R(() => (
|
|
1995
|
+
return R(() => (y(t.accept != null, "accept must be defined"), Array.isArray(e) ? e : [
|
|
2181
1996
|
e
|
|
2182
1997
|
]), [
|
|
2183
1998
|
e
|
|
@@ -2208,7 +2023,7 @@ function Xn(t, e) {
|
|
|
2208
2023
|
e
|
|
2209
2024
|
]
|
|
2210
2025
|
);
|
|
2211
|
-
return
|
|
2026
|
+
return M(() => {
|
|
2212
2027
|
r.spec = t;
|
|
2213
2028
|
}, [
|
|
2214
2029
|
t
|
|
@@ -2216,9 +2031,9 @@ function Xn(t, e) {
|
|
|
2216
2031
|
}
|
|
2217
2032
|
function Wn(t, e, r) {
|
|
2218
2033
|
const n = J(), i = Xn(t, e), o = qn(t);
|
|
2219
|
-
|
|
2220
|
-
const [s,
|
|
2221
|
-
return e.receiveHandlerId(s), r.receiveHandlerId(s),
|
|
2034
|
+
$(function() {
|
|
2035
|
+
const [s, u] = Nn(o, i, n);
|
|
2036
|
+
return e.receiveHandlerId(s), r.receiveHandlerId(s), u;
|
|
2222
2037
|
}, [
|
|
2223
2038
|
n,
|
|
2224
2039
|
e,
|
|
@@ -2230,13 +2045,13 @@ function Wn(t, e, r) {
|
|
|
2230
2045
|
]);
|
|
2231
2046
|
}
|
|
2232
2047
|
function Kn(t, e) {
|
|
2233
|
-
const r =
|
|
2048
|
+
const r = ct(t), n = zn(), i = $n(r.options);
|
|
2234
2049
|
return Wn(r, n, i), [
|
|
2235
|
-
|
|
2050
|
+
at(r.collect, n, i),
|
|
2236
2051
|
Vn(i)
|
|
2237
2052
|
];
|
|
2238
2053
|
}
|
|
2239
|
-
function
|
|
2054
|
+
function lt(t) {
|
|
2240
2055
|
let e = null;
|
|
2241
2056
|
return () => (e == null && (e = t()), e);
|
|
2242
2057
|
}
|
|
@@ -2311,22 +2126,22 @@ class ei {
|
|
|
2311
2126
|
this.config = e, this.item = {}, this.initializeExposedProperties();
|
|
2312
2127
|
}
|
|
2313
2128
|
}
|
|
2314
|
-
const
|
|
2129
|
+
const dt = "__NATIVE_FILE__", ft = "__NATIVE_URL__", gt = "__NATIVE_TEXT__", ht = "__NATIVE_HTML__", $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2315
2130
|
__proto__: null,
|
|
2316
|
-
FILE:
|
|
2317
|
-
HTML:
|
|
2318
|
-
TEXT:
|
|
2319
|
-
URL:
|
|
2131
|
+
FILE: dt,
|
|
2132
|
+
HTML: ht,
|
|
2133
|
+
TEXT: gt,
|
|
2134
|
+
URL: ft
|
|
2320
2135
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2321
|
-
function
|
|
2136
|
+
function ge(t, e, r) {
|
|
2322
2137
|
const n = e.reduce(
|
|
2323
2138
|
(i, o) => i || t.getData(o),
|
|
2324
2139
|
""
|
|
2325
2140
|
);
|
|
2326
2141
|
return n ?? r;
|
|
2327
2142
|
}
|
|
2328
|
-
const
|
|
2329
|
-
[
|
|
2143
|
+
const Se = {
|
|
2144
|
+
[dt]: {
|
|
2330
2145
|
exposeProperties: {
|
|
2331
2146
|
files: (t) => Array.prototype.slice.call(t.files),
|
|
2332
2147
|
items: (t) => t.items,
|
|
@@ -2336,9 +2151,9 @@ const Oe = {
|
|
|
2336
2151
|
"Files"
|
|
2337
2152
|
]
|
|
2338
2153
|
},
|
|
2339
|
-
[
|
|
2154
|
+
[ht]: {
|
|
2340
2155
|
exposeProperties: {
|
|
2341
|
-
html: (t, e) =>
|
|
2156
|
+
html: (t, e) => ge(t, e, ""),
|
|
2342
2157
|
dataTransfer: (t) => t
|
|
2343
2158
|
},
|
|
2344
2159
|
matchesTypes: [
|
|
@@ -2346,9 +2161,9 @@ const Oe = {
|
|
|
2346
2161
|
"text/html"
|
|
2347
2162
|
]
|
|
2348
2163
|
},
|
|
2349
|
-
[
|
|
2164
|
+
[ft]: {
|
|
2350
2165
|
exposeProperties: {
|
|
2351
|
-
urls: (t, e) =>
|
|
2166
|
+
urls: (t, e) => ge(t, e, "").split(`
|
|
2352
2167
|
`),
|
|
2353
2168
|
dataTransfer: (t) => t
|
|
2354
2169
|
},
|
|
@@ -2357,9 +2172,9 @@ const Oe = {
|
|
|
2357
2172
|
"text/uri-list"
|
|
2358
2173
|
]
|
|
2359
2174
|
},
|
|
2360
|
-
[
|
|
2175
|
+
[gt]: {
|
|
2361
2176
|
exposeProperties: {
|
|
2362
|
-
text: (t, e) =>
|
|
2177
|
+
text: (t, e) => ge(t, e, ""),
|
|
2363
2178
|
dataTransfer: (t) => t
|
|
2364
2179
|
},
|
|
2365
2180
|
matchesTypes: [
|
|
@@ -2369,86 +2184,86 @@ const Oe = {
|
|
|
2369
2184
|
}
|
|
2370
2185
|
};
|
|
2371
2186
|
function ti(t, e) {
|
|
2372
|
-
const r =
|
|
2187
|
+
const r = Se[t];
|
|
2373
2188
|
if (!r)
|
|
2374
2189
|
throw new Error(`native type ${t} has no configuration`);
|
|
2375
2190
|
const n = new ei(r);
|
|
2376
2191
|
return n.loadDataTransfer(e), n;
|
|
2377
2192
|
}
|
|
2378
|
-
function
|
|
2193
|
+
function he(t) {
|
|
2379
2194
|
if (!t)
|
|
2380
2195
|
return null;
|
|
2381
2196
|
const e = Array.prototype.slice.call(t.types || []);
|
|
2382
|
-
return Object.keys(
|
|
2383
|
-
const n =
|
|
2197
|
+
return Object.keys(Se).filter((r) => {
|
|
2198
|
+
const n = Se[r];
|
|
2384
2199
|
return n?.matchesTypes ? n.matchesTypes.some(
|
|
2385
2200
|
(i) => e.indexOf(i) > -1
|
|
2386
2201
|
) : !1;
|
|
2387
2202
|
})[0] || null;
|
|
2388
2203
|
}
|
|
2389
|
-
const ri =
|
|
2204
|
+
const ri = lt(
|
|
2390
2205
|
() => /firefox/i.test(navigator.userAgent)
|
|
2391
|
-
),
|
|
2206
|
+
), pt = lt(
|
|
2392
2207
|
() => !!window.safari
|
|
2393
2208
|
);
|
|
2394
|
-
class
|
|
2209
|
+
class ze {
|
|
2395
2210
|
interpolate(e) {
|
|
2396
2211
|
const { xs: r, ys: n, c1s: i, c2s: o, c3s: a } = this;
|
|
2397
2212
|
let s = r.length - 1;
|
|
2398
2213
|
if (e === r[s])
|
|
2399
2214
|
return n[s];
|
|
2400
|
-
let
|
|
2401
|
-
for (;
|
|
2402
|
-
|
|
2403
|
-
const d = r[
|
|
2215
|
+
let u = 0, l = a.length - 1, p;
|
|
2216
|
+
for (; u <= l; ) {
|
|
2217
|
+
p = Math.floor(0.5 * (u + l));
|
|
2218
|
+
const d = r[p];
|
|
2404
2219
|
if (d < e)
|
|
2405
|
-
|
|
2220
|
+
u = p + 1;
|
|
2406
2221
|
else if (d > e)
|
|
2407
|
-
|
|
2222
|
+
l = p - 1;
|
|
2408
2223
|
else
|
|
2409
|
-
return n[
|
|
2224
|
+
return n[p];
|
|
2410
2225
|
}
|
|
2411
|
-
s = Math.max(0,
|
|
2412
|
-
const
|
|
2413
|
-
return n[s] + i[s] *
|
|
2226
|
+
s = Math.max(0, l);
|
|
2227
|
+
const m = e - r[s], g = m * m;
|
|
2228
|
+
return n[s] + i[s] * m + o[s] * g + a[s] * m * g;
|
|
2414
2229
|
}
|
|
2415
2230
|
constructor(e, r) {
|
|
2416
2231
|
const { length: n } = e, i = [];
|
|
2417
2232
|
for (let d = 0; d < n; d++)
|
|
2418
2233
|
i.push(d);
|
|
2419
2234
|
i.sort(
|
|
2420
|
-
(d,
|
|
2235
|
+
(d, b) => e[d] < e[b] ? -1 : 1
|
|
2421
2236
|
);
|
|
2422
2237
|
const o = [], a = [];
|
|
2423
|
-
let s,
|
|
2238
|
+
let s, u;
|
|
2424
2239
|
for (let d = 0; d < n - 1; d++)
|
|
2425
|
-
s = e[d + 1] - e[d],
|
|
2426
|
-
const
|
|
2240
|
+
s = e[d + 1] - e[d], u = r[d + 1] - r[d], o.push(s), a.push(u / s);
|
|
2241
|
+
const l = [
|
|
2427
2242
|
a[0]
|
|
2428
2243
|
];
|
|
2429
2244
|
for (let d = 0; d < o.length - 1; d++) {
|
|
2430
|
-
const
|
|
2431
|
-
if (
|
|
2432
|
-
|
|
2245
|
+
const b = a[d], D = a[d + 1];
|
|
2246
|
+
if (b * D <= 0)
|
|
2247
|
+
l.push(0);
|
|
2433
2248
|
else {
|
|
2434
2249
|
s = o[d];
|
|
2435
|
-
const
|
|
2436
|
-
|
|
2250
|
+
const E = o[d + 1], v = s + E;
|
|
2251
|
+
l.push(3 * v / ((v + E) / b + (v + s) / D));
|
|
2437
2252
|
}
|
|
2438
2253
|
}
|
|
2439
|
-
|
|
2440
|
-
const
|
|
2441
|
-
let
|
|
2442
|
-
for (let d = 0; d <
|
|
2443
|
-
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2254
|
+
l.push(a[a.length - 1]);
|
|
2255
|
+
const p = [], m = [];
|
|
2256
|
+
let g;
|
|
2257
|
+
for (let d = 0; d < l.length - 1; d++) {
|
|
2258
|
+
g = a[d];
|
|
2259
|
+
const b = l[d], D = 1 / o[d], E = b + l[d + 1] - g - g;
|
|
2260
|
+
p.push((g - b - E) * D), m.push(E * D * D);
|
|
2446
2261
|
}
|
|
2447
|
-
this.xs = e, this.ys = r, this.c1s =
|
|
2262
|
+
this.xs = e, this.ys = r, this.c1s = l, this.c2s = p, this.c3s = m;
|
|
2448
2263
|
}
|
|
2449
2264
|
}
|
|
2450
2265
|
const ni = 1;
|
|
2451
|
-
function
|
|
2266
|
+
function mt(t) {
|
|
2452
2267
|
const e = t.nodeType === ni ? t : t.parentElement;
|
|
2453
2268
|
if (!e)
|
|
2454
2269
|
return null;
|
|
@@ -2458,7 +2273,7 @@ function Dt(t) {
|
|
|
2458
2273
|
y: r
|
|
2459
2274
|
};
|
|
2460
2275
|
}
|
|
2461
|
-
function
|
|
2276
|
+
function te(t) {
|
|
2462
2277
|
return {
|
|
2463
2278
|
x: t.clientX,
|
|
2464
2279
|
y: t.clientY
|
|
@@ -2470,44 +2285,44 @@ function ii(t) {
|
|
|
2470
2285
|
}
|
|
2471
2286
|
function oi(t, e, r, n) {
|
|
2472
2287
|
let i = t ? e.width : r, o = t ? e.height : n;
|
|
2473
|
-
return
|
|
2288
|
+
return pt() && t && (o /= window.devicePixelRatio, i /= window.devicePixelRatio), {
|
|
2474
2289
|
dragPreviewWidth: i,
|
|
2475
2290
|
dragPreviewHeight: o
|
|
2476
2291
|
};
|
|
2477
2292
|
}
|
|
2478
2293
|
function si(t, e, r, n, i) {
|
|
2479
|
-
const o = ii(e), s =
|
|
2294
|
+
const o = ii(e), s = mt(o ? t : e), u = {
|
|
2480
2295
|
x: r.x - s.x,
|
|
2481
2296
|
y: r.y - s.y
|
|
2482
|
-
}, { offsetWidth:
|
|
2483
|
-
let S = new
|
|
2297
|
+
}, { offsetWidth: l, offsetHeight: p } = t, { anchorX: m, anchorY: g } = n, { dragPreviewWidth: d, dragPreviewHeight: b } = oi(o, e, l, p), D = () => {
|
|
2298
|
+
let S = new ze([
|
|
2484
2299
|
0,
|
|
2485
2300
|
0.5,
|
|
2486
2301
|
1
|
|
2487
2302
|
], [
|
|
2488
2303
|
// Dock to the top
|
|
2489
|
-
|
|
2304
|
+
u.y,
|
|
2490
2305
|
// Align at the center
|
|
2491
|
-
|
|
2306
|
+
u.y / p * b,
|
|
2492
2307
|
// Dock to the bottom
|
|
2493
|
-
|
|
2494
|
-
]).interpolate(
|
|
2495
|
-
return
|
|
2496
|
-
},
|
|
2308
|
+
u.y + b - p
|
|
2309
|
+
]).interpolate(g);
|
|
2310
|
+
return pt() && o && (S += (window.devicePixelRatio - 1) * b), S;
|
|
2311
|
+
}, E = () => new ze([
|
|
2497
2312
|
0,
|
|
2498
2313
|
0.5,
|
|
2499
2314
|
1
|
|
2500
2315
|
], [
|
|
2501
2316
|
// Dock to the left
|
|
2502
|
-
|
|
2317
|
+
u.x,
|
|
2503
2318
|
// Align at the center
|
|
2504
|
-
|
|
2319
|
+
u.x / l * d,
|
|
2505
2320
|
// Dock to the right
|
|
2506
|
-
|
|
2507
|
-
]).interpolate(
|
|
2321
|
+
u.x + d - l
|
|
2322
|
+
]).interpolate(m), { offsetX: v, offsetY: h } = i, I = v === 0 || v, f = h === 0 || h;
|
|
2508
2323
|
return {
|
|
2509
|
-
x:
|
|
2510
|
-
y: f ? h :
|
|
2324
|
+
x: I ? v : E(),
|
|
2325
|
+
y: f ? h : D()
|
|
2511
2326
|
};
|
|
2512
2327
|
}
|
|
2513
2328
|
class ai {
|
|
@@ -2537,7 +2352,7 @@ function ci(t, e, r) {
|
|
|
2537
2352
|
writable: !0
|
|
2538
2353
|
}) : t[e] = r, t;
|
|
2539
2354
|
}
|
|
2540
|
-
function
|
|
2355
|
+
function qe(t) {
|
|
2541
2356
|
for (var e = 1; e < arguments.length; e++) {
|
|
2542
2357
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
2543
2358
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
@@ -2619,7 +2434,7 @@ class ui {
|
|
|
2619
2434
|
}
|
|
2620
2435
|
getCurrentSourceNodeOptions() {
|
|
2621
2436
|
const e = this.monitor.getSourceId(), r = this.sourceNodeOptions.get(e);
|
|
2622
|
-
return
|
|
2437
|
+
return qe({
|
|
2623
2438
|
dropEffect: this.altKeyPressed ? "copy" : "move"
|
|
2624
2439
|
}, r || {});
|
|
2625
2440
|
}
|
|
@@ -2628,7 +2443,7 @@ class ui {
|
|
|
2628
2443
|
}
|
|
2629
2444
|
getCurrentSourcePreviewNodeOptions() {
|
|
2630
2445
|
const e = this.monitor.getSourceId(), r = this.sourcePreviewNodeOptions.get(e);
|
|
2631
|
-
return
|
|
2446
|
+
return qe({
|
|
2632
2447
|
anchorX: 0.5,
|
|
2633
2448
|
anchorY: 0.5,
|
|
2634
2449
|
captureDraggingState: !1
|
|
@@ -2636,8 +2451,8 @@ class ui {
|
|
|
2636
2451
|
}
|
|
2637
2452
|
isDraggingNativeItem() {
|
|
2638
2453
|
const e = this.monitor.getItemType();
|
|
2639
|
-
return Object.keys(
|
|
2640
|
-
(r) =>
|
|
2454
|
+
return Object.keys($e).some(
|
|
2455
|
+
(r) => $e[r] === e
|
|
2641
2456
|
);
|
|
2642
2457
|
}
|
|
2643
2458
|
beginDragNativeItem(e, r) {
|
|
@@ -2678,7 +2493,7 @@ class ui {
|
|
|
2678
2493
|
constructor(e, r, n) {
|
|
2679
2494
|
this.sourcePreviewNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodeOptions = /* @__PURE__ */ new Map(), this.sourceNodes = /* @__PURE__ */ new Map(), this.sourceNodeOptions = /* @__PURE__ */ new Map(), this.dragStartSourceIds = null, this.dropTargetIds = [], this.dragEnterTargetIds = [], this.currentNativeSource = null, this.currentNativeHandle = null, this.currentDragSourceNode = null, this.altKeyPressed = !1, this.mouseMoveTimeoutTimer = null, this.asyncEndDragFrameId = null, this.dragOverTargetIds = null, this.lastClientOffset = null, this.hoverRafId = null, this.getSourceClientOffset = (i) => {
|
|
2680
2495
|
const o = this.sourceNodes.get(i);
|
|
2681
|
-
return o &&
|
|
2496
|
+
return o && mt(o) || null;
|
|
2682
2497
|
}, this.endDragNativeItem = () => {
|
|
2683
2498
|
this.isDraggingNativeItem() && (this.actions.endDrag(), this.currentNativeHandle && this.registry.removeSource(this.currentNativeHandle), this.currentNativeHandle = null, this.currentNativeSource = null);
|
|
2684
2499
|
}, this.isNodeInDocument = (i) => !!(i && this.document && this.document.body && this.document.body.contains(i)), this.endDragIfSourceWasRemovedFromDOM = () => {
|
|
@@ -2699,25 +2514,25 @@ class ui {
|
|
|
2699
2514
|
return;
|
|
2700
2515
|
const { dragStartSourceIds: o } = this;
|
|
2701
2516
|
this.dragStartSourceIds = null;
|
|
2702
|
-
const a =
|
|
2517
|
+
const a = te(i);
|
|
2703
2518
|
this.monitor.isDragging() && (this.actions.endDrag(), this.cancelHover()), this.actions.beginDrag(o || [], {
|
|
2704
2519
|
publishSource: !1,
|
|
2705
2520
|
getSourceClientOffset: this.getSourceClientOffset,
|
|
2706
2521
|
clientOffset: a
|
|
2707
2522
|
});
|
|
2708
|
-
const { dataTransfer: s } = i,
|
|
2523
|
+
const { dataTransfer: s } = i, u = he(s);
|
|
2709
2524
|
if (this.monitor.isDragging()) {
|
|
2710
2525
|
if (s && typeof s.setDragImage == "function") {
|
|
2711
|
-
const
|
|
2712
|
-
if (
|
|
2713
|
-
const { anchorX: d, anchorY:
|
|
2526
|
+
const p = this.monitor.getSourceId(), m = this.sourceNodes.get(p), g = this.sourcePreviewNodes.get(p) || m;
|
|
2527
|
+
if (g) {
|
|
2528
|
+
const { anchorX: d, anchorY: b, offsetX: D, offsetY: E } = this.getCurrentSourcePreviewNodeOptions(), I = si(m, g, a, {
|
|
2714
2529
|
anchorX: d,
|
|
2715
|
-
anchorY:
|
|
2530
|
+
anchorY: b
|
|
2716
2531
|
}, {
|
|
2717
|
-
offsetX:
|
|
2718
|
-
offsetY:
|
|
2532
|
+
offsetX: D,
|
|
2533
|
+
offsetY: E
|
|
2719
2534
|
});
|
|
2720
|
-
s.setDragImage(
|
|
2535
|
+
s.setDragImage(g, I.x, I.y);
|
|
2721
2536
|
}
|
|
2722
2537
|
}
|
|
2723
2538
|
try {
|
|
@@ -2725,13 +2540,13 @@ class ui {
|
|
|
2725
2540
|
} catch {
|
|
2726
2541
|
}
|
|
2727
2542
|
this.setCurrentDragSourceNode(i.target);
|
|
2728
|
-
const { captureDraggingState:
|
|
2729
|
-
|
|
2543
|
+
const { captureDraggingState: l } = this.getCurrentSourcePreviewNodeOptions();
|
|
2544
|
+
l ? this.actions.publishDragSource() : setTimeout(
|
|
2730
2545
|
() => this.actions.publishDragSource(),
|
|
2731
2546
|
0
|
|
2732
2547
|
);
|
|
2733
|
-
} else if (
|
|
2734
|
-
this.beginDragNativeItem(
|
|
2548
|
+
} else if (u)
|
|
2549
|
+
this.beginDragNativeItem(u);
|
|
2735
2550
|
else {
|
|
2736
2551
|
if (s && !s.types && (i.target && !i.target.hasAttribute || !i.target.hasAttribute("draggable")))
|
|
2737
2552
|
return;
|
|
@@ -2746,14 +2561,14 @@ class ui {
|
|
|
2746
2561
|
}
|
|
2747
2562
|
if (!this.enterLeaveCounter.enter(i.target) || this.monitor.isDragging())
|
|
2748
2563
|
return;
|
|
2749
|
-
const { dataTransfer: s } = i,
|
|
2750
|
-
|
|
2564
|
+
const { dataTransfer: s } = i, u = he(s);
|
|
2565
|
+
u && this.beginDragNativeItem(u, s);
|
|
2751
2566
|
}, this.handleTopDragEnter = (i) => {
|
|
2752
2567
|
const { dragEnterTargetIds: o } = this;
|
|
2753
2568
|
if (this.dragEnterTargetIds = [], !this.monitor.isDragging())
|
|
2754
2569
|
return;
|
|
2755
2570
|
this.altKeyPressed = i.altKey, o.length > 0 && this.actions.hover(o, {
|
|
2756
|
-
clientOffset:
|
|
2571
|
+
clientOffset: te(i)
|
|
2757
2572
|
}), o.some(
|
|
2758
2573
|
(s) => this.monitor.canDropOnTarget(s)
|
|
2759
2574
|
) && (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect()));
|
|
@@ -2768,7 +2583,7 @@ class ui {
|
|
|
2768
2583
|
i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none");
|
|
2769
2584
|
return;
|
|
2770
2585
|
}
|
|
2771
|
-
this.altKeyPressed = i.altKey, this.lastClientOffset =
|
|
2586
|
+
this.altKeyPressed = i.altKey, this.lastClientOffset = te(i), this.scheduleHover(o), (o || []).some(
|
|
2772
2587
|
(s) => this.monitor.canDropOnTarget(s)
|
|
2773
2588
|
) ? (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect())) : this.isDraggingNativeItem() ? i.preventDefault() : (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none"));
|
|
2774
2589
|
}, this.handleTopDragLeaveCapture = (i) => {
|
|
@@ -2780,12 +2595,12 @@ class ui {
|
|
|
2780
2595
|
if (this.dropTargetIds = [], this.isDraggingNativeItem()) {
|
|
2781
2596
|
var o;
|
|
2782
2597
|
i.preventDefault(), (o = this.currentNativeSource) === null || o === void 0 || o.loadDataTransfer(i.dataTransfer);
|
|
2783
|
-
} else
|
|
2598
|
+
} else he(i.dataTransfer) && i.preventDefault();
|
|
2784
2599
|
this.enterLeaveCounter.reset();
|
|
2785
2600
|
}, this.handleTopDrop = (i) => {
|
|
2786
2601
|
const { dropTargetIds: o } = this;
|
|
2787
2602
|
this.dropTargetIds = [], this.actions.hover(o, {
|
|
2788
|
-
clientOffset:
|
|
2603
|
+
clientOffset: te(i)
|
|
2789
2604
|
}), this.actions.drop({
|
|
2790
2605
|
dropEffect: this.getCurrentDropEffect()
|
|
2791
2606
|
}), this.isDraggingNativeItem() ? this.endDragNativeItem() : this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
|
|
@@ -2815,7 +2630,7 @@ const li = function(e, r, n) {
|
|
|
2815
2630
|
".gif",
|
|
2816
2631
|
// 압축
|
|
2817
2632
|
".zip"
|
|
2818
|
-
],
|
|
2633
|
+
], Ge = {
|
|
2819
2634
|
FILE: "file"
|
|
2820
2635
|
}, fi = ({
|
|
2821
2636
|
originNode: t,
|
|
@@ -2824,41 +2639,41 @@ const li = function(e, r, n) {
|
|
|
2824
2639
|
moveFile: n,
|
|
2825
2640
|
onDrop: i
|
|
2826
2641
|
}) => {
|
|
2827
|
-
const o =
|
|
2828
|
-
accept:
|
|
2829
|
-
collect: (
|
|
2830
|
-
handlerId:
|
|
2642
|
+
const o = V(null), [{ handlerId: a }, s] = Kn({
|
|
2643
|
+
accept: Ge.FILE,
|
|
2644
|
+
collect: (m) => ({
|
|
2645
|
+
handlerId: m.getHandlerId()
|
|
2831
2646
|
}),
|
|
2832
|
-
hover(
|
|
2647
|
+
hover(m, g) {
|
|
2833
2648
|
if (!o.current)
|
|
2834
2649
|
return;
|
|
2835
|
-
const d =
|
|
2836
|
-
if (d ===
|
|
2650
|
+
const d = m.uid, b = e.uid;
|
|
2651
|
+
if (d === b)
|
|
2837
2652
|
return;
|
|
2838
|
-
const
|
|
2839
|
-
if (
|
|
2653
|
+
const D = Z(r, { uid: b }), E = Z(r, { uid: d });
|
|
2654
|
+
if (E === -1 || D === -1)
|
|
2840
2655
|
return;
|
|
2841
|
-
const
|
|
2656
|
+
const v = o.current.getBoundingClientRect(), h = g.getClientOffset();
|
|
2842
2657
|
if (!h)
|
|
2843
2658
|
return;
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2659
|
+
const I = (v.bottom - v.top) / 2, f = h.y - v.top;
|
|
2660
|
+
E < D && f < I || E > D && f > I || n(d, b);
|
|
2846
2661
|
},
|
|
2847
2662
|
drop() {
|
|
2848
2663
|
i();
|
|
2849
2664
|
}
|
|
2850
|
-
}), [{ isDragging:
|
|
2851
|
-
type:
|
|
2665
|
+
}), [{ isDragging: u }, l] = Bn({
|
|
2666
|
+
type: Ge.FILE,
|
|
2852
2667
|
item: () => ({
|
|
2853
2668
|
uid: e.uid,
|
|
2854
2669
|
index: Z(r, { uid: e.uid })
|
|
2855
2670
|
}),
|
|
2856
|
-
collect: (
|
|
2857
|
-
isDragging:
|
|
2671
|
+
collect: (m) => ({
|
|
2672
|
+
isDragging: m.isDragging()
|
|
2858
2673
|
})
|
|
2859
|
-
}),
|
|
2860
|
-
return
|
|
2861
|
-
},
|
|
2674
|
+
}), p = u ? 0 : 1;
|
|
2675
|
+
return l(s(o)), /* @__PURE__ */ c.jsx("div", { ref: o, style: { opacity: p }, "data-handler-id": a, children: t });
|
|
2676
|
+
}, ki = ({
|
|
2862
2677
|
fileGrpKey: t,
|
|
2863
2678
|
onUploadComplete: e,
|
|
2864
2679
|
onFetchFilesTrxCd: r = "SCMFILE00101",
|
|
@@ -2867,20 +2682,20 @@ const li = function(e, r, n) {
|
|
|
2867
2682
|
onReorderFilesTrxCd: o = "SCMFILE00104",
|
|
2868
2683
|
allowedExtensions: a = di,
|
|
2869
2684
|
maxFileSize: s = 200,
|
|
2870
|
-
showButton:
|
|
2685
|
+
showButton: u = !0,
|
|
2871
2686
|
// 기본값으로 true 설정
|
|
2872
|
-
multiple:
|
|
2687
|
+
multiple: l = !1
|
|
2873
2688
|
}) => {
|
|
2874
|
-
const [
|
|
2875
|
-
|
|
2689
|
+
const [p, m] = L([]), g = V(t), d = V([]), D = V(
|
|
2690
|
+
$t(() => {
|
|
2876
2691
|
if (d.current.length === 0)
|
|
2877
2692
|
return;
|
|
2878
2693
|
const f = [...d.current];
|
|
2879
2694
|
if (d.current = [], n) {
|
|
2880
|
-
const
|
|
2881
|
-
crprCd:
|
|
2695
|
+
const T = f.map((S) => ({
|
|
2696
|
+
crprCd: A()?.crprCd,
|
|
2882
2697
|
sysCd: __SYS_CD__,
|
|
2883
|
-
fileGrpKey:
|
|
2698
|
+
fileGrpKey: g.current,
|
|
2884
2699
|
physFileNm: S.fileNameP,
|
|
2885
2700
|
lgclFileNm: S.fileNameL,
|
|
2886
2701
|
filePath: S.filePath,
|
|
@@ -2888,33 +2703,33 @@ const li = function(e, r, n) {
|
|
|
2888
2703
|
fileSize: S.fileSize,
|
|
2889
2704
|
mltpYn: "N"
|
|
2890
2705
|
}));
|
|
2891
|
-
|
|
2892
|
-
crprCd:
|
|
2706
|
+
H(n, {
|
|
2707
|
+
crprCd: A()?.crprCd,
|
|
2893
2708
|
sysCd: __SYS_CD__,
|
|
2894
|
-
fileGrpKey:
|
|
2895
|
-
sub:
|
|
2709
|
+
fileGrpKey: g.current,
|
|
2710
|
+
sub: T
|
|
2896
2711
|
}).then((S) => {
|
|
2897
2712
|
if (S?.sub && S.sub.length > 0) {
|
|
2898
2713
|
const O = S.sub[0].fileGrpKey;
|
|
2899
|
-
|
|
2714
|
+
g.current || (g.current = O);
|
|
2900
2715
|
const x = /* @__PURE__ */ new Map();
|
|
2901
|
-
S.sub.forEach((
|
|
2716
|
+
S.sub.forEach((C) => {
|
|
2902
2717
|
const N = f.find(
|
|
2903
|
-
(
|
|
2718
|
+
(_) => _.fileNameL === C.lgclFileNm
|
|
2904
2719
|
);
|
|
2905
|
-
N && x.set(N.tempId,
|
|
2906
|
-
}),
|
|
2907
|
-
const w = x.get(
|
|
2720
|
+
N && x.set(N.tempId, C);
|
|
2721
|
+
}), m((C) => C.map((_) => {
|
|
2722
|
+
const w = x.get(_.uid);
|
|
2908
2723
|
if (w) {
|
|
2909
|
-
const
|
|
2910
|
-
(
|
|
2724
|
+
const z = f.find(
|
|
2725
|
+
(q) => q.tempId === _.uid
|
|
2911
2726
|
);
|
|
2912
|
-
return e &&
|
|
2913
|
-
...
|
|
2727
|
+
return e && z && e({
|
|
2728
|
+
...z,
|
|
2914
2729
|
fileGrpKey: O,
|
|
2915
2730
|
fileKey: w.fileKey
|
|
2916
2731
|
}), {
|
|
2917
|
-
...
|
|
2732
|
+
..._,
|
|
2918
2733
|
name: w.lgclFileNm,
|
|
2919
2734
|
fileGrpKey: O,
|
|
2920
2735
|
fileKey: w.fileKey,
|
|
@@ -2923,137 +2738,137 @@ const li = function(e, r, n) {
|
|
|
2923
2738
|
url: `/api/download?filePath=${w.filePath}&logicalName=${w.lgclFileNm}`
|
|
2924
2739
|
};
|
|
2925
2740
|
}
|
|
2926
|
-
return
|
|
2741
|
+
return _;
|
|
2927
2742
|
}));
|
|
2928
2743
|
}
|
|
2929
2744
|
}).catch((S) => {
|
|
2930
|
-
console.error("업로드 후처리 서비스 호출 실패:", S),
|
|
2745
|
+
console.error("업로드 후처리 서비스 호출 실패:", S), P.error("파일 후처리 중 오류가 발생했습니다.");
|
|
2931
2746
|
const O = new Set(f.map((x) => x.tempId));
|
|
2932
|
-
|
|
2747
|
+
m(
|
|
2933
2748
|
(x) => x.map(
|
|
2934
|
-
(
|
|
2749
|
+
(C) => O.has(C.uid) ? { ...C, status: "error", error: "후처리 실패" } : C
|
|
2935
2750
|
)
|
|
2936
2751
|
);
|
|
2937
2752
|
});
|
|
2938
2753
|
}
|
|
2939
2754
|
}, 500)
|
|
2940
2755
|
).current;
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
}, [
|
|
2944
|
-
|
|
2945
|
-
}, [t]),
|
|
2946
|
-
t && r &&
|
|
2947
|
-
crprCd:
|
|
2756
|
+
M(() => () => {
|
|
2757
|
+
D.cancel();
|
|
2758
|
+
}, [D]), M(() => {
|
|
2759
|
+
g.current = t;
|
|
2760
|
+
}, [t]), M(() => {
|
|
2761
|
+
t && r && H(r, {
|
|
2762
|
+
crprCd: A()?.crprCd,
|
|
2948
2763
|
sysCd: __SYS_CD__,
|
|
2949
2764
|
fileGrpKey: t
|
|
2950
2765
|
}).then((f) => {
|
|
2951
2766
|
if (f?.sub) {
|
|
2952
|
-
const
|
|
2767
|
+
const T = f.sub.map((S) => ({
|
|
2953
2768
|
uid: S.fileKey,
|
|
2954
2769
|
name: S.lgclFileNm,
|
|
2955
2770
|
status: "done",
|
|
2956
2771
|
url: `/api/download?filePath=${S.filePath}&logicalName=${S.lgclFileNm}`
|
|
2957
2772
|
}));
|
|
2958
|
-
|
|
2773
|
+
m(T);
|
|
2959
2774
|
}
|
|
2960
2775
|
}).catch((f) => {
|
|
2961
|
-
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", f),
|
|
2776
|
+
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", f), P.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
2962
2777
|
});
|
|
2963
2778
|
}, [t, r]);
|
|
2964
|
-
const
|
|
2965
|
-
const S = Z(
|
|
2779
|
+
const E = (f, T) => {
|
|
2780
|
+
const S = Z(p, { uid: f }), O = Z(p, { uid: T });
|
|
2966
2781
|
if (S < 0 || O < 0) return;
|
|
2967
|
-
const x = [...
|
|
2968
|
-
x.splice(O, 0,
|
|
2969
|
-
},
|
|
2782
|
+
const x = [...p], [C] = x.splice(S, 1);
|
|
2783
|
+
x.splice(O, 0, C), m(x);
|
|
2784
|
+
}, v = () => {
|
|
2970
2785
|
if (t && o) {
|
|
2971
|
-
const f =
|
|
2972
|
-
|
|
2973
|
-
crprCd:
|
|
2786
|
+
const f = p.map((T) => T.uid);
|
|
2787
|
+
H(o, {
|
|
2788
|
+
crprCd: A()?.crprCd,
|
|
2974
2789
|
sysCd: __SYS_CD__,
|
|
2975
2790
|
fileGrpKey: t,
|
|
2976
2791
|
reorderedFileKeys: f
|
|
2977
2792
|
}).then(() => {
|
|
2978
|
-
|
|
2979
|
-
}).catch((
|
|
2980
|
-
console.error("파일 순서 저장 서비스 호출 실패:",
|
|
2793
|
+
P.success("파일 순서가 성공적으로 저장되었습니다.");
|
|
2794
|
+
}).catch((T) => {
|
|
2795
|
+
console.error("파일 순서 저장 서비스 호출 실패:", T), P.error("파일 순서 저장 중 오류가 발생했습니다.");
|
|
2981
2796
|
});
|
|
2982
2797
|
}
|
|
2983
|
-
},
|
|
2798
|
+
}, I = {
|
|
2984
2799
|
name: "file",
|
|
2985
|
-
multiple:
|
|
2800
|
+
multiple: l,
|
|
2986
2801
|
action: "/api/upload",
|
|
2987
|
-
fileList:
|
|
2802
|
+
fileList: p,
|
|
2988
2803
|
beforeUpload: (f) => {
|
|
2989
|
-
if (!
|
|
2990
|
-
return
|
|
2804
|
+
if (!l && p.length > 0)
|
|
2805
|
+
return P.error("하나의 파일만 업로드할 수 있습니다."), Y.LIST_IGNORE;
|
|
2991
2806
|
if (a && a.length > 0) {
|
|
2992
|
-
const
|
|
2993
|
-
if (!a.includes(
|
|
2994
|
-
return
|
|
2807
|
+
const T = `.${f.name.split(".").pop()?.toLowerCase()}`;
|
|
2808
|
+
if (!a.includes(T))
|
|
2809
|
+
return P.error(
|
|
2995
2810
|
`${f.name} 파일은 허용되지 않는 확장자입니다. (${a.join(
|
|
2996
2811
|
", "
|
|
2997
2812
|
)})`
|
|
2998
|
-
),
|
|
2813
|
+
), Y.LIST_IGNORE;
|
|
2999
2814
|
}
|
|
3000
|
-
return s && !(f.size / 1024 / 1024 < s) ? (
|
|
2815
|
+
return s && !(f.size / 1024 / 1024 < s) ? (P.error(`일반업로드의 최대용량은 ${s}MB입니다.`), Y.LIST_IGNORE) : !0;
|
|
3001
2816
|
},
|
|
3002
2817
|
showUploadList: {
|
|
3003
|
-
showRemoveIcon:
|
|
2818
|
+
showRemoveIcon: u
|
|
3004
2819
|
// showButton 값에 따라 삭제 버튼 표시/숨김
|
|
3005
2820
|
},
|
|
3006
2821
|
onChange(f) {
|
|
3007
|
-
const { status:
|
|
3008
|
-
if (
|
|
3009
|
-
i ?
|
|
3010
|
-
crprCd:
|
|
2822
|
+
const { status: T, uid: S } = f.file;
|
|
2823
|
+
if (T === "removed") {
|
|
2824
|
+
i ? H(i, {
|
|
2825
|
+
crprCd: A()?.crprCd,
|
|
3011
2826
|
sysCd: __SYS_CD__,
|
|
3012
|
-
fileGrpKey:
|
|
2827
|
+
fileGrpKey: g.current,
|
|
3013
2828
|
fileKey: S
|
|
3014
2829
|
}).then(() => {
|
|
3015
|
-
|
|
2830
|
+
P.success("파일이 성공적으로 삭제되었습니다."), m(f.fileList);
|
|
3016
2831
|
}).catch((O) => {
|
|
3017
|
-
console.error("파일 삭제 서비스 호출에 실패했습니다.", O),
|
|
3018
|
-
}) :
|
|
2832
|
+
console.error("파일 삭제 서비스 호출에 실패했습니다.", O), P.error("파일 삭제 중 오류가 발생했습니다.");
|
|
2833
|
+
}) : m(f.fileList);
|
|
3019
2834
|
return;
|
|
3020
2835
|
}
|
|
3021
|
-
if (
|
|
2836
|
+
if (m(f.fileList), T === "done")
|
|
3022
2837
|
if (f.file.response?.success) {
|
|
3023
2838
|
const { uploadedFiles: O } = f.file.response;
|
|
3024
2839
|
O && Array.isArray(O) && O.length > 0 && (O.forEach((x) => {
|
|
3025
2840
|
x.tempId = f.file.uid, d.current.push(x);
|
|
3026
|
-
}),
|
|
2841
|
+
}), D()), P.success(
|
|
3027
2842
|
f.file.response.message || `${f.file.name} 파일이 성공적으로 업로드되었습니다.`
|
|
3028
2843
|
);
|
|
3029
2844
|
} else
|
|
3030
|
-
|
|
2845
|
+
P.error(
|
|
3031
2846
|
f.file.response?.message || `${f.file.name} 파일 업로드에 실패했습니다.`
|
|
3032
2847
|
);
|
|
3033
|
-
else
|
|
2848
|
+
else T === "error" && P.error(
|
|
3034
2849
|
f.file.response?.message || `${f.file.name} 파일 업로드 중 오류가 발생했습니다.`
|
|
3035
2850
|
);
|
|
3036
2851
|
},
|
|
3037
|
-
itemRender(f,
|
|
3038
|
-
const O =
|
|
3039
|
-
href:
|
|
2852
|
+
itemRender(f, T, S) {
|
|
2853
|
+
const O = jt.cloneElement(f, {
|
|
2854
|
+
href: T.url || void 0,
|
|
3040
2855
|
title: void 0
|
|
3041
2856
|
});
|
|
3042
2857
|
return /* @__PURE__ */ c.jsx(
|
|
3043
2858
|
fi,
|
|
3044
2859
|
{
|
|
3045
2860
|
originNode: O,
|
|
3046
|
-
file:
|
|
2861
|
+
file: T,
|
|
3047
2862
|
fileList: S,
|
|
3048
|
-
moveFile:
|
|
3049
|
-
onDrop:
|
|
2863
|
+
moveFile: E,
|
|
2864
|
+
onDrop: v
|
|
3050
2865
|
},
|
|
3051
|
-
|
|
2866
|
+
T.uid
|
|
3052
2867
|
);
|
|
3053
2868
|
}
|
|
3054
2869
|
};
|
|
3055
|
-
return /* @__PURE__ */ c.jsx(vn, { backend: li, children: /* @__PURE__ */ c.jsx(
|
|
3056
|
-
}, { Text:
|
|
2870
|
+
return /* @__PURE__ */ c.jsx(vn, { backend: li, children: /* @__PURE__ */ c.jsx(Y, { ...I, listType: "picture", children: u && (l || p.length === 0) && /* @__PURE__ */ c.jsx(B, { icon: /* @__PURE__ */ c.jsx(Je, {}), children: "파일 선택" }) }) });
|
|
2871
|
+
}, { Text: re, Link: Ai } = Tt, { Dragger: gi } = Y, hi = [
|
|
3057
2872
|
".pdf",
|
|
3058
2873
|
".xlsx",
|
|
3059
2874
|
".xls",
|
|
@@ -3075,7 +2890,7 @@ const li = function(e, r, n) {
|
|
|
3075
2890
|
if (t === 0) return "0 Bytes";
|
|
3076
2891
|
const r = 1024, n = e < 0 ? 0 : e, i = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(t) / Math.log(r));
|
|
3077
2892
|
return parseFloat((t / Math.pow(r, o)).toFixed(n)) + " " + i[o];
|
|
3078
|
-
},
|
|
2893
|
+
}, Yi = ({
|
|
3079
2894
|
title: t = "첨부파일",
|
|
3080
2895
|
fileGrpKey: e,
|
|
3081
2896
|
onUploadComplete: r,
|
|
@@ -3086,45 +2901,45 @@ const li = function(e, r, n) {
|
|
|
3086
2901
|
maxFileSize: a = 2048
|
|
3087
2902
|
// 기본값 2GB
|
|
3088
2903
|
}) => {
|
|
3089
|
-
const [s,
|
|
2904
|
+
const [s, u] = L([]), [l, p] = L(!1), [m, g] = L(!1), [d, b] = L(0), D = (h) => {
|
|
3090
2905
|
if (o && o.length > 0) {
|
|
3091
|
-
const f = ((
|
|
3092
|
-
const S =
|
|
3093
|
-
return S === -1 ? "" :
|
|
2906
|
+
const f = ((T) => {
|
|
2907
|
+
const S = T.lastIndexOf(".");
|
|
2908
|
+
return S === -1 ? "" : T.substring(S).toLowerCase();
|
|
3094
2909
|
})(h.name);
|
|
3095
2910
|
if (!o.includes(f))
|
|
3096
|
-
return
|
|
2911
|
+
return P.error(
|
|
3097
2912
|
`${h.name} 파일은 허용되지 않는 확장자입니다. (${o.join(
|
|
3098
2913
|
", "
|
|
3099
2914
|
)}만 가능)`
|
|
3100
2915
|
), !1;
|
|
3101
2916
|
}
|
|
3102
2917
|
return !0;
|
|
3103
|
-
},
|
|
3104
|
-
const h = s.filter((O) => O.status !== "done"),
|
|
2918
|
+
}, E = async () => {
|
|
2919
|
+
const h = s.filter((O) => O.status !== "done"), I = h.reduce(
|
|
3105
2920
|
(O, x) => O + (x.size || 0),
|
|
3106
2921
|
0
|
|
3107
2922
|
), f = 2 * 1024 * 1024 * 1024;
|
|
3108
|
-
if (
|
|
3109
|
-
|
|
2923
|
+
if (I > f) {
|
|
2924
|
+
It.error({
|
|
3110
2925
|
message: "업로드 용량 초과",
|
|
3111
2926
|
description: "한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."
|
|
3112
2927
|
});
|
|
3113
2928
|
return;
|
|
3114
2929
|
}
|
|
3115
2930
|
if (h.length === 0) {
|
|
3116
|
-
|
|
2931
|
+
P.warning(
|
|
3117
2932
|
"업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다."
|
|
3118
2933
|
);
|
|
3119
2934
|
return;
|
|
3120
2935
|
}
|
|
3121
|
-
|
|
3122
|
-
let
|
|
2936
|
+
g(!0);
|
|
2937
|
+
let T;
|
|
3123
2938
|
try {
|
|
3124
|
-
const O = new
|
|
2939
|
+
const O = new qt();
|
|
3125
2940
|
h.forEach((x) => {
|
|
3126
2941
|
x.originFileObj && O.file(x.name, x.originFileObj);
|
|
3127
|
-
}),
|
|
2942
|
+
}), T = await O.generateAsync({
|
|
3128
2943
|
type: "blob",
|
|
3129
2944
|
compression: "DEFLATE",
|
|
3130
2945
|
compressionOptions: {
|
|
@@ -3133,27 +2948,27 @@ const li = function(e, r, n) {
|
|
|
3133
2948
|
}
|
|
3134
2949
|
});
|
|
3135
2950
|
} catch (O) {
|
|
3136
|
-
|
|
2951
|
+
g(!1), P.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", O);
|
|
3137
2952
|
return;
|
|
3138
2953
|
}
|
|
3139
|
-
|
|
2954
|
+
g(!1);
|
|
3140
2955
|
const S = new FormData();
|
|
3141
|
-
S.append("file",
|
|
2956
|
+
S.append("file", T, "upload.zip"), p(!0), b(0);
|
|
3142
2957
|
try {
|
|
3143
|
-
const O = await new Promise((
|
|
3144
|
-
const
|
|
3145
|
-
|
|
2958
|
+
const O = await new Promise((C, N) => {
|
|
2959
|
+
const _ = new XMLHttpRequest();
|
|
2960
|
+
_.open("POST", "/api/upload-large", !0), _.upload.onprogress = (w) => {
|
|
3146
2961
|
if (w.lengthComputable) {
|
|
3147
|
-
const
|
|
2962
|
+
const z = Math.round(
|
|
3148
2963
|
w.loaded / w.total * 100
|
|
3149
2964
|
);
|
|
3150
|
-
|
|
2965
|
+
b(z);
|
|
3151
2966
|
}
|
|
3152
|
-
},
|
|
3153
|
-
if (
|
|
2967
|
+
}, _.onload = () => {
|
|
2968
|
+
if (_.status >= 200 && _.status < 300)
|
|
3154
2969
|
try {
|
|
3155
|
-
const w = JSON.parse(
|
|
3156
|
-
w.success ?
|
|
2970
|
+
const w = JSON.parse(_.responseText);
|
|
2971
|
+
w.success ? C(w) : N(
|
|
3157
2972
|
new Error(w.message || "파일 업로드에 실패했습니다.")
|
|
3158
2973
|
);
|
|
3159
2974
|
} catch {
|
|
@@ -3161,31 +2976,31 @@ const li = function(e, r, n) {
|
|
|
3161
2976
|
}
|
|
3162
2977
|
else
|
|
3163
2978
|
try {
|
|
3164
|
-
const w = JSON.parse(
|
|
3165
|
-
N(new Error(w.message || `서버 오류: ${
|
|
2979
|
+
const w = JSON.parse(_.responseText);
|
|
2980
|
+
N(new Error(w.message || `서버 오류: ${_.status}`));
|
|
3166
2981
|
} catch {
|
|
3167
|
-
N(new Error(`서버 오류: ${
|
|
2982
|
+
N(new Error(`서버 오류: ${_.status}`));
|
|
3168
2983
|
}
|
|
3169
|
-
},
|
|
2984
|
+
}, _.onerror = () => {
|
|
3170
2985
|
N(new Error("네트워크 오류가 발생했습니다."));
|
|
3171
|
-
},
|
|
2986
|
+
}, _.send(S);
|
|
3172
2987
|
});
|
|
3173
|
-
|
|
2988
|
+
P.success(
|
|
3174
2989
|
O.message || "압축 파일이 성공적으로 업로드되었습니다."
|
|
3175
2990
|
);
|
|
3176
2991
|
const x = s.map(
|
|
3177
|
-
(
|
|
2992
|
+
(C) => h.find((N) => N.uid === C.uid) ? { ...C, status: "done" } : C
|
|
3178
2993
|
);
|
|
3179
|
-
if (
|
|
3180
|
-
const
|
|
2994
|
+
if (u(x), n && O.uploadedFiles && Array.isArray(O.uploadedFiles)) {
|
|
2995
|
+
const C = A();
|
|
3181
2996
|
O.uploadedFiles.forEach((N) => {
|
|
3182
|
-
const
|
|
3183
|
-
crprCd:
|
|
2997
|
+
const _ = {
|
|
2998
|
+
crprCd: C?.crprCd,
|
|
3184
2999
|
sysCd: __SYS_CD__,
|
|
3185
3000
|
fileGrpKey: e,
|
|
3186
3001
|
sub: [
|
|
3187
3002
|
{
|
|
3188
|
-
crprCd:
|
|
3003
|
+
crprCd: C?.crprCd,
|
|
3189
3004
|
sysCd: __SYS_CD__,
|
|
3190
3005
|
fileGrpKey: e,
|
|
3191
3006
|
physFileNm: N.fileNameP,
|
|
@@ -3197,23 +3012,23 @@ const li = function(e, r, n) {
|
|
|
3197
3012
|
}
|
|
3198
3013
|
]
|
|
3199
3014
|
};
|
|
3200
|
-
|
|
3201
|
-
const
|
|
3202
|
-
crprCd:
|
|
3015
|
+
H(n, _).then((w) => {
|
|
3016
|
+
const z = s.map((q) => ({
|
|
3017
|
+
crprCd: C?.crprCd,
|
|
3203
3018
|
sysCd: __SYS_CD__,
|
|
3204
3019
|
fileGrpKey: w.sub[0].fileGrpKey,
|
|
3205
3020
|
fileKey: w.sub[0].fileKey,
|
|
3206
|
-
lgclFileNm:
|
|
3207
|
-
fileSize:
|
|
3208
|
-
fileExtn:
|
|
3209
|
-
fileType:
|
|
3021
|
+
lgclFileNm: q.name,
|
|
3022
|
+
fileSize: q.size,
|
|
3023
|
+
fileExtn: q.name.split(".").pop(),
|
|
3024
|
+
fileType: q.type
|
|
3210
3025
|
}));
|
|
3211
|
-
|
|
3026
|
+
H(i, {
|
|
3212
3027
|
// 파일 목록에 fileKey를 추가합니다.
|
|
3213
|
-
sub:
|
|
3028
|
+
sub: z
|
|
3214
3029
|
});
|
|
3215
3030
|
}).catch((w) => {
|
|
3216
|
-
console.error("후처리 서비스 호출 실패:", w),
|
|
3031
|
+
console.error("후처리 서비스 호출 실패:", w), P.error(
|
|
3217
3032
|
`${N.fileNameL} 파일의 후처리 작업에 실패했습니다.`
|
|
3218
3033
|
);
|
|
3219
3034
|
}), r && r({
|
|
@@ -3223,107 +3038,107 @@ const li = function(e, r, n) {
|
|
|
3223
3038
|
});
|
|
3224
3039
|
}
|
|
3225
3040
|
} catch (O) {
|
|
3226
|
-
|
|
3041
|
+
P.error(O.message || "파일 업로드 중 오류가 발생했습니다.");
|
|
3227
3042
|
const x = s.map(
|
|
3228
|
-
(
|
|
3229
|
-
...
|
|
3043
|
+
(C) => h.find((N) => N.uid === C.uid) ? {
|
|
3044
|
+
...C,
|
|
3230
3045
|
status: "error",
|
|
3231
3046
|
response: O.message || "파일 업로드 중 오류가 발생했습니다."
|
|
3232
|
-
} :
|
|
3047
|
+
} : C
|
|
3233
3048
|
);
|
|
3234
|
-
|
|
3049
|
+
u(x);
|
|
3235
3050
|
} finally {
|
|
3236
|
-
|
|
3051
|
+
p(!1);
|
|
3237
3052
|
}
|
|
3238
|
-
},
|
|
3053
|
+
}, v = {
|
|
3239
3054
|
multiple: !0,
|
|
3240
3055
|
fileList: s,
|
|
3241
|
-
beforeUpload: (h) =>
|
|
3056
|
+
beforeUpload: (h) => D(h) ? a && h.size >= a * 1024 * 1024 ? (P.error(
|
|
3242
3057
|
`대용량 첨부 파일 최대 크기는 ${(a / 1024).toFixed(
|
|
3243
3058
|
1
|
|
3244
3059
|
)}GB입니다.`
|
|
3245
|
-
),
|
|
3060
|
+
), Y.LIST_IGNORE) : !1 : Y.LIST_IGNORE,
|
|
3246
3061
|
onChange: ({ fileList: h }) => {
|
|
3247
|
-
const
|
|
3062
|
+
const I = new Map(s.map((f) => [f.uid, f]));
|
|
3248
3063
|
h.forEach((f) => {
|
|
3249
|
-
|
|
3250
|
-
}),
|
|
3064
|
+
I.set(f.uid, f);
|
|
3065
|
+
}), u(Array.from(I.values()));
|
|
3251
3066
|
},
|
|
3252
3067
|
onRemove: (h) => {
|
|
3253
|
-
const
|
|
3254
|
-
|
|
3068
|
+
const I = s.filter((f) => f.uid !== h.uid);
|
|
3069
|
+
u(I);
|
|
3255
3070
|
},
|
|
3256
3071
|
showUploadList: !1
|
|
3257
3072
|
// 수동으로 목록을 렌더링하므로 antd의 기본 목록은 숨깁니다.
|
|
3258
3073
|
};
|
|
3259
3074
|
return /* @__PURE__ */ c.jsx(
|
|
3260
|
-
|
|
3075
|
+
St,
|
|
3261
3076
|
{
|
|
3262
|
-
spinning:
|
|
3263
|
-
tip:
|
|
3077
|
+
spinning: l || m,
|
|
3078
|
+
tip: m ? "파일 압축 중..." : `파일 업로드 중... ${d}%`,
|
|
3264
3079
|
children: /* @__PURE__ */ c.jsxs("div", { className: "bwg-large-uploader-container", children: [
|
|
3265
3080
|
/* @__PURE__ */ c.jsx(
|
|
3266
|
-
|
|
3081
|
+
Ke,
|
|
3267
3082
|
{
|
|
3268
|
-
title: /* @__PURE__ */ c.jsx(
|
|
3269
|
-
extra: /* @__PURE__ */ c.jsx(
|
|
3083
|
+
title: /* @__PURE__ */ c.jsx(re, { strong: !0, children: t }),
|
|
3084
|
+
extra: /* @__PURE__ */ c.jsx(Y, { ...v, children: /* @__PURE__ */ c.jsx(B, { icon: /* @__PURE__ */ c.jsx(Je, {}), children: "파일 선택" }) }),
|
|
3270
3085
|
bodyStyle: { padding: 0 },
|
|
3271
3086
|
children: /* @__PURE__ */ c.jsx(
|
|
3272
3087
|
gi,
|
|
3273
3088
|
{
|
|
3274
|
-
...
|
|
3089
|
+
...v,
|
|
3275
3090
|
style: {
|
|
3276
3091
|
border: "none",
|
|
3277
3092
|
background: "transparent",
|
|
3278
3093
|
padding: 0
|
|
3279
3094
|
},
|
|
3280
3095
|
children: /* @__PURE__ */ c.jsx("div", { className: "upload-list-container", children: s.length > 0 ? /* @__PURE__ */ c.jsx(
|
|
3281
|
-
|
|
3096
|
+
K,
|
|
3282
3097
|
{
|
|
3283
3098
|
style: { textAlign: "left" },
|
|
3284
3099
|
dataSource: s,
|
|
3285
3100
|
renderItem: (h) => {
|
|
3286
|
-
const
|
|
3287
|
-
let
|
|
3288
|
-
return
|
|
3289
|
-
|
|
3101
|
+
const I = h.status === "done", f = h.status === "error";
|
|
3102
|
+
let T;
|
|
3103
|
+
return I ? T = /* @__PURE__ */ c.jsx(
|
|
3104
|
+
_t,
|
|
3290
3105
|
{
|
|
3291
3106
|
style: { color: "#52c41a", fontSize: 14 }
|
|
3292
3107
|
}
|
|
3293
|
-
) : f ?
|
|
3294
|
-
|
|
3108
|
+
) : f ? T = /* @__PURE__ */ c.jsx(
|
|
3109
|
+
Ot,
|
|
3295
3110
|
{
|
|
3296
3111
|
title: typeof h.response == "string" ? h.response : "업로드 실패",
|
|
3297
3112
|
children: /* @__PURE__ */ c.jsx(
|
|
3298
|
-
|
|
3113
|
+
wt,
|
|
3299
3114
|
{
|
|
3300
3115
|
style: { color: "#ff4d4f", fontSize: 14 }
|
|
3301
3116
|
}
|
|
3302
3117
|
)
|
|
3303
3118
|
}
|
|
3304
|
-
) :
|
|
3305
|
-
|
|
3119
|
+
) : T = /* @__PURE__ */ c.jsx(Rt, { style: { fontSize: 14 } }), /* @__PURE__ */ c.jsx(
|
|
3120
|
+
K.Item,
|
|
3306
3121
|
{
|
|
3307
3122
|
actions: [
|
|
3308
|
-
/* @__PURE__ */ c.jsx(
|
|
3123
|
+
/* @__PURE__ */ c.jsx(re, { type: "secondary", children: pi(h.size || 0) }, "size"),
|
|
3309
3124
|
/* @__PURE__ */ c.jsx(
|
|
3310
|
-
|
|
3125
|
+
B,
|
|
3311
3126
|
{
|
|
3312
3127
|
type: "text",
|
|
3313
|
-
icon: /* @__PURE__ */ c.jsx(
|
|
3128
|
+
icon: /* @__PURE__ */ c.jsx(xt, {}),
|
|
3314
3129
|
onClick: (S) => {
|
|
3315
|
-
S.stopPropagation(),
|
|
3130
|
+
S.stopPropagation(), v.onRemove?.(h);
|
|
3316
3131
|
},
|
|
3317
|
-
disabled:
|
|
3132
|
+
disabled: l || m
|
|
3318
3133
|
},
|
|
3319
3134
|
"delete"
|
|
3320
3135
|
)
|
|
3321
3136
|
],
|
|
3322
3137
|
children: /* @__PURE__ */ c.jsx(
|
|
3323
|
-
|
|
3138
|
+
K.Item.Meta,
|
|
3324
3139
|
{
|
|
3325
|
-
avatar:
|
|
3326
|
-
title: /* @__PURE__ */ c.jsx(
|
|
3140
|
+
avatar: T,
|
|
3141
|
+
title: /* @__PURE__ */ c.jsx(re, { type: f ? "danger" : void 0, children: h.name })
|
|
3327
3142
|
}
|
|
3328
3143
|
)
|
|
3329
3144
|
},
|
|
@@ -3332,7 +3147,7 @@ const li = function(e, r, n) {
|
|
|
3332
3147
|
}
|
|
3333
3148
|
}
|
|
3334
3149
|
) : /* @__PURE__ */ c.jsxs(
|
|
3335
|
-
|
|
3150
|
+
xe,
|
|
3336
3151
|
{
|
|
3337
3152
|
gap: "middle",
|
|
3338
3153
|
align: "center",
|
|
@@ -3340,8 +3155,8 @@ const li = function(e, r, n) {
|
|
|
3340
3155
|
vertical: !0,
|
|
3341
3156
|
style: { padding: "20px 0", minHeight: "120px" },
|
|
3342
3157
|
children: [
|
|
3343
|
-
/* @__PURE__ */ c.jsx(
|
|
3344
|
-
/* @__PURE__ */ c.jsx(
|
|
3158
|
+
/* @__PURE__ */ c.jsx(Nt, { style: { fontSize: "32px", color: "#999" } }),
|
|
3159
|
+
/* @__PURE__ */ c.jsx(re, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
|
|
3345
3160
|
]
|
|
3346
3161
|
}
|
|
3347
3162
|
) })
|
|
@@ -3350,21 +3165,21 @@ const li = function(e, r, n) {
|
|
|
3350
3165
|
}
|
|
3351
3166
|
),
|
|
3352
3167
|
s.length > 0 && /* @__PURE__ */ c.jsxs(
|
|
3353
|
-
|
|
3168
|
+
xe,
|
|
3354
3169
|
{
|
|
3355
3170
|
justify: "flex-end",
|
|
3356
3171
|
align: "center",
|
|
3357
3172
|
gap: "large",
|
|
3358
3173
|
style: { marginTop: 16 },
|
|
3359
3174
|
children: [
|
|
3360
|
-
|
|
3175
|
+
l && /* @__PURE__ */ c.jsx("div", { style: { width: "250px" }, children: /* @__PURE__ */ c.jsx(bt, { percent: d, size: "small" }) }),
|
|
3361
3176
|
/* @__PURE__ */ c.jsx(
|
|
3362
|
-
|
|
3177
|
+
B,
|
|
3363
3178
|
{
|
|
3364
3179
|
type: "primary",
|
|
3365
|
-
onClick:
|
|
3366
|
-
disabled:
|
|
3367
|
-
icon: /* @__PURE__ */ c.jsx(
|
|
3180
|
+
onClick: E,
|
|
3181
|
+
disabled: l || m || s.filter((h) => h.status !== "done").length === 0,
|
|
3182
|
+
icon: /* @__PURE__ */ c.jsx(Pt, {}),
|
|
3368
3183
|
children: "일괄 업로드"
|
|
3369
3184
|
}
|
|
3370
3185
|
)
|
|
@@ -3374,25 +3189,111 @@ const li = function(e, r, n) {
|
|
|
3374
3189
|
] })
|
|
3375
3190
|
}
|
|
3376
3191
|
);
|
|
3192
|
+
}, Hi = ({
|
|
3193
|
+
fileGrpKey: t,
|
|
3194
|
+
onFetchFilesTrxCd: e = "SCMFILE00101",
|
|
3195
|
+
readOnly: r = !1,
|
|
3196
|
+
sysCd: n = __SYS_CD__
|
|
3197
|
+
}) => {
|
|
3198
|
+
const [i, o] = L([]);
|
|
3199
|
+
M(() => {
|
|
3200
|
+
t && e ? n != __SYS_CD__ ? Vt(n, e, {
|
|
3201
|
+
crprCd: A()?.crprCd,
|
|
3202
|
+
sysCd: n,
|
|
3203
|
+
fileGrpKey: t
|
|
3204
|
+
}).then((s) => {
|
|
3205
|
+
if (s?.sub) {
|
|
3206
|
+
const u = s.sub.map((l) => ({
|
|
3207
|
+
uid: l.fileKey,
|
|
3208
|
+
name: l.lgclFileNm,
|
|
3209
|
+
filePath: l.filePath
|
|
3210
|
+
}));
|
|
3211
|
+
o(u);
|
|
3212
|
+
}
|
|
3213
|
+
}).catch((s) => {
|
|
3214
|
+
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", s), P.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
3215
|
+
}) : H(e, {
|
|
3216
|
+
crprCd: A()?.crprCd,
|
|
3217
|
+
sysCd: n,
|
|
3218
|
+
fileGrpKey: t
|
|
3219
|
+
}).then((s) => {
|
|
3220
|
+
if (s?.sub) {
|
|
3221
|
+
const u = s.sub.map((l) => ({
|
|
3222
|
+
uid: l.fileKey,
|
|
3223
|
+
name: l.lgclFileNm,
|
|
3224
|
+
filePath: l.filePath
|
|
3225
|
+
}));
|
|
3226
|
+
o(u);
|
|
3227
|
+
}
|
|
3228
|
+
}).catch((s) => {
|
|
3229
|
+
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", s), P.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
3230
|
+
}) : o([]);
|
|
3231
|
+
}, [t, e]);
|
|
3232
|
+
const a = async (s) => {
|
|
3233
|
+
try {
|
|
3234
|
+
let u;
|
|
3235
|
+
n != __SYS_CD__ ? u = "/api/download/" + n : u = "/api/download";
|
|
3236
|
+
const l = await fetch(u, {
|
|
3237
|
+
method: "POST",
|
|
3238
|
+
headers: {
|
|
3239
|
+
"Content-Type": "application/json"
|
|
3240
|
+
// 여기에 필요한 다른 헤더(예: 인증 토큰)를 추가할 수 있습니다.
|
|
3241
|
+
},
|
|
3242
|
+
body: JSON.stringify({
|
|
3243
|
+
filePath: s.filePath,
|
|
3244
|
+
logicalName: s.name,
|
|
3245
|
+
fileKey: s.uid
|
|
3246
|
+
})
|
|
3247
|
+
});
|
|
3248
|
+
if (!l.ok) {
|
|
3249
|
+
const b = (await l.json().catch(() => null))?.message || "파일 다운로드에 실패했습니다.";
|
|
3250
|
+
throw new Error(b);
|
|
3251
|
+
}
|
|
3252
|
+
const p = await l.blob(), m = window.URL.createObjectURL(p), g = document.createElement("a");
|
|
3253
|
+
g.href = m, g.setAttribute("download", s.name), document.body.appendChild(g), g.click(), document.body.removeChild(g), window.URL.revokeObjectURL(m);
|
|
3254
|
+
} catch (u) {
|
|
3255
|
+
console.error(u), P.error(
|
|
3256
|
+
u.message || "파일을 다운로드하는 중 오류가 발생했습니다."
|
|
3257
|
+
);
|
|
3258
|
+
}
|
|
3259
|
+
};
|
|
3260
|
+
return zt(i) ? null : /* @__PURE__ */ c.jsx(Ke, { title: "파일 목록", children: /* @__PURE__ */ c.jsx(
|
|
3261
|
+
K,
|
|
3262
|
+
{
|
|
3263
|
+
dataSource: i,
|
|
3264
|
+
renderItem: (s) => /* @__PURE__ */ c.jsx(
|
|
3265
|
+
K.Item,
|
|
3266
|
+
{
|
|
3267
|
+
actions: r ? [] : [
|
|
3268
|
+
/* @__PURE__ */ c.jsx(
|
|
3269
|
+
B,
|
|
3270
|
+
{
|
|
3271
|
+
type: "text",
|
|
3272
|
+
icon: /* @__PURE__ */ c.jsx(Lt, {}),
|
|
3273
|
+
onClick: () => a(s)
|
|
3274
|
+
},
|
|
3275
|
+
"download"
|
|
3276
|
+
)
|
|
3277
|
+
],
|
|
3278
|
+
children: /* @__PURE__ */ c.jsx(K.Item.Meta, { avatar: /* @__PURE__ */ c.jsx(Mt, {}), title: s.name })
|
|
3279
|
+
}
|
|
3280
|
+
)
|
|
3281
|
+
}
|
|
3282
|
+
) });
|
|
3377
3283
|
};
|
|
3378
3284
|
export {
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
Yi as m,
|
|
3393
|
-
ki as n,
|
|
3394
|
-
Ai as o,
|
|
3395
|
-
Hi as p,
|
|
3396
|
-
Bi as q
|
|
3285
|
+
wi as B,
|
|
3286
|
+
xi as a,
|
|
3287
|
+
Ni as b,
|
|
3288
|
+
Pi as c,
|
|
3289
|
+
_i as d,
|
|
3290
|
+
Ri as e,
|
|
3291
|
+
Mi as f,
|
|
3292
|
+
Li as g,
|
|
3293
|
+
ji as h,
|
|
3294
|
+
Fi as i,
|
|
3295
|
+
ki as j,
|
|
3296
|
+
Yi as k,
|
|
3297
|
+
Hi as l
|
|
3397
3298
|
};
|
|
3398
|
-
//# sourceMappingURL=
|
|
3299
|
+
//# sourceMappingURL=BwgDownload-Qhs6jJxM.js.map
|