@bwg-ui/core 1.1.9 → 1.1.10
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/{BwgLargeUploader-DsaIHpYz.js → BwgLargeUploader-B5EtYKUz.js} +844 -810
- package/dist/chunks/{BwgLargeUploader-DsaIHpYz.js.map → BwgLargeUploader-B5EtYKUz.js.map} +1 -1
- package/dist/chunks/BwgLargeUploader-BPJcShgF.cjs +3 -0
- package/dist/chunks/{BwgLargeUploader-1yDku10l.cjs.map → BwgLargeUploader-BPJcShgF.cjs.map} +1 -1
- package/dist/chunks/{FileUtils-CmK-zHC5.cjs → FileUtils-BweAWoJt.cjs} +2 -2
- package/dist/chunks/{FileUtils-CmK-zHC5.cjs.map → FileUtils-BweAWoJt.cjs.map} +1 -1
- package/dist/chunks/{FileUtils-DsA-Sw37.js → FileUtils-CaU9Bzu2.js} +2 -2
- package/dist/chunks/{FileUtils-DsA-Sw37.js.map → FileUtils-CaU9Bzu2.js.map} +1 -1
- package/dist/chunks/{SSOHandler-DNvCpRTu.js → SSOHandler-C72Do3RD.js} +4 -4
- package/dist/chunks/{SSOHandler-DNvCpRTu.js.map → SSOHandler-C72Do3RD.js.map} +1 -1
- package/dist/chunks/{SSOHandler-Qm_2PekO.cjs → SSOHandler-ColywAGZ.cjs} +2 -2
- package/dist/chunks/{SSOHandler-Qm_2PekO.cjs.map → SSOHandler-ColywAGZ.cjs.map} +1 -1
- package/dist/chunks/{SearchBoxContext-CzDzVCVm.js → SearchBoxContext-CY4tAQcg.js} +2 -2
- package/dist/chunks/{SearchBoxContext-CzDzVCVm.js.map → SearchBoxContext-CY4tAQcg.js.map} +1 -1
- package/dist/chunks/{SearchBoxContext-mcPWk862.cjs → SearchBoxContext-DDBY44Wr.cjs} +2 -2
- package/dist/chunks/{SearchBoxContext-mcPWk862.cjs.map → SearchBoxContext-DDBY44Wr.cjs.map} +1 -1
- package/dist/chunks/{UtilsContext-DczQBfFi.cjs → UtilsContext-C4tlOndT.cjs} +2 -2
- package/dist/chunks/{UtilsContext-DczQBfFi.cjs.map → UtilsContext-C4tlOndT.cjs.map} +1 -1
- package/dist/chunks/{UtilsContext-BKUZmmKx.js → UtilsContext-JSHHfnWl.js} +4 -4
- package/dist/chunks/{UtilsContext-BKUZmmKx.js.map → UtilsContext-JSHHfnWl.js.map} +1 -1
- package/dist/chunks/{codeStore-rU4v3QIA.js → codeStore-IIp25egq.js} +2 -2
- package/dist/chunks/{codeStore-rU4v3QIA.js.map → codeStore-IIp25egq.js.map} +1 -1
- package/dist/chunks/{codeStore-BG8S_mdS.cjs → codeStore-KPL92rcv.cjs} +2 -2
- package/dist/chunks/{codeStore-BG8S_mdS.cjs.map → codeStore-KPL92rcv.cjs.map} +1 -1
- package/dist/chunks/envUtils-C9Gf5aek.js.map +1 -1
- package/dist/chunks/envUtils-CduTHoHu.cjs.map +1 -1
- package/dist/chunks/{menuViewStore-w4fLSR6N.cjs → menuViewStore-DuS0VmkB.cjs} +2 -2
- package/dist/chunks/{menuViewStore-w4fLSR6N.cjs.map → menuViewStore-DuS0VmkB.cjs.map} +1 -1
- package/dist/chunks/{menuViewStore-BhfgX53f.js → menuViewStore-OKcSQq-s.js} +2 -2
- package/dist/chunks/{menuViewStore-BhfgX53f.js.map → menuViewStore-OKcSQq-s.js.map} +1 -1
- package/dist/chunks/{popupStore-BGubYHZh.cjs → popupStore-BEoWGajT.cjs} +2 -2
- package/dist/chunks/{popupStore-BGubYHZh.cjs.map → popupStore-BEoWGajT.cjs.map} +1 -1
- package/dist/chunks/{popupStore-BJ_IYrdY.js → popupStore-D8RI04bU.js} +2 -2
- package/dist/chunks/{popupStore-BJ_IYrdY.js.map → popupStore-D8RI04bU.js.map} +1 -1
- package/dist/chunks/serviceConfig-9dHegQIK.cjs +3 -0
- package/dist/chunks/serviceConfig-9dHegQIK.cjs.map +1 -0
- package/dist/chunks/serviceConfig-Dhe7neaj.js +709 -0
- package/dist/chunks/serviceConfig-Dhe7neaj.js.map +1 -0
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgUploader.d.ts +10 -0
- package/dist/components/core/BwgUploader.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +9 -9
- package/dist/provider/contexts/UtilsContext.d.ts +6 -6
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +2 -2
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +5 -5
- package/dist/utils/apiUtils.d.ts +20 -6
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/notificationUtils.d.ts +3 -2
- package/dist/utils/notificationUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/BwgLargeUploader-1yDku10l.cjs +0 -3
- package/dist/chunks/serviceConfig-Cc8jfw_Y.cjs +0 -3
- package/dist/chunks/serviceConfig-Cc8jfw_Y.cjs.map +0 -1
- package/dist/chunks/serviceConfig-lAlRNVIw.js +0 -670
- package/dist/chunks/serviceConfig-lAlRNVIw.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-Dpn_P65e.js";
|
|
2
|
-
import { Form as
|
|
3
|
-
import Ze, { forwardRef as
|
|
4
|
-
import { u as Rt } from "./popupStore-
|
|
2
|
+
import { Form as A, ConfigProvider as We, Select as be, Space as ne, Typography as Ke, Input as K, Button as W, DatePicker as Te, Radio as yt, Checkbox as me, InputNumber as Dt, message as M, Upload as H, Spin as St, Card as Ot, List as ue, Tooltip as bt, Flex as Pe, Progress as Tt, notification as It } from "antd";
|
|
3
|
+
import Ze, { forwardRef as Ct, useMemo as L, useRef as B, useEffect as j, useState as Y, createContext as Et, memo as wt, useLayoutEffect as xt, useCallback as Nt, isValidElement as Pt, cloneElement as Me, useContext as Mt } from "react";
|
|
4
|
+
import { u as Rt } from "./popupStore-D8RI04bU.js";
|
|
5
5
|
import { SearchOutlined as _t, UploadOutlined as Je, CloseCircleOutlined as Lt, DeleteOutlined as jt, InboxOutlined as Ft, CloudUploadOutlined as kt, CheckCircleOutlined as Yt, FileTextOutlined as At } from "@ant-design/icons";
|
|
6
6
|
import Qe from "imask";
|
|
7
|
-
import
|
|
8
|
-
import { V as
|
|
9
|
-
import { findIndex as
|
|
10
|
-
import { g as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
7
|
+
import _ from "dayjs";
|
|
8
|
+
import { V as X, a7 as G } from "./serviceConfig-Dhe7neaj.js";
|
|
9
|
+
import { debounce as Ht, findIndex as J } from "lodash";
|
|
10
|
+
import { g as Bt } from "./_commonjsHelpers-C6fGbg64.js";
|
|
11
|
+
import Ut from "jszip";
|
|
12
|
+
const R = Ze.memo(
|
|
13
13
|
({
|
|
14
14
|
children: t,
|
|
15
15
|
label: e,
|
|
@@ -26,7 +26,7 @@ const w = Ze.memo(
|
|
|
26
26
|
u && /* @__PURE__ */ c.jsx("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
|
|
27
27
|
] }) : /* @__PURE__ */ c.jsx("span", { style: a, children: e });
|
|
28
28
|
return /* @__PURE__ */ c.jsx(
|
|
29
|
-
|
|
29
|
+
A.Item,
|
|
30
30
|
{
|
|
31
31
|
className: "bwg-form-item",
|
|
32
32
|
label: e ? f() : void 0,
|
|
@@ -41,7 +41,7 @@ const w = Ze.memo(
|
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
),
|
|
44
|
+
), Vt = Ct(
|
|
45
45
|
({ children: t, labelCol: e, style: r, className: n, ...i }, o) => /* @__PURE__ */ c.jsx(
|
|
46
46
|
We,
|
|
47
47
|
{
|
|
@@ -50,7 +50,7 @@ const w = Ze.memo(
|
|
|
50
50
|
validateMessages: { required: "'${label}을(를) 입력해주세요.'" }
|
|
51
51
|
},
|
|
52
52
|
children: /* @__PURE__ */ c.jsx(
|
|
53
|
-
|
|
53
|
+
A,
|
|
54
54
|
{
|
|
55
55
|
ref: o,
|
|
56
56
|
...i,
|
|
@@ -64,7 +64,7 @@ const w = Ze.memo(
|
|
|
64
64
|
}
|
|
65
65
|
)
|
|
66
66
|
);
|
|
67
|
-
|
|
67
|
+
Vt.displayName = "BwgForm";
|
|
68
68
|
const Ci = ({
|
|
69
69
|
itemProps: t,
|
|
70
70
|
selectProps: e = {
|
|
@@ -72,7 +72,7 @@ const Ci = ({
|
|
|
72
72
|
allowClear: !0
|
|
73
73
|
}
|
|
74
74
|
}) => {
|
|
75
|
-
const r =
|
|
75
|
+
const r = A.useFormInstance(), n = !!r, i = L(() => e?.addField === "ALL" ? [{ label: "전체", value: "" }, ...e?.options || []] : e?.addField === "NULL" ? [{ label: "", value: "" }, ...e?.options || []] : e?.options || [], [e.options, e.addField]), o = (u) => {
|
|
76
76
|
e.onChange?.(u);
|
|
77
77
|
}, s = {
|
|
78
78
|
...e,
|
|
@@ -83,9 +83,9 @@ const Ci = ({
|
|
|
83
83
|
}, a = /* @__PURE__ */ c.jsx(be, { ...s, disabled: e.disabled });
|
|
84
84
|
return e.copyable && !n && console.warn(
|
|
85
85
|
"BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
|
|
86
|
-
), e.copyable ? /* @__PURE__ */ c.jsx(
|
|
86
|
+
), e.copyable ? /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsxs(ne.Compact, { block: !0, children: [
|
|
87
87
|
/* @__PURE__ */ c.jsx(
|
|
88
|
-
|
|
88
|
+
A.Item,
|
|
89
89
|
{
|
|
90
90
|
name: t?.name,
|
|
91
91
|
rules: t?.rules,
|
|
@@ -116,9 +116,9 @@ const Ci = ({
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
|
-
] }) }) : /* @__PURE__ */ c.jsx(
|
|
120
|
-
}, Re =
|
|
121
|
-
const e =
|
|
119
|
+
] }) }) : /* @__PURE__ */ c.jsx(R, { ...t, children: a });
|
|
120
|
+
}, Re = K.Search, Ei = (t) => {
|
|
121
|
+
const e = A.useFormInstance(), { openPopup: r } = Rt(), n = t.itemProps?.name || [], i = t.popupConfig || {
|
|
122
122
|
callback(s) {
|
|
123
123
|
console.log("callback data :: ", s), n.length > 1 ? (e.setFieldValue(n[0], s.code), e.setFieldValue(n[1], s.name)) : e.setFieldValue(n, s.code);
|
|
124
124
|
}
|
|
@@ -132,9 +132,9 @@ const Ci = ({
|
|
|
132
132
|
t.popuCd ? r(t.popuCd, t.popupParams, i) : t.onSearch?.(s);
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
-
return n.length > 1 ? /* @__PURE__ */ c.jsx(
|
|
135
|
+
return n.length > 1 ? /* @__PURE__ */ c.jsx(R, { ...t.itemProps, name: void 0, children: /* @__PURE__ */ c.jsxs(ne.Compact, { block: !0, children: [
|
|
136
136
|
/* @__PURE__ */ c.jsx(
|
|
137
|
-
|
|
137
|
+
A.Item,
|
|
138
138
|
{
|
|
139
139
|
name: n[0],
|
|
140
140
|
rules: t.itemProps?.rules,
|
|
@@ -142,7 +142,7 @@ const Ci = ({
|
|
|
142
142
|
validateStatus: "",
|
|
143
143
|
help: "",
|
|
144
144
|
children: /* @__PURE__ */ c.jsx(
|
|
145
|
-
|
|
145
|
+
K,
|
|
146
146
|
{
|
|
147
147
|
style: { color: "#999", backgroundColor: "#f5f5f5" },
|
|
148
148
|
placeholder: t.placeholder?.[0] || "",
|
|
@@ -151,12 +151,12 @@ const Ci = ({
|
|
|
151
151
|
)
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
/* @__PURE__ */ c.jsx(
|
|
154
|
+
/* @__PURE__ */ c.jsx(A.Item, { name: n[1], style: { width: "60%", marginBottom: 0 }, children: /* @__PURE__ */ c.jsx(
|
|
155
155
|
Re,
|
|
156
156
|
{
|
|
157
157
|
readOnly: t.readOnly,
|
|
158
158
|
enterButton: /* @__PURE__ */ c.jsx(
|
|
159
|
-
|
|
159
|
+
W,
|
|
160
160
|
{
|
|
161
161
|
icon: /* @__PURE__ */ c.jsx(_t, {}),
|
|
162
162
|
disabled: t.readOnly
|
|
@@ -165,8 +165,8 @@ const Ci = ({
|
|
|
165
165
|
...o
|
|
166
166
|
}
|
|
167
167
|
) })
|
|
168
|
-
] }) }) : /* @__PURE__ */ c.jsx(
|
|
169
|
-
},
|
|
168
|
+
] }) }) : /* @__PURE__ */ c.jsx(R, { ...t.itemProps, children: /* @__PURE__ */ c.jsx(Re, { ...o }) });
|
|
169
|
+
}, $t = (t) => {
|
|
170
170
|
if (typeof t == "string")
|
|
171
171
|
return t.replace(/0/g, "_");
|
|
172
172
|
if (Array.isArray(t))
|
|
@@ -179,13 +179,13 @@ const Ci = ({
|
|
|
179
179
|
}).join(".");
|
|
180
180
|
}
|
|
181
181
|
return "";
|
|
182
|
-
},
|
|
182
|
+
}, wi = ({
|
|
183
183
|
itemProps: t,
|
|
184
184
|
inputProps: e,
|
|
185
185
|
mask: r
|
|
186
186
|
}) => {
|
|
187
|
-
const n =
|
|
188
|
-
return
|
|
187
|
+
const n = B(null), i = A.useFormInstance(), o = L(() => $t(r), [r]);
|
|
188
|
+
return j(() => {
|
|
189
189
|
if (!n.current?.input) return;
|
|
190
190
|
const s = typeof r == "string" || Array.isArray(r) ? { mask: r } : r, a = Qe(n.current.input, s);
|
|
191
191
|
return a.on("accept", () => {
|
|
@@ -193,8 +193,8 @@ const Ci = ({
|
|
|
193
193
|
}), () => {
|
|
194
194
|
a.destroy();
|
|
195
195
|
};
|
|
196
|
-
}, [r, i, t?.name]), /* @__PURE__ */ c.jsx(
|
|
197
|
-
},
|
|
196
|
+
}, [r, i, t?.name]), /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsx(K, { ...e, ref: n, placeholder: o }) });
|
|
197
|
+
}, zt = (t) => {
|
|
198
198
|
switch (t) {
|
|
199
199
|
case "year":
|
|
200
200
|
return { format: "YYYY", mask: "0000", outputFormat: "YYYY" };
|
|
@@ -208,63 +208,63 @@ const Ci = ({
|
|
|
208
208
|
outputFormat: "YYYYMMDD"
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
},
|
|
211
|
+
}, xi = ({
|
|
212
212
|
type: t = "date",
|
|
213
213
|
itemProps: e = { name: "calendar" },
|
|
214
214
|
inputProps: r
|
|
215
215
|
}) => {
|
|
216
|
-
const { format: n, mask: i, outputFormat: o } =
|
|
217
|
-
|
|
216
|
+
const { format: n, mask: i, outputFormat: o } = zt(t), s = B(null), a = B(null), u = A.useFormInstance(), [f, l] = Y(!1), [m, p] = Y(!1), d = e?.name, [I, y] = Y(null);
|
|
217
|
+
j(() => {
|
|
218
218
|
if (!s.current?.input) return;
|
|
219
|
-
const
|
|
219
|
+
const v = Qe(s.current.input, {
|
|
220
220
|
mask: i,
|
|
221
221
|
lazy: !1
|
|
222
222
|
});
|
|
223
|
-
return a.current =
|
|
224
|
-
console.log("input :: ",
|
|
225
|
-
const
|
|
226
|
-
console.log("input :: ",
|
|
223
|
+
return a.current = v, v.on("accept", () => {
|
|
224
|
+
console.log("input :: ", v.value);
|
|
225
|
+
const h = v.value, T = _(h, n, !0);
|
|
226
|
+
console.log("input :: ", T), h.length === n.length && T.isValid() && (console.log("parsed :: ", T.format(o)), u.setFieldValue(d, T.format(o)), a.current.updateValue(), l(!1));
|
|
227
227
|
}), () => {
|
|
228
|
-
|
|
228
|
+
v.destroy();
|
|
229
229
|
};
|
|
230
|
-
}, [n, i]),
|
|
231
|
-
|
|
232
|
-
}, [u.getFieldValue(
|
|
233
|
-
const
|
|
234
|
-
if (!
|
|
230
|
+
}, [n, i]), j(() => {
|
|
231
|
+
y(_(u.getFieldValue(d)));
|
|
232
|
+
}, [u.getFieldValue(d)]);
|
|
233
|
+
const C = (v) => {
|
|
234
|
+
if (!v) {
|
|
235
235
|
a.current?.updateValue();
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
console.log("formatted :: ",
|
|
238
|
+
const h = v.format(o);
|
|
239
|
+
console.log("formatted :: ", h), a.current && (a.current.value = h, a.current.updateValue()), p(!1);
|
|
240
240
|
};
|
|
241
241
|
return /* @__PURE__ */ c.jsx(
|
|
242
|
-
|
|
242
|
+
R,
|
|
243
243
|
{
|
|
244
244
|
...e,
|
|
245
245
|
name: void 0,
|
|
246
|
-
validateStatus:
|
|
247
|
-
help:
|
|
246
|
+
validateStatus: m ? "warning" : void 0,
|
|
247
|
+
help: m ? "유효하지 않은 날짜입니다" : void 0,
|
|
248
248
|
children: /* @__PURE__ */ c.jsxs("div", { style: { position: "relative" }, children: [
|
|
249
249
|
/* @__PURE__ */ c.jsx(
|
|
250
|
-
|
|
250
|
+
A.Item,
|
|
251
251
|
{
|
|
252
|
-
name:
|
|
253
|
-
getValueProps: (
|
|
254
|
-
value:
|
|
252
|
+
name: d,
|
|
253
|
+
getValueProps: (v) => ({
|
|
254
|
+
value: v ? _(v).format(n) : void 0
|
|
255
255
|
}),
|
|
256
|
-
normalize: (
|
|
256
|
+
normalize: (v) => v ? _(v).format(o) : void 0,
|
|
257
257
|
noStyle: !0,
|
|
258
258
|
children: /* @__PURE__ */ c.jsx(
|
|
259
|
-
|
|
259
|
+
K,
|
|
260
260
|
{
|
|
261
261
|
...r,
|
|
262
262
|
ref: s,
|
|
263
263
|
onFocus: () => {
|
|
264
264
|
l(!f), a.current?.updateValue();
|
|
265
265
|
},
|
|
266
|
-
onKeyDown: (
|
|
267
|
-
|
|
266
|
+
onKeyDown: (v) => {
|
|
267
|
+
v.key === "Backspace" && l(!0), v.key === "Tab" && l(!1);
|
|
268
268
|
},
|
|
269
269
|
allowClear: !0,
|
|
270
270
|
placeholder: i.replace(/0/g, "_"),
|
|
@@ -279,9 +279,9 @@ const Ci = ({
|
|
|
279
279
|
open: f,
|
|
280
280
|
picker: t,
|
|
281
281
|
format: n,
|
|
282
|
-
value:
|
|
283
|
-
onChange:
|
|
284
|
-
getPopupContainer: (
|
|
282
|
+
value: I,
|
|
283
|
+
onChange: C,
|
|
284
|
+
getPopupContainer: (v) => v.parentElement,
|
|
285
285
|
style: {
|
|
286
286
|
position: "absolute",
|
|
287
287
|
top: 0,
|
|
@@ -295,7 +295,7 @@ const Ci = ({
|
|
|
295
295
|
] })
|
|
296
296
|
}
|
|
297
297
|
);
|
|
298
|
-
},
|
|
298
|
+
}, Ni = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsx(K, { ...e }) }), Pi = ({
|
|
299
299
|
itemProps: t,
|
|
300
300
|
inputProps: e,
|
|
301
301
|
type: r = "date",
|
|
@@ -308,19 +308,19 @@ const Ci = ({
|
|
|
308
308
|
}, { displayFormat: o, outputFormat: s } = i[r], a = (u, f) => {
|
|
309
309
|
if (e?.onChange && typeof e.onChange == "function") {
|
|
310
310
|
let l;
|
|
311
|
-
u instanceof
|
|
312
|
-
l.push(
|
|
311
|
+
u instanceof _ ? l = u.format(s) : (l = [], u && u.map((m) => {
|
|
312
|
+
l.push(m.format(s));
|
|
313
313
|
})), e.onChange(l, f);
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
return /* @__PURE__ */ c.jsx(
|
|
317
|
-
|
|
317
|
+
R,
|
|
318
318
|
{
|
|
319
319
|
...t,
|
|
320
320
|
getValueProps: (u) => ({
|
|
321
|
-
value: u &&
|
|
321
|
+
value: u && _(u)
|
|
322
322
|
}),
|
|
323
|
-
normalize: (u) => u && `${
|
|
323
|
+
normalize: (u) => u && `${_(u).format(s)}`,
|
|
324
324
|
children: /* @__PURE__ */ c.jsx(
|
|
325
325
|
Te,
|
|
326
326
|
{
|
|
@@ -331,7 +331,7 @@ const Ci = ({
|
|
|
331
331
|
)
|
|
332
332
|
}
|
|
333
333
|
);
|
|
334
|
-
}, { RangePicker:
|
|
334
|
+
}, { RangePicker: qt } = Te, Mi = ({
|
|
335
335
|
itemProps: t,
|
|
336
336
|
inputProps: e,
|
|
337
337
|
type: r = "date",
|
|
@@ -343,30 +343,30 @@ const Ci = ({
|
|
|
343
343
|
year: { displayFormat: "YYYY", outputFormat: "YYYY" },
|
|
344
344
|
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
345
345
|
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" }
|
|
346
|
-
}, { displayFormat: a, outputFormat: u } = s[r], f = (l,
|
|
346
|
+
}, { displayFormat: a, outputFormat: u } = s[r], f = (l, m) => {
|
|
347
347
|
if (e.onChange && typeof e.onChange == "function") {
|
|
348
|
-
let
|
|
349
|
-
l instanceof
|
|
350
|
-
|
|
351
|
-
})), e.onChange(
|
|
348
|
+
let p;
|
|
349
|
+
l instanceof _ ? p = l.format(u) : (p = [], l && l.map((d) => {
|
|
350
|
+
p.push(d.format(u));
|
|
351
|
+
})), e.onChange(p, m);
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
return /* @__PURE__ */ c.jsx(
|
|
355
|
-
|
|
355
|
+
R,
|
|
356
356
|
{
|
|
357
357
|
...t,
|
|
358
358
|
getValueProps: (l) => ({
|
|
359
359
|
value: l && [
|
|
360
|
-
l[0] ?
|
|
361
|
-
l[1] ?
|
|
360
|
+
l[0] ? _(l[0]) : null,
|
|
361
|
+
l[1] ? _(l[1]) : null
|
|
362
362
|
]
|
|
363
363
|
}),
|
|
364
364
|
normalize: (l) => [
|
|
365
|
-
l?.[0] ?
|
|
366
|
-
l?.[1] ?
|
|
365
|
+
l?.[0] ? _(l[0]).format(u) : void 0,
|
|
366
|
+
l?.[1] ? _(l[1]).format(u) : void 0
|
|
367
367
|
],
|
|
368
368
|
children: /* @__PURE__ */ c.jsx(
|
|
369
|
-
|
|
369
|
+
qt,
|
|
370
370
|
{
|
|
371
371
|
...e,
|
|
372
372
|
format: o ? {
|
|
@@ -375,24 +375,24 @@ const Ci = ({
|
|
|
375
375
|
} : void 0,
|
|
376
376
|
picker: r,
|
|
377
377
|
order: !0,
|
|
378
|
-
minDate: n ?
|
|
379
|
-
maxDate: i ?
|
|
378
|
+
minDate: n ? _(n, u) : void 0,
|
|
379
|
+
maxDate: i ? _(i, u) : void 0,
|
|
380
380
|
onChange: f
|
|
381
381
|
}
|
|
382
382
|
)
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
|
-
},
|
|
385
|
+
}, Ri = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsx(yt.Group, { ...e }) }), _i = ({
|
|
386
386
|
itemProps: t,
|
|
387
387
|
inputProps: e = {
|
|
388
388
|
format: "YN"
|
|
389
389
|
}
|
|
390
390
|
}) => {
|
|
391
|
-
const r =
|
|
391
|
+
const r = A.useFormInstance(), n = (i) => {
|
|
392
392
|
e.format === "boolean" ? r.setFieldValue(t?.name, i.target.checked) : r.setFieldValue(t?.name, i.target.checked ? "Y" : "N"), e.onChange && e.onChange(i);
|
|
393
393
|
};
|
|
394
394
|
return /* @__PURE__ */ c.jsx(
|
|
395
|
-
|
|
395
|
+
R,
|
|
396
396
|
{
|
|
397
397
|
...t,
|
|
398
398
|
getValueProps: (i) => (console.log("getValueProps :: ", i), { checked: e.format === "boolean" ? !!i : i === "Y" }),
|
|
@@ -400,26 +400,26 @@ const Ci = ({
|
|
|
400
400
|
children: /* @__PURE__ */ c.jsx(me, { ...e, onChange: n, children: e?.title })
|
|
401
401
|
}
|
|
402
402
|
);
|
|
403
|
-
},
|
|
404
|
-
const r =
|
|
403
|
+
}, Li = ({ itemProps: t, inputProps: e }) => {
|
|
404
|
+
const r = A.useFormInstance(), [n, i] = Y(
|
|
405
405
|
t?.initialValue ?? []
|
|
406
|
-
), [o, s] =
|
|
407
|
-
|
|
406
|
+
), [o, s] = Y([]), a = o.length > 0 && o.length == n?.length, u = n?.length > 0 && n.length < o.length;
|
|
407
|
+
j(() => {
|
|
408
408
|
s(f(e?.options));
|
|
409
|
-
}, [e?.options]),
|
|
409
|
+
}, [e?.options]), j(() => {
|
|
410
410
|
i(n);
|
|
411
411
|
}, [n]);
|
|
412
|
-
const f = (
|
|
413
|
-
const
|
|
414
|
-
return (
|
|
415
|
-
|
|
416
|
-
}),
|
|
417
|
-
}, l = (
|
|
418
|
-
i(
|
|
419
|
-
},
|
|
420
|
-
i(
|
|
412
|
+
const f = (p) => {
|
|
413
|
+
const d = [];
|
|
414
|
+
return (p || []).map((I, y) => {
|
|
415
|
+
d.push(I.value);
|
|
416
|
+
}), d;
|
|
417
|
+
}, l = (p) => {
|
|
418
|
+
i(p.target.checked ? o : []), r.setFieldValue(t?.name, p.target.checked ? o : []);
|
|
419
|
+
}, m = (p) => {
|
|
420
|
+
i(p), r.setFieldValue(t?.name, p), e?.onChange && typeof e?.onChange == "function" && e?.onChange(p);
|
|
421
421
|
};
|
|
422
|
-
return /* @__PURE__ */ c.jsx(
|
|
422
|
+
return /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsxs(We, { theme: {
|
|
423
423
|
components: {
|
|
424
424
|
Checkbox: {
|
|
425
425
|
colorPrimary: "var(--check-primary)",
|
|
@@ -442,11 +442,11 @@ const Ci = ({
|
|
|
442
442
|
{
|
|
443
443
|
options: e?.options,
|
|
444
444
|
value: n,
|
|
445
|
-
onChange:
|
|
445
|
+
onChange: m
|
|
446
446
|
}
|
|
447
447
|
)
|
|
448
448
|
] }) });
|
|
449
|
-
}, { TextArea:
|
|
449
|
+
}, { TextArea: Gt } = K, ji = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsx(Gt, { ...e }) }), Fi = ({ itemProps: t, inputProps: e }) => {
|
|
450
450
|
const r = (i) => {
|
|
451
451
|
let o = i.toString().split(".");
|
|
452
452
|
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];
|
|
@@ -454,7 +454,7 @@ const Ci = ({
|
|
|
454
454
|
let o = i.toString().split(".");
|
|
455
455
|
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];
|
|
456
456
|
};
|
|
457
|
-
return /* @__PURE__ */ c.jsx(
|
|
457
|
+
return /* @__PURE__ */ c.jsx(R, { ...t, children: /* @__PURE__ */ c.jsx(
|
|
458
458
|
Dt,
|
|
459
459
|
{
|
|
460
460
|
...e,
|
|
@@ -462,15 +462,15 @@ const Ci = ({
|
|
|
462
462
|
parser: (i) => n(i)
|
|
463
463
|
}
|
|
464
464
|
) });
|
|
465
|
-
}, { Option: _e } = be,
|
|
466
|
-
const [r, n] =
|
|
467
|
-
return
|
|
465
|
+
}, { Option: _e } = be, ki = ({ itemProps: t, inputProps: e }) => {
|
|
466
|
+
const [r, n] = Y([]);
|
|
467
|
+
return j(() => {
|
|
468
468
|
e?.addField === "ALL" ? n([
|
|
469
469
|
{ label: "전체", value: "" },
|
|
470
470
|
...e?.list || []
|
|
471
471
|
]) : e?.addField === "NULL" ? n([{ label: "", value: "" }, ...e?.list || []]) : n(e?.list || []);
|
|
472
472
|
}, [e?.list]), /* @__PURE__ */ c.jsx(
|
|
473
|
-
|
|
473
|
+
R,
|
|
474
474
|
{
|
|
475
475
|
...t,
|
|
476
476
|
getValueProps: (i) => i ? {
|
|
@@ -481,14 +481,14 @@ const Ci = ({
|
|
|
481
481
|
normalize: (i) => i != null && i != null && i.length > 0 ? i.toString() : "",
|
|
482
482
|
children: /* @__PURE__ */ c.jsx(be, { ...e, mode: "multiple", children: r.map((i) => {
|
|
483
483
|
const { value: o, label: s } = i;
|
|
484
|
-
return e?.printCode ? /* @__PURE__ */ c.jsx(_e, { value: o, label: s, children: /* @__PURE__ */ c.jsx(
|
|
484
|
+
return e?.printCode ? /* @__PURE__ */ c.jsx(_e, { value: o, label: s, children: /* @__PURE__ */ c.jsx(ne, { children: `[${o}] ${s}` }) }, o) : /* @__PURE__ */ c.jsx(_e, { value: o, label: s, children: /* @__PURE__ */ c.jsx(ne, { children: `${s}` }) }, o);
|
|
485
485
|
}) })
|
|
486
486
|
}
|
|
487
487
|
);
|
|
488
|
-
},
|
|
488
|
+
}, Yi = (t) => /* @__PURE__ */ c.jsx(W, { ...t, className: "bwg-btn" }), et = Et({
|
|
489
489
|
dragDropManager: void 0
|
|
490
490
|
});
|
|
491
|
-
function
|
|
491
|
+
function F(t) {
|
|
492
492
|
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. ";
|
|
493
493
|
}
|
|
494
494
|
var Le = (function() {
|
|
@@ -499,13 +499,13 @@ var Le = (function() {
|
|
|
499
499
|
INIT: "@@redux/INIT" + je(),
|
|
500
500
|
REPLACE: "@@redux/REPLACE" + je()
|
|
501
501
|
};
|
|
502
|
-
function
|
|
502
|
+
function Xt(t) {
|
|
503
503
|
if (typeof t != "object" || t === null) return !1;
|
|
504
504
|
for (var e = t; Object.getPrototypeOf(e) !== null; )
|
|
505
505
|
e = Object.getPrototypeOf(e);
|
|
506
506
|
return Object.getPrototypeOf(t) === e;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Wt(t) {
|
|
509
509
|
if (t === void 0) return "undefined";
|
|
510
510
|
if (t === null) return "null";
|
|
511
511
|
var e = typeof t;
|
|
@@ -518,9 +518,9 @@ function Xt(t) {
|
|
|
518
518
|
return e;
|
|
519
519
|
}
|
|
520
520
|
if (Array.isArray(t)) return "array";
|
|
521
|
-
if (
|
|
522
|
-
if (
|
|
523
|
-
var r =
|
|
521
|
+
if (Jt(t)) return "date";
|
|
522
|
+
if (Zt(t)) return "error";
|
|
523
|
+
var r = Kt(t);
|
|
524
524
|
switch (r) {
|
|
525
525
|
case "Symbol":
|
|
526
526
|
case "Promise":
|
|
@@ -532,83 +532,83 @@ function Xt(t) {
|
|
|
532
532
|
}
|
|
533
533
|
return e.slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Kt(t) {
|
|
536
536
|
return typeof t.constructor == "function" ? t.constructor.name : null;
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Zt(t) {
|
|
539
539
|
return t instanceof Error || typeof t.message == "string" && t.constructor && typeof t.constructor.stackTraceLimit == "number";
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Jt(t) {
|
|
542
542
|
return t instanceof Date ? !0 : typeof t.toDateString == "function" && typeof t.getDate == "function" && typeof t.setDate == "function";
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function z(t) {
|
|
545
545
|
var e = typeof t;
|
|
546
|
-
return process.env.NODE_ENV !== "production" && (e =
|
|
546
|
+
return process.env.NODE_ENV !== "production" && (e = Wt(t)), e;
|
|
547
547
|
}
|
|
548
548
|
function tt(t, e, r) {
|
|
549
549
|
var n;
|
|
550
550
|
if (typeof e == "function" && typeof r == "function" || typeof r == "function" && typeof arguments[3] == "function")
|
|
551
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
551
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(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.");
|
|
552
552
|
if (typeof e == "function" && typeof r > "u" && (r = e, e = void 0), typeof r < "u") {
|
|
553
553
|
if (typeof r != "function")
|
|
554
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
554
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(1) : "Expected the enhancer to be a function. Instead, received: '" + z(r) + "'");
|
|
555
555
|
return r(tt)(t, e);
|
|
556
556
|
}
|
|
557
557
|
if (typeof t != "function")
|
|
558
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
558
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(2) : "Expected the root reducer to be a function. Instead, received: '" + z(t) + "'");
|
|
559
559
|
var i = t, o = e, s = [], a = s, u = !1;
|
|
560
560
|
function f() {
|
|
561
561
|
a === s && (a = s.slice());
|
|
562
562
|
}
|
|
563
563
|
function l() {
|
|
564
564
|
if (u)
|
|
565
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
565
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(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.");
|
|
566
566
|
return o;
|
|
567
567
|
}
|
|
568
|
-
function
|
|
569
|
-
if (typeof
|
|
570
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
568
|
+
function m(y) {
|
|
569
|
+
if (typeof y != "function")
|
|
570
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(4) : "Expected the listener to be a function. Instead, received: '" + z(y) + "'");
|
|
571
571
|
if (u)
|
|
572
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
573
|
-
var
|
|
574
|
-
return f(), a.push(
|
|
575
|
-
if (
|
|
572
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(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.");
|
|
573
|
+
var C = !0;
|
|
574
|
+
return f(), a.push(y), function() {
|
|
575
|
+
if (C) {
|
|
576
576
|
if (u)
|
|
577
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
578
|
-
|
|
579
|
-
var
|
|
580
|
-
a.splice(
|
|
577
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(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.");
|
|
578
|
+
C = !1, f();
|
|
579
|
+
var h = a.indexOf(y);
|
|
580
|
+
a.splice(h, 1), s = null;
|
|
581
581
|
}
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
if (!
|
|
586
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
587
|
-
if (typeof
|
|
588
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
584
|
+
function p(y) {
|
|
585
|
+
if (!Xt(y))
|
|
586
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(7) : "Actions must be plain objects. Instead, the actual type was: '" + z(y) + "'. 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.");
|
|
587
|
+
if (typeof y.type > "u")
|
|
588
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
|
|
589
589
|
if (u)
|
|
590
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
590
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(9) : "Reducers may not dispatch actions.");
|
|
591
591
|
try {
|
|
592
|
-
u = !0, o = i(o,
|
|
592
|
+
u = !0, o = i(o, y);
|
|
593
593
|
} finally {
|
|
594
594
|
u = !1;
|
|
595
595
|
}
|
|
596
|
-
for (var
|
|
597
|
-
var
|
|
598
|
-
|
|
596
|
+
for (var C = s = a, v = 0; v < C.length; v++) {
|
|
597
|
+
var h = C[v];
|
|
598
|
+
h();
|
|
599
599
|
}
|
|
600
|
-
return
|
|
600
|
+
return y;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
if (typeof
|
|
604
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
605
|
-
i =
|
|
602
|
+
function d(y) {
|
|
603
|
+
if (typeof y != "function")
|
|
604
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(10) : "Expected the nextReducer to be a function. Instead, received: '" + z(y));
|
|
605
|
+
i = y, p({
|
|
606
606
|
type: Fe.REPLACE
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
var
|
|
611
|
-
return
|
|
609
|
+
function I() {
|
|
610
|
+
var y, C = m;
|
|
611
|
+
return y = {
|
|
612
612
|
/**
|
|
613
613
|
* The minimal observable subscription method.
|
|
614
614
|
* @param {Object} observer Any object that can be used as an observer.
|
|
@@ -617,33 +617,33 @@ function tt(t, e, r) {
|
|
|
617
617
|
* be used to unsubscribe the observable from the store, and prevent further
|
|
618
618
|
* emission of values from the observable.
|
|
619
619
|
*/
|
|
620
|
-
subscribe: function(
|
|
621
|
-
if (typeof
|
|
622
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
623
|
-
function
|
|
624
|
-
|
|
620
|
+
subscribe: function(h) {
|
|
621
|
+
if (typeof h != "object" || h === null)
|
|
622
|
+
throw new Error(process.env.NODE_ENV === "production" ? F(11) : "Expected the observer to be an object. Instead, received: '" + z(h) + "'");
|
|
623
|
+
function T() {
|
|
624
|
+
h.next && h.next(l());
|
|
625
625
|
}
|
|
626
|
-
|
|
627
|
-
var
|
|
626
|
+
T();
|
|
627
|
+
var g = C(T);
|
|
628
628
|
return {
|
|
629
|
-
unsubscribe:
|
|
629
|
+
unsubscribe: g
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
|
-
},
|
|
632
|
+
}, y[Le] = function() {
|
|
633
633
|
return this;
|
|
634
|
-
},
|
|
634
|
+
}, y;
|
|
635
635
|
}
|
|
636
|
-
return
|
|
636
|
+
return p({
|
|
637
637
|
type: Fe.INIT
|
|
638
638
|
}), n = {
|
|
639
|
-
dispatch:
|
|
640
|
-
subscribe:
|
|
639
|
+
dispatch: p,
|
|
640
|
+
subscribe: m,
|
|
641
641
|
getState: l,
|
|
642
|
-
replaceReducer:
|
|
643
|
-
}, n[Le] =
|
|
642
|
+
replaceReducer: d
|
|
643
|
+
}, n[Le] = I, n;
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
if (
|
|
645
|
+
function D(t, e, ...r) {
|
|
646
|
+
if (Qt() && e === void 0)
|
|
647
647
|
throw new Error("invariant requires an error message argument");
|
|
648
648
|
if (!t) {
|
|
649
649
|
let n;
|
|
@@ -658,16 +658,16 @@ function y(t, e, ...r) {
|
|
|
658
658
|
throw n.framesToPop = 1, n;
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function Qt() {
|
|
662
662
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function er(t, e, r) {
|
|
665
665
|
return e.split(".").reduce(
|
|
666
666
|
(n, i) => n && n[i] ? n[i] : r || null,
|
|
667
667
|
t
|
|
668
668
|
);
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function tr(t, e) {
|
|
671
671
|
return t.filter(
|
|
672
672
|
(r) => r !== e
|
|
673
673
|
);
|
|
@@ -675,7 +675,7 @@ function er(t, e) {
|
|
|
675
675
|
function rt(t) {
|
|
676
676
|
return typeof t == "object";
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function rr(t, e) {
|
|
679
679
|
const r = /* @__PURE__ */ new Map(), n = (o) => {
|
|
680
680
|
r.set(o, r.has(o) ? r.get(o) + 1 : 1);
|
|
681
681
|
};
|
|
@@ -685,56 +685,56 @@ function tr(t, e) {
|
|
|
685
685
|
o === 1 && i.push(s);
|
|
686
686
|
}), i;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function nr(t, e) {
|
|
689
689
|
return t.filter(
|
|
690
690
|
(r) => e.indexOf(r) > -1
|
|
691
691
|
);
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const Ie = "dnd-core/INIT_COORDS", ie = "dnd-core/BEGIN_DRAG", Ce = "dnd-core/PUBLISH_DRAG_SOURCE", oe = "dnd-core/HOVER", se = "dnd-core/DROP", ae = "dnd-core/END_DRAG";
|
|
694
694
|
function ke(t, e) {
|
|
695
695
|
return {
|
|
696
|
-
type:
|
|
696
|
+
type: Ie,
|
|
697
697
|
payload: {
|
|
698
698
|
sourceClientOffset: e || null,
|
|
699
699
|
clientOffset: t || null
|
|
700
700
|
}
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
type:
|
|
703
|
+
const ir = {
|
|
704
|
+
type: Ie,
|
|
705
705
|
payload: {
|
|
706
706
|
clientOffset: null,
|
|
707
707
|
sourceClientOffset: null
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
|
-
function
|
|
710
|
+
function or(t) {
|
|
711
711
|
return function(r = [], n = {
|
|
712
712
|
publishSource: !0
|
|
713
713
|
}) {
|
|
714
714
|
const { publishSource: i = !0, clientOffset: o, getSourceClientOffset: s } = n, a = t.getMonitor(), u = t.getRegistry();
|
|
715
|
-
t.dispatch(ke(o)),
|
|
716
|
-
const f =
|
|
715
|
+
t.dispatch(ke(o)), sr(r, a, u);
|
|
716
|
+
const f = ur(r, a);
|
|
717
717
|
if (f == null) {
|
|
718
|
-
t.dispatch(
|
|
718
|
+
t.dispatch(ir);
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
721
721
|
let l = null;
|
|
722
722
|
if (o) {
|
|
723
723
|
if (!s)
|
|
724
724
|
throw new Error("getSourceClientOffset must be defined");
|
|
725
|
-
|
|
725
|
+
ar(s), l = s(f);
|
|
726
726
|
}
|
|
727
727
|
t.dispatch(ke(o, l));
|
|
728
|
-
const
|
|
729
|
-
if (
|
|
728
|
+
const p = u.getSource(f).beginDrag(a, f);
|
|
729
|
+
if (p == null)
|
|
730
730
|
return;
|
|
731
|
-
|
|
732
|
-
const
|
|
731
|
+
cr(p), u.pinSource(f);
|
|
732
|
+
const d = u.getSourceType(f);
|
|
733
733
|
return {
|
|
734
|
-
type:
|
|
734
|
+
type: ie,
|
|
735
735
|
payload: {
|
|
736
|
-
itemType:
|
|
737
|
-
item:
|
|
736
|
+
itemType: d,
|
|
737
|
+
item: p,
|
|
738
738
|
sourceId: f,
|
|
739
739
|
clientOffset: o || null,
|
|
740
740
|
sourceClientOffset: l || null,
|
|
@@ -743,18 +743,18 @@ function ir(t) {
|
|
|
743
743
|
};
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
|
|
748
|
-
|
|
746
|
+
function sr(t, e, r) {
|
|
747
|
+
D(!e.isDragging(), "Cannot call beginDrag while dragging."), t.forEach(function(n) {
|
|
748
|
+
D(r.getSource(n), "Expected sourceIds to be registered.");
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
|
-
function sr(t) {
|
|
752
|
-
y(typeof t == "function", "When clientOffset is provided, getSourceClientOffset must be a function.");
|
|
753
|
-
}
|
|
754
751
|
function ar(t) {
|
|
755
|
-
|
|
752
|
+
D(typeof t == "function", "When clientOffset is provided, getSourceClientOffset must be a function.");
|
|
756
753
|
}
|
|
757
|
-
function cr(t
|
|
754
|
+
function cr(t) {
|
|
755
|
+
D(rt(t), "Item must be an object.");
|
|
756
|
+
}
|
|
757
|
+
function ur(t, e) {
|
|
758
758
|
let r = null;
|
|
759
759
|
for (let n = t.length - 1; n >= 0; n--)
|
|
760
760
|
if (e.canDragSource(t[n])) {
|
|
@@ -763,7 +763,7 @@ function cr(t, e) {
|
|
|
763
763
|
}
|
|
764
764
|
return r;
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function lr(t, e, r) {
|
|
767
767
|
return e in t ? Object.defineProperty(t, e, {
|
|
768
768
|
value: r,
|
|
769
769
|
enumerable: !0,
|
|
@@ -771,70 +771,70 @@ function ur(t, e, r) {
|
|
|
771
771
|
writable: !0
|
|
772
772
|
}) : t[e] = r, t;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function dr(t) {
|
|
775
775
|
for (var e = 1; e < arguments.length; e++) {
|
|
776
776
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
777
777
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
778
778
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
779
779
|
}))), n.forEach(function(i) {
|
|
780
|
-
|
|
780
|
+
lr(t, i, r[i]);
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
783
|
return t;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function fr(t) {
|
|
786
786
|
return function(r = {}) {
|
|
787
787
|
const n = t.getMonitor(), i = t.getRegistry();
|
|
788
|
-
|
|
789
|
-
const u =
|
|
790
|
-
type:
|
|
788
|
+
gr(n), mr(n).forEach((s, a) => {
|
|
789
|
+
const u = hr(s, a, i, n), f = {
|
|
790
|
+
type: se,
|
|
791
791
|
payload: {
|
|
792
|
-
dropResult:
|
|
792
|
+
dropResult: dr({}, r, u)
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
795
|
t.dispatch(f);
|
|
796
796
|
});
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
|
|
799
|
+
function gr(t) {
|
|
800
|
+
D(t.isDragging(), "Cannot call drop while not dragging."), D(!t.didDrop(), "Cannot call drop twice during one drag operation.");
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function hr(t, e, r, n) {
|
|
803
803
|
const i = r.getTarget(t);
|
|
804
804
|
let o = i ? i.drop(n, t) : void 0;
|
|
805
|
-
return
|
|
806
|
-
}
|
|
807
|
-
function hr(t) {
|
|
808
|
-
y(typeof t > "u" || rt(t), "Drop result must either be an object or undefined.");
|
|
805
|
+
return pr(o), typeof o > "u" && (o = e === 0 ? {} : n.getDropResult()), o;
|
|
809
806
|
}
|
|
810
807
|
function pr(t) {
|
|
808
|
+
D(typeof t > "u" || rt(t), "Drop result must either be an object or undefined.");
|
|
809
|
+
}
|
|
810
|
+
function mr(t) {
|
|
811
811
|
const e = t.getTargetIds().filter(t.canDropOnTarget, t);
|
|
812
812
|
return e.reverse(), e;
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function vr(t) {
|
|
815
815
|
return function() {
|
|
816
816
|
const r = t.getMonitor(), n = t.getRegistry();
|
|
817
|
-
|
|
817
|
+
yr(r);
|
|
818
818
|
const i = r.getSourceId();
|
|
819
819
|
return i != null && (n.getSource(i, !0).endDrag(r, i), n.unpinSource()), {
|
|
820
|
-
type:
|
|
820
|
+
type: ae
|
|
821
821
|
};
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
824
|
+
function yr(t) {
|
|
825
|
+
D(t.isDragging(), "Cannot call endDrag while not dragging.");
|
|
826
826
|
}
|
|
827
827
|
function ve(t, e) {
|
|
828
828
|
return e === null ? t === null : Array.isArray(t) ? t.some(
|
|
829
829
|
(r) => r === e
|
|
830
830
|
) : t === e;
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function Dr(t) {
|
|
833
833
|
return function(r, { clientOffset: n } = {}) {
|
|
834
|
-
|
|
834
|
+
Sr(r);
|
|
835
835
|
const i = r.slice(0), o = t.getMonitor(), s = t.getRegistry(), a = o.getItemType();
|
|
836
|
-
return
|
|
837
|
-
type:
|
|
836
|
+
return br(i, s, a), Or(i, o, s), Tr(i, o, s), {
|
|
837
|
+
type: oe,
|
|
838
838
|
payload: {
|
|
839
839
|
targetIds: i,
|
|
840
840
|
clientOffset: n || null
|
|
@@ -842,47 +842,47 @@ function yr(t) {
|
|
|
842
842
|
};
|
|
843
843
|
};
|
|
844
844
|
}
|
|
845
|
-
function
|
|
846
|
-
|
|
845
|
+
function Sr(t) {
|
|
846
|
+
D(Array.isArray(t), "Expected targetIds to be an array.");
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
|
|
848
|
+
function Or(t, e, r) {
|
|
849
|
+
D(e.isDragging(), "Cannot call hover while not dragging."), D(!e.didDrop(), "Cannot call hover after drop.");
|
|
850
850
|
for (let n = 0; n < t.length; n++) {
|
|
851
851
|
const i = t[n];
|
|
852
|
-
|
|
852
|
+
D(t.lastIndexOf(i) === n, "Expected targetIds to be unique in the passed array.");
|
|
853
853
|
const o = r.getTarget(i);
|
|
854
|
-
|
|
854
|
+
D(o, "Expected targetIds to be registered.");
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function br(t, e, r) {
|
|
858
858
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
859
859
|
const i = t[n], o = e.getTargetType(i);
|
|
860
860
|
ve(o, r) || t.splice(n, 1);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function Tr(t, e, r) {
|
|
864
864
|
t.forEach(function(n) {
|
|
865
865
|
r.getTarget(n).hover(e, n);
|
|
866
866
|
});
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Ir(t) {
|
|
869
869
|
return function() {
|
|
870
870
|
if (t.getMonitor().isDragging())
|
|
871
871
|
return {
|
|
872
|
-
type:
|
|
872
|
+
type: Ce
|
|
873
873
|
};
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
876
|
function Cr(t) {
|
|
877
877
|
return {
|
|
878
|
-
beginDrag:
|
|
879
|
-
publishDragSource:
|
|
880
|
-
hover:
|
|
881
|
-
drop:
|
|
882
|
-
endDrag:
|
|
878
|
+
beginDrag: or(t),
|
|
879
|
+
publishDragSource: Ir(t),
|
|
880
|
+
hover: Dr(t),
|
|
881
|
+
drop: fr(t),
|
|
882
|
+
endDrag: vr(t)
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
class
|
|
885
|
+
class Er {
|
|
886
886
|
receiveBackend(e) {
|
|
887
887
|
this.backend = e;
|
|
888
888
|
}
|
|
@@ -919,7 +919,7 @@ class Ir {
|
|
|
919
919
|
}, this.store = e, this.monitor = r, e.subscribe(this.handleRefCountChange);
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function wr(t, e) {
|
|
923
923
|
return {
|
|
924
924
|
x: t.x + e.x,
|
|
925
925
|
y: t.y + e.y
|
|
@@ -931,29 +931,29 @@ function nt(t, e) {
|
|
|
931
931
|
y: t.y - e.y
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function xr(t) {
|
|
935
935
|
const { clientOffset: e, initialClientOffset: r, initialSourceClientOffset: n } = t;
|
|
936
|
-
return !e || !r || !n ? null : nt(
|
|
936
|
+
return !e || !r || !n ? null : nt(wr(e, n), r);
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Nr(t) {
|
|
939
939
|
const { clientOffset: e, initialClientOffset: r } = t;
|
|
940
940
|
return !e || !r ? null : nt(e, r);
|
|
941
941
|
}
|
|
942
|
-
const
|
|
943
|
-
|
|
942
|
+
const Q = [], Ee = [];
|
|
943
|
+
Q.__IS_NONE__ = !0;
|
|
944
944
|
Ee.__IS_ALL__ = !0;
|
|
945
|
-
function
|
|
946
|
-
return t ===
|
|
945
|
+
function Pr(t, e) {
|
|
946
|
+
return t === Q ? !1 : t === Ee || typeof e > "u" ? !0 : nr(e, t).length > 0;
|
|
947
947
|
}
|
|
948
|
-
class
|
|
948
|
+
class Mr {
|
|
949
949
|
subscribeToStateChange(e, r = {}) {
|
|
950
950
|
const { handlerIds: n } = r;
|
|
951
|
-
|
|
951
|
+
D(typeof e == "function", "listener must be a function."), D(typeof n > "u" || Array.isArray(n), "handlerIds, when specified, must be an array of strings.");
|
|
952
952
|
let i = this.store.getState().stateId;
|
|
953
953
|
const o = () => {
|
|
954
954
|
const s = this.store.getState(), a = s.stateId;
|
|
955
955
|
try {
|
|
956
|
-
a === i || a === i + 1 && !
|
|
956
|
+
a === i || a === i + 1 && !Pr(s.dirtyHandlerIds, n) || e();
|
|
957
957
|
} finally {
|
|
958
958
|
i = a;
|
|
959
959
|
}
|
|
@@ -961,7 +961,7 @@ class Pr {
|
|
|
961
961
|
return this.store.subscribe(o);
|
|
962
962
|
}
|
|
963
963
|
subscribeToOffsetChange(e) {
|
|
964
|
-
|
|
964
|
+
D(typeof e == "function", "listener must be a function.");
|
|
965
965
|
let r = this.store.getState().dragOffset;
|
|
966
966
|
const n = () => {
|
|
967
967
|
const i = this.store.getState().dragOffset;
|
|
@@ -973,13 +973,13 @@ class Pr {
|
|
|
973
973
|
if (!e)
|
|
974
974
|
return !1;
|
|
975
975
|
const r = this.registry.getSource(e);
|
|
976
|
-
return
|
|
976
|
+
return D(r, `Expected to find a valid source. sourceId=${e}`), this.isDragging() ? !1 : r.canDrag(this, e);
|
|
977
977
|
}
|
|
978
978
|
canDropOnTarget(e) {
|
|
979
979
|
if (!e)
|
|
980
980
|
return !1;
|
|
981
981
|
const r = this.registry.getTarget(e);
|
|
982
|
-
if (
|
|
982
|
+
if (D(r, `Expected to find a valid target. targetId=${e}`), !this.isDragging() || this.didDrop())
|
|
983
983
|
return !1;
|
|
984
984
|
const n = this.registry.getTargetType(e), i = this.getItemType();
|
|
985
985
|
return ve(n, i) && r.canDrop(this, e);
|
|
@@ -991,7 +991,7 @@ class Pr {
|
|
|
991
991
|
if (!e)
|
|
992
992
|
return !1;
|
|
993
993
|
const r = this.registry.getSource(e, !0);
|
|
994
|
-
if (
|
|
994
|
+
if (D(r, `Expected to find a valid source. sourceId=${e}`), !this.isDragging() || !this.isSourcePublic())
|
|
995
995
|
return !1;
|
|
996
996
|
const n = this.registry.getSourceType(e), i = this.getItemType();
|
|
997
997
|
return n !== i ? !1 : r.isDragging(this, e);
|
|
@@ -1044,10 +1044,10 @@ class Pr {
|
|
|
1044
1044
|
return this.store.getState().dragOffset.clientOffset;
|
|
1045
1045
|
}
|
|
1046
1046
|
getSourceClientOffset() {
|
|
1047
|
-
return
|
|
1047
|
+
return xr(this.store.getState().dragOffset);
|
|
1048
1048
|
}
|
|
1049
1049
|
getDifferenceFromInitialOffset() {
|
|
1050
|
-
return
|
|
1050
|
+
return Nr(this.store.getState().dragOffset);
|
|
1051
1051
|
}
|
|
1052
1052
|
constructor(e, r) {
|
|
1053
1053
|
this.store = e, this.registry = r;
|
|
@@ -1062,7 +1062,7 @@ function ot(t) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
};
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Rr(t) {
|
|
1066
1066
|
let e = 1;
|
|
1067
1067
|
const r = new it(t), n = document.createTextNode("");
|
|
1068
1068
|
return r.observe(n, {
|
|
@@ -1071,7 +1071,7 @@ function Mr(t) {
|
|
|
1071
1071
|
e = -e, n.data = e;
|
|
1072
1072
|
};
|
|
1073
1073
|
}
|
|
1074
|
-
const
|
|
1074
|
+
const _r = typeof it == "function" ? (
|
|
1075
1075
|
// reliably everywhere they are implemented.
|
|
1076
1076
|
// They are implemented in all modern browsers.
|
|
1077
1077
|
//
|
|
@@ -1082,7 +1082,7 @@ const Rr = typeof it == "function" ? (
|
|
|
1082
1082
|
// - iPad Safari 6-7.1
|
|
1083
1083
|
// - iPhone Safari 7-7.1
|
|
1084
1084
|
// - Safari 6-7
|
|
1085
|
-
|
|
1085
|
+
Rr
|
|
1086
1086
|
) : (
|
|
1087
1087
|
// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
|
|
1088
1088
|
// 11-12, and in web workers in many engines.
|
|
@@ -1110,7 +1110,7 @@ const Rr = typeof it == "function" ? (
|
|
|
1110
1110
|
// - Lynx 2.8.7
|
|
1111
1111
|
ot
|
|
1112
1112
|
);
|
|
1113
|
-
class
|
|
1113
|
+
class Lr {
|
|
1114
1114
|
// Use the fastest means possible to execute a task in its own turn, with
|
|
1115
1115
|
// priority over other events including IO, animation, reflow, and redraw
|
|
1116
1116
|
// events in browsers.
|
|
@@ -1139,13 +1139,13 @@ class _r {
|
|
|
1139
1139
|
e.length = 0, this.index = 0, this.flushing = !1;
|
|
1140
1140
|
}, this.registerPendingError = (e) => {
|
|
1141
1141
|
this.pendingErrors.push(e), this.requestErrorThrow();
|
|
1142
|
-
}, this.requestFlush =
|
|
1142
|
+
}, this.requestFlush = _r(this.flush), this.requestErrorThrow = ot(() => {
|
|
1143
1143
|
if (this.pendingErrors.length)
|
|
1144
1144
|
throw this.pendingErrors.shift();
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
class
|
|
1148
|
+
class jr {
|
|
1149
1149
|
call() {
|
|
1150
1150
|
try {
|
|
1151
1151
|
this.task && this.task();
|
|
@@ -1159,9 +1159,9 @@ class Lr {
|
|
|
1159
1159
|
this.onError = e, this.release = r, this.task = null;
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
|
-
class
|
|
1162
|
+
class Fr {
|
|
1163
1163
|
create(e) {
|
|
1164
|
-
const r = this.freeTasks, n = r.length ? r.pop() : new
|
|
1164
|
+
const r = this.freeTasks, n = r.length ? r.pop() : new jr(
|
|
1165
1165
|
this.onError,
|
|
1166
1166
|
(i) => r[r.length] = i
|
|
1167
1167
|
);
|
|
@@ -1171,12 +1171,12 @@ class jr {
|
|
|
1171
1171
|
this.onError = e, this.freeTasks = [];
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
const st = new
|
|
1175
|
-
function kr(t) {
|
|
1176
|
-
st.enqueueTask(Fr.create(t));
|
|
1177
|
-
}
|
|
1178
|
-
const we = "dnd-core/ADD_SOURCE", xe = "dnd-core/ADD_TARGET", Ne = "dnd-core/REMOVE_SOURCE", ae = "dnd-core/REMOVE_TARGET";
|
|
1174
|
+
const st = new Lr(), kr = new Fr(st.registerPendingError);
|
|
1179
1175
|
function Yr(t) {
|
|
1176
|
+
st.enqueueTask(kr.create(t));
|
|
1177
|
+
}
|
|
1178
|
+
const we = "dnd-core/ADD_SOURCE", xe = "dnd-core/ADD_TARGET", Ne = "dnd-core/REMOVE_SOURCE", ce = "dnd-core/REMOVE_TARGET";
|
|
1179
|
+
function Ar(t) {
|
|
1180
1180
|
return {
|
|
1181
1181
|
type: we,
|
|
1182
1182
|
payload: {
|
|
@@ -1184,7 +1184,7 @@ function Yr(t) {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
};
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Hr(t) {
|
|
1188
1188
|
return {
|
|
1189
1189
|
type: xe,
|
|
1190
1190
|
payload: {
|
|
@@ -1192,7 +1192,7 @@ function Ar(t) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
};
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Br(t) {
|
|
1196
1196
|
return {
|
|
1197
1197
|
type: Ne,
|
|
1198
1198
|
payload: {
|
|
@@ -1200,19 +1200,19 @@ function Hr(t) {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function Ur(t) {
|
|
1204
1204
|
return {
|
|
1205
|
-
type:
|
|
1205
|
+
type: ce,
|
|
1206
1206
|
payload: {
|
|
1207
1207
|
targetId: t
|
|
1208
1208
|
}
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function Ur(t) {
|
|
1212
|
-
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.");
|
|
1213
|
-
}
|
|
1214
1211
|
function Vr(t) {
|
|
1215
|
-
|
|
1212
|
+
D(typeof t.canDrag == "function", "Expected canDrag to be a function."), D(typeof t.beginDrag == "function", "Expected beginDrag to be a function."), D(typeof t.endDrag == "function", "Expected endDrag to be a function.");
|
|
1213
|
+
}
|
|
1214
|
+
function $r(t) {
|
|
1215
|
+
D(typeof t.canDrop == "function", "Expected canDrop to be a function."), D(typeof t.hover == "function", "Expected hover to be a function."), D(typeof t.drop == "function", "Expected beginDrag to be a function.");
|
|
1216
1216
|
}
|
|
1217
1217
|
function ye(t, e) {
|
|
1218
1218
|
if (e && Array.isArray(t)) {
|
|
@@ -1221,22 +1221,22 @@ function ye(t, e) {
|
|
|
1221
1221
|
);
|
|
1222
1222
|
return;
|
|
1223
1223
|
}
|
|
1224
|
-
|
|
1224
|
+
D(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.");
|
|
1225
1225
|
}
|
|
1226
|
-
var
|
|
1226
|
+
var k;
|
|
1227
1227
|
(function(t) {
|
|
1228
1228
|
t.SOURCE = "SOURCE", t.TARGET = "TARGET";
|
|
1229
|
-
})(
|
|
1230
|
-
let
|
|
1231
|
-
function
|
|
1232
|
-
return
|
|
1229
|
+
})(k || (k = {}));
|
|
1230
|
+
let zr = 0;
|
|
1231
|
+
function qr() {
|
|
1232
|
+
return zr++;
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1235
|
-
const e =
|
|
1234
|
+
function Gr(t) {
|
|
1235
|
+
const e = qr().toString();
|
|
1236
1236
|
switch (t) {
|
|
1237
|
-
case
|
|
1237
|
+
case k.SOURCE:
|
|
1238
1238
|
return `S${e}`;
|
|
1239
|
-
case
|
|
1239
|
+
case k.TARGET:
|
|
1240
1240
|
return `T${e}`;
|
|
1241
1241
|
default:
|
|
1242
1242
|
throw new Error(`Unknown Handler Role: ${t}`);
|
|
@@ -1245,9 +1245,9 @@ function qr(t) {
|
|
|
1245
1245
|
function Ae(t) {
|
|
1246
1246
|
switch (t[0]) {
|
|
1247
1247
|
case "S":
|
|
1248
|
-
return
|
|
1248
|
+
return k.SOURCE;
|
|
1249
1249
|
case "T":
|
|
1250
|
-
return
|
|
1250
|
+
return k.TARGET;
|
|
1251
1251
|
default:
|
|
1252
1252
|
throw new Error(`Cannot parse handler ID: ${t}`);
|
|
1253
1253
|
}
|
|
@@ -1263,66 +1263,66 @@ function He(t, e) {
|
|
|
1263
1263
|
} while (!n);
|
|
1264
1264
|
return !1;
|
|
1265
1265
|
}
|
|
1266
|
-
class
|
|
1266
|
+
class Xr {
|
|
1267
1267
|
addSource(e, r) {
|
|
1268
|
-
ye(e),
|
|
1269
|
-
const n = this.addHandler(
|
|
1270
|
-
return this.store.dispatch(
|
|
1268
|
+
ye(e), Vr(r);
|
|
1269
|
+
const n = this.addHandler(k.SOURCE, e, r);
|
|
1270
|
+
return this.store.dispatch(Ar(n)), n;
|
|
1271
1271
|
}
|
|
1272
1272
|
addTarget(e, r) {
|
|
1273
|
-
ye(e, !0),
|
|
1274
|
-
const n = this.addHandler(
|
|
1275
|
-
return this.store.dispatch(
|
|
1273
|
+
ye(e, !0), $r(r);
|
|
1274
|
+
const n = this.addHandler(k.TARGET, e, r);
|
|
1275
|
+
return this.store.dispatch(Hr(n)), n;
|
|
1276
1276
|
}
|
|
1277
1277
|
containsHandler(e) {
|
|
1278
1278
|
return He(this.dragSources, e) || He(this.dropTargets, e);
|
|
1279
1279
|
}
|
|
1280
1280
|
getSource(e, r = !1) {
|
|
1281
|
-
return
|
|
1281
|
+
return D(this.isSourceId(e), "Expected a valid source ID."), r && e === this.pinnedSourceId ? this.pinnedSource : this.dragSources.get(e);
|
|
1282
1282
|
}
|
|
1283
1283
|
getTarget(e) {
|
|
1284
|
-
return
|
|
1284
|
+
return D(this.isTargetId(e), "Expected a valid target ID."), this.dropTargets.get(e);
|
|
1285
1285
|
}
|
|
1286
1286
|
getSourceType(e) {
|
|
1287
|
-
return
|
|
1287
|
+
return D(this.isSourceId(e), "Expected a valid source ID."), this.types.get(e);
|
|
1288
1288
|
}
|
|
1289
1289
|
getTargetType(e) {
|
|
1290
|
-
return
|
|
1290
|
+
return D(this.isTargetId(e), "Expected a valid target ID."), this.types.get(e);
|
|
1291
1291
|
}
|
|
1292
1292
|
isSourceId(e) {
|
|
1293
|
-
return Ae(e) ===
|
|
1293
|
+
return Ae(e) === k.SOURCE;
|
|
1294
1294
|
}
|
|
1295
1295
|
isTargetId(e) {
|
|
1296
|
-
return Ae(e) ===
|
|
1296
|
+
return Ae(e) === k.TARGET;
|
|
1297
1297
|
}
|
|
1298
1298
|
removeSource(e) {
|
|
1299
|
-
|
|
1299
|
+
D(this.getSource(e), "Expected an existing source."), this.store.dispatch(Br(e)), Yr(() => {
|
|
1300
1300
|
this.dragSources.delete(e), this.types.delete(e);
|
|
1301
1301
|
});
|
|
1302
1302
|
}
|
|
1303
1303
|
removeTarget(e) {
|
|
1304
|
-
|
|
1304
|
+
D(this.getTarget(e), "Expected an existing target."), this.store.dispatch(Ur(e)), this.dropTargets.delete(e), this.types.delete(e);
|
|
1305
1305
|
}
|
|
1306
1306
|
pinSource(e) {
|
|
1307
1307
|
const r = this.getSource(e);
|
|
1308
|
-
|
|
1308
|
+
D(r, "Expected an existing source."), this.pinnedSourceId = e, this.pinnedSource = r;
|
|
1309
1309
|
}
|
|
1310
1310
|
unpinSource() {
|
|
1311
|
-
|
|
1311
|
+
D(this.pinnedSource, "No source is pinned at the time."), this.pinnedSourceId = null, this.pinnedSource = null;
|
|
1312
1312
|
}
|
|
1313
1313
|
addHandler(e, r, n) {
|
|
1314
|
-
const i =
|
|
1315
|
-
return this.types.set(i, r), e ===
|
|
1314
|
+
const i = Gr(e);
|
|
1315
|
+
return this.types.set(i, r), e === k.SOURCE ? this.dragSources.set(i, n) : e === k.TARGET && this.dropTargets.set(i, n), i;
|
|
1316
1316
|
}
|
|
1317
1317
|
constructor(e) {
|
|
1318
1318
|
this.types = /* @__PURE__ */ new Map(), this.dragSources = /* @__PURE__ */ new Map(), this.dropTargets = /* @__PURE__ */ new Map(), this.pinnedSourceId = null, this.pinnedSource = null, this.store = e;
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
const
|
|
1322
|
-
function
|
|
1321
|
+
const Wr = (t, e) => t === e;
|
|
1322
|
+
function Kr(t, e) {
|
|
1323
1323
|
return !t && !e ? !0 : !t || !e ? !1 : t.x === e.x && t.y === e.y;
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function Zr(t, e, r = Wr) {
|
|
1326
1326
|
if (t.length !== e.length)
|
|
1327
1327
|
return !1;
|
|
1328
1328
|
for (let n = 0; n < t.length; ++n)
|
|
@@ -1330,29 +1330,29 @@ function Kr(t, e, r = Xr) {
|
|
|
1330
1330
|
return !1;
|
|
1331
1331
|
return !0;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function Jr(t = Q, e) {
|
|
1334
1334
|
switch (e.type) {
|
|
1335
|
-
case
|
|
1335
|
+
case oe:
|
|
1336
1336
|
break;
|
|
1337
1337
|
case we:
|
|
1338
1338
|
case xe:
|
|
1339
|
-
case
|
|
1339
|
+
case ce:
|
|
1340
1340
|
case Ne:
|
|
1341
|
-
return
|
|
1342
|
-
case
|
|
1343
|
-
case
|
|
1341
|
+
return Q;
|
|
1342
|
+
case ie:
|
|
1343
|
+
case Ce:
|
|
1344
|
+
case ae:
|
|
1344
1345
|
case se:
|
|
1345
|
-
case oe:
|
|
1346
1346
|
default:
|
|
1347
1347
|
return Ee;
|
|
1348
1348
|
}
|
|
1349
|
-
const { targetIds: r = [], prevTargetIds: n = [] } = e.payload, i =
|
|
1350
|
-
if (!(i.length > 0 || !
|
|
1351
|
-
return
|
|
1349
|
+
const { targetIds: r = [], prevTargetIds: n = [] } = e.payload, i = rr(r, n);
|
|
1350
|
+
if (!(i.length > 0 || !Zr(r, n)))
|
|
1351
|
+
return Q;
|
|
1352
1352
|
const s = n[n.length - 1], a = r[r.length - 1];
|
|
1353
1353
|
return s !== a && (s && i.push(s), a && i.push(a)), i;
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function Qr(t, e, r) {
|
|
1356
1356
|
return e in t ? Object.defineProperty(t, e, {
|
|
1357
1357
|
value: r,
|
|
1358
1358
|
enumerable: !0,
|
|
@@ -1360,13 +1360,13 @@ function Jr(t, e, r) {
|
|
|
1360
1360
|
writable: !0
|
|
1361
1361
|
}) : t[e] = r, t;
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1363
|
+
function en(t) {
|
|
1364
1364
|
for (var e = 1; e < arguments.length; e++) {
|
|
1365
1365
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
1366
1366
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
1367
1367
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
1368
1368
|
}))), n.forEach(function(i) {
|
|
1369
|
-
|
|
1369
|
+
Qr(t, i, r[i]);
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
1372
|
return t;
|
|
@@ -1376,28 +1376,28 @@ const Be = {
|
|
|
1376
1376
|
initialClientOffset: null,
|
|
1377
1377
|
clientOffset: null
|
|
1378
1378
|
};
|
|
1379
|
-
function
|
|
1379
|
+
function tn(t = Be, e) {
|
|
1380
1380
|
const { payload: r } = e;
|
|
1381
1381
|
switch (e.type) {
|
|
1382
|
-
case
|
|
1383
|
-
case
|
|
1382
|
+
case Ie:
|
|
1383
|
+
case ie:
|
|
1384
1384
|
return {
|
|
1385
1385
|
initialSourceClientOffset: r.sourceClientOffset,
|
|
1386
1386
|
initialClientOffset: r.clientOffset,
|
|
1387
1387
|
clientOffset: r.clientOffset
|
|
1388
1388
|
};
|
|
1389
|
-
case
|
|
1390
|
-
return
|
|
1389
|
+
case oe:
|
|
1390
|
+
return Kr(t.clientOffset, r.clientOffset) ? t : en({}, t, {
|
|
1391
1391
|
clientOffset: r.clientOffset
|
|
1392
1392
|
});
|
|
1393
|
+
case ae:
|
|
1393
1394
|
case se:
|
|
1394
|
-
case oe:
|
|
1395
1395
|
return Be;
|
|
1396
1396
|
default:
|
|
1397
1397
|
return t;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function rn(t, e, r) {
|
|
1401
1401
|
return e in t ? Object.defineProperty(t, e, {
|
|
1402
1402
|
value: r,
|
|
1403
1403
|
enumerable: !0,
|
|
@@ -1405,18 +1405,18 @@ function tn(t, e, r) {
|
|
|
1405
1405
|
writable: !0
|
|
1406
1406
|
}) : t[e] = r, t;
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function q(t) {
|
|
1409
1409
|
for (var e = 1; e < arguments.length; e++) {
|
|
1410
1410
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
1411
1411
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
1412
1412
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
1413
1413
|
}))), n.forEach(function(i) {
|
|
1414
|
-
|
|
1414
|
+
rn(t, i, r[i]);
|
|
1415
1415
|
});
|
|
1416
1416
|
}
|
|
1417
1417
|
return t;
|
|
1418
1418
|
}
|
|
1419
|
-
const
|
|
1419
|
+
const nn = {
|
|
1420
1420
|
itemType: null,
|
|
1421
1421
|
item: null,
|
|
1422
1422
|
sourceId: null,
|
|
@@ -1425,11 +1425,11 @@ const rn = {
|
|
|
1425
1425
|
didDrop: !1,
|
|
1426
1426
|
isSourcePublic: null
|
|
1427
1427
|
};
|
|
1428
|
-
function
|
|
1428
|
+
function on(t = nn, e) {
|
|
1429
1429
|
const { payload: r } = e;
|
|
1430
1430
|
switch (e.type) {
|
|
1431
|
-
case
|
|
1432
|
-
return
|
|
1431
|
+
case ie:
|
|
1432
|
+
return q({}, t, {
|
|
1433
1433
|
itemType: r.itemType,
|
|
1434
1434
|
item: r.item,
|
|
1435
1435
|
sourceId: r.sourceId,
|
|
@@ -1437,26 +1437,26 @@ function nn(t = rn, e) {
|
|
|
1437
1437
|
dropResult: null,
|
|
1438
1438
|
didDrop: !1
|
|
1439
1439
|
});
|
|
1440
|
-
case
|
|
1441
|
-
return
|
|
1440
|
+
case Ce:
|
|
1441
|
+
return q({}, t, {
|
|
1442
1442
|
isSourcePublic: !0
|
|
1443
1443
|
});
|
|
1444
|
-
case
|
|
1445
|
-
return
|
|
1444
|
+
case oe:
|
|
1445
|
+
return q({}, t, {
|
|
1446
1446
|
targetIds: r.targetIds
|
|
1447
1447
|
});
|
|
1448
|
-
case
|
|
1449
|
-
return t.targetIds.indexOf(r.targetId) === -1 ? t :
|
|
1450
|
-
targetIds:
|
|
1448
|
+
case ce:
|
|
1449
|
+
return t.targetIds.indexOf(r.targetId) === -1 ? t : q({}, t, {
|
|
1450
|
+
targetIds: tr(t.targetIds, r.targetId)
|
|
1451
1451
|
});
|
|
1452
|
-
case
|
|
1453
|
-
return
|
|
1452
|
+
case se:
|
|
1453
|
+
return q({}, t, {
|
|
1454
1454
|
dropResult: r.dropResult,
|
|
1455
1455
|
didDrop: !0,
|
|
1456
1456
|
targetIds: []
|
|
1457
1457
|
});
|
|
1458
|
-
case
|
|
1459
|
-
return
|
|
1458
|
+
case ae:
|
|
1459
|
+
return q({}, t, {
|
|
1460
1460
|
itemType: null,
|
|
1461
1461
|
item: null,
|
|
1462
1462
|
sourceId: null,
|
|
@@ -1469,22 +1469,22 @@ function nn(t = rn, e) {
|
|
|
1469
1469
|
return t;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function sn(t = 0, e) {
|
|
1473
1473
|
switch (e.type) {
|
|
1474
1474
|
case we:
|
|
1475
1475
|
case xe:
|
|
1476
1476
|
return t + 1;
|
|
1477
1477
|
case Ne:
|
|
1478
|
-
case
|
|
1478
|
+
case ce:
|
|
1479
1479
|
return t - 1;
|
|
1480
1480
|
default:
|
|
1481
1481
|
return t;
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function an(t = 0) {
|
|
1485
1485
|
return t + 1;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function cn(t, e, r) {
|
|
1488
1488
|
return e in t ? Object.defineProperty(t, e, {
|
|
1489
1489
|
value: r,
|
|
1490
1490
|
enumerable: !0,
|
|
@@ -1492,45 +1492,45 @@ function an(t, e, r) {
|
|
|
1492
1492
|
writable: !0
|
|
1493
1493
|
}) : t[e] = r, t;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function un(t) {
|
|
1496
1496
|
for (var e = 1; e < arguments.length; e++) {
|
|
1497
1497
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
1498
1498
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
1499
1499
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
1500
1500
|
}))), n.forEach(function(i) {
|
|
1501
|
-
|
|
1501
|
+
cn(t, i, r[i]);
|
|
1502
1502
|
});
|
|
1503
1503
|
}
|
|
1504
1504
|
return t;
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function ln(t = {}, e) {
|
|
1507
1507
|
return {
|
|
1508
|
-
dirtyHandlerIds:
|
|
1508
|
+
dirtyHandlerIds: Jr(t.dirtyHandlerIds, {
|
|
1509
1509
|
type: e.type,
|
|
1510
|
-
payload:
|
|
1511
|
-
prevTargetIds:
|
|
1510
|
+
payload: un({}, e.payload, {
|
|
1511
|
+
prevTargetIds: er(t, "dragOperation.targetIds", [])
|
|
1512
1512
|
})
|
|
1513
1513
|
}),
|
|
1514
|
-
dragOffset:
|
|
1515
|
-
refCount:
|
|
1516
|
-
dragOperation:
|
|
1517
|
-
stateId:
|
|
1514
|
+
dragOffset: tn(t.dragOffset, e),
|
|
1515
|
+
refCount: sn(t.refCount, e),
|
|
1516
|
+
dragOperation: on(t.dragOperation, e),
|
|
1517
|
+
stateId: an(t.stateId)
|
|
1518
1518
|
};
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const i =
|
|
1520
|
+
function dn(t, e = void 0, r = {}, n = !1) {
|
|
1521
|
+
const i = fn(n), o = new Mr(i, new Xr(i)), s = new Er(i, o), a = t(s, e, r);
|
|
1522
1522
|
return s.receiveBackend(a), s;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function fn(t) {
|
|
1525
1525
|
const e = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
1526
|
-
return tt(
|
|
1526
|
+
return tt(ln, t && e && e({
|
|
1527
1527
|
name: "dnd-core",
|
|
1528
1528
|
instanceId: "dnd-core"
|
|
1529
1529
|
}));
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function gn(t, e) {
|
|
1532
1532
|
if (t == null) return {};
|
|
1533
|
-
var r =
|
|
1533
|
+
var r = hn(t, e), n, i;
|
|
1534
1534
|
if (Object.getOwnPropertySymbols) {
|
|
1535
1535
|
var o = Object.getOwnPropertySymbols(t);
|
|
1536
1536
|
for (i = 0; i < o.length; i++)
|
|
@@ -1538,7 +1538,7 @@ function fn(t, e) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
return r;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function hn(t, e) {
|
|
1542
1542
|
if (t == null) return {};
|
|
1543
1543
|
var r = {}, n = Object.keys(t), i, o;
|
|
1544
1544
|
for (o = 0; o < n.length; o++)
|
|
@@ -1546,17 +1546,17 @@ function gn(t, e) {
|
|
|
1546
1546
|
return r;
|
|
1547
1547
|
}
|
|
1548
1548
|
let Ue = 0;
|
|
1549
|
-
const
|
|
1550
|
-
var
|
|
1551
|
-
var { children: r } = e, n =
|
|
1549
|
+
const re = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
1550
|
+
var pn = /* @__PURE__ */ wt(function(e) {
|
|
1551
|
+
var { children: r } = e, n = gn(e, [
|
|
1552
1552
|
"children"
|
|
1553
1553
|
]);
|
|
1554
|
-
const [i, o] =
|
|
1555
|
-
return
|
|
1554
|
+
const [i, o] = mn(n);
|
|
1555
|
+
return j(() => {
|
|
1556
1556
|
if (o) {
|
|
1557
1557
|
const s = at();
|
|
1558
1558
|
return ++Ue, () => {
|
|
1559
|
-
--Ue === 0 && (s[
|
|
1559
|
+
--Ue === 0 && (s[re] = null);
|
|
1560
1560
|
};
|
|
1561
1561
|
}
|
|
1562
1562
|
}, []), /* @__PURE__ */ c.jsx(et.Provider, {
|
|
@@ -1564,7 +1564,7 @@ var hn = /* @__PURE__ */ wt(function(e) {
|
|
|
1564
1564
|
children: r
|
|
1565
1565
|
});
|
|
1566
1566
|
});
|
|
1567
|
-
function
|
|
1567
|
+
function mn(t) {
|
|
1568
1568
|
if ("manager" in t)
|
|
1569
1569
|
return [
|
|
1570
1570
|
{
|
|
@@ -1572,23 +1572,23 @@ function pn(t) {
|
|
|
1572
1572
|
},
|
|
1573
1573
|
!1
|
|
1574
1574
|
];
|
|
1575
|
-
const e =
|
|
1575
|
+
const e = vn(t.backend, t.context, t.options, t.debugMode), r = !t.context;
|
|
1576
1576
|
return [
|
|
1577
1577
|
e,
|
|
1578
1578
|
r
|
|
1579
1579
|
];
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function vn(t, e = at(), r, n) {
|
|
1582
1582
|
const i = e;
|
|
1583
|
-
return i[
|
|
1584
|
-
dragDropManager:
|
|
1585
|
-
}), i[
|
|
1583
|
+
return i[re] || (i[re] = {
|
|
1584
|
+
dragDropManager: dn(t, e, r, n)
|
|
1585
|
+
}), i[re];
|
|
1586
1586
|
}
|
|
1587
1587
|
function at() {
|
|
1588
1588
|
return typeof global < "u" ? global : window;
|
|
1589
1589
|
}
|
|
1590
1590
|
var le, Ve;
|
|
1591
|
-
function
|
|
1591
|
+
function yn() {
|
|
1592
1592
|
return Ve || (Ve = 1, le = function t(e, r) {
|
|
1593
1593
|
if (e === r) return !0;
|
|
1594
1594
|
if (e && r && typeof e == "object" && typeof r == "object") {
|
|
@@ -1615,27 +1615,27 @@ function vn() {
|
|
|
1615
1615
|
return e !== e && r !== r;
|
|
1616
1616
|
}), le;
|
|
1617
1617
|
}
|
|
1618
|
-
var
|
|
1619
|
-
const
|
|
1620
|
-
function
|
|
1621
|
-
const [n, i] =
|
|
1618
|
+
var Dn = yn();
|
|
1619
|
+
const Sn = /* @__PURE__ */ Bt(Dn), U = typeof window < "u" ? xt : j;
|
|
1620
|
+
function On(t, e, r) {
|
|
1621
|
+
const [n, i] = Y(
|
|
1622
1622
|
() => e(t)
|
|
1623
1623
|
), o = Nt(() => {
|
|
1624
1624
|
const s = e(t);
|
|
1625
|
-
|
|
1625
|
+
Sn(n, s) || (i(s), r && r());
|
|
1626
1626
|
}, [
|
|
1627
1627
|
n,
|
|
1628
1628
|
t,
|
|
1629
1629
|
r
|
|
1630
1630
|
]);
|
|
1631
|
-
return
|
|
1631
|
+
return U(o), [
|
|
1632
1632
|
n,
|
|
1633
1633
|
o
|
|
1634
1634
|
];
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
const [n, i] =
|
|
1638
|
-
return
|
|
1636
|
+
function bn(t, e, r) {
|
|
1637
|
+
const [n, i] = On(t, e, r);
|
|
1638
|
+
return U(function() {
|
|
1639
1639
|
const s = t.getHandlerId();
|
|
1640
1640
|
if (s != null)
|
|
1641
1641
|
return t.subscribeToStateChange(i, {
|
|
@@ -1649,7 +1649,7 @@ function On(t, e, r) {
|
|
|
1649
1649
|
]), n;
|
|
1650
1650
|
}
|
|
1651
1651
|
function ct(t, e, r) {
|
|
1652
|
-
return
|
|
1652
|
+
return bn(
|
|
1653
1653
|
e,
|
|
1654
1654
|
t || (() => ({})),
|
|
1655
1655
|
() => r.reconnect()
|
|
@@ -1657,18 +1657,18 @@ function ct(t, e, r) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
function ut(t, e) {
|
|
1659
1659
|
const r = [];
|
|
1660
|
-
return typeof t != "function" && r.push(t),
|
|
1660
|
+
return typeof t != "function" && r.push(t), L(() => typeof t == "function" ? t() : t, r);
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1663
|
-
return
|
|
1662
|
+
function Tn(t) {
|
|
1663
|
+
return L(
|
|
1664
1664
|
() => t.hooks.dragSource(),
|
|
1665
1665
|
[
|
|
1666
1666
|
t
|
|
1667
1667
|
]
|
|
1668
1668
|
);
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1671
|
-
return
|
|
1670
|
+
function In(t) {
|
|
1671
|
+
return L(
|
|
1672
1672
|
() => t.hooks.dragPreview(),
|
|
1673
1673
|
[
|
|
1674
1674
|
t
|
|
@@ -1684,7 +1684,7 @@ class Cn {
|
|
|
1684
1684
|
return this.sourceId;
|
|
1685
1685
|
}
|
|
1686
1686
|
canDrag() {
|
|
1687
|
-
|
|
1687
|
+
D(!de, "You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
|
|
1688
1688
|
try {
|
|
1689
1689
|
return de = !0, this.internalMonitor.canDragSource(this.sourceId);
|
|
1690
1690
|
} finally {
|
|
@@ -1694,7 +1694,7 @@ class Cn {
|
|
|
1694
1694
|
isDragging() {
|
|
1695
1695
|
if (!this.sourceId)
|
|
1696
1696
|
return !1;
|
|
1697
|
-
|
|
1697
|
+
D(!fe, "You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
|
|
1698
1698
|
try {
|
|
1699
1699
|
return fe = !0, this.internalMonitor.isDraggingSource(this.sourceId);
|
|
1700
1700
|
} finally {
|
|
@@ -1760,7 +1760,7 @@ class Cn {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
1762
|
let ge = !1;
|
|
1763
|
-
class
|
|
1763
|
+
class En {
|
|
1764
1764
|
receiveHandlerId(e) {
|
|
1765
1765
|
this.targetId = e;
|
|
1766
1766
|
}
|
|
@@ -1773,7 +1773,7 @@ class In {
|
|
|
1773
1773
|
canDrop() {
|
|
1774
1774
|
if (!this.targetId)
|
|
1775
1775
|
return !1;
|
|
1776
|
-
|
|
1776
|
+
D(!ge, "You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");
|
|
1777
1777
|
try {
|
|
1778
1778
|
return ge = !0, this.internalMonitor.canDropOnTarget(this.targetId);
|
|
1779
1779
|
} finally {
|
|
@@ -1814,14 +1814,14 @@ class In {
|
|
|
1814
1814
|
this.targetId = null, this.internalMonitor = e.getMonitor();
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function wn(t, e, r) {
|
|
1818
1818
|
const n = r.getRegistry(), i = n.addTarget(t, e);
|
|
1819
1819
|
return [
|
|
1820
1820
|
i,
|
|
1821
1821
|
() => n.removeTarget(i)
|
|
1822
1822
|
];
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1824
|
+
function xn(t, e, r) {
|
|
1825
1825
|
const n = r.getRegistry(), i = n.addSource(t, e);
|
|
1826
1826
|
return [
|
|
1827
1827
|
i,
|
|
@@ -1844,8 +1844,8 @@ function De(t, e, r, n) {
|
|
|
1844
1844
|
const f = o[u];
|
|
1845
1845
|
if (!a(f))
|
|
1846
1846
|
return !1;
|
|
1847
|
-
const l = t[f],
|
|
1848
|
-
if (i = void 0, i === !1 || i === void 0 && l !==
|
|
1847
|
+
const l = t[f], m = e[f];
|
|
1848
|
+
if (i = void 0, i === !1 || i === void 0 && l !== m)
|
|
1849
1849
|
return !1;
|
|
1850
1850
|
}
|
|
1851
1851
|
return !0;
|
|
@@ -1856,20 +1856,20 @@ function Se(t) {
|
|
|
1856
1856
|
t !== null && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current")
|
|
1857
1857
|
);
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1859
|
+
function Nn(t) {
|
|
1860
1860
|
if (typeof t.type == "string")
|
|
1861
1861
|
return;
|
|
1862
1862
|
const e = t.type.displayName || t.type.name || "the component";
|
|
1863
1863
|
throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`);
|
|
1864
1864
|
}
|
|
1865
|
-
function
|
|
1865
|
+
function Pn(t) {
|
|
1866
1866
|
return (e = null, r = null) => {
|
|
1867
1867
|
if (!Pt(e)) {
|
|
1868
1868
|
const o = e;
|
|
1869
1869
|
return t(o, r), o;
|
|
1870
1870
|
}
|
|
1871
1871
|
const n = e;
|
|
1872
|
-
return
|
|
1872
|
+
return Nn(n), Mn(n, r ? (o) => t(o, r) : t);
|
|
1873
1873
|
};
|
|
1874
1874
|
}
|
|
1875
1875
|
function lt(t) {
|
|
@@ -1879,7 +1879,7 @@ function lt(t) {
|
|
|
1879
1879
|
if (r.endsWith("Ref"))
|
|
1880
1880
|
e[r] = t[r];
|
|
1881
1881
|
else {
|
|
1882
|
-
const i =
|
|
1882
|
+
const i = Pn(n);
|
|
1883
1883
|
e[r] = () => i;
|
|
1884
1884
|
}
|
|
1885
1885
|
}), e;
|
|
@@ -1887,9 +1887,9 @@ function lt(t) {
|
|
|
1887
1887
|
function $e(t, e) {
|
|
1888
1888
|
typeof t == "function" ? t(e) : t.current = e;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1890
|
+
function Mn(t, e) {
|
|
1891
1891
|
const r = t.ref;
|
|
1892
|
-
return
|
|
1892
|
+
return D(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 ? Me(t, {
|
|
1893
1893
|
ref: (n) => {
|
|
1894
1894
|
$e(r, n), $e(e, n);
|
|
1895
1895
|
}
|
|
@@ -1897,7 +1897,7 @@ function Pn(t, e) {
|
|
|
1897
1897
|
ref: e
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
|
-
class
|
|
1900
|
+
class Rn {
|
|
1901
1901
|
receiveHandlerId(e) {
|
|
1902
1902
|
this.handlerId !== e && (this.handlerId = e, this.reconnect());
|
|
1903
1903
|
}
|
|
@@ -1978,7 +1978,7 @@ class Mn {
|
|
|
1978
1978
|
}), 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;
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
|
-
class
|
|
1981
|
+
class _n {
|
|
1982
1982
|
get connectTarget() {
|
|
1983
1983
|
return this.dropTarget;
|
|
1984
1984
|
}
|
|
@@ -2029,35 +2029,35 @@ class Rn {
|
|
|
2029
2029
|
}), this.handlerId = null, this.dropTargetRef = null, this.dropTargetOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDropTarget = null, this.lastConnectedDropTargetOptions = null, this.backend = e;
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
function
|
|
2032
|
+
function Z() {
|
|
2033
2033
|
const { dragDropManager: t } = Mt(et);
|
|
2034
|
-
return
|
|
2034
|
+
return D(t != null, "Expected drag drop context"), t;
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2037
|
-
const r =
|
|
2038
|
-
() => new
|
|
2036
|
+
function Ln(t, e) {
|
|
2037
|
+
const r = Z(), n = L(
|
|
2038
|
+
() => new Rn(r.getBackend()),
|
|
2039
2039
|
[
|
|
2040
2040
|
r
|
|
2041
2041
|
]
|
|
2042
2042
|
);
|
|
2043
|
-
return
|
|
2043
|
+
return U(() => (n.dragSourceOptions = t || null, n.reconnect(), () => n.disconnectDragSource()), [
|
|
2044
2044
|
n,
|
|
2045
2045
|
t
|
|
2046
|
-
]),
|
|
2046
|
+
]), U(() => (n.dragPreviewOptions = e || null, n.reconnect(), () => n.disconnectDragPreview()), [
|
|
2047
2047
|
n,
|
|
2048
2048
|
e
|
|
2049
2049
|
]), n;
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2052
|
-
const t =
|
|
2053
|
-
return
|
|
2051
|
+
function jn() {
|
|
2052
|
+
const t = Z();
|
|
2053
|
+
return L(
|
|
2054
2054
|
() => new Cn(t),
|
|
2055
2055
|
[
|
|
2056
2056
|
t
|
|
2057
2057
|
]
|
|
2058
2058
|
);
|
|
2059
2059
|
}
|
|
2060
|
-
class
|
|
2060
|
+
class Fn {
|
|
2061
2061
|
beginDrag() {
|
|
2062
2062
|
const e = this.spec, r = this.monitor;
|
|
2063
2063
|
let n = null;
|
|
@@ -2079,33 +2079,33 @@ class jn {
|
|
|
2079
2079
|
this.spec = e, this.monitor = r, this.connector = n;
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2083
|
-
const n =
|
|
2084
|
-
() => new
|
|
2082
|
+
function kn(t, e, r) {
|
|
2083
|
+
const n = L(
|
|
2084
|
+
() => new Fn(t, e, r),
|
|
2085
2085
|
[
|
|
2086
2086
|
e,
|
|
2087
2087
|
r
|
|
2088
2088
|
]
|
|
2089
2089
|
);
|
|
2090
|
-
return
|
|
2090
|
+
return j(() => {
|
|
2091
2091
|
n.spec = t;
|
|
2092
2092
|
}, [
|
|
2093
2093
|
t
|
|
2094
2094
|
]), n;
|
|
2095
2095
|
}
|
|
2096
|
-
function
|
|
2097
|
-
return
|
|
2096
|
+
function Yn(t) {
|
|
2097
|
+
return L(() => {
|
|
2098
2098
|
const e = t.type;
|
|
2099
|
-
return
|
|
2099
|
+
return D(e != null, "spec.type must be defined"), e;
|
|
2100
2100
|
}, [
|
|
2101
2101
|
t
|
|
2102
2102
|
]);
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const n =
|
|
2106
|
-
|
|
2104
|
+
function An(t, e, r) {
|
|
2105
|
+
const n = Z(), i = kn(t, e, r), o = Yn(t);
|
|
2106
|
+
U(function() {
|
|
2107
2107
|
if (o != null) {
|
|
2108
|
-
const [a, u] =
|
|
2108
|
+
const [a, u] = xn(o, i, n);
|
|
2109
2109
|
return e.receiveHandlerId(a), r.receiveHandlerId(a), u;
|
|
2110
2110
|
}
|
|
2111
2111
|
}, [
|
|
@@ -2116,53 +2116,53 @@ function Yn(t, e, r) {
|
|
|
2116
2116
|
o
|
|
2117
2117
|
]);
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function Hn(t, e) {
|
|
2120
2120
|
const r = ut(t);
|
|
2121
|
-
|
|
2122
|
-
const n =
|
|
2123
|
-
return
|
|
2121
|
+
D(!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)");
|
|
2122
|
+
const n = jn(), i = Ln(r.options, r.previewOptions);
|
|
2123
|
+
return An(r, n, i), [
|
|
2124
2124
|
ct(r.collect, n, i),
|
|
2125
|
-
|
|
2126
|
-
|
|
2125
|
+
Tn(i),
|
|
2126
|
+
In(i)
|
|
2127
2127
|
];
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2130
|
-
return
|
|
2129
|
+
function Bn(t) {
|
|
2130
|
+
return L(
|
|
2131
2131
|
() => t.hooks.dropTarget(),
|
|
2132
2132
|
[
|
|
2133
2133
|
t
|
|
2134
2134
|
]
|
|
2135
2135
|
);
|
|
2136
2136
|
}
|
|
2137
|
-
function
|
|
2138
|
-
const e =
|
|
2139
|
-
() => new
|
|
2137
|
+
function Un(t) {
|
|
2138
|
+
const e = Z(), r = L(
|
|
2139
|
+
() => new _n(e.getBackend()),
|
|
2140
2140
|
[
|
|
2141
2141
|
e
|
|
2142
2142
|
]
|
|
2143
2143
|
);
|
|
2144
|
-
return
|
|
2144
|
+
return U(() => (r.dropTargetOptions = t || null, r.reconnect(), () => r.disconnectDropTarget()), [
|
|
2145
2145
|
t
|
|
2146
2146
|
]), r;
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2149
|
-
const t =
|
|
2150
|
-
return
|
|
2151
|
-
() => new
|
|
2148
|
+
function Vn() {
|
|
2149
|
+
const t = Z();
|
|
2150
|
+
return L(
|
|
2151
|
+
() => new En(t),
|
|
2152
2152
|
[
|
|
2153
2153
|
t
|
|
2154
2154
|
]
|
|
2155
2155
|
);
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function $n(t) {
|
|
2158
2158
|
const { accept: e } = t;
|
|
2159
|
-
return
|
|
2159
|
+
return L(() => (D(t.accept != null, "accept must be defined"), Array.isArray(e) ? e : [
|
|
2160
2160
|
e
|
|
2161
2161
|
]), [
|
|
2162
2162
|
e
|
|
2163
2163
|
]);
|
|
2164
2164
|
}
|
|
2165
|
-
class
|
|
2165
|
+
class zn {
|
|
2166
2166
|
canDrop() {
|
|
2167
2167
|
const e = this.spec, r = this.monitor;
|
|
2168
2168
|
return e.canDrop ? e.canDrop(r.getItem(), r) : !0;
|
|
@@ -2180,23 +2180,23 @@ class $n {
|
|
|
2180
2180
|
this.spec = e, this.monitor = r;
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2184
|
-
const r =
|
|
2185
|
-
() => new
|
|
2183
|
+
function qn(t, e) {
|
|
2184
|
+
const r = L(
|
|
2185
|
+
() => new zn(t, e),
|
|
2186
2186
|
[
|
|
2187
2187
|
e
|
|
2188
2188
|
]
|
|
2189
2189
|
);
|
|
2190
|
-
return
|
|
2190
|
+
return j(() => {
|
|
2191
2191
|
r.spec = t;
|
|
2192
2192
|
}, [
|
|
2193
2193
|
t
|
|
2194
2194
|
]), r;
|
|
2195
2195
|
}
|
|
2196
|
-
function
|
|
2197
|
-
const n =
|
|
2198
|
-
|
|
2199
|
-
const [a, u] =
|
|
2196
|
+
function Gn(t, e, r) {
|
|
2197
|
+
const n = Z(), i = qn(t, e), o = $n(t);
|
|
2198
|
+
U(function() {
|
|
2199
|
+
const [a, u] = wn(o, i, n);
|
|
2200
2200
|
return e.receiveHandlerId(a), r.receiveHandlerId(a), u;
|
|
2201
2201
|
}, [
|
|
2202
2202
|
n,
|
|
@@ -2208,23 +2208,23 @@ function qn(t, e, r) {
|
|
|
2208
2208
|
).join("|")
|
|
2209
2209
|
]);
|
|
2210
2210
|
}
|
|
2211
|
-
function
|
|
2212
|
-
const r = ut(t), n =
|
|
2213
|
-
return
|
|
2211
|
+
function Xn(t, e) {
|
|
2212
|
+
const r = ut(t), n = Vn(), i = Un(r.options);
|
|
2213
|
+
return Gn(r, n, i), [
|
|
2214
2214
|
ct(r.collect, n, i),
|
|
2215
|
-
|
|
2215
|
+
Bn(i)
|
|
2216
2216
|
];
|
|
2217
2217
|
}
|
|
2218
2218
|
function dt(t) {
|
|
2219
2219
|
let e = null;
|
|
2220
2220
|
return () => (e == null && (e = t()), e);
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2222
|
+
function Wn(t, e) {
|
|
2223
2223
|
return t.filter(
|
|
2224
2224
|
(r) => r !== e
|
|
2225
2225
|
);
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2227
|
+
function Kn(t, e) {
|
|
2228
2228
|
const r = /* @__PURE__ */ new Set(), n = (o) => r.add(o);
|
|
2229
2229
|
t.forEach(n), e.forEach(n);
|
|
2230
2230
|
const i = [];
|
|
@@ -2232,16 +2232,16 @@ function Wn(t, e) {
|
|
|
2232
2232
|
(o) => i.push(o)
|
|
2233
2233
|
), i;
|
|
2234
2234
|
}
|
|
2235
|
-
class
|
|
2235
|
+
class Zn {
|
|
2236
2236
|
enter(e) {
|
|
2237
2237
|
const r = this.entered.length, n = (i) => this.isNodeInDocument(i) && (!i.contains || i.contains(e));
|
|
2238
|
-
return this.entered =
|
|
2238
|
+
return this.entered = Kn(this.entered.filter(n), [
|
|
2239
2239
|
e
|
|
2240
2240
|
]), r === 0 && this.entered.length > 0;
|
|
2241
2241
|
}
|
|
2242
2242
|
leave(e) {
|
|
2243
2243
|
const r = this.entered.length;
|
|
2244
|
-
return this.entered =
|
|
2244
|
+
return this.entered = Wn(this.entered.filter(this.isNodeInDocument), e), r > 0 && this.entered.length === 0;
|
|
2245
2245
|
}
|
|
2246
2246
|
reset() {
|
|
2247
2247
|
this.entered = [];
|
|
@@ -2250,7 +2250,7 @@ class Kn {
|
|
|
2250
2250
|
this.entered = [], this.isNodeInDocument = e;
|
|
2251
2251
|
}
|
|
2252
2252
|
}
|
|
2253
|
-
class
|
|
2253
|
+
class Jn {
|
|
2254
2254
|
initializeExposedProperties() {
|
|
2255
2255
|
Object.keys(this.config.exposeProperties).forEach((e) => {
|
|
2256
2256
|
Object.defineProperty(this.item, e, {
|
|
@@ -2347,11 +2347,11 @@ const Oe = {
|
|
|
2347
2347
|
]
|
|
2348
2348
|
}
|
|
2349
2349
|
};
|
|
2350
|
-
function
|
|
2350
|
+
function Qn(t, e) {
|
|
2351
2351
|
const r = Oe[t];
|
|
2352
2352
|
if (!r)
|
|
2353
2353
|
throw new Error(`native type ${t} has no configuration`);
|
|
2354
|
-
const n = new
|
|
2354
|
+
const n = new Jn(r);
|
|
2355
2355
|
return n.loadDataTransfer(e), n;
|
|
2356
2356
|
}
|
|
2357
2357
|
function pe(t) {
|
|
@@ -2365,7 +2365,7 @@ function pe(t) {
|
|
|
2365
2365
|
) : !1;
|
|
2366
2366
|
})[0] || null;
|
|
2367
2367
|
}
|
|
2368
|
-
const
|
|
2368
|
+
const ei = dt(
|
|
2369
2369
|
() => /firefox/i.test(navigator.userAgent)
|
|
2370
2370
|
), mt = dt(
|
|
2371
2371
|
() => !!window.safari
|
|
@@ -2379,56 +2379,56 @@ class qe {
|
|
|
2379
2379
|
let u = 0, f = s.length - 1, l;
|
|
2380
2380
|
for (; u <= f; ) {
|
|
2381
2381
|
l = Math.floor(0.5 * (u + f));
|
|
2382
|
-
const
|
|
2383
|
-
if (
|
|
2382
|
+
const d = r[l];
|
|
2383
|
+
if (d < e)
|
|
2384
2384
|
u = l + 1;
|
|
2385
|
-
else if (
|
|
2385
|
+
else if (d > e)
|
|
2386
2386
|
f = l - 1;
|
|
2387
2387
|
else
|
|
2388
2388
|
return n[l];
|
|
2389
2389
|
}
|
|
2390
2390
|
a = Math.max(0, f);
|
|
2391
|
-
const
|
|
2392
|
-
return n[a] + i[a] *
|
|
2391
|
+
const m = e - r[a], p = m * m;
|
|
2392
|
+
return n[a] + i[a] * m + o[a] * p + s[a] * m * p;
|
|
2393
2393
|
}
|
|
2394
2394
|
constructor(e, r) {
|
|
2395
2395
|
const { length: n } = e, i = [];
|
|
2396
|
-
for (let
|
|
2397
|
-
i.push(
|
|
2396
|
+
for (let d = 0; d < n; d++)
|
|
2397
|
+
i.push(d);
|
|
2398
2398
|
i.sort(
|
|
2399
|
-
(
|
|
2399
|
+
(d, I) => e[d] < e[I] ? -1 : 1
|
|
2400
2400
|
);
|
|
2401
2401
|
const o = [], s = [];
|
|
2402
2402
|
let a, u;
|
|
2403
|
-
for (let
|
|
2404
|
-
a = e[
|
|
2403
|
+
for (let d = 0; d < n - 1; d++)
|
|
2404
|
+
a = e[d + 1] - e[d], u = r[d + 1] - r[d], o.push(a), s.push(u / a);
|
|
2405
2405
|
const f = [
|
|
2406
2406
|
s[0]
|
|
2407
2407
|
];
|
|
2408
|
-
for (let
|
|
2409
|
-
const
|
|
2410
|
-
if (
|
|
2408
|
+
for (let d = 0; d < o.length - 1; d++) {
|
|
2409
|
+
const I = s[d], y = s[d + 1];
|
|
2410
|
+
if (I * y <= 0)
|
|
2411
2411
|
f.push(0);
|
|
2412
2412
|
else {
|
|
2413
|
-
a = o[
|
|
2414
|
-
const
|
|
2415
|
-
f.push(3 *
|
|
2413
|
+
a = o[d];
|
|
2414
|
+
const C = o[d + 1], v = a + C;
|
|
2415
|
+
f.push(3 * v / ((v + C) / I + (v + a) / y));
|
|
2416
2416
|
}
|
|
2417
2417
|
}
|
|
2418
2418
|
f.push(s[s.length - 1]);
|
|
2419
|
-
const l = [],
|
|
2420
|
-
let
|
|
2421
|
-
for (let
|
|
2422
|
-
|
|
2423
|
-
const
|
|
2424
|
-
l.push((
|
|
2419
|
+
const l = [], m = [];
|
|
2420
|
+
let p;
|
|
2421
|
+
for (let d = 0; d < f.length - 1; d++) {
|
|
2422
|
+
p = s[d];
|
|
2423
|
+
const I = f[d], y = 1 / o[d], C = I + f[d + 1] - p - p;
|
|
2424
|
+
l.push((p - I - C) * y), m.push(C * y * y);
|
|
2425
2425
|
}
|
|
2426
|
-
this.xs = e, this.ys = r, this.c1s = f, this.c2s = l, this.c3s =
|
|
2426
|
+
this.xs = e, this.ys = r, this.c1s = f, this.c2s = l, this.c3s = m;
|
|
2427
2427
|
}
|
|
2428
2428
|
}
|
|
2429
|
-
const
|
|
2429
|
+
const ti = 1;
|
|
2430
2430
|
function vt(t) {
|
|
2431
|
-
const e = t.nodeType ===
|
|
2431
|
+
const e = t.nodeType === ti ? t : t.parentElement;
|
|
2432
2432
|
if (!e)
|
|
2433
2433
|
return null;
|
|
2434
2434
|
const { top: r, left: n } = e.getBoundingClientRect();
|
|
@@ -2437,29 +2437,29 @@ function vt(t) {
|
|
|
2437
2437
|
y: r
|
|
2438
2438
|
};
|
|
2439
2439
|
}
|
|
2440
|
-
function
|
|
2440
|
+
function ee(t) {
|
|
2441
2441
|
return {
|
|
2442
2442
|
x: t.clientX,
|
|
2443
2443
|
y: t.clientY
|
|
2444
2444
|
};
|
|
2445
2445
|
}
|
|
2446
|
-
function
|
|
2446
|
+
function ri(t) {
|
|
2447
2447
|
var e;
|
|
2448
|
-
return t.nodeName === "IMG" && (
|
|
2448
|
+
return t.nodeName === "IMG" && (ei() || !(!((e = document.documentElement) === null || e === void 0) && e.contains(t)));
|
|
2449
2449
|
}
|
|
2450
|
-
function
|
|
2450
|
+
function ni(t, e, r, n) {
|
|
2451
2451
|
let i = t ? e.width : r, o = t ? e.height : n;
|
|
2452
2452
|
return mt() && t && (o /= window.devicePixelRatio, i /= window.devicePixelRatio), {
|
|
2453
2453
|
dragPreviewWidth: i,
|
|
2454
2454
|
dragPreviewHeight: o
|
|
2455
2455
|
};
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2458
|
-
const o =
|
|
2457
|
+
function ii(t, e, r, n, i) {
|
|
2458
|
+
const o = ri(e), a = vt(o ? t : e), u = {
|
|
2459
2459
|
x: r.x - a.x,
|
|
2460
2460
|
y: r.y - a.y
|
|
2461
|
-
}, { offsetWidth: f, offsetHeight: l } = t, { anchorX:
|
|
2462
|
-
let
|
|
2461
|
+
}, { offsetWidth: f, offsetHeight: l } = t, { anchorX: m, anchorY: p } = n, { dragPreviewWidth: d, dragPreviewHeight: I } = ni(o, e, f, l), y = () => {
|
|
2462
|
+
let S = new qe([
|
|
2463
2463
|
0,
|
|
2464
2464
|
0.5,
|
|
2465
2465
|
1
|
|
@@ -2467,12 +2467,12 @@ function ni(t, e, r, n, i) {
|
|
|
2467
2467
|
// Dock to the top
|
|
2468
2468
|
u.y,
|
|
2469
2469
|
// Align at the center
|
|
2470
|
-
u.y / l *
|
|
2470
|
+
u.y / l * I,
|
|
2471
2471
|
// Dock to the bottom
|
|
2472
|
-
u.y +
|
|
2473
|
-
]).interpolate(
|
|
2474
|
-
return mt() && o && (
|
|
2475
|
-
},
|
|
2472
|
+
u.y + I - l
|
|
2473
|
+
]).interpolate(p);
|
|
2474
|
+
return mt() && o && (S += (window.devicePixelRatio - 1) * I), S;
|
|
2475
|
+
}, C = () => new qe([
|
|
2476
2476
|
0,
|
|
2477
2477
|
0.5,
|
|
2478
2478
|
1
|
|
@@ -2480,16 +2480,16 @@ function ni(t, e, r, n, i) {
|
|
|
2480
2480
|
// Dock to the left
|
|
2481
2481
|
u.x,
|
|
2482
2482
|
// Align at the center
|
|
2483
|
-
u.x / f *
|
|
2483
|
+
u.x / f * d,
|
|
2484
2484
|
// Dock to the right
|
|
2485
|
-
u.x +
|
|
2486
|
-
]).interpolate(
|
|
2485
|
+
u.x + d - f
|
|
2486
|
+
]).interpolate(m), { offsetX: v, offsetY: h } = i, T = v === 0 || v, g = h === 0 || h;
|
|
2487
2487
|
return {
|
|
2488
|
-
x:
|
|
2489
|
-
y:
|
|
2488
|
+
x: T ? v : C(),
|
|
2489
|
+
y: g ? h : y()
|
|
2490
2490
|
};
|
|
2491
2491
|
}
|
|
2492
|
-
class
|
|
2492
|
+
class oi {
|
|
2493
2493
|
get window() {
|
|
2494
2494
|
if (this.globalContext)
|
|
2495
2495
|
return this.globalContext;
|
|
@@ -2508,7 +2508,7 @@ class ii {
|
|
|
2508
2508
|
this.ownerDocument = null, this.globalContext = e, this.optionsArgs = r;
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function si(t, e, r) {
|
|
2512
2512
|
return e in t ? Object.defineProperty(t, e, {
|
|
2513
2513
|
value: r,
|
|
2514
2514
|
enumerable: !0,
|
|
@@ -2522,12 +2522,12 @@ function Ge(t) {
|
|
|
2522
2522
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
2523
2523
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
2524
2524
|
}))), n.forEach(function(i) {
|
|
2525
|
-
|
|
2525
|
+
si(t, i, r[i]);
|
|
2526
2526
|
});
|
|
2527
2527
|
}
|
|
2528
2528
|
return t;
|
|
2529
2529
|
}
|
|
2530
|
-
class
|
|
2530
|
+
class ai {
|
|
2531
2531
|
/**
|
|
2532
2532
|
* Generate profiling statistics for the HTML5Backend.
|
|
2533
2533
|
*/
|
|
@@ -2620,7 +2620,7 @@ class si {
|
|
|
2620
2620
|
);
|
|
2621
2621
|
}
|
|
2622
2622
|
beginDragNativeItem(e, r) {
|
|
2623
|
-
this.clearCurrentDragSourceNode(), this.currentNativeSource =
|
|
2623
|
+
this.clearCurrentDragSourceNode(), this.currentNativeSource = Qn(e, r), this.currentNativeHandle = this.registry.addSource(e, this.currentNativeSource), this.actions.beginDrag([
|
|
2624
2624
|
this.currentNativeHandle
|
|
2625
2625
|
]);
|
|
2626
2626
|
}
|
|
@@ -2678,7 +2678,7 @@ class si {
|
|
|
2678
2678
|
return;
|
|
2679
2679
|
const { dragStartSourceIds: o } = this;
|
|
2680
2680
|
this.dragStartSourceIds = null;
|
|
2681
|
-
const s =
|
|
2681
|
+
const s = ee(i);
|
|
2682
2682
|
this.monitor.isDragging() && (this.actions.endDrag(), this.cancelHover()), this.actions.beginDrag(o || [], {
|
|
2683
2683
|
publishSource: !1,
|
|
2684
2684
|
getSourceClientOffset: this.getSourceClientOffset,
|
|
@@ -2687,16 +2687,16 @@ class si {
|
|
|
2687
2687
|
const { dataTransfer: a } = i, u = pe(a);
|
|
2688
2688
|
if (this.monitor.isDragging()) {
|
|
2689
2689
|
if (a && typeof a.setDragImage == "function") {
|
|
2690
|
-
const l = this.monitor.getSourceId(),
|
|
2691
|
-
if (
|
|
2692
|
-
const { anchorX:
|
|
2693
|
-
anchorX:
|
|
2694
|
-
anchorY:
|
|
2690
|
+
const l = this.monitor.getSourceId(), m = this.sourceNodes.get(l), p = this.sourcePreviewNodes.get(l) || m;
|
|
2691
|
+
if (p) {
|
|
2692
|
+
const { anchorX: d, anchorY: I, offsetX: y, offsetY: C } = this.getCurrentSourcePreviewNodeOptions(), T = ii(m, p, s, {
|
|
2693
|
+
anchorX: d,
|
|
2694
|
+
anchorY: I
|
|
2695
2695
|
}, {
|
|
2696
|
-
offsetX:
|
|
2697
|
-
offsetY:
|
|
2696
|
+
offsetX: y,
|
|
2697
|
+
offsetY: C
|
|
2698
2698
|
});
|
|
2699
|
-
a.setDragImage(
|
|
2699
|
+
a.setDragImage(p, T.x, T.y);
|
|
2700
2700
|
}
|
|
2701
2701
|
}
|
|
2702
2702
|
try {
|
|
@@ -2732,7 +2732,7 @@ class si {
|
|
|
2732
2732
|
if (this.dragEnterTargetIds = [], !this.monitor.isDragging())
|
|
2733
2733
|
return;
|
|
2734
2734
|
this.altKeyPressed = i.altKey, o.length > 0 && this.actions.hover(o, {
|
|
2735
|
-
clientOffset:
|
|
2735
|
+
clientOffset: ee(i)
|
|
2736
2736
|
}), o.some(
|
|
2737
2737
|
(a) => this.monitor.canDropOnTarget(a)
|
|
2738
2738
|
) && (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect()));
|
|
@@ -2747,7 +2747,7 @@ class si {
|
|
|
2747
2747
|
i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none");
|
|
2748
2748
|
return;
|
|
2749
2749
|
}
|
|
2750
|
-
this.altKeyPressed = i.altKey, this.lastClientOffset =
|
|
2750
|
+
this.altKeyPressed = i.altKey, this.lastClientOffset = ee(i), this.scheduleHover(o), (o || []).some(
|
|
2751
2751
|
(a) => this.monitor.canDropOnTarget(a)
|
|
2752
2752
|
) ? (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect())) : this.isDraggingNativeItem() ? i.preventDefault() : (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none"));
|
|
2753
2753
|
}, this.handleTopDragLeaveCapture = (i) => {
|
|
@@ -2764,19 +2764,19 @@ class si {
|
|
|
2764
2764
|
}, this.handleTopDrop = (i) => {
|
|
2765
2765
|
const { dropTargetIds: o } = this;
|
|
2766
2766
|
this.dropTargetIds = [], this.actions.hover(o, {
|
|
2767
|
-
clientOffset:
|
|
2767
|
+
clientOffset: ee(i)
|
|
2768
2768
|
}), this.actions.drop({
|
|
2769
2769
|
dropEffect: this.getCurrentDropEffect()
|
|
2770
2770
|
}), this.isDraggingNativeItem() ? this.endDragNativeItem() : this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
|
|
2771
2771
|
}, this.handleSelectStart = (i) => {
|
|
2772
2772
|
const o = i.target;
|
|
2773
2773
|
typeof o.dragDrop == "function" && (o.tagName === "INPUT" || o.tagName === "SELECT" || o.tagName === "TEXTAREA" || o.isContentEditable || (i.preventDefault(), o.dragDrop()));
|
|
2774
|
-
}, this.options = new
|
|
2774
|
+
}, this.options = new oi(r, n), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.registry = e.getRegistry(), this.enterLeaveCounter = new Zn(this.isNodeInDocument);
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
const
|
|
2778
|
-
return new
|
|
2779
|
-
},
|
|
2777
|
+
const ci = function(e, r, n) {
|
|
2778
|
+
return new ai(e, r, n);
|
|
2779
|
+
}, ui = [
|
|
2780
2780
|
".pdf",
|
|
2781
2781
|
".xlsx",
|
|
2782
2782
|
".xls",
|
|
@@ -2796,205 +2796,239 @@ const ai = function(e, r, n) {
|
|
|
2796
2796
|
".zip"
|
|
2797
2797
|
], Xe = {
|
|
2798
2798
|
FILE: "file"
|
|
2799
|
-
},
|
|
2799
|
+
}, li = ({
|
|
2800
2800
|
originNode: t,
|
|
2801
2801
|
file: e,
|
|
2802
2802
|
fileList: r,
|
|
2803
2803
|
moveFile: n,
|
|
2804
2804
|
onDrop: i
|
|
2805
2805
|
}) => {
|
|
2806
|
-
const o =
|
|
2806
|
+
const o = B(null), [{ handlerId: s }, a] = Xn({
|
|
2807
2807
|
accept: Xe.FILE,
|
|
2808
|
-
collect: (
|
|
2809
|
-
handlerId:
|
|
2808
|
+
collect: (m) => ({
|
|
2809
|
+
handlerId: m.getHandlerId()
|
|
2810
2810
|
}),
|
|
2811
|
-
hover(
|
|
2811
|
+
hover(m, p) {
|
|
2812
2812
|
if (!o.current)
|
|
2813
2813
|
return;
|
|
2814
|
-
const
|
|
2815
|
-
if (
|
|
2814
|
+
const d = m.uid, I = e.uid;
|
|
2815
|
+
if (d === I)
|
|
2816
2816
|
return;
|
|
2817
|
-
const
|
|
2818
|
-
if (
|
|
2817
|
+
const y = J(r, { uid: I }), C = J(r, { uid: d });
|
|
2818
|
+
if (C === -1 || y === -1)
|
|
2819
2819
|
return;
|
|
2820
|
-
const
|
|
2821
|
-
if (!
|
|
2820
|
+
const v = o.current.getBoundingClientRect(), h = p.getClientOffset();
|
|
2821
|
+
if (!h)
|
|
2822
2822
|
return;
|
|
2823
|
-
const
|
|
2824
|
-
|
|
2823
|
+
const T = (v.bottom - v.top) / 2, g = h.y - v.top;
|
|
2824
|
+
C < y && g < T || C > y && g > T || n(d, I);
|
|
2825
2825
|
},
|
|
2826
2826
|
drop() {
|
|
2827
2827
|
i();
|
|
2828
2828
|
}
|
|
2829
|
-
}), [{ isDragging: u }, f] =
|
|
2829
|
+
}), [{ isDragging: u }, f] = Hn({
|
|
2830
2830
|
type: Xe.FILE,
|
|
2831
2831
|
item: () => ({
|
|
2832
2832
|
uid: e.uid,
|
|
2833
|
-
index:
|
|
2833
|
+
index: J(r, { uid: e.uid })
|
|
2834
2834
|
}),
|
|
2835
|
-
collect: (
|
|
2836
|
-
isDragging:
|
|
2835
|
+
collect: (m) => ({
|
|
2836
|
+
isDragging: m.isDragging()
|
|
2837
2837
|
})
|
|
2838
2838
|
}), l = u ? 0 : 1;
|
|
2839
2839
|
return f(a(o)), /* @__PURE__ */ c.jsx("div", { ref: o, style: { opacity: l }, "data-handler-id": s, children: t });
|
|
2840
|
-
},
|
|
2840
|
+
}, Ai = ({
|
|
2841
2841
|
fileGrpKey: t,
|
|
2842
2842
|
onUploadComplete: e,
|
|
2843
2843
|
onFetchFilesTrxCd: r = "SCMFILE00101",
|
|
2844
2844
|
onSuccessTrxCd: n = "SCMFILE00102",
|
|
2845
2845
|
onDeleteFileTrxCd: i = "SCMFILE00103",
|
|
2846
2846
|
onReorderFilesTrxCd: o = "SCMFILE00104",
|
|
2847
|
-
allowedExtensions: s =
|
|
2848
|
-
maxFileSize: a = 200
|
|
2847
|
+
allowedExtensions: s = ui,
|
|
2848
|
+
maxFileSize: a = 200,
|
|
2849
|
+
showButton: u = !0,
|
|
2850
|
+
// 기본값으로 true 설정
|
|
2851
|
+
multiple: f = !1
|
|
2849
2852
|
}) => {
|
|
2850
|
-
const [
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2853
|
+
const [l, m] = Y([]), p = B(t), d = B([]), y = B(
|
|
2854
|
+
Ht(() => {
|
|
2855
|
+
if (d.current.length === 0)
|
|
2856
|
+
return;
|
|
2857
|
+
const g = [...d.current];
|
|
2858
|
+
if (d.current = [], n) {
|
|
2859
|
+
const b = g.map((S) => ({
|
|
2860
|
+
crprCd: G()?.crprCd,
|
|
2861
|
+
sysCd: __SYS_CD__,
|
|
2862
|
+
fileGrpKey: p.current,
|
|
2863
|
+
physFileNm: S.fileNameP,
|
|
2864
|
+
lgclFileNm: S.fileNameL,
|
|
2865
|
+
filePath: S.filePath,
|
|
2866
|
+
fileExtn: S.fileExt,
|
|
2867
|
+
fileSize: S.fileSize,
|
|
2868
|
+
mltpYn: "N"
|
|
2869
|
+
}));
|
|
2870
|
+
X(n, {
|
|
2871
|
+
crprCd: G()?.crprCd,
|
|
2872
|
+
sysCd: __SYS_CD__,
|
|
2873
|
+
fileGrpKey: p.current,
|
|
2874
|
+
sub: b
|
|
2875
|
+
}).then((S) => {
|
|
2876
|
+
if (S?.sub && S.sub.length > 0) {
|
|
2877
|
+
const O = S.sub[0].fileGrpKey;
|
|
2878
|
+
p.current || (p.current = O);
|
|
2879
|
+
const x = /* @__PURE__ */ new Map();
|
|
2880
|
+
S.sub.forEach((E) => {
|
|
2881
|
+
const N = g.find(
|
|
2882
|
+
(P) => P.fileNameL === E.lgclFileNm
|
|
2883
|
+
);
|
|
2884
|
+
N && x.set(N.tempId, E);
|
|
2885
|
+
}), m((E) => E.map((P) => {
|
|
2886
|
+
const w = x.get(P.uid);
|
|
2887
|
+
if (w) {
|
|
2888
|
+
const V = g.find(
|
|
2889
|
+
($) => $.tempId === P.uid
|
|
2890
|
+
);
|
|
2891
|
+
return e && V && e({
|
|
2892
|
+
...V,
|
|
2893
|
+
fileGrpKey: O,
|
|
2894
|
+
fileKey: w.fileKey
|
|
2895
|
+
}), {
|
|
2896
|
+
...P,
|
|
2897
|
+
name: w.lgclFileNm,
|
|
2898
|
+
fileGrpKey: O,
|
|
2899
|
+
fileKey: w.fileKey,
|
|
2900
|
+
uid: w.fileKey,
|
|
2901
|
+
status: "done",
|
|
2902
|
+
url: `/api/download?filePath=${w.filePath}&logicalName=${w.lgclFileNm}`
|
|
2903
|
+
};
|
|
2904
|
+
}
|
|
2905
|
+
return P;
|
|
2906
|
+
}));
|
|
2907
|
+
}
|
|
2908
|
+
}).catch((S) => {
|
|
2909
|
+
console.error("업로드 후처리 서비스 호출 실패:", S), M.error("파일 후처리 중 오류가 발생했습니다.");
|
|
2910
|
+
const O = new Set(g.map((x) => x.tempId));
|
|
2911
|
+
m(
|
|
2912
|
+
(x) => x.map(
|
|
2913
|
+
(E) => O.has(E.uid) ? { ...E, status: "error", error: "후처리 실패" } : E
|
|
2914
|
+
)
|
|
2915
|
+
);
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
}, 500)
|
|
2919
|
+
).current;
|
|
2920
|
+
j(() => () => {
|
|
2921
|
+
y.cancel();
|
|
2922
|
+
}, [y]), j(() => {
|
|
2923
|
+
p.current = t;
|
|
2924
|
+
}, [t]), j(() => {
|
|
2925
|
+
t && r && X(r, {
|
|
2926
|
+
crprCd: G()?.crprCd,
|
|
2854
2927
|
sysCd: __SYS_CD__,
|
|
2855
2928
|
fileGrpKey: t
|
|
2856
|
-
}).then((
|
|
2857
|
-
if (
|
|
2858
|
-
const
|
|
2859
|
-
uid:
|
|
2860
|
-
name:
|
|
2929
|
+
}).then((g) => {
|
|
2930
|
+
if (g?.sub) {
|
|
2931
|
+
const b = g.sub.map((S) => ({
|
|
2932
|
+
uid: S.fileKey,
|
|
2933
|
+
name: S.lgclFileNm,
|
|
2861
2934
|
status: "done",
|
|
2862
|
-
url: `/api/download?filePath=${
|
|
2935
|
+
url: `/api/download?filePath=${S.filePath}&logicalName=${S.lgclFileNm}`
|
|
2863
2936
|
}));
|
|
2864
|
-
|
|
2937
|
+
m(b);
|
|
2865
2938
|
}
|
|
2866
|
-
}).catch((
|
|
2867
|
-
console.error("파일 목록 조회 서비스 호출에 실패했습니다.",
|
|
2939
|
+
}).catch((g) => {
|
|
2940
|
+
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", g), M.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
2868
2941
|
});
|
|
2869
2942
|
}, [t, r]);
|
|
2870
|
-
const
|
|
2871
|
-
const
|
|
2872
|
-
if (
|
|
2873
|
-
const
|
|
2874
|
-
|
|
2875
|
-
},
|
|
2943
|
+
const C = (g, b) => {
|
|
2944
|
+
const S = J(l, { uid: g }), O = J(l, { uid: b });
|
|
2945
|
+
if (S < 0 || O < 0) return;
|
|
2946
|
+
const x = [...l], [E] = x.splice(S, 1);
|
|
2947
|
+
x.splice(O, 0, E), m(x);
|
|
2948
|
+
}, v = () => {
|
|
2876
2949
|
if (t && o) {
|
|
2877
|
-
const
|
|
2878
|
-
|
|
2879
|
-
crprCd:
|
|
2950
|
+
const g = l.map((b) => b.uid);
|
|
2951
|
+
X(o, {
|
|
2952
|
+
crprCd: G()?.crprCd,
|
|
2880
2953
|
sysCd: __SYS_CD__,
|
|
2881
2954
|
fileGrpKey: t,
|
|
2882
|
-
reorderedFileKeys:
|
|
2955
|
+
reorderedFileKeys: g
|
|
2883
2956
|
}).then(() => {
|
|
2884
|
-
|
|
2885
|
-
}).catch((
|
|
2886
|
-
console.error("파일 순서 저장 서비스 호출 실패:",
|
|
2957
|
+
M.success("파일 순서가 성공적으로 저장되었습니다.");
|
|
2958
|
+
}).catch((b) => {
|
|
2959
|
+
console.error("파일 순서 저장 서비스 호출 실패:", b), M.error("파일 순서 저장 중 오류가 발생했습니다.");
|
|
2887
2960
|
});
|
|
2888
2961
|
}
|
|
2889
|
-
},
|
|
2962
|
+
}, T = {
|
|
2890
2963
|
name: "file",
|
|
2891
|
-
multiple:
|
|
2964
|
+
multiple: f,
|
|
2892
2965
|
action: "/api/upload",
|
|
2893
|
-
fileList:
|
|
2894
|
-
beforeUpload: (
|
|
2966
|
+
fileList: l,
|
|
2967
|
+
beforeUpload: (g) => {
|
|
2968
|
+
if (!f && l.length > 0)
|
|
2969
|
+
return M.error("하나의 파일만 업로드할 수 있습니다."), H.LIST_IGNORE;
|
|
2895
2970
|
if (s && s.length > 0) {
|
|
2896
|
-
const
|
|
2897
|
-
if (!s.includes(
|
|
2898
|
-
return
|
|
2899
|
-
`${
|
|
2971
|
+
const b = `.${g.name.split(".").pop()?.toLowerCase()}`;
|
|
2972
|
+
if (!s.includes(b))
|
|
2973
|
+
return M.error(
|
|
2974
|
+
`${g.name} 파일은 허용되지 않는 확장자입니다. (${s.join(
|
|
2900
2975
|
", "
|
|
2901
2976
|
)})`
|
|
2902
2977
|
), H.LIST_IGNORE;
|
|
2903
2978
|
}
|
|
2904
|
-
return a && !(
|
|
2979
|
+
return a && !(g.size / 1024 / 1024 < a) ? (M.error(`일반업로드의 최대용량은 ${a}MB입니다.`), H.LIST_IGNORE) : !0;
|
|
2905
2980
|
},
|
|
2906
|
-
onChange(
|
|
2907
|
-
const { status:
|
|
2908
|
-
if (
|
|
2909
|
-
i ?
|
|
2910
|
-
crprCd:
|
|
2981
|
+
onChange(g) {
|
|
2982
|
+
const { status: b, uid: S } = g.file;
|
|
2983
|
+
if (b === "removed") {
|
|
2984
|
+
i ? X(i, {
|
|
2985
|
+
crprCd: G()?.crprCd,
|
|
2911
2986
|
sysCd: __SYS_CD__,
|
|
2912
|
-
fileGrpKey:
|
|
2913
|
-
fileKey:
|
|
2987
|
+
fileGrpKey: p.current,
|
|
2988
|
+
fileKey: S
|
|
2914
2989
|
}).then(() => {
|
|
2915
|
-
|
|
2916
|
-
}).catch((
|
|
2917
|
-
console.error("파일 삭제 서비스 호출에 실패했습니다.",
|
|
2918
|
-
}) :
|
|
2990
|
+
M.success("파일이 성공적으로 삭제되었습니다."), m(g.fileList);
|
|
2991
|
+
}).catch((O) => {
|
|
2992
|
+
console.error("파일 삭제 서비스 호출에 실패했습니다.", O), M.error("파일 삭제 중 오류가 발생했습니다.");
|
|
2993
|
+
}) : m(g.fileList);
|
|
2919
2994
|
return;
|
|
2920
2995
|
}
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
sysCd: __SYS_CD__,
|
|
2929
|
-
fileGrpKey: t,
|
|
2930
|
-
sub: [
|
|
2931
|
-
{
|
|
2932
|
-
crprCd: $()?.crprCd,
|
|
2933
|
-
sysCd: __SYS_CD__,
|
|
2934
|
-
fileGrpKey: t,
|
|
2935
|
-
physFileNm: S.fileNameP,
|
|
2936
|
-
lgclFileNm: S.fileNameL,
|
|
2937
|
-
filePath: S.filePath,
|
|
2938
|
-
fileExtn: S.fileExt,
|
|
2939
|
-
fileSize: S.fileSize,
|
|
2940
|
-
mltpYn: "N"
|
|
2941
|
-
}
|
|
2942
|
-
]
|
|
2943
|
-
}).then((b) => {
|
|
2944
|
-
b?.sub && b.sub.length > 0 && f(
|
|
2945
|
-
(x) => x.map((N) => (e && e({
|
|
2946
|
-
...S,
|
|
2947
|
-
fileGrpKey: b.sub[0].fileGrpKey,
|
|
2948
|
-
fileKey: b.sub[0].fileKey
|
|
2949
|
-
}), N.uid === p.file.uid ? {
|
|
2950
|
-
...N,
|
|
2951
|
-
fileGrpKey: b.sub[0].fileGrpKey,
|
|
2952
|
-
fileKey: b.sub[0].fileKey,
|
|
2953
|
-
uid: b.sub[0].fileKey,
|
|
2954
|
-
status: "done",
|
|
2955
|
-
url: `/api/download?filePath=${S.filePath}&logicalName=${S.fileNameL}`
|
|
2956
|
-
} : N))
|
|
2957
|
-
);
|
|
2958
|
-
}).catch((b) => {
|
|
2959
|
-
console.error("업로드 후처리 서비스 호출 실패:", b), C.error("파일 후처리 중 오류가 발생했습니다.");
|
|
2960
|
-
}) : m = m.map((b) => b.uid === p.file.uid ? {
|
|
2961
|
-
...b,
|
|
2962
|
-
uid: S.fileNameP,
|
|
2963
|
-
status: "done",
|
|
2964
|
-
url: `/api/download?filePath=${S.filePath}&logicalName=${S.fileNameL}`
|
|
2965
|
-
} : b);
|
|
2966
|
-
}), C.success(
|
|
2967
|
-
p.file.response.message || `${p.file.name} 파일이 성공적으로 업로드되었습니다.`
|
|
2996
|
+
if (m(g.fileList), b === "done")
|
|
2997
|
+
if (g.file.response?.success) {
|
|
2998
|
+
const { uploadedFiles: O } = g.file.response;
|
|
2999
|
+
O && Array.isArray(O) && O.length > 0 && (O.forEach((x) => {
|
|
3000
|
+
x.tempId = g.file.uid, d.current.push(x);
|
|
3001
|
+
}), y()), M.success(
|
|
3002
|
+
g.file.response.message || `${g.file.name} 파일이 성공적으로 업로드되었습니다.`
|
|
2968
3003
|
);
|
|
2969
3004
|
} else
|
|
2970
|
-
|
|
2971
|
-
|
|
3005
|
+
M.error(
|
|
3006
|
+
g.file.response?.message || `${g.file.name} 파일 업로드에 실패했습니다.`
|
|
2972
3007
|
);
|
|
2973
|
-
else
|
|
2974
|
-
|
|
3008
|
+
else b === "error" && M.error(
|
|
3009
|
+
g.file.response?.message || `${g.file.name} 파일 업로드 중 오류가 발생했습니다.`
|
|
2975
3010
|
);
|
|
2976
|
-
f(m);
|
|
2977
3011
|
},
|
|
2978
|
-
itemRender(
|
|
2979
|
-
const
|
|
2980
|
-
href:
|
|
3012
|
+
itemRender(g, b, S) {
|
|
3013
|
+
const O = Ze.cloneElement(g, {
|
|
3014
|
+
href: b.url || void 0,
|
|
2981
3015
|
title: void 0
|
|
2982
3016
|
});
|
|
2983
3017
|
return /* @__PURE__ */ c.jsx(
|
|
2984
|
-
|
|
3018
|
+
li,
|
|
2985
3019
|
{
|
|
2986
|
-
originNode:
|
|
2987
|
-
file:
|
|
2988
|
-
fileList:
|
|
2989
|
-
moveFile:
|
|
2990
|
-
onDrop:
|
|
3020
|
+
originNode: O,
|
|
3021
|
+
file: b,
|
|
3022
|
+
fileList: S,
|
|
3023
|
+
moveFile: C,
|
|
3024
|
+
onDrop: v
|
|
2991
3025
|
},
|
|
2992
|
-
|
|
3026
|
+
b.uid
|
|
2993
3027
|
);
|
|
2994
3028
|
}
|
|
2995
3029
|
};
|
|
2996
|
-
return /* @__PURE__ */ c.jsx(
|
|
2997
|
-
}, { Text:
|
|
3030
|
+
return /* @__PURE__ */ c.jsx(pn, { backend: ci, children: /* @__PURE__ */ c.jsx(H, { ...T, listType: "picture", children: u && (f || l.length === 0) && /* @__PURE__ */ c.jsx(W, { icon: /* @__PURE__ */ c.jsx(Je, {}), children: "파일 선택" }) }) });
|
|
3031
|
+
}, { Text: te, Link: Hi } = Ke, { Dragger: di } = H, fi = [
|
|
2998
3032
|
".pdf",
|
|
2999
3033
|
".xlsx",
|
|
3000
3034
|
".xls",
|
|
@@ -3012,60 +3046,60 @@ const ai = function(e, r, n) {
|
|
|
3012
3046
|
".gif",
|
|
3013
3047
|
// 압축
|
|
3014
3048
|
".zip"
|
|
3015
|
-
],
|
|
3049
|
+
], gi = (t, e = 2) => {
|
|
3016
3050
|
if (t === 0) return "0 Bytes";
|
|
3017
3051
|
const r = 1024, n = e < 0 ? 0 : e, i = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(t) / Math.log(r));
|
|
3018
3052
|
return parseFloat((t / Math.pow(r, o)).toFixed(n)) + " " + i[o];
|
|
3019
|
-
},
|
|
3053
|
+
}, Bi = ({
|
|
3020
3054
|
title: t = "첨부파일",
|
|
3021
3055
|
fileGrpKey: e,
|
|
3022
3056
|
onUploadComplete: r,
|
|
3023
3057
|
onSuccessTrxCd: n = "SCMFILE00102",
|
|
3024
3058
|
// BwgUploader와 동일한 기본 trxCd 설정
|
|
3025
3059
|
anotherServiceTrxCd: i = "SCMFILE00105",
|
|
3026
|
-
allowedExtensions: o =
|
|
3060
|
+
allowedExtensions: o = fi,
|
|
3027
3061
|
maxFileSize: s = 2048
|
|
3028
3062
|
// 기본값 2GB
|
|
3029
3063
|
}) => {
|
|
3030
|
-
const [a, u] =
|
|
3064
|
+
const [a, u] = Y([]), [f, l] = Y(!1), [m, p] = Y(!1), [d, I] = Y(0), y = (h) => {
|
|
3031
3065
|
if (o && o.length > 0) {
|
|
3032
|
-
const
|
|
3033
|
-
const
|
|
3034
|
-
return
|
|
3035
|
-
})(
|
|
3036
|
-
if (!o.includes(
|
|
3037
|
-
return
|
|
3038
|
-
`${
|
|
3066
|
+
const g = ((b) => {
|
|
3067
|
+
const S = b.lastIndexOf(".");
|
|
3068
|
+
return S === -1 ? "" : b.substring(S).toLowerCase();
|
|
3069
|
+
})(h.name);
|
|
3070
|
+
if (!o.includes(g))
|
|
3071
|
+
return M.error(
|
|
3072
|
+
`${h.name} 파일은 허용되지 않는 확장자입니다. (${o.join(
|
|
3039
3073
|
", "
|
|
3040
3074
|
)}만 가능)`
|
|
3041
3075
|
), !1;
|
|
3042
3076
|
}
|
|
3043
3077
|
return !0;
|
|
3044
|
-
},
|
|
3045
|
-
const
|
|
3046
|
-
(
|
|
3078
|
+
}, C = async () => {
|
|
3079
|
+
const h = a.filter((O) => O.status !== "done"), T = h.reduce(
|
|
3080
|
+
(O, x) => O + (x.size || 0),
|
|
3047
3081
|
0
|
|
3048
|
-
),
|
|
3049
|
-
if (
|
|
3050
|
-
|
|
3082
|
+
), g = 2 * 1024 * 1024 * 1024;
|
|
3083
|
+
if (T > g) {
|
|
3084
|
+
It.error({
|
|
3051
3085
|
message: "업로드 용량 초과",
|
|
3052
3086
|
description: "한 번에 업로드할 수 있는 총 파일 용량은 2GB를 초과할 수 없습니다."
|
|
3053
3087
|
});
|
|
3054
3088
|
return;
|
|
3055
3089
|
}
|
|
3056
|
-
if (
|
|
3057
|
-
|
|
3090
|
+
if (h.length === 0) {
|
|
3091
|
+
M.warning(
|
|
3058
3092
|
"업로드할 파일이 없거나 모든 파일이 이미 업로드되었습니다."
|
|
3059
3093
|
);
|
|
3060
3094
|
return;
|
|
3061
3095
|
}
|
|
3062
|
-
|
|
3063
|
-
let
|
|
3096
|
+
p(!0);
|
|
3097
|
+
let b;
|
|
3064
3098
|
try {
|
|
3065
|
-
const
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
}),
|
|
3099
|
+
const O = new Ut();
|
|
3100
|
+
h.forEach((x) => {
|
|
3101
|
+
x.originFileObj && O.file(x.name, x.originFileObj);
|
|
3102
|
+
}), b = await O.generateAsync({
|
|
3069
3103
|
type: "blob",
|
|
3070
3104
|
compression: "DEFLATE",
|
|
3071
3105
|
compressionOptions: {
|
|
@@ -3073,126 +3107,126 @@ const ai = function(e, r, n) {
|
|
|
3073
3107
|
// 높은 압축률 설정
|
|
3074
3108
|
}
|
|
3075
3109
|
});
|
|
3076
|
-
} catch (
|
|
3077
|
-
|
|
3110
|
+
} catch (O) {
|
|
3111
|
+
p(!1), M.error("파일을 압축하는 중 오류가 발생했습니다."), console.error("Zipping error:", O);
|
|
3078
3112
|
return;
|
|
3079
3113
|
}
|
|
3080
|
-
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3114
|
+
p(!1);
|
|
3115
|
+
const S = new FormData();
|
|
3116
|
+
S.append("file", b, "upload.zip"), l(!0), I(0);
|
|
3083
3117
|
try {
|
|
3084
|
-
const
|
|
3085
|
-
const
|
|
3086
|
-
|
|
3087
|
-
if (
|
|
3088
|
-
const
|
|
3089
|
-
|
|
3118
|
+
const O = await new Promise((E, N) => {
|
|
3119
|
+
const P = new XMLHttpRequest();
|
|
3120
|
+
P.open("POST", "/api/upload-large", !0), P.upload.onprogress = (w) => {
|
|
3121
|
+
if (w.lengthComputable) {
|
|
3122
|
+
const V = Math.round(
|
|
3123
|
+
w.loaded / w.total * 100
|
|
3090
3124
|
);
|
|
3091
|
-
|
|
3125
|
+
I(V);
|
|
3092
3126
|
}
|
|
3093
|
-
},
|
|
3094
|
-
if (
|
|
3127
|
+
}, P.onload = () => {
|
|
3128
|
+
if (P.status >= 200 && P.status < 300)
|
|
3095
3129
|
try {
|
|
3096
|
-
const
|
|
3097
|
-
|
|
3098
|
-
new Error(
|
|
3130
|
+
const w = JSON.parse(P.responseText);
|
|
3131
|
+
w.success ? E(w) : N(
|
|
3132
|
+
new Error(w.message || "파일 업로드에 실패했습니다.")
|
|
3099
3133
|
);
|
|
3100
3134
|
} catch {
|
|
3101
|
-
|
|
3135
|
+
N(new Error("잘못된 서버 응답입니다."));
|
|
3102
3136
|
}
|
|
3103
3137
|
else
|
|
3104
3138
|
try {
|
|
3105
|
-
const
|
|
3106
|
-
|
|
3139
|
+
const w = JSON.parse(P.responseText);
|
|
3140
|
+
N(new Error(w.message || `서버 오류: ${P.status}`));
|
|
3107
3141
|
} catch {
|
|
3108
|
-
|
|
3142
|
+
N(new Error(`서버 오류: ${P.status}`));
|
|
3109
3143
|
}
|
|
3110
|
-
},
|
|
3111
|
-
|
|
3112
|
-
},
|
|
3144
|
+
}, P.onerror = () => {
|
|
3145
|
+
N(new Error("네트워크 오류가 발생했습니다."));
|
|
3146
|
+
}, P.send(S);
|
|
3113
3147
|
});
|
|
3114
|
-
|
|
3115
|
-
|
|
3148
|
+
M.success(
|
|
3149
|
+
O.message || "압축 파일이 성공적으로 업로드되었습니다."
|
|
3116
3150
|
);
|
|
3117
|
-
const
|
|
3118
|
-
(
|
|
3151
|
+
const x = a.map(
|
|
3152
|
+
(E) => h.find((N) => N.uid === E.uid) ? { ...E, status: "done" } : E
|
|
3119
3153
|
);
|
|
3120
|
-
if (u(
|
|
3121
|
-
const
|
|
3122
|
-
|
|
3123
|
-
const
|
|
3124
|
-
crprCd:
|
|
3154
|
+
if (u(x), n && O.uploadedFiles && Array.isArray(O.uploadedFiles)) {
|
|
3155
|
+
const E = G();
|
|
3156
|
+
O.uploadedFiles.forEach((N) => {
|
|
3157
|
+
const P = {
|
|
3158
|
+
crprCd: E.crprCd,
|
|
3125
3159
|
sysCd: __SYS_CD__,
|
|
3126
3160
|
fileGrpKey: e,
|
|
3127
3161
|
sub: [
|
|
3128
3162
|
{
|
|
3129
|
-
crprCd:
|
|
3163
|
+
crprCd: E.crprCd,
|
|
3130
3164
|
sysCd: __SYS_CD__,
|
|
3131
3165
|
fileGrpKey: e,
|
|
3132
|
-
physFileNm:
|
|
3133
|
-
lgclFileNm:
|
|
3134
|
-
filePath:
|
|
3135
|
-
fileExtn:
|
|
3136
|
-
fileSize:
|
|
3166
|
+
physFileNm: N.fileNameP,
|
|
3167
|
+
lgclFileNm: N.fileNameL,
|
|
3168
|
+
filePath: N.filePath,
|
|
3169
|
+
fileExtn: N.fileExt,
|
|
3170
|
+
fileSize: N.fileSize,
|
|
3137
3171
|
mltpYn: "Y"
|
|
3138
3172
|
}
|
|
3139
3173
|
]
|
|
3140
3174
|
};
|
|
3141
|
-
|
|
3142
|
-
const
|
|
3143
|
-
crprCd:
|
|
3175
|
+
X(n, P).then((w) => {
|
|
3176
|
+
const V = a.map(($) => ({
|
|
3177
|
+
crprCd: E.crprCd,
|
|
3144
3178
|
sysCd: __SYS_CD__,
|
|
3145
|
-
fileGrpKey:
|
|
3146
|
-
fileKey:
|
|
3147
|
-
lgclFileNm:
|
|
3148
|
-
fileSize:
|
|
3149
|
-
fileExtn:
|
|
3150
|
-
fileType:
|
|
3179
|
+
fileGrpKey: w.sub[0].fileGrpKey,
|
|
3180
|
+
fileKey: w.sub[0].fileKey,
|
|
3181
|
+
lgclFileNm: $.name,
|
|
3182
|
+
fileSize: $.size,
|
|
3183
|
+
fileExtn: $.name.split(".").pop(),
|
|
3184
|
+
fileType: $.type
|
|
3151
3185
|
}));
|
|
3152
|
-
|
|
3186
|
+
X(i, {
|
|
3153
3187
|
// 파일 목록에 fileKey를 추가합니다.
|
|
3154
|
-
sub:
|
|
3188
|
+
sub: V
|
|
3155
3189
|
});
|
|
3156
|
-
}).catch((
|
|
3157
|
-
console.error("후처리 서비스 호출 실패:",
|
|
3158
|
-
`${
|
|
3190
|
+
}).catch((w) => {
|
|
3191
|
+
console.error("후처리 서비스 호출 실패:", w), M.error(
|
|
3192
|
+
`${N.fileNameL} 파일의 후처리 작업에 실패했습니다.`
|
|
3159
3193
|
);
|
|
3160
3194
|
}), r && r({
|
|
3161
|
-
fileNameP:
|
|
3162
|
-
fileNameL:
|
|
3195
|
+
fileNameP: N.fileNameP,
|
|
3196
|
+
fileNameL: N.fileNameL
|
|
3163
3197
|
});
|
|
3164
3198
|
});
|
|
3165
3199
|
}
|
|
3166
|
-
} catch (
|
|
3167
|
-
|
|
3168
|
-
const
|
|
3169
|
-
(
|
|
3170
|
-
...
|
|
3200
|
+
} catch (O) {
|
|
3201
|
+
M.error(O.message || "파일 업로드 중 오류가 발생했습니다.");
|
|
3202
|
+
const x = a.map(
|
|
3203
|
+
(E) => h.find((N) => N.uid === E.uid) ? {
|
|
3204
|
+
...E,
|
|
3171
3205
|
status: "error",
|
|
3172
|
-
response:
|
|
3173
|
-
} :
|
|
3206
|
+
response: O.message || "파일 업로드 중 오류가 발생했습니다."
|
|
3207
|
+
} : E
|
|
3174
3208
|
);
|
|
3175
|
-
u(
|
|
3209
|
+
u(x);
|
|
3176
3210
|
} finally {
|
|
3177
3211
|
l(!1);
|
|
3178
3212
|
}
|
|
3179
|
-
},
|
|
3213
|
+
}, v = {
|
|
3180
3214
|
multiple: !0,
|
|
3181
3215
|
fileList: a,
|
|
3182
|
-
beforeUpload: (
|
|
3216
|
+
beforeUpload: (h) => y(h) ? s && h.size >= s * 1024 * 1024 ? (M.error(
|
|
3183
3217
|
`대용량 첨부 파일 최대 크기는 ${(s / 1024).toFixed(
|
|
3184
3218
|
1
|
|
3185
3219
|
)}GB입니다.`
|
|
3186
3220
|
), H.LIST_IGNORE) : !1 : H.LIST_IGNORE,
|
|
3187
|
-
onChange: ({ fileList:
|
|
3188
|
-
const
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
}), u(Array.from(
|
|
3221
|
+
onChange: ({ fileList: h }) => {
|
|
3222
|
+
const T = new Map(a.map((g) => [g.uid, g]));
|
|
3223
|
+
h.forEach((g) => {
|
|
3224
|
+
T.set(g.uid, g);
|
|
3225
|
+
}), u(Array.from(T.values()));
|
|
3192
3226
|
},
|
|
3193
|
-
onRemove: (
|
|
3194
|
-
const
|
|
3195
|
-
u(
|
|
3227
|
+
onRemove: (h) => {
|
|
3228
|
+
const T = a.filter((g) => g.uid !== h.uid);
|
|
3229
|
+
u(T);
|
|
3196
3230
|
},
|
|
3197
3231
|
showUploadList: !1
|
|
3198
3232
|
// 수동으로 목록을 렌더링하므로 antd의 기본 목록은 숨깁니다.
|
|
@@ -3200,19 +3234,19 @@ const ai = function(e, r, n) {
|
|
|
3200
3234
|
return /* @__PURE__ */ c.jsx(
|
|
3201
3235
|
St,
|
|
3202
3236
|
{
|
|
3203
|
-
spinning: f ||
|
|
3204
|
-
tip:
|
|
3237
|
+
spinning: f || m,
|
|
3238
|
+
tip: m ? "파일 압축 중..." : `파일 업로드 중... ${d}%`,
|
|
3205
3239
|
children: /* @__PURE__ */ c.jsxs("div", { className: "bwg-large-uploader-container", children: [
|
|
3206
3240
|
/* @__PURE__ */ c.jsx(
|
|
3207
3241
|
Ot,
|
|
3208
3242
|
{
|
|
3209
|
-
title: /* @__PURE__ */ c.jsx(
|
|
3210
|
-
extra: /* @__PURE__ */ c.jsx(H, { ...
|
|
3243
|
+
title: /* @__PURE__ */ c.jsx(te, { strong: !0, children: t }),
|
|
3244
|
+
extra: /* @__PURE__ */ c.jsx(H, { ...v, children: /* @__PURE__ */ c.jsx(W, { icon: /* @__PURE__ */ c.jsx(Je, {}), children: "파일 선택" }) }),
|
|
3211
3245
|
bodyStyle: { padding: 0 },
|
|
3212
3246
|
children: /* @__PURE__ */ c.jsx(
|
|
3213
|
-
|
|
3247
|
+
di,
|
|
3214
3248
|
{
|
|
3215
|
-
...
|
|
3249
|
+
...v,
|
|
3216
3250
|
style: {
|
|
3217
3251
|
border: "none",
|
|
3218
3252
|
background: "transparent",
|
|
@@ -3223,18 +3257,18 @@ const ai = function(e, r, n) {
|
|
|
3223
3257
|
{
|
|
3224
3258
|
style: { textAlign: "left" },
|
|
3225
3259
|
dataSource: a,
|
|
3226
|
-
renderItem: (
|
|
3227
|
-
const
|
|
3228
|
-
let
|
|
3229
|
-
return
|
|
3260
|
+
renderItem: (h) => {
|
|
3261
|
+
const T = h.status === "done", g = h.status === "error";
|
|
3262
|
+
let b;
|
|
3263
|
+
return T ? b = /* @__PURE__ */ c.jsx(
|
|
3230
3264
|
Yt,
|
|
3231
3265
|
{
|
|
3232
3266
|
style: { color: "#52c41a", fontSize: 14 }
|
|
3233
3267
|
}
|
|
3234
|
-
) :
|
|
3268
|
+
) : g ? b = /* @__PURE__ */ c.jsx(
|
|
3235
3269
|
bt,
|
|
3236
3270
|
{
|
|
3237
|
-
title: typeof
|
|
3271
|
+
title: typeof h.response == "string" ? h.response : "업로드 실패",
|
|
3238
3272
|
children: /* @__PURE__ */ c.jsx(
|
|
3239
3273
|
Lt,
|
|
3240
3274
|
{
|
|
@@ -3242,20 +3276,20 @@ const ai = function(e, r, n) {
|
|
|
3242
3276
|
}
|
|
3243
3277
|
)
|
|
3244
3278
|
}
|
|
3245
|
-
) :
|
|
3279
|
+
) : b = /* @__PURE__ */ c.jsx(At, { style: { fontSize: 14 } }), /* @__PURE__ */ c.jsx(
|
|
3246
3280
|
ue.Item,
|
|
3247
3281
|
{
|
|
3248
3282
|
actions: [
|
|
3249
|
-
/* @__PURE__ */ c.jsx(
|
|
3283
|
+
/* @__PURE__ */ c.jsx(te, { type: "secondary", children: gi(h.size || 0) }, "size"),
|
|
3250
3284
|
/* @__PURE__ */ c.jsx(
|
|
3251
|
-
|
|
3285
|
+
W,
|
|
3252
3286
|
{
|
|
3253
3287
|
type: "text",
|
|
3254
3288
|
icon: /* @__PURE__ */ c.jsx(jt, {}),
|
|
3255
|
-
onClick: (
|
|
3256
|
-
|
|
3289
|
+
onClick: (S) => {
|
|
3290
|
+
S.stopPropagation(), v.onRemove?.(h);
|
|
3257
3291
|
},
|
|
3258
|
-
disabled: f ||
|
|
3292
|
+
disabled: f || m
|
|
3259
3293
|
},
|
|
3260
3294
|
"delete"
|
|
3261
3295
|
)
|
|
@@ -3263,12 +3297,12 @@ const ai = function(e, r, n) {
|
|
|
3263
3297
|
children: /* @__PURE__ */ c.jsx(
|
|
3264
3298
|
ue.Item.Meta,
|
|
3265
3299
|
{
|
|
3266
|
-
avatar:
|
|
3267
|
-
title: /* @__PURE__ */ c.jsx(
|
|
3300
|
+
avatar: b,
|
|
3301
|
+
title: /* @__PURE__ */ c.jsx(te, { type: g ? "danger" : void 0, children: h.name })
|
|
3268
3302
|
}
|
|
3269
3303
|
)
|
|
3270
3304
|
},
|
|
3271
|
-
|
|
3305
|
+
h.uid
|
|
3272
3306
|
);
|
|
3273
3307
|
}
|
|
3274
3308
|
}
|
|
@@ -3282,7 +3316,7 @@ const ai = function(e, r, n) {
|
|
|
3282
3316
|
style: { padding: "20px 0", minHeight: "120px" },
|
|
3283
3317
|
children: [
|
|
3284
3318
|
/* @__PURE__ */ c.jsx(Ft, { style: { fontSize: "32px", color: "#999" } }),
|
|
3285
|
-
/* @__PURE__ */ c.jsx(
|
|
3319
|
+
/* @__PURE__ */ c.jsx(te, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
|
|
3286
3320
|
]
|
|
3287
3321
|
}
|
|
3288
3322
|
) })
|
|
@@ -3298,13 +3332,13 @@ const ai = function(e, r, n) {
|
|
|
3298
3332
|
gap: "large",
|
|
3299
3333
|
style: { marginTop: 16 },
|
|
3300
3334
|
children: [
|
|
3301
|
-
f && /* @__PURE__ */ c.jsx("div", { style: { width: "250px" }, children: /* @__PURE__ */ c.jsx(Tt, { percent:
|
|
3335
|
+
f && /* @__PURE__ */ c.jsx("div", { style: { width: "250px" }, children: /* @__PURE__ */ c.jsx(Tt, { percent: d, size: "small" }) }),
|
|
3302
3336
|
/* @__PURE__ */ c.jsx(
|
|
3303
|
-
|
|
3337
|
+
W,
|
|
3304
3338
|
{
|
|
3305
3339
|
type: "primary",
|
|
3306
|
-
onClick:
|
|
3307
|
-
disabled: f ||
|
|
3340
|
+
onClick: C,
|
|
3341
|
+
disabled: f || m || a.filter((h) => h.status !== "done").length === 0,
|
|
3308
3342
|
icon: /* @__PURE__ */ c.jsx(kt, {}),
|
|
3309
3343
|
children: "일괄 업로드"
|
|
3310
3344
|
}
|
|
@@ -3317,23 +3351,23 @@ const ai = function(e, r, n) {
|
|
|
3317
3351
|
);
|
|
3318
3352
|
};
|
|
3319
3353
|
export {
|
|
3320
|
-
|
|
3321
|
-
|
|
3354
|
+
R as B,
|
|
3355
|
+
Vt as a,
|
|
3322
3356
|
Ci as b,
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3357
|
+
Ei as c,
|
|
3358
|
+
wi as d,
|
|
3359
|
+
xi as e,
|
|
3360
|
+
Ni as f,
|
|
3361
|
+
Pi as g,
|
|
3362
|
+
Mi as h,
|
|
3363
|
+
Ri as i,
|
|
3364
|
+
_i as j,
|
|
3365
|
+
Li as k,
|
|
3366
|
+
ji as l,
|
|
3367
|
+
Fi as m,
|
|
3368
|
+
ki as n,
|
|
3369
|
+
Yi as o,
|
|
3370
|
+
Ai as p,
|
|
3371
|
+
Bi as q
|
|
3338
3372
|
};
|
|
3339
|
-
//# sourceMappingURL=BwgLargeUploader-
|
|
3373
|
+
//# sourceMappingURL=BwgLargeUploader-B5EtYKUz.js.map
|