@bwg-ui/core 1.1.7 → 1.1.8
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/README.md +1 -1
- package/dist/chunks/BwgLargeUploader-1yDku10l.cjs +3 -0
- package/dist/chunks/BwgLargeUploader-1yDku10l.cjs.map +1 -0
- package/dist/chunks/{BwgLargeUploader-CZllyq7K.js → BwgLargeUploader-DsaIHpYz.js} +311 -297
- package/dist/chunks/BwgLargeUploader-DsaIHpYz.js.map +1 -0
- package/dist/chunks/LoadingOverlay-CAO6_FuF.js +29 -0
- package/dist/chunks/LoadingOverlay-CAO6_FuF.js.map +1 -0
- package/dist/chunks/LoadingOverlay-NX9Mo_6n.cjs +2 -0
- package/dist/chunks/LoadingOverlay-NX9Mo_6n.cjs.map +1 -0
- package/dist/chunks/{PublicLayout-BiTPwkVq.cjs → PublicLayout-3v46YZdi.cjs} +2 -2
- package/dist/chunks/{PublicLayout-BiTPwkVq.cjs.map → PublicLayout-3v46YZdi.cjs.map} +1 -1
- package/dist/chunks/{PublicLayout-g9WMtoZ0.js → PublicLayout-B4wGo0ut.js} +2 -2
- package/dist/chunks/{PublicLayout-g9WMtoZ0.js.map → PublicLayout-B4wGo0ut.js.map} +1 -1
- package/dist/chunks/{SSOHandler-Bu3v95k0.js → SSOHandler-B5rmYk8s.js} +2565 -2568
- package/dist/chunks/SSOHandler-B5rmYk8s.js.map +1 -0
- package/dist/chunks/SSOHandler-DjL0sH7k.cjs +184 -0
- package/dist/chunks/SSOHandler-DjL0sH7k.cjs.map +1 -0
- package/dist/chunks/ScreenProtectContext-3my4PHFa.js +154 -0
- package/dist/chunks/ScreenProtectContext-3my4PHFa.js.map +1 -0
- package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs +2 -0
- package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs.map +1 -0
- package/dist/chunks/{UtilsContext-CSgz9o2Z.js → UtilsContext-BKUZmmKx.js} +2 -2
- package/dist/chunks/{UtilsContext-CSgz9o2Z.js.map → UtilsContext-BKUZmmKx.js.map} +1 -1
- package/dist/chunks/{UtilsContext-5l7yFRQI.cjs → UtilsContext-DczQBfFi.cjs} +2 -2
- package/dist/chunks/{UtilsContext-5l7yFRQI.cjs.map → UtilsContext-DczQBfFi.cjs.map} +1 -1
- package/dist/chunks/{commonUtils-BV6WFv-z.js → commonUtils-Cvx6_eK2.js} +24 -23
- package/dist/chunks/commonUtils-Cvx6_eK2.js.map +1 -0
- package/dist/chunks/commonUtils-DaFg0y7C.cjs +2 -0
- package/dist/chunks/commonUtils-DaFg0y7C.cjs.map +1 -0
- package/dist/chunks/menuViewStore-BJak0NMm.cjs +3 -0
- package/dist/chunks/menuViewStore-BJak0NMm.cjs.map +1 -0
- package/dist/chunks/menuViewStore-BwR3vgPM.js +339 -0
- package/dist/chunks/menuViewStore-BwR3vgPM.js.map +1 -0
- package/dist/components/common/BwgButtonGroup.d.ts +2 -2
- package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
- package/dist/components/common/BwgTitleBox.d.ts +2 -2
- package/dist/components/common/BwgTitleBox.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/QuickServiceToggle.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgForm.d.ts.map +1 -1
- package/dist/components/core/BwgUploader.d.ts +5 -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/components/layout/LoadingOverlay.d.ts +5 -0
- package/dist/components/layout/LoadingOverlay.d.ts.map +1 -0
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +3 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +295 -291
- package/dist/index.js.map +1 -1
- package/dist/provider/contexts/ScreenProtectContext.d.ts +9 -4
- package/dist/provider/contexts/ScreenProtectContext.d.ts.map +1 -1
- package/dist/provider/hooks/index.d.ts +0 -1
- package/dist/provider/hooks/index.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +2 -2
- package/dist/stores/favoriteStore.d.ts +1 -1
- package/dist/stores/favoriteStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.cjs.map +1 -1
- package/dist/stores/index.d.ts +34 -3
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +17 -15
- package/dist/stores/index.js.map +1 -1
- package/dist/stores/menuModelStore.d.ts +36 -0
- package/dist/stores/menuModelStore.d.ts.map +1 -0
- package/dist/stores/menuViewStore.d.ts +31 -0
- package/dist/stores/menuViewStore.d.ts.map +1 -0
- package/dist/styles/assets/images/contents/icon/ico-quick-tab-move.svg +4 -4
- package/dist/styles/assets/images/logos/krx-logo-full.svg +35 -35
- package/dist/styles/components.css +2 -2
- package/dist/styles/layout.css +7 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +10 -4
- package/scripts/gen-component-registry.js +138 -0
- package/dist/chunks/BwgLargeUploader-CZllyq7K.js.map +0 -1
- package/dist/chunks/BwgLargeUploader-xAjj4TQ1.cjs +0 -3
- package/dist/chunks/BwgLargeUploader-xAjj4TQ1.cjs.map +0 -1
- package/dist/chunks/SSOHandler-Bu3v95k0.js.map +0 -1
- package/dist/chunks/SSOHandler-kghWABfM.cjs +0 -184
- package/dist/chunks/SSOHandler-kghWABfM.cjs.map +0 -1
- package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs +0 -2
- package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs.map +0 -1
- package/dist/chunks/ScreenProtectContext-zByHldrr.js +0 -115
- package/dist/chunks/ScreenProtectContext-zByHldrr.js.map +0 -1
- package/dist/chunks/commonUtils-BV6WFv-z.js.map +0 -1
- package/dist/chunks/commonUtils-L9Jgc5y-.cjs +0 -2
- package/dist/chunks/commonUtils-L9Jgc5y-.cjs.map +0 -1
- package/dist/chunks/menuStore-2zsN-PRt.js +0 -266
- package/dist/chunks/menuStore-2zsN-PRt.js.map +0 -1
- package/dist/chunks/menuStore-D7zl2c89.cjs +0 -2
- package/dist/chunks/menuStore-D7zl2c89.cjs.map +0 -1
- package/dist/provider/hooks/useViewState.d.ts +0 -15
- package/dist/provider/hooks/useViewState.d.ts.map +0 -1
- package/dist/stores/menuStore.d.ts +0 -53
- package/dist/stores/menuStore.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-Dpn_P65e.js";
|
|
2
|
-
import { Form as k, Select as be, Space as te, Typography as
|
|
2
|
+
import { Form as k, ConfigProvider as We, Select as be, Space as te, Typography as Ke, Input as G, Button as q, DatePicker as Te, Radio as yt, Checkbox as me, InputNumber as Dt, message as C, Upload as H, Spin as St, Card as Ot, List as ue, Tooltip as bt, Flex as Pe, Progress as Tt, notification as Ct } from "antd";
|
|
3
3
|
import Ze, { forwardRef as It, useMemo as M, useRef as re, useEffect as Y, useState as F, createContext as Et, memo as wt, useLayoutEffect as xt, useCallback as Nt, isValidElement as Pt, cloneElement as Me, useContext as Mt } from "react";
|
|
4
4
|
import { u as Rt } from "./popupStore-BJ_IYrdY.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";
|
|
@@ -21,7 +21,7 @@ const w = Ze.memo(
|
|
|
21
21
|
}) => {
|
|
22
22
|
const a = {
|
|
23
23
|
fontWeight: "bold"
|
|
24
|
-
}, u = Array.isArray(n) && n.some((l) => l.required === !0),
|
|
24
|
+
}, u = Array.isArray(n) && n.some((l) => l.required === !0), f = () => typeof e == "string" ? /* @__PURE__ */ c.jsxs("span", { style: a, children: [
|
|
25
25
|
e,
|
|
26
26
|
u && /* @__PURE__ */ c.jsx("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
|
|
27
27
|
] }) : /* @__PURE__ */ c.jsx("span", { style: a, children: e });
|
|
@@ -29,7 +29,7 @@ const w = Ze.memo(
|
|
|
29
29
|
k.Item,
|
|
30
30
|
{
|
|
31
31
|
className: "bwg-form-item",
|
|
32
|
-
label: e ?
|
|
32
|
+
label: e ? f() : void 0,
|
|
33
33
|
labelAlign: "left",
|
|
34
34
|
name: r,
|
|
35
35
|
rules: n,
|
|
@@ -43,15 +43,24 @@ const w = Ze.memo(
|
|
|
43
43
|
}
|
|
44
44
|
), Ut = It(
|
|
45
45
|
({ children: t, labelCol: e, style: r, className: n, ...i }, o) => /* @__PURE__ */ c.jsx(
|
|
46
|
-
|
|
46
|
+
We,
|
|
47
47
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
form: {
|
|
49
|
+
//기존 rule.message의 default message인 $name을를 입력해주세요를 변경
|
|
50
|
+
validateMessages: { required: "'${label}을(를) 입력해주세요.'" }
|
|
51
|
+
},
|
|
52
|
+
children: /* @__PURE__ */ c.jsx(
|
|
53
|
+
k,
|
|
54
|
+
{
|
|
55
|
+
ref: o,
|
|
56
|
+
...i,
|
|
57
|
+
requiredMark: !1,
|
|
58
|
+
labelCol: e || { flex: "100px" },
|
|
59
|
+
style: { padding: "10px", ...r },
|
|
60
|
+
className: `bwg-form ${n ?? ""}`,
|
|
61
|
+
children: t
|
|
62
|
+
}
|
|
63
|
+
)
|
|
55
64
|
}
|
|
56
65
|
)
|
|
57
66
|
);
|
|
@@ -71,9 +80,7 @@ const Ci = ({
|
|
|
71
80
|
options: i,
|
|
72
81
|
onChange: o,
|
|
73
82
|
variant: e.variant
|
|
74
|
-
};
|
|
75
|
-
console.log("selectComponentProps :: ", s);
|
|
76
|
-
const a = /* @__PURE__ */ c.jsx(be, { ...s, disabled: e.disabled });
|
|
83
|
+
}, a = /* @__PURE__ */ c.jsx(be, { ...s, disabled: e.disabled });
|
|
77
84
|
return e.copyable && !n && console.warn(
|
|
78
85
|
"BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
|
|
79
86
|
), e.copyable ? /* @__PURE__ */ c.jsx(w, { ...t, children: /* @__PURE__ */ c.jsxs(te.Compact, { block: !0, children: [
|
|
@@ -89,7 +96,7 @@ const Ci = ({
|
|
|
89
96
|
}
|
|
90
97
|
),
|
|
91
98
|
/* @__PURE__ */ c.jsx(
|
|
92
|
-
|
|
99
|
+
Ke.Paragraph,
|
|
93
100
|
{
|
|
94
101
|
copyable: {
|
|
95
102
|
text: n && r?.getFieldValue(t?.name)?.toString() || "",
|
|
@@ -206,7 +213,7 @@ const Ci = ({
|
|
|
206
213
|
itemProps: e = { name: "calendar" },
|
|
207
214
|
inputProps: r
|
|
208
215
|
}) => {
|
|
209
|
-
const { format: n, mask: i, outputFormat: o } = $t(t), s = re(null), a = re(null), u = k.useFormInstance(), [
|
|
216
|
+
const { format: n, mask: i, outputFormat: o } = $t(t), s = re(null), a = re(null), u = k.useFormInstance(), [f, l] = F(!1), [D, v] = F(!1), g = e?.name, [p, h] = F(null);
|
|
210
217
|
Y(() => {
|
|
211
218
|
if (!s.current?.input) return;
|
|
212
219
|
const m = Qe(s.current.input, {
|
|
@@ -216,13 +223,13 @@ const Ci = ({
|
|
|
216
223
|
return a.current = m, m.on("accept", () => {
|
|
217
224
|
console.log("input :: ", m.value);
|
|
218
225
|
const d = m.value, S = P(d, n, !0);
|
|
219
|
-
console.log("input :: ", S), d.length === n.length && S.isValid() && (console.log("parsed :: ", S.format(o)), u.setFieldValue(
|
|
226
|
+
console.log("input :: ", S), d.length === n.length && S.isValid() && (console.log("parsed :: ", S.format(o)), u.setFieldValue(g, S.format(o)), a.current.updateValue(), l(!1));
|
|
220
227
|
}), () => {
|
|
221
228
|
m.destroy();
|
|
222
229
|
};
|
|
223
230
|
}, [n, i]), Y(() => {
|
|
224
|
-
h(P(u.getFieldValue(
|
|
225
|
-
}, [u.getFieldValue(
|
|
231
|
+
h(P(u.getFieldValue(g)));
|
|
232
|
+
}, [u.getFieldValue(g)]);
|
|
226
233
|
const O = (m) => {
|
|
227
234
|
if (!m) {
|
|
228
235
|
a.current?.updateValue();
|
|
@@ -236,13 +243,13 @@ const Ci = ({
|
|
|
236
243
|
{
|
|
237
244
|
...e,
|
|
238
245
|
name: void 0,
|
|
239
|
-
validateStatus:
|
|
240
|
-
help:
|
|
246
|
+
validateStatus: D ? "warning" : void 0,
|
|
247
|
+
help: D ? "유효하지 않은 날짜입니다" : void 0,
|
|
241
248
|
children: /* @__PURE__ */ c.jsxs("div", { style: { position: "relative" }, children: [
|
|
242
249
|
/* @__PURE__ */ c.jsx(
|
|
243
250
|
k.Item,
|
|
244
251
|
{
|
|
245
|
-
name:
|
|
252
|
+
name: g,
|
|
246
253
|
getValueProps: (m) => ({
|
|
247
254
|
value: m ? P(m).format(n) : void 0
|
|
248
255
|
}),
|
|
@@ -254,7 +261,7 @@ const Ci = ({
|
|
|
254
261
|
...r,
|
|
255
262
|
ref: s,
|
|
256
263
|
onFocus: () => {
|
|
257
|
-
l(!
|
|
264
|
+
l(!f), a.current?.updateValue();
|
|
258
265
|
},
|
|
259
266
|
onKeyDown: (m) => {
|
|
260
267
|
m.key === "Backspace" && l(!0), m.key === "Tab" && l(!1);
|
|
@@ -269,7 +276,7 @@ const Ci = ({
|
|
|
269
276
|
/* @__PURE__ */ c.jsx(
|
|
270
277
|
Te,
|
|
271
278
|
{
|
|
272
|
-
open:
|
|
279
|
+
open: f,
|
|
273
280
|
picker: t,
|
|
274
281
|
format: n,
|
|
275
282
|
value: p,
|
|
@@ -298,12 +305,12 @@ const Ci = ({
|
|
|
298
305
|
year: { displayFormat: "YYYY", outputFormat: "YYYY" },
|
|
299
306
|
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
300
307
|
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" }
|
|
301
|
-
}, { displayFormat: o, outputFormat: s } = i[r], a = (u,
|
|
308
|
+
}, { displayFormat: o, outputFormat: s } = i[r], a = (u, f) => {
|
|
302
309
|
if (e?.onChange && typeof e.onChange == "function") {
|
|
303
310
|
let l;
|
|
304
|
-
u instanceof P ? l = u.format(s) : (l = [], u && u.map((
|
|
305
|
-
l.push(
|
|
306
|
-
})), e.onChange(l,
|
|
311
|
+
u instanceof P ? l = u.format(s) : (l = [], u && u.map((D) => {
|
|
312
|
+
l.push(D.format(s));
|
|
313
|
+
})), e.onChange(l, f);
|
|
307
314
|
}
|
|
308
315
|
};
|
|
309
316
|
return /* @__PURE__ */ c.jsx(
|
|
@@ -336,12 +343,12 @@ const Ci = ({
|
|
|
336
343
|
year: { displayFormat: "YYYY", outputFormat: "YYYY" },
|
|
337
344
|
month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
|
|
338
345
|
date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" }
|
|
339
|
-
}, { displayFormat: a, outputFormat: u } = s[r],
|
|
346
|
+
}, { displayFormat: a, outputFormat: u } = s[r], f = (l, D) => {
|
|
340
347
|
if (e.onChange && typeof e.onChange == "function") {
|
|
341
348
|
let v;
|
|
342
|
-
l instanceof P ? v = l.format(u) : (v = [], l && l.map((
|
|
343
|
-
v.push(
|
|
344
|
-
})), e.onChange(v,
|
|
349
|
+
l instanceof P ? v = l.format(u) : (v = [], l && l.map((g) => {
|
|
350
|
+
v.push(g.format(u));
|
|
351
|
+
})), e.onChange(v, D);
|
|
345
352
|
}
|
|
346
353
|
};
|
|
347
354
|
return /* @__PURE__ */ c.jsx(
|
|
@@ -370,12 +377,12 @@ const Ci = ({
|
|
|
370
377
|
order: !0,
|
|
371
378
|
minDate: n ? P(n, u) : void 0,
|
|
372
379
|
maxDate: i ? P(i, u) : void 0,
|
|
373
|
-
onChange:
|
|
380
|
+
onChange: f
|
|
374
381
|
}
|
|
375
382
|
)
|
|
376
383
|
}
|
|
377
384
|
);
|
|
378
|
-
}, Mi = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(w, { ...t, children: /* @__PURE__ */ c.jsx(
|
|
385
|
+
}, Mi = ({ itemProps: t, inputProps: e }) => /* @__PURE__ */ c.jsx(w, { ...t, children: /* @__PURE__ */ c.jsx(yt.Group, { ...e }) }), Ri = ({
|
|
379
386
|
itemProps: t,
|
|
380
387
|
inputProps: e = {
|
|
381
388
|
format: "YN"
|
|
@@ -398,21 +405,21 @@ const Ci = ({
|
|
|
398
405
|
t?.initialValue ?? []
|
|
399
406
|
), [o, s] = F([]), a = o.length > 0 && o.length == n?.length, u = n?.length > 0 && n.length < o.length;
|
|
400
407
|
Y(() => {
|
|
401
|
-
s(
|
|
408
|
+
s(f(e?.options));
|
|
402
409
|
}, [e?.options]), Y(() => {
|
|
403
410
|
i(n);
|
|
404
411
|
}, [n]);
|
|
405
|
-
const
|
|
406
|
-
const
|
|
412
|
+
const f = (v) => {
|
|
413
|
+
const g = [];
|
|
407
414
|
return (v || []).map((p, h) => {
|
|
408
|
-
|
|
409
|
-
}),
|
|
415
|
+
g.push(p.value);
|
|
416
|
+
}), g;
|
|
410
417
|
}, l = (v) => {
|
|
411
418
|
i(v.target.checked ? o : []), r.setFieldValue(t?.name, v.target.checked ? o : []);
|
|
412
|
-
},
|
|
419
|
+
}, D = (v) => {
|
|
413
420
|
i(v), r.setFieldValue(t?.name, v), e?.onChange && typeof e?.onChange == "function" && e?.onChange(v);
|
|
414
421
|
};
|
|
415
|
-
return /* @__PURE__ */ c.jsx(w, { ...t, children: /* @__PURE__ */ c.jsxs(
|
|
422
|
+
return /* @__PURE__ */ c.jsx(w, { ...t, children: /* @__PURE__ */ c.jsxs(We, { theme: {
|
|
416
423
|
components: {
|
|
417
424
|
Checkbox: {
|
|
418
425
|
colorPrimary: "var(--check-primary)",
|
|
@@ -435,7 +442,7 @@ const Ci = ({
|
|
|
435
442
|
{
|
|
436
443
|
options: e?.options,
|
|
437
444
|
value: n,
|
|
438
|
-
onChange:
|
|
445
|
+
onChange: D
|
|
439
446
|
}
|
|
440
447
|
)
|
|
441
448
|
] }) });
|
|
@@ -448,7 +455,7 @@ const Ci = ({
|
|
|
448
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];
|
|
449
456
|
};
|
|
450
457
|
return /* @__PURE__ */ c.jsx(w, { ...t, children: /* @__PURE__ */ c.jsx(
|
|
451
|
-
|
|
458
|
+
Dt,
|
|
452
459
|
{
|
|
453
460
|
...e,
|
|
454
461
|
formatter: (i) => r(i),
|
|
@@ -478,7 +485,7 @@ const Ci = ({
|
|
|
478
485
|
}) })
|
|
479
486
|
}
|
|
480
487
|
);
|
|
481
|
-
}, ki = (t) => /* @__PURE__ */ c.jsx(q, { ...t, className: "bwg-btn" }),
|
|
488
|
+
}, ki = (t) => /* @__PURE__ */ c.jsx(q, { ...t, className: "bwg-btn" }), et = Et({
|
|
482
489
|
dragDropManager: void 0
|
|
483
490
|
});
|
|
484
491
|
function L(t) {
|
|
@@ -511,8 +518,8 @@ function Xt(t) {
|
|
|
511
518
|
return e;
|
|
512
519
|
}
|
|
513
520
|
if (Array.isArray(t)) return "array";
|
|
514
|
-
if (
|
|
515
|
-
if (
|
|
521
|
+
if (Zt(t)) return "date";
|
|
522
|
+
if (Kt(t)) return "error";
|
|
516
523
|
var r = Wt(t);
|
|
517
524
|
switch (r) {
|
|
518
525
|
case "Symbol":
|
|
@@ -528,29 +535,29 @@ function Xt(t) {
|
|
|
528
535
|
function Wt(t) {
|
|
529
536
|
return typeof t.constructor == "function" ? t.constructor.name : null;
|
|
530
537
|
}
|
|
531
|
-
function
|
|
538
|
+
function Kt(t) {
|
|
532
539
|
return t instanceof Error || typeof t.message == "string" && t.constructor && typeof t.constructor.stackTraceLimit == "number";
|
|
533
540
|
}
|
|
534
|
-
function
|
|
541
|
+
function Zt(t) {
|
|
535
542
|
return t instanceof Date ? !0 : typeof t.toDateString == "function" && typeof t.getDate == "function" && typeof t.setDate == "function";
|
|
536
543
|
}
|
|
537
544
|
function U(t) {
|
|
538
545
|
var e = typeof t;
|
|
539
546
|
return process.env.NODE_ENV !== "production" && (e = Xt(t)), e;
|
|
540
547
|
}
|
|
541
|
-
function
|
|
548
|
+
function tt(t, e, r) {
|
|
542
549
|
var n;
|
|
543
550
|
if (typeof e == "function" && typeof r == "function" || typeof r == "function" && typeof arguments[3] == "function")
|
|
544
551
|
throw new Error(process.env.NODE_ENV === "production" ? L(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.");
|
|
545
552
|
if (typeof e == "function" && typeof r > "u" && (r = e, e = void 0), typeof r < "u") {
|
|
546
553
|
if (typeof r != "function")
|
|
547
554
|
throw new Error(process.env.NODE_ENV === "production" ? L(1) : "Expected the enhancer to be a function. Instead, received: '" + U(r) + "'");
|
|
548
|
-
return r(
|
|
555
|
+
return r(tt)(t, e);
|
|
549
556
|
}
|
|
550
557
|
if (typeof t != "function")
|
|
551
558
|
throw new Error(process.env.NODE_ENV === "production" ? L(2) : "Expected the root reducer to be a function. Instead, received: '" + U(t) + "'");
|
|
552
559
|
var i = t, o = e, s = [], a = s, u = !1;
|
|
553
|
-
function
|
|
560
|
+
function f() {
|
|
554
561
|
a === s && (a = s.slice());
|
|
555
562
|
}
|
|
556
563
|
function l() {
|
|
@@ -558,17 +565,17 @@ function et(t, e, r) {
|
|
|
558
565
|
throw new Error(process.env.NODE_ENV === "production" ? L(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.");
|
|
559
566
|
return o;
|
|
560
567
|
}
|
|
561
|
-
function
|
|
568
|
+
function D(h) {
|
|
562
569
|
if (typeof h != "function")
|
|
563
570
|
throw new Error(process.env.NODE_ENV === "production" ? L(4) : "Expected the listener to be a function. Instead, received: '" + U(h) + "'");
|
|
564
571
|
if (u)
|
|
565
572
|
throw new Error(process.env.NODE_ENV === "production" ? L(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.");
|
|
566
573
|
var O = !0;
|
|
567
|
-
return
|
|
574
|
+
return f(), a.push(h), function() {
|
|
568
575
|
if (O) {
|
|
569
576
|
if (u)
|
|
570
577
|
throw new Error(process.env.NODE_ENV === "production" ? L(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.");
|
|
571
|
-
O = !1,
|
|
578
|
+
O = !1, f();
|
|
572
579
|
var d = a.indexOf(h);
|
|
573
580
|
a.splice(d, 1), s = null;
|
|
574
581
|
}
|
|
@@ -592,7 +599,7 @@ function et(t, e, r) {
|
|
|
592
599
|
}
|
|
593
600
|
return h;
|
|
594
601
|
}
|
|
595
|
-
function
|
|
602
|
+
function g(h) {
|
|
596
603
|
if (typeof h != "function")
|
|
597
604
|
throw new Error(process.env.NODE_ENV === "production" ? L(10) : "Expected the nextReducer to be a function. Instead, received: '" + U(h));
|
|
598
605
|
i = h, v({
|
|
@@ -600,7 +607,7 @@ function et(t, e, r) {
|
|
|
600
607
|
});
|
|
601
608
|
}
|
|
602
609
|
function p() {
|
|
603
|
-
var h, O =
|
|
610
|
+
var h, O = D;
|
|
604
611
|
return h = {
|
|
605
612
|
/**
|
|
606
613
|
* The minimal observable subscription method.
|
|
@@ -630,13 +637,13 @@ function et(t, e, r) {
|
|
|
630
637
|
type: Fe.INIT
|
|
631
638
|
}), n = {
|
|
632
639
|
dispatch: v,
|
|
633
|
-
subscribe:
|
|
640
|
+
subscribe: D,
|
|
634
641
|
getState: l,
|
|
635
|
-
replaceReducer:
|
|
642
|
+
replaceReducer: g
|
|
636
643
|
}, n[Le] = p, n;
|
|
637
644
|
}
|
|
638
|
-
function
|
|
639
|
-
if (
|
|
645
|
+
function y(t, e, ...r) {
|
|
646
|
+
if (Jt() && e === void 0)
|
|
640
647
|
throw new Error("invariant requires an error message argument");
|
|
641
648
|
if (!t) {
|
|
642
649
|
let n;
|
|
@@ -651,10 +658,10 @@ function D(t, e, ...r) {
|
|
|
651
658
|
throw n.framesToPop = 1, n;
|
|
652
659
|
}
|
|
653
660
|
}
|
|
654
|
-
function
|
|
661
|
+
function Jt() {
|
|
655
662
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
656
663
|
}
|
|
657
|
-
function
|
|
664
|
+
function Qt(t, e, r) {
|
|
658
665
|
return e.split(".").reduce(
|
|
659
666
|
(n, i) => n && n[i] ? n[i] : r || null,
|
|
660
667
|
t
|
|
@@ -665,7 +672,7 @@ function er(t, e) {
|
|
|
665
672
|
(r) => r !== e
|
|
666
673
|
);
|
|
667
674
|
}
|
|
668
|
-
function
|
|
675
|
+
function rt(t) {
|
|
669
676
|
return typeof t == "object";
|
|
670
677
|
}
|
|
671
678
|
function tr(t, e) {
|
|
@@ -706,8 +713,8 @@ function ir(t) {
|
|
|
706
713
|
}) {
|
|
707
714
|
const { publishSource: i = !0, clientOffset: o, getSourceClientOffset: s } = n, a = t.getMonitor(), u = t.getRegistry();
|
|
708
715
|
t.dispatch(ke(o)), or(r, a, u);
|
|
709
|
-
const
|
|
710
|
-
if (
|
|
716
|
+
const f = cr(r, a);
|
|
717
|
+
if (f == null) {
|
|
711
718
|
t.dispatch(nr);
|
|
712
719
|
return;
|
|
713
720
|
}
|
|
@@ -715,20 +722,20 @@ function ir(t) {
|
|
|
715
722
|
if (o) {
|
|
716
723
|
if (!s)
|
|
717
724
|
throw new Error("getSourceClientOffset must be defined");
|
|
718
|
-
sr(s), l = s(
|
|
725
|
+
sr(s), l = s(f);
|
|
719
726
|
}
|
|
720
727
|
t.dispatch(ke(o, l));
|
|
721
|
-
const v = u.getSource(
|
|
728
|
+
const v = u.getSource(f).beginDrag(a, f);
|
|
722
729
|
if (v == null)
|
|
723
730
|
return;
|
|
724
|
-
ar(v), u.pinSource(
|
|
725
|
-
const
|
|
731
|
+
ar(v), u.pinSource(f);
|
|
732
|
+
const g = u.getSourceType(f);
|
|
726
733
|
return {
|
|
727
734
|
type: ne,
|
|
728
735
|
payload: {
|
|
729
|
-
itemType:
|
|
736
|
+
itemType: g,
|
|
730
737
|
item: v,
|
|
731
|
-
sourceId:
|
|
738
|
+
sourceId: f,
|
|
732
739
|
clientOffset: o || null,
|
|
733
740
|
sourceClientOffset: l || null,
|
|
734
741
|
isSourcePublic: !!i
|
|
@@ -737,15 +744,15 @@ function ir(t) {
|
|
|
737
744
|
};
|
|
738
745
|
}
|
|
739
746
|
function or(t, e, r) {
|
|
740
|
-
|
|
741
|
-
|
|
747
|
+
y(!e.isDragging(), "Cannot call beginDrag while dragging."), t.forEach(function(n) {
|
|
748
|
+
y(r.getSource(n), "Expected sourceIds to be registered.");
|
|
742
749
|
});
|
|
743
750
|
}
|
|
744
751
|
function sr(t) {
|
|
745
|
-
|
|
752
|
+
y(typeof t == "function", "When clientOffset is provided, getSourceClientOffset must be a function.");
|
|
746
753
|
}
|
|
747
754
|
function ar(t) {
|
|
748
|
-
|
|
755
|
+
y(rt(t), "Item must be an object.");
|
|
749
756
|
}
|
|
750
757
|
function cr(t, e) {
|
|
751
758
|
let r = null;
|
|
@@ -778,27 +785,27 @@ function lr(t) {
|
|
|
778
785
|
function dr(t) {
|
|
779
786
|
return function(r = {}) {
|
|
780
787
|
const n = t.getMonitor(), i = t.getRegistry();
|
|
781
|
-
|
|
782
|
-
const u =
|
|
788
|
+
fr(n), pr(n).forEach((s, a) => {
|
|
789
|
+
const u = gr(s, a, i, n), f = {
|
|
783
790
|
type: oe,
|
|
784
791
|
payload: {
|
|
785
792
|
dropResult: lr({}, r, u)
|
|
786
793
|
}
|
|
787
794
|
};
|
|
788
|
-
t.dispatch(
|
|
795
|
+
t.dispatch(f);
|
|
789
796
|
});
|
|
790
797
|
};
|
|
791
798
|
}
|
|
792
|
-
function
|
|
793
|
-
|
|
799
|
+
function fr(t) {
|
|
800
|
+
y(t.isDragging(), "Cannot call drop while not dragging."), y(!t.didDrop(), "Cannot call drop twice during one drag operation.");
|
|
794
801
|
}
|
|
795
|
-
function
|
|
802
|
+
function gr(t, e, r, n) {
|
|
796
803
|
const i = r.getTarget(t);
|
|
797
804
|
let o = i ? i.drop(n, t) : void 0;
|
|
798
805
|
return hr(o), typeof o > "u" && (o = e === 0 ? {} : n.getDropResult()), o;
|
|
799
806
|
}
|
|
800
807
|
function hr(t) {
|
|
801
|
-
|
|
808
|
+
y(typeof t > "u" || rt(t), "Drop result must either be an object or undefined.");
|
|
802
809
|
}
|
|
803
810
|
function pr(t) {
|
|
804
811
|
const e = t.getTargetIds().filter(t.canDropOnTarget, t);
|
|
@@ -815,16 +822,16 @@ function mr(t) {
|
|
|
815
822
|
};
|
|
816
823
|
}
|
|
817
824
|
function vr(t) {
|
|
818
|
-
|
|
825
|
+
y(t.isDragging(), "Cannot call endDrag while not dragging.");
|
|
819
826
|
}
|
|
820
827
|
function ve(t, e) {
|
|
821
828
|
return e === null ? t === null : Array.isArray(t) ? t.some(
|
|
822
829
|
(r) => r === e
|
|
823
830
|
) : t === e;
|
|
824
831
|
}
|
|
825
|
-
function
|
|
832
|
+
function yr(t) {
|
|
826
833
|
return function(r, { clientOffset: n } = {}) {
|
|
827
|
-
|
|
834
|
+
Dr(r);
|
|
828
835
|
const i = r.slice(0), o = t.getMonitor(), s = t.getRegistry(), a = o.getItemType();
|
|
829
836
|
return Or(i, s, a), Sr(i, o, s), br(i, o, s), {
|
|
830
837
|
type: ie,
|
|
@@ -835,16 +842,16 @@ function Dr(t) {
|
|
|
835
842
|
};
|
|
836
843
|
};
|
|
837
844
|
}
|
|
838
|
-
function
|
|
839
|
-
|
|
845
|
+
function Dr(t) {
|
|
846
|
+
y(Array.isArray(t), "Expected targetIds to be an array.");
|
|
840
847
|
}
|
|
841
848
|
function Sr(t, e, r) {
|
|
842
|
-
|
|
849
|
+
y(e.isDragging(), "Cannot call hover while not dragging."), y(!e.didDrop(), "Cannot call hover after drop.");
|
|
843
850
|
for (let n = 0; n < t.length; n++) {
|
|
844
851
|
const i = t[n];
|
|
845
|
-
|
|
852
|
+
y(t.lastIndexOf(i) === n, "Expected targetIds to be unique in the passed array.");
|
|
846
853
|
const o = r.getTarget(i);
|
|
847
|
-
|
|
854
|
+
y(o, "Expected targetIds to be registered.");
|
|
848
855
|
}
|
|
849
856
|
}
|
|
850
857
|
function Or(t, e, r) {
|
|
@@ -870,7 +877,7 @@ function Cr(t) {
|
|
|
870
877
|
return {
|
|
871
878
|
beginDrag: ir(t),
|
|
872
879
|
publishDragSource: Tr(t),
|
|
873
|
-
hover:
|
|
880
|
+
hover: yr(t),
|
|
874
881
|
drop: dr(t),
|
|
875
882
|
endDrag: mr(t)
|
|
876
883
|
};
|
|
@@ -918,7 +925,7 @@ function Er(t, e) {
|
|
|
918
925
|
y: t.y + e.y
|
|
919
926
|
};
|
|
920
927
|
}
|
|
921
|
-
function
|
|
928
|
+
function nt(t, e) {
|
|
922
929
|
return {
|
|
923
930
|
x: t.x - e.x,
|
|
924
931
|
y: t.y - e.y
|
|
@@ -926,22 +933,22 @@ function rt(t, e) {
|
|
|
926
933
|
}
|
|
927
934
|
function wr(t) {
|
|
928
935
|
const { clientOffset: e, initialClientOffset: r, initialSourceClientOffset: n } = t;
|
|
929
|
-
return !e || !r || !n ? null :
|
|
936
|
+
return !e || !r || !n ? null : nt(Er(e, n), r);
|
|
930
937
|
}
|
|
931
938
|
function xr(t) {
|
|
932
939
|
const { clientOffset: e, initialClientOffset: r } = t;
|
|
933
|
-
return !e || !r ? null :
|
|
940
|
+
return !e || !r ? null : nt(e, r);
|
|
934
941
|
}
|
|
935
|
-
const
|
|
936
|
-
|
|
942
|
+
const K = [], Ee = [];
|
|
943
|
+
K.__IS_NONE__ = !0;
|
|
937
944
|
Ee.__IS_ALL__ = !0;
|
|
938
945
|
function Nr(t, e) {
|
|
939
|
-
return t ===
|
|
946
|
+
return t === K ? !1 : t === Ee || typeof e > "u" ? !0 : rr(e, t).length > 0;
|
|
940
947
|
}
|
|
941
948
|
class Pr {
|
|
942
949
|
subscribeToStateChange(e, r = {}) {
|
|
943
950
|
const { handlerIds: n } = r;
|
|
944
|
-
|
|
951
|
+
y(typeof e == "function", "listener must be a function."), y(typeof n > "u" || Array.isArray(n), "handlerIds, when specified, must be an array of strings.");
|
|
945
952
|
let i = this.store.getState().stateId;
|
|
946
953
|
const o = () => {
|
|
947
954
|
const s = this.store.getState(), a = s.stateId;
|
|
@@ -954,7 +961,7 @@ class Pr {
|
|
|
954
961
|
return this.store.subscribe(o);
|
|
955
962
|
}
|
|
956
963
|
subscribeToOffsetChange(e) {
|
|
957
|
-
|
|
964
|
+
y(typeof e == "function", "listener must be a function.");
|
|
958
965
|
let r = this.store.getState().dragOffset;
|
|
959
966
|
const n = () => {
|
|
960
967
|
const i = this.store.getState().dragOffset;
|
|
@@ -966,13 +973,13 @@ class Pr {
|
|
|
966
973
|
if (!e)
|
|
967
974
|
return !1;
|
|
968
975
|
const r = this.registry.getSource(e);
|
|
969
|
-
return
|
|
976
|
+
return y(r, `Expected to find a valid source. sourceId=${e}`), this.isDragging() ? !1 : r.canDrag(this, e);
|
|
970
977
|
}
|
|
971
978
|
canDropOnTarget(e) {
|
|
972
979
|
if (!e)
|
|
973
980
|
return !1;
|
|
974
981
|
const r = this.registry.getTarget(e);
|
|
975
|
-
if (
|
|
982
|
+
if (y(r, `Expected to find a valid target. targetId=${e}`), !this.isDragging() || this.didDrop())
|
|
976
983
|
return !1;
|
|
977
984
|
const n = this.registry.getTargetType(e), i = this.getItemType();
|
|
978
985
|
return ve(n, i) && r.canDrop(this, e);
|
|
@@ -984,7 +991,7 @@ class Pr {
|
|
|
984
991
|
if (!e)
|
|
985
992
|
return !1;
|
|
986
993
|
const r = this.registry.getSource(e, !0);
|
|
987
|
-
if (
|
|
994
|
+
if (y(r, `Expected to find a valid source. sourceId=${e}`), !this.isDragging() || !this.isSourcePublic())
|
|
988
995
|
return !1;
|
|
989
996
|
const n = this.registry.getSourceType(e), i = this.getItemType();
|
|
990
997
|
return n !== i ? !1 : r.isDragging(this, e);
|
|
@@ -1046,8 +1053,8 @@ class Pr {
|
|
|
1046
1053
|
this.store = e, this.registry = r;
|
|
1047
1054
|
}
|
|
1048
1055
|
}
|
|
1049
|
-
const Ye = typeof global < "u" ? global : self,
|
|
1050
|
-
function
|
|
1056
|
+
const Ye = typeof global < "u" ? global : self, it = Ye.MutationObserver || Ye.WebKitMutationObserver;
|
|
1057
|
+
function ot(t) {
|
|
1051
1058
|
return function() {
|
|
1052
1059
|
const r = setTimeout(i, 0), n = setInterval(i, 50);
|
|
1053
1060
|
function i() {
|
|
@@ -1057,14 +1064,14 @@ function it(t) {
|
|
|
1057
1064
|
}
|
|
1058
1065
|
function Mr(t) {
|
|
1059
1066
|
let e = 1;
|
|
1060
|
-
const r = new
|
|
1067
|
+
const r = new it(t), n = document.createTextNode("");
|
|
1061
1068
|
return r.observe(n, {
|
|
1062
1069
|
characterData: !0
|
|
1063
1070
|
}), function() {
|
|
1064
1071
|
e = -e, n.data = e;
|
|
1065
1072
|
};
|
|
1066
1073
|
}
|
|
1067
|
-
const Rr = typeof
|
|
1074
|
+
const Rr = typeof it == "function" ? (
|
|
1068
1075
|
// reliably everywhere they are implemented.
|
|
1069
1076
|
// They are implemented in all modern browsers.
|
|
1070
1077
|
//
|
|
@@ -1101,7 +1108,7 @@ const Rr = typeof nt == "function" ? (
|
|
|
1101
1108
|
// - Internet Explorer 6-9
|
|
1102
1109
|
// - iPad Safari 4.3
|
|
1103
1110
|
// - Lynx 2.8.7
|
|
1104
|
-
|
|
1111
|
+
ot
|
|
1105
1112
|
);
|
|
1106
1113
|
class _r {
|
|
1107
1114
|
// Use the fastest means possible to execute a task in its own turn, with
|
|
@@ -1132,7 +1139,7 @@ class _r {
|
|
|
1132
1139
|
e.length = 0, this.index = 0, this.flushing = !1;
|
|
1133
1140
|
}, this.registerPendingError = (e) => {
|
|
1134
1141
|
this.pendingErrors.push(e), this.requestErrorThrow();
|
|
1135
|
-
}, this.requestFlush = Rr(this.flush), this.requestErrorThrow =
|
|
1142
|
+
}, this.requestFlush = Rr(this.flush), this.requestErrorThrow = ot(() => {
|
|
1136
1143
|
if (this.pendingErrors.length)
|
|
1137
1144
|
throw this.pendingErrors.shift();
|
|
1138
1145
|
});
|
|
@@ -1164,9 +1171,9 @@ class jr {
|
|
|
1164
1171
|
this.onError = e, this.freeTasks = [];
|
|
1165
1172
|
}
|
|
1166
1173
|
}
|
|
1167
|
-
const
|
|
1174
|
+
const st = new _r(), Fr = new jr(st.registerPendingError);
|
|
1168
1175
|
function kr(t) {
|
|
1169
|
-
|
|
1176
|
+
st.enqueueTask(Fr.create(t));
|
|
1170
1177
|
}
|
|
1171
1178
|
const we = "dnd-core/ADD_SOURCE", xe = "dnd-core/ADD_TARGET", Ne = "dnd-core/REMOVE_SOURCE", ae = "dnd-core/REMOVE_TARGET";
|
|
1172
1179
|
function Yr(t) {
|
|
@@ -1202,19 +1209,19 @@ function Br(t) {
|
|
|
1202
1209
|
};
|
|
1203
1210
|
}
|
|
1204
1211
|
function Ur(t) {
|
|
1205
|
-
|
|
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.");
|
|
1206
1213
|
}
|
|
1207
1214
|
function Vr(t) {
|
|
1208
|
-
|
|
1215
|
+
y(typeof t.canDrop == "function", "Expected canDrop to be a function."), y(typeof t.hover == "function", "Expected hover to be a function."), y(typeof t.drop == "function", "Expected beginDrag to be a function.");
|
|
1209
1216
|
}
|
|
1210
|
-
function
|
|
1217
|
+
function ye(t, e) {
|
|
1211
1218
|
if (e && Array.isArray(t)) {
|
|
1212
1219
|
t.forEach(
|
|
1213
|
-
(r) =>
|
|
1220
|
+
(r) => ye(r, !1)
|
|
1214
1221
|
);
|
|
1215
1222
|
return;
|
|
1216
1223
|
}
|
|
1217
|
-
|
|
1224
|
+
y(typeof t == "string" || typeof t == "symbol", e ? "Type can only be a string, a symbol, or an array of either." : "Type can only be a string or a symbol.");
|
|
1218
1225
|
}
|
|
1219
1226
|
var j;
|
|
1220
1227
|
(function(t) {
|
|
@@ -1258,12 +1265,12 @@ function He(t, e) {
|
|
|
1258
1265
|
}
|
|
1259
1266
|
class Gr {
|
|
1260
1267
|
addSource(e, r) {
|
|
1261
|
-
|
|
1268
|
+
ye(e), Ur(r);
|
|
1262
1269
|
const n = this.addHandler(j.SOURCE, e, r);
|
|
1263
1270
|
return this.store.dispatch(Yr(n)), n;
|
|
1264
1271
|
}
|
|
1265
1272
|
addTarget(e, r) {
|
|
1266
|
-
|
|
1273
|
+
ye(e, !0), Vr(r);
|
|
1267
1274
|
const n = this.addHandler(j.TARGET, e, r);
|
|
1268
1275
|
return this.store.dispatch(Ar(n)), n;
|
|
1269
1276
|
}
|
|
@@ -1271,16 +1278,16 @@ class Gr {
|
|
|
1271
1278
|
return He(this.dragSources, e) || He(this.dropTargets, e);
|
|
1272
1279
|
}
|
|
1273
1280
|
getSource(e, r = !1) {
|
|
1274
|
-
return
|
|
1281
|
+
return y(this.isSourceId(e), "Expected a valid source ID."), r && e === this.pinnedSourceId ? this.pinnedSource : this.dragSources.get(e);
|
|
1275
1282
|
}
|
|
1276
1283
|
getTarget(e) {
|
|
1277
|
-
return
|
|
1284
|
+
return y(this.isTargetId(e), "Expected a valid target ID."), this.dropTargets.get(e);
|
|
1278
1285
|
}
|
|
1279
1286
|
getSourceType(e) {
|
|
1280
|
-
return
|
|
1287
|
+
return y(this.isSourceId(e), "Expected a valid source ID."), this.types.get(e);
|
|
1281
1288
|
}
|
|
1282
1289
|
getTargetType(e) {
|
|
1283
|
-
return
|
|
1290
|
+
return y(this.isTargetId(e), "Expected a valid target ID."), this.types.get(e);
|
|
1284
1291
|
}
|
|
1285
1292
|
isSourceId(e) {
|
|
1286
1293
|
return Ae(e) === j.SOURCE;
|
|
@@ -1289,19 +1296,19 @@ class Gr {
|
|
|
1289
1296
|
return Ae(e) === j.TARGET;
|
|
1290
1297
|
}
|
|
1291
1298
|
removeSource(e) {
|
|
1292
|
-
|
|
1299
|
+
y(this.getSource(e), "Expected an existing source."), this.store.dispatch(Hr(e)), kr(() => {
|
|
1293
1300
|
this.dragSources.delete(e), this.types.delete(e);
|
|
1294
1301
|
});
|
|
1295
1302
|
}
|
|
1296
1303
|
removeTarget(e) {
|
|
1297
|
-
|
|
1304
|
+
y(this.getTarget(e), "Expected an existing target."), this.store.dispatch(Br(e)), this.dropTargets.delete(e), this.types.delete(e);
|
|
1298
1305
|
}
|
|
1299
1306
|
pinSource(e) {
|
|
1300
1307
|
const r = this.getSource(e);
|
|
1301
|
-
|
|
1308
|
+
y(r, "Expected an existing source."), this.pinnedSourceId = e, this.pinnedSource = r;
|
|
1302
1309
|
}
|
|
1303
1310
|
unpinSource() {
|
|
1304
|
-
|
|
1311
|
+
y(this.pinnedSource, "No source is pinned at the time."), this.pinnedSourceId = null, this.pinnedSource = null;
|
|
1305
1312
|
}
|
|
1306
1313
|
addHandler(e, r, n) {
|
|
1307
1314
|
const i = qr(e);
|
|
@@ -1315,7 +1322,7 @@ const Xr = (t, e) => t === e;
|
|
|
1315
1322
|
function Wr(t, e) {
|
|
1316
1323
|
return !t && !e ? !0 : !t || !e ? !1 : t.x === e.x && t.y === e.y;
|
|
1317
1324
|
}
|
|
1318
|
-
function
|
|
1325
|
+
function Kr(t, e, r = Xr) {
|
|
1319
1326
|
if (t.length !== e.length)
|
|
1320
1327
|
return !1;
|
|
1321
1328
|
for (let n = 0; n < t.length; ++n)
|
|
@@ -1323,7 +1330,7 @@ function Zr(t, e, r = Xr) {
|
|
|
1323
1330
|
return !1;
|
|
1324
1331
|
return !0;
|
|
1325
1332
|
}
|
|
1326
|
-
function
|
|
1333
|
+
function Zr(t = K, e) {
|
|
1327
1334
|
switch (e.type) {
|
|
1328
1335
|
case ie:
|
|
1329
1336
|
break;
|
|
@@ -1331,7 +1338,7 @@ function Jr(t = Z, e) {
|
|
|
1331
1338
|
case xe:
|
|
1332
1339
|
case ae:
|
|
1333
1340
|
case Ne:
|
|
1334
|
-
return
|
|
1341
|
+
return K;
|
|
1335
1342
|
case ne:
|
|
1336
1343
|
case Ie:
|
|
1337
1344
|
case se:
|
|
@@ -1340,12 +1347,12 @@ function Jr(t = Z, e) {
|
|
|
1340
1347
|
return Ee;
|
|
1341
1348
|
}
|
|
1342
1349
|
const { targetIds: r = [], prevTargetIds: n = [] } = e.payload, i = tr(r, n);
|
|
1343
|
-
if (!(i.length > 0 || !
|
|
1344
|
-
return
|
|
1350
|
+
if (!(i.length > 0 || !Kr(r, n)))
|
|
1351
|
+
return K;
|
|
1345
1352
|
const s = n[n.length - 1], a = r[r.length - 1];
|
|
1346
1353
|
return s !== a && (s && i.push(s), a && i.push(a)), i;
|
|
1347
1354
|
}
|
|
1348
|
-
function
|
|
1355
|
+
function Jr(t, e, r) {
|
|
1349
1356
|
return e in t ? Object.defineProperty(t, e, {
|
|
1350
1357
|
value: r,
|
|
1351
1358
|
enumerable: !0,
|
|
@@ -1353,13 +1360,13 @@ function Qr(t, e, r) {
|
|
|
1353
1360
|
writable: !0
|
|
1354
1361
|
}) : t[e] = r, t;
|
|
1355
1362
|
}
|
|
1356
|
-
function
|
|
1363
|
+
function Qr(t) {
|
|
1357
1364
|
for (var e = 1; e < arguments.length; e++) {
|
|
1358
1365
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
1359
1366
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
1360
1367
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
1361
1368
|
}))), n.forEach(function(i) {
|
|
1362
|
-
|
|
1369
|
+
Jr(t, i, r[i]);
|
|
1363
1370
|
});
|
|
1364
1371
|
}
|
|
1365
1372
|
return t;
|
|
@@ -1380,7 +1387,7 @@ function en(t = Be, e) {
|
|
|
1380
1387
|
clientOffset: r.clientOffset
|
|
1381
1388
|
};
|
|
1382
1389
|
case ie:
|
|
1383
|
-
return Wr(t.clientOffset, r.clientOffset) ? t :
|
|
1390
|
+
return Wr(t.clientOffset, r.clientOffset) ? t : Qr({}, t, {
|
|
1384
1391
|
clientOffset: r.clientOffset
|
|
1385
1392
|
});
|
|
1386
1393
|
case se:
|
|
@@ -1498,10 +1505,10 @@ function cn(t) {
|
|
|
1498
1505
|
}
|
|
1499
1506
|
function un(t = {}, e) {
|
|
1500
1507
|
return {
|
|
1501
|
-
dirtyHandlerIds:
|
|
1508
|
+
dirtyHandlerIds: Zr(t.dirtyHandlerIds, {
|
|
1502
1509
|
type: e.type,
|
|
1503
1510
|
payload: cn({}, e.payload, {
|
|
1504
|
-
prevTargetIds:
|
|
1511
|
+
prevTargetIds: Qt(t, "dragOperation.targetIds", [])
|
|
1505
1512
|
})
|
|
1506
1513
|
}),
|
|
1507
1514
|
dragOffset: en(t.dragOffset, e),
|
|
@@ -1516,14 +1523,14 @@ function ln(t, e = void 0, r = {}, n = !1) {
|
|
|
1516
1523
|
}
|
|
1517
1524
|
function dn(t) {
|
|
1518
1525
|
const e = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
1519
|
-
return
|
|
1526
|
+
return tt(un, t && e && e({
|
|
1520
1527
|
name: "dnd-core",
|
|
1521
1528
|
instanceId: "dnd-core"
|
|
1522
1529
|
}));
|
|
1523
1530
|
}
|
|
1524
|
-
function
|
|
1531
|
+
function fn(t, e) {
|
|
1525
1532
|
if (t == null) return {};
|
|
1526
|
-
var r =
|
|
1533
|
+
var r = gn(t, e), n, i;
|
|
1527
1534
|
if (Object.getOwnPropertySymbols) {
|
|
1528
1535
|
var o = Object.getOwnPropertySymbols(t);
|
|
1529
1536
|
for (i = 0; i < o.length; i++)
|
|
@@ -1531,7 +1538,7 @@ function gn(t, e) {
|
|
|
1531
1538
|
}
|
|
1532
1539
|
return r;
|
|
1533
1540
|
}
|
|
1534
|
-
function
|
|
1541
|
+
function gn(t, e) {
|
|
1535
1542
|
if (t == null) return {};
|
|
1536
1543
|
var r = {}, n = Object.keys(t), i, o;
|
|
1537
1544
|
for (o = 0; o < n.length; o++)
|
|
@@ -1541,18 +1548,18 @@ function fn(t, e) {
|
|
|
1541
1548
|
let Ue = 0;
|
|
1542
1549
|
const ee = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
1543
1550
|
var hn = /* @__PURE__ */ wt(function(e) {
|
|
1544
|
-
var { children: r } = e, n =
|
|
1551
|
+
var { children: r } = e, n = fn(e, [
|
|
1545
1552
|
"children"
|
|
1546
1553
|
]);
|
|
1547
1554
|
const [i, o] = pn(n);
|
|
1548
1555
|
return Y(() => {
|
|
1549
1556
|
if (o) {
|
|
1550
|
-
const s =
|
|
1557
|
+
const s = at();
|
|
1551
1558
|
return ++Ue, () => {
|
|
1552
1559
|
--Ue === 0 && (s[ee] = null);
|
|
1553
1560
|
};
|
|
1554
1561
|
}
|
|
1555
|
-
}, []), /* @__PURE__ */ c.jsx(
|
|
1562
|
+
}, []), /* @__PURE__ */ c.jsx(et.Provider, {
|
|
1556
1563
|
value: i,
|
|
1557
1564
|
children: r
|
|
1558
1565
|
});
|
|
@@ -1571,13 +1578,13 @@ function pn(t) {
|
|
|
1571
1578
|
r
|
|
1572
1579
|
];
|
|
1573
1580
|
}
|
|
1574
|
-
function mn(t, e =
|
|
1581
|
+
function mn(t, e = at(), r, n) {
|
|
1575
1582
|
const i = e;
|
|
1576
1583
|
return i[ee] || (i[ee] = {
|
|
1577
1584
|
dragDropManager: ln(t, e, r, n)
|
|
1578
1585
|
}), i[ee];
|
|
1579
1586
|
}
|
|
1580
|
-
function
|
|
1587
|
+
function at() {
|
|
1581
1588
|
return typeof global < "u" ? global : window;
|
|
1582
1589
|
}
|
|
1583
1590
|
var le, Ve;
|
|
@@ -1608,14 +1615,14 @@ function vn() {
|
|
|
1608
1615
|
return e !== e && r !== r;
|
|
1609
1616
|
}), le;
|
|
1610
1617
|
}
|
|
1611
|
-
var
|
|
1612
|
-
const
|
|
1618
|
+
var yn = vn();
|
|
1619
|
+
const Dn = /* @__PURE__ */ Ht(yn), B = typeof window < "u" ? xt : Y;
|
|
1613
1620
|
function Sn(t, e, r) {
|
|
1614
1621
|
const [n, i] = F(
|
|
1615
1622
|
() => e(t)
|
|
1616
1623
|
), o = Nt(() => {
|
|
1617
1624
|
const s = e(t);
|
|
1618
|
-
|
|
1625
|
+
Dn(n, s) || (i(s), r && r());
|
|
1619
1626
|
}, [
|
|
1620
1627
|
n,
|
|
1621
1628
|
t,
|
|
@@ -1641,14 +1648,14 @@ function On(t, e, r) {
|
|
|
1641
1648
|
i
|
|
1642
1649
|
]), n;
|
|
1643
1650
|
}
|
|
1644
|
-
function
|
|
1651
|
+
function ct(t, e, r) {
|
|
1645
1652
|
return On(
|
|
1646
1653
|
e,
|
|
1647
1654
|
t || (() => ({})),
|
|
1648
1655
|
() => r.reconnect()
|
|
1649
1656
|
);
|
|
1650
1657
|
}
|
|
1651
|
-
function
|
|
1658
|
+
function ut(t, e) {
|
|
1652
1659
|
const r = [];
|
|
1653
1660
|
return typeof t != "function" && r.push(t), M(() => typeof t == "function" ? t() : t, r);
|
|
1654
1661
|
}
|
|
@@ -1668,7 +1675,7 @@ function Tn(t) {
|
|
|
1668
1675
|
]
|
|
1669
1676
|
);
|
|
1670
1677
|
}
|
|
1671
|
-
let de = !1,
|
|
1678
|
+
let de = !1, fe = !1;
|
|
1672
1679
|
class Cn {
|
|
1673
1680
|
receiveHandlerId(e) {
|
|
1674
1681
|
this.sourceId = e;
|
|
@@ -1677,7 +1684,7 @@ class Cn {
|
|
|
1677
1684
|
return this.sourceId;
|
|
1678
1685
|
}
|
|
1679
1686
|
canDrag() {
|
|
1680
|
-
|
|
1687
|
+
y(!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");
|
|
1681
1688
|
try {
|
|
1682
1689
|
return de = !0, this.internalMonitor.canDragSource(this.sourceId);
|
|
1683
1690
|
} finally {
|
|
@@ -1687,11 +1694,11 @@ class Cn {
|
|
|
1687
1694
|
isDragging() {
|
|
1688
1695
|
if (!this.sourceId)
|
|
1689
1696
|
return !1;
|
|
1690
|
-
|
|
1697
|
+
y(!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");
|
|
1691
1698
|
try {
|
|
1692
|
-
return
|
|
1699
|
+
return fe = !0, this.internalMonitor.isDraggingSource(this.sourceId);
|
|
1693
1700
|
} finally {
|
|
1694
|
-
|
|
1701
|
+
fe = !1;
|
|
1695
1702
|
}
|
|
1696
1703
|
}
|
|
1697
1704
|
subscribeToStateChange(e, r) {
|
|
@@ -1752,7 +1759,7 @@ class Cn {
|
|
|
1752
1759
|
this.sourceId = null, this.internalMonitor = e.getMonitor();
|
|
1753
1760
|
}
|
|
1754
1761
|
}
|
|
1755
|
-
let
|
|
1762
|
+
let ge = !1;
|
|
1756
1763
|
class In {
|
|
1757
1764
|
receiveHandlerId(e) {
|
|
1758
1765
|
this.targetId = e;
|
|
@@ -1766,11 +1773,11 @@ class In {
|
|
|
1766
1773
|
canDrop() {
|
|
1767
1774
|
if (!this.targetId)
|
|
1768
1775
|
return !1;
|
|
1769
|
-
|
|
1776
|
+
y(!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");
|
|
1770
1777
|
try {
|
|
1771
|
-
return
|
|
1778
|
+
return ge = !0, this.internalMonitor.canDropOnTarget(this.targetId);
|
|
1772
1779
|
} finally {
|
|
1773
|
-
|
|
1780
|
+
ge = !1;
|
|
1774
1781
|
}
|
|
1775
1782
|
}
|
|
1776
1783
|
isOver(e) {
|
|
@@ -1821,7 +1828,7 @@ function wn(t, e, r) {
|
|
|
1821
1828
|
() => n.removeSource(i)
|
|
1822
1829
|
];
|
|
1823
1830
|
}
|
|
1824
|
-
function
|
|
1831
|
+
function De(t, e, r, n) {
|
|
1825
1832
|
let i;
|
|
1826
1833
|
if (i !== void 0)
|
|
1827
1834
|
return !!i;
|
|
@@ -1834,11 +1841,11 @@ function ye(t, e, r, n) {
|
|
|
1834
1841
|
return !1;
|
|
1835
1842
|
const a = Object.prototype.hasOwnProperty.bind(e);
|
|
1836
1843
|
for (let u = 0; u < o.length; u++) {
|
|
1837
|
-
const
|
|
1838
|
-
if (!a(
|
|
1844
|
+
const f = o[u];
|
|
1845
|
+
if (!a(f))
|
|
1839
1846
|
return !1;
|
|
1840
|
-
const l = t[
|
|
1841
|
-
if (i = void 0, i === !1 || i === void 0 && l !==
|
|
1847
|
+
const l = t[f], D = e[f];
|
|
1848
|
+
if (i = void 0, i === !1 || i === void 0 && l !== D)
|
|
1842
1849
|
return !1;
|
|
1843
1850
|
}
|
|
1844
1851
|
return !0;
|
|
@@ -1865,7 +1872,7 @@ function Nn(t) {
|
|
|
1865
1872
|
return xn(n), Pn(n, r ? (o) => t(o, r) : t);
|
|
1866
1873
|
};
|
|
1867
1874
|
}
|
|
1868
|
-
function
|
|
1875
|
+
function lt(t) {
|
|
1869
1876
|
const e = {};
|
|
1870
1877
|
return Object.keys(t).forEach((r) => {
|
|
1871
1878
|
const n = t[r];
|
|
@@ -1882,7 +1889,7 @@ function $e(t, e) {
|
|
|
1882
1889
|
}
|
|
1883
1890
|
function Pn(t, e) {
|
|
1884
1891
|
const r = t.ref;
|
|
1885
|
-
return
|
|
1892
|
+
return y(typeof r != "string", "Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"), r ? Me(t, {
|
|
1886
1893
|
ref: (n) => {
|
|
1887
1894
|
$e(r, n), $e(e, n);
|
|
1888
1895
|
}
|
|
@@ -1937,10 +1944,10 @@ class Mn {
|
|
|
1937
1944
|
return this.lastConnectedDragPreview !== this.dragPreview;
|
|
1938
1945
|
}
|
|
1939
1946
|
didDragSourceOptionsChange() {
|
|
1940
|
-
return !
|
|
1947
|
+
return !De(this.lastConnectedDragSourceOptions, this.dragSourceOptions);
|
|
1941
1948
|
}
|
|
1942
1949
|
didDragPreviewOptionsChange() {
|
|
1943
|
-
return !
|
|
1950
|
+
return !De(this.lastConnectedDragPreviewOptions, this.dragPreviewOptions);
|
|
1944
1951
|
}
|
|
1945
1952
|
disconnectDragSource() {
|
|
1946
1953
|
this.dragSourceUnsubscribe && (this.dragSourceUnsubscribe(), this.dragSourceUnsubscribe = void 0);
|
|
@@ -1961,7 +1968,7 @@ class Mn {
|
|
|
1961
1968
|
this.dragPreviewNode = null, this.dragPreviewRef = null;
|
|
1962
1969
|
}
|
|
1963
1970
|
constructor(e) {
|
|
1964
|
-
this.hooks =
|
|
1971
|
+
this.hooks = lt({
|
|
1965
1972
|
dragSource: (r, n) => {
|
|
1966
1973
|
this.clearDragSource(), this.dragSourceOptions = n || null, Se(r) ? this.dragSourceRef = r : this.dragSourceNode = r, this.reconnectDragSource();
|
|
1967
1974
|
},
|
|
@@ -2003,7 +2010,7 @@ class Rn {
|
|
|
2003
2010
|
return this.lastConnectedDropTarget !== this.dropTarget;
|
|
2004
2011
|
}
|
|
2005
2012
|
didOptionsChange() {
|
|
2006
|
-
return !
|
|
2013
|
+
return !De(this.lastConnectedDropTargetOptions, this.dropTargetOptions);
|
|
2007
2014
|
}
|
|
2008
2015
|
disconnectDropTarget() {
|
|
2009
2016
|
this.unsubscribeDropTarget && (this.unsubscribeDropTarget(), this.unsubscribeDropTarget = void 0);
|
|
@@ -2015,7 +2022,7 @@ class Rn {
|
|
|
2015
2022
|
this.dropTargetRef = null, this.dropTargetNode = null;
|
|
2016
2023
|
}
|
|
2017
2024
|
constructor(e) {
|
|
2018
|
-
this.hooks =
|
|
2025
|
+
this.hooks = lt({
|
|
2019
2026
|
dropTarget: (r, n) => {
|
|
2020
2027
|
this.clearDropTarget(), this.dropTargetOptions = n, Se(r) ? this.dropTargetRef = r : this.dropTargetNode = r, this.reconnect();
|
|
2021
2028
|
}
|
|
@@ -2023,8 +2030,8 @@ class Rn {
|
|
|
2023
2030
|
}
|
|
2024
2031
|
}
|
|
2025
2032
|
function X() {
|
|
2026
|
-
const { dragDropManager: t } = Mt(
|
|
2027
|
-
return
|
|
2033
|
+
const { dragDropManager: t } = Mt(et);
|
|
2034
|
+
return y(t != null, "Expected drag drop context"), t;
|
|
2028
2035
|
}
|
|
2029
2036
|
function _n(t, e) {
|
|
2030
2037
|
const r = X(), n = M(
|
|
@@ -2089,7 +2096,7 @@ function Fn(t, e, r) {
|
|
|
2089
2096
|
function kn(t) {
|
|
2090
2097
|
return M(() => {
|
|
2091
2098
|
const e = t.type;
|
|
2092
|
-
return
|
|
2099
|
+
return y(e != null, "spec.type must be defined"), e;
|
|
2093
2100
|
}, [
|
|
2094
2101
|
t
|
|
2095
2102
|
]);
|
|
@@ -2110,11 +2117,11 @@ function Yn(t, e, r) {
|
|
|
2110
2117
|
]);
|
|
2111
2118
|
}
|
|
2112
2119
|
function An(t, e) {
|
|
2113
|
-
const r =
|
|
2114
|
-
|
|
2120
|
+
const r = ut(t);
|
|
2121
|
+
y(!r.begin, "useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");
|
|
2115
2122
|
const n = Ln(), i = _n(r.options, r.previewOptions);
|
|
2116
2123
|
return Yn(r, n, i), [
|
|
2117
|
-
|
|
2124
|
+
ct(r.collect, n, i),
|
|
2118
2125
|
bn(i),
|
|
2119
2126
|
Tn(i)
|
|
2120
2127
|
];
|
|
@@ -2149,7 +2156,7 @@ function Un() {
|
|
|
2149
2156
|
}
|
|
2150
2157
|
function Vn(t) {
|
|
2151
2158
|
const { accept: e } = t;
|
|
2152
|
-
return M(() => (
|
|
2159
|
+
return M(() => (y(t.accept != null, "accept must be defined"), Array.isArray(e) ? e : [
|
|
2153
2160
|
e
|
|
2154
2161
|
]), [
|
|
2155
2162
|
e
|
|
@@ -2202,13 +2209,13 @@ function qn(t, e, r) {
|
|
|
2202
2209
|
]);
|
|
2203
2210
|
}
|
|
2204
2211
|
function Gn(t, e) {
|
|
2205
|
-
const r =
|
|
2212
|
+
const r = ut(t), n = Un(), i = Bn(r.options);
|
|
2206
2213
|
return qn(r, n, i), [
|
|
2207
|
-
|
|
2214
|
+
ct(r.collect, n, i),
|
|
2208
2215
|
Hn(i)
|
|
2209
2216
|
];
|
|
2210
2217
|
}
|
|
2211
|
-
function
|
|
2218
|
+
function dt(t) {
|
|
2212
2219
|
let e = null;
|
|
2213
2220
|
return () => (e == null && (e = t()), e);
|
|
2214
2221
|
}
|
|
@@ -2225,7 +2232,7 @@ function Wn(t, e) {
|
|
|
2225
2232
|
(o) => i.push(o)
|
|
2226
2233
|
), i;
|
|
2227
2234
|
}
|
|
2228
|
-
class
|
|
2235
|
+
class Kn {
|
|
2229
2236
|
enter(e) {
|
|
2230
2237
|
const r = this.entered.length, n = (i) => this.isNodeInDocument(i) && (!i.contains || i.contains(e));
|
|
2231
2238
|
return this.entered = Wn(this.entered.filter(n), [
|
|
@@ -2243,7 +2250,7 @@ class Zn {
|
|
|
2243
2250
|
this.entered = [], this.isNodeInDocument = e;
|
|
2244
2251
|
}
|
|
2245
2252
|
}
|
|
2246
|
-
class
|
|
2253
|
+
class Zn {
|
|
2247
2254
|
initializeExposedProperties() {
|
|
2248
2255
|
Object.keys(this.config.exposeProperties).forEach((e) => {
|
|
2249
2256
|
Object.defineProperty(this.item, e, {
|
|
@@ -2283,11 +2290,11 @@ class Jn {
|
|
|
2283
2290
|
this.config = e, this.item = {}, this.initializeExposedProperties();
|
|
2284
2291
|
}
|
|
2285
2292
|
}
|
|
2286
|
-
const
|
|
2293
|
+
const ft = "__NATIVE_FILE__", gt = "__NATIVE_URL__", ht = "__NATIVE_TEXT__", pt = "__NATIVE_HTML__", ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2287
2294
|
__proto__: null,
|
|
2288
|
-
FILE:
|
|
2289
|
-
HTML:
|
|
2290
|
-
TEXT:
|
|
2295
|
+
FILE: ft,
|
|
2296
|
+
HTML: pt,
|
|
2297
|
+
TEXT: ht,
|
|
2291
2298
|
URL: gt
|
|
2292
2299
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2293
2300
|
function he(t, e, r) {
|
|
@@ -2298,7 +2305,7 @@ function he(t, e, r) {
|
|
|
2298
2305
|
return n ?? r;
|
|
2299
2306
|
}
|
|
2300
2307
|
const Oe = {
|
|
2301
|
-
[
|
|
2308
|
+
[ft]: {
|
|
2302
2309
|
exposeProperties: {
|
|
2303
2310
|
files: (t) => Array.prototype.slice.call(t.files),
|
|
2304
2311
|
items: (t) => t.items,
|
|
@@ -2308,7 +2315,7 @@ const Oe = {
|
|
|
2308
2315
|
"Files"
|
|
2309
2316
|
]
|
|
2310
2317
|
},
|
|
2311
|
-
[
|
|
2318
|
+
[pt]: {
|
|
2312
2319
|
exposeProperties: {
|
|
2313
2320
|
html: (t, e) => he(t, e, ""),
|
|
2314
2321
|
dataTransfer: (t) => t
|
|
@@ -2329,7 +2336,7 @@ const Oe = {
|
|
|
2329
2336
|
"text/uri-list"
|
|
2330
2337
|
]
|
|
2331
2338
|
},
|
|
2332
|
-
[
|
|
2339
|
+
[ht]: {
|
|
2333
2340
|
exposeProperties: {
|
|
2334
2341
|
text: (t, e) => he(t, e, ""),
|
|
2335
2342
|
dataTransfer: (t) => t
|
|
@@ -2340,11 +2347,11 @@ const Oe = {
|
|
|
2340
2347
|
]
|
|
2341
2348
|
}
|
|
2342
2349
|
};
|
|
2343
|
-
function
|
|
2350
|
+
function Jn(t, e) {
|
|
2344
2351
|
const r = Oe[t];
|
|
2345
2352
|
if (!r)
|
|
2346
2353
|
throw new Error(`native type ${t} has no configuration`);
|
|
2347
|
-
const n = new
|
|
2354
|
+
const n = new Zn(r);
|
|
2348
2355
|
return n.loadDataTransfer(e), n;
|
|
2349
2356
|
}
|
|
2350
2357
|
function pe(t) {
|
|
@@ -2358,9 +2365,9 @@ function pe(t) {
|
|
|
2358
2365
|
) : !1;
|
|
2359
2366
|
})[0] || null;
|
|
2360
2367
|
}
|
|
2361
|
-
const
|
|
2368
|
+
const Qn = dt(
|
|
2362
2369
|
() => /firefox/i.test(navigator.userAgent)
|
|
2363
|
-
),
|
|
2370
|
+
), mt = dt(
|
|
2364
2371
|
() => !!window.safari
|
|
2365
2372
|
);
|
|
2366
2373
|
class qe {
|
|
@@ -2369,58 +2376,58 @@ class qe {
|
|
|
2369
2376
|
let a = r.length - 1;
|
|
2370
2377
|
if (e === r[a])
|
|
2371
2378
|
return n[a];
|
|
2372
|
-
let u = 0,
|
|
2373
|
-
for (; u <=
|
|
2374
|
-
l = Math.floor(0.5 * (u +
|
|
2375
|
-
const
|
|
2376
|
-
if (
|
|
2379
|
+
let u = 0, f = s.length - 1, l;
|
|
2380
|
+
for (; u <= f; ) {
|
|
2381
|
+
l = Math.floor(0.5 * (u + f));
|
|
2382
|
+
const g = r[l];
|
|
2383
|
+
if (g < e)
|
|
2377
2384
|
u = l + 1;
|
|
2378
|
-
else if (
|
|
2379
|
-
|
|
2385
|
+
else if (g > e)
|
|
2386
|
+
f = l - 1;
|
|
2380
2387
|
else
|
|
2381
2388
|
return n[l];
|
|
2382
2389
|
}
|
|
2383
|
-
a = Math.max(0,
|
|
2384
|
-
const
|
|
2385
|
-
return n[a] + i[a] *
|
|
2390
|
+
a = Math.max(0, f);
|
|
2391
|
+
const D = e - r[a], v = D * D;
|
|
2392
|
+
return n[a] + i[a] * D + o[a] * v + s[a] * D * v;
|
|
2386
2393
|
}
|
|
2387
2394
|
constructor(e, r) {
|
|
2388
2395
|
const { length: n } = e, i = [];
|
|
2389
|
-
for (let
|
|
2390
|
-
i.push(
|
|
2396
|
+
for (let g = 0; g < n; g++)
|
|
2397
|
+
i.push(g);
|
|
2391
2398
|
i.sort(
|
|
2392
|
-
(
|
|
2399
|
+
(g, p) => e[g] < e[p] ? -1 : 1
|
|
2393
2400
|
);
|
|
2394
2401
|
const o = [], s = [];
|
|
2395
2402
|
let a, u;
|
|
2396
|
-
for (let
|
|
2397
|
-
a = e[
|
|
2398
|
-
const
|
|
2403
|
+
for (let g = 0; g < n - 1; g++)
|
|
2404
|
+
a = e[g + 1] - e[g], u = r[g + 1] - r[g], o.push(a), s.push(u / a);
|
|
2405
|
+
const f = [
|
|
2399
2406
|
s[0]
|
|
2400
2407
|
];
|
|
2401
|
-
for (let
|
|
2402
|
-
const p = s[
|
|
2408
|
+
for (let g = 0; g < o.length - 1; g++) {
|
|
2409
|
+
const p = s[g], h = s[g + 1];
|
|
2403
2410
|
if (p * h <= 0)
|
|
2404
|
-
|
|
2411
|
+
f.push(0);
|
|
2405
2412
|
else {
|
|
2406
|
-
a = o[
|
|
2407
|
-
const O = o[
|
|
2408
|
-
|
|
2413
|
+
a = o[g];
|
|
2414
|
+
const O = o[g + 1], m = a + O;
|
|
2415
|
+
f.push(3 * m / ((m + O) / p + (m + a) / h));
|
|
2409
2416
|
}
|
|
2410
2417
|
}
|
|
2411
|
-
|
|
2412
|
-
const l = [],
|
|
2418
|
+
f.push(s[s.length - 1]);
|
|
2419
|
+
const l = [], D = [];
|
|
2413
2420
|
let v;
|
|
2414
|
-
for (let
|
|
2415
|
-
v = s[
|
|
2416
|
-
const p = g
|
|
2417
|
-
l.push((v - p - O) * h),
|
|
2421
|
+
for (let g = 0; g < f.length - 1; g++) {
|
|
2422
|
+
v = s[g];
|
|
2423
|
+
const p = f[g], h = 1 / o[g], O = p + f[g + 1] - v - v;
|
|
2424
|
+
l.push((v - p - O) * h), D.push(O * h * h);
|
|
2418
2425
|
}
|
|
2419
|
-
this.xs = e, this.ys = r, this.c1s =
|
|
2426
|
+
this.xs = e, this.ys = r, this.c1s = f, this.c2s = l, this.c3s = D;
|
|
2420
2427
|
}
|
|
2421
2428
|
}
|
|
2422
2429
|
const ei = 1;
|
|
2423
|
-
function
|
|
2430
|
+
function vt(t) {
|
|
2424
2431
|
const e = t.nodeType === ei ? t : t.parentElement;
|
|
2425
2432
|
if (!e)
|
|
2426
2433
|
return null;
|
|
@@ -2430,7 +2437,7 @@ function mt(t) {
|
|
|
2430
2437
|
y: r
|
|
2431
2438
|
};
|
|
2432
2439
|
}
|
|
2433
|
-
function
|
|
2440
|
+
function J(t) {
|
|
2434
2441
|
return {
|
|
2435
2442
|
x: t.clientX,
|
|
2436
2443
|
y: t.clientY
|
|
@@ -2438,20 +2445,20 @@ function Q(t) {
|
|
|
2438
2445
|
}
|
|
2439
2446
|
function ti(t) {
|
|
2440
2447
|
var e;
|
|
2441
|
-
return t.nodeName === "IMG" && (
|
|
2448
|
+
return t.nodeName === "IMG" && (Qn() || !(!((e = document.documentElement) === null || e === void 0) && e.contains(t)));
|
|
2442
2449
|
}
|
|
2443
2450
|
function ri(t, e, r, n) {
|
|
2444
2451
|
let i = t ? e.width : r, o = t ? e.height : n;
|
|
2445
|
-
return
|
|
2452
|
+
return mt() && t && (o /= window.devicePixelRatio, i /= window.devicePixelRatio), {
|
|
2446
2453
|
dragPreviewWidth: i,
|
|
2447
2454
|
dragPreviewHeight: o
|
|
2448
2455
|
};
|
|
2449
2456
|
}
|
|
2450
2457
|
function ni(t, e, r, n, i) {
|
|
2451
|
-
const o = ti(e), a =
|
|
2458
|
+
const o = ti(e), a = vt(o ? t : e), u = {
|
|
2452
2459
|
x: r.x - a.x,
|
|
2453
2460
|
y: r.y - a.y
|
|
2454
|
-
}, { offsetWidth:
|
|
2461
|
+
}, { offsetWidth: f, offsetHeight: l } = t, { anchorX: D, anchorY: v } = n, { dragPreviewWidth: g, dragPreviewHeight: p } = ri(o, e, f, l), h = () => {
|
|
2455
2462
|
let N = new qe([
|
|
2456
2463
|
0,
|
|
2457
2464
|
0.5,
|
|
@@ -2464,7 +2471,7 @@ function ni(t, e, r, n, i) {
|
|
|
2464
2471
|
// Dock to the bottom
|
|
2465
2472
|
u.y + p - l
|
|
2466
2473
|
]).interpolate(v);
|
|
2467
|
-
return
|
|
2474
|
+
return mt() && o && (N += (window.devicePixelRatio - 1) * p), N;
|
|
2468
2475
|
}, O = () => new qe([
|
|
2469
2476
|
0,
|
|
2470
2477
|
0.5,
|
|
@@ -2473,10 +2480,10 @@ function ni(t, e, r, n, i) {
|
|
|
2473
2480
|
// Dock to the left
|
|
2474
2481
|
u.x,
|
|
2475
2482
|
// Align at the center
|
|
2476
|
-
u.x /
|
|
2483
|
+
u.x / f * g,
|
|
2477
2484
|
// Dock to the right
|
|
2478
|
-
u.x +
|
|
2479
|
-
]).interpolate(
|
|
2485
|
+
u.x + g - f
|
|
2486
|
+
]).interpolate(D), { offsetX: m, offsetY: d } = i, S = m === 0 || m, b = d === 0 || d;
|
|
2480
2487
|
return {
|
|
2481
2488
|
x: S ? m : O(),
|
|
2482
2489
|
y: b ? d : h()
|
|
@@ -2613,7 +2620,7 @@ class si {
|
|
|
2613
2620
|
);
|
|
2614
2621
|
}
|
|
2615
2622
|
beginDragNativeItem(e, r) {
|
|
2616
|
-
this.clearCurrentDragSourceNode(), this.currentNativeSource =
|
|
2623
|
+
this.clearCurrentDragSourceNode(), this.currentNativeSource = Jn(e, r), this.currentNativeHandle = this.registry.addSource(e, this.currentNativeSource), this.actions.beginDrag([
|
|
2617
2624
|
this.currentNativeHandle
|
|
2618
2625
|
]);
|
|
2619
2626
|
}
|
|
@@ -2650,7 +2657,7 @@ class si {
|
|
|
2650
2657
|
constructor(e, r, n) {
|
|
2651
2658
|
this.sourcePreviewNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodeOptions = /* @__PURE__ */ new Map(), this.sourceNodes = /* @__PURE__ */ new Map(), this.sourceNodeOptions = /* @__PURE__ */ new Map(), this.dragStartSourceIds = null, this.dropTargetIds = [], this.dragEnterTargetIds = [], this.currentNativeSource = null, this.currentNativeHandle = null, this.currentDragSourceNode = null, this.altKeyPressed = !1, this.mouseMoveTimeoutTimer = null, this.asyncEndDragFrameId = null, this.dragOverTargetIds = null, this.lastClientOffset = null, this.hoverRafId = null, this.getSourceClientOffset = (i) => {
|
|
2652
2659
|
const o = this.sourceNodes.get(i);
|
|
2653
|
-
return o &&
|
|
2660
|
+
return o && vt(o) || null;
|
|
2654
2661
|
}, this.endDragNativeItem = () => {
|
|
2655
2662
|
this.isDraggingNativeItem() && (this.actions.endDrag(), this.currentNativeHandle && this.registry.removeSource(this.currentNativeHandle), this.currentNativeHandle = null, this.currentNativeSource = null);
|
|
2656
2663
|
}, this.isNodeInDocument = (i) => !!(i && this.document && this.document.body && this.document.body.contains(i)), this.endDragIfSourceWasRemovedFromDOM = () => {
|
|
@@ -2671,7 +2678,7 @@ class si {
|
|
|
2671
2678
|
return;
|
|
2672
2679
|
const { dragStartSourceIds: o } = this;
|
|
2673
2680
|
this.dragStartSourceIds = null;
|
|
2674
|
-
const s =
|
|
2681
|
+
const s = J(i);
|
|
2675
2682
|
this.monitor.isDragging() && (this.actions.endDrag(), this.cancelHover()), this.actions.beginDrag(o || [], {
|
|
2676
2683
|
publishSource: !1,
|
|
2677
2684
|
getSourceClientOffset: this.getSourceClientOffset,
|
|
@@ -2680,10 +2687,10 @@ class si {
|
|
|
2680
2687
|
const { dataTransfer: a } = i, u = pe(a);
|
|
2681
2688
|
if (this.monitor.isDragging()) {
|
|
2682
2689
|
if (a && typeof a.setDragImage == "function") {
|
|
2683
|
-
const l = this.monitor.getSourceId(),
|
|
2690
|
+
const l = this.monitor.getSourceId(), D = this.sourceNodes.get(l), v = this.sourcePreviewNodes.get(l) || D;
|
|
2684
2691
|
if (v) {
|
|
2685
|
-
const { anchorX:
|
|
2686
|
-
anchorX:
|
|
2692
|
+
const { anchorX: g, anchorY: p, offsetX: h, offsetY: O } = this.getCurrentSourcePreviewNodeOptions(), S = ni(D, v, s, {
|
|
2693
|
+
anchorX: g,
|
|
2687
2694
|
anchorY: p
|
|
2688
2695
|
}, {
|
|
2689
2696
|
offsetX: h,
|
|
@@ -2697,8 +2704,8 @@ class si {
|
|
|
2697
2704
|
} catch {
|
|
2698
2705
|
}
|
|
2699
2706
|
this.setCurrentDragSourceNode(i.target);
|
|
2700
|
-
const { captureDraggingState:
|
|
2701
|
-
|
|
2707
|
+
const { captureDraggingState: f } = this.getCurrentSourcePreviewNodeOptions();
|
|
2708
|
+
f ? this.actions.publishDragSource() : setTimeout(
|
|
2702
2709
|
() => this.actions.publishDragSource(),
|
|
2703
2710
|
0
|
|
2704
2711
|
);
|
|
@@ -2725,7 +2732,7 @@ class si {
|
|
|
2725
2732
|
if (this.dragEnterTargetIds = [], !this.monitor.isDragging())
|
|
2726
2733
|
return;
|
|
2727
2734
|
this.altKeyPressed = i.altKey, o.length > 0 && this.actions.hover(o, {
|
|
2728
|
-
clientOffset:
|
|
2735
|
+
clientOffset: J(i)
|
|
2729
2736
|
}), o.some(
|
|
2730
2737
|
(a) => this.monitor.canDropOnTarget(a)
|
|
2731
2738
|
) && (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect()));
|
|
@@ -2740,7 +2747,7 @@ class si {
|
|
|
2740
2747
|
i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none");
|
|
2741
2748
|
return;
|
|
2742
2749
|
}
|
|
2743
|
-
this.altKeyPressed = i.altKey, this.lastClientOffset =
|
|
2750
|
+
this.altKeyPressed = i.altKey, this.lastClientOffset = J(i), this.scheduleHover(o), (o || []).some(
|
|
2744
2751
|
(a) => this.monitor.canDropOnTarget(a)
|
|
2745
2752
|
) ? (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect())) : this.isDraggingNativeItem() ? i.preventDefault() : (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none"));
|
|
2746
2753
|
}, this.handleTopDragLeaveCapture = (i) => {
|
|
@@ -2757,14 +2764,14 @@ class si {
|
|
|
2757
2764
|
}, this.handleTopDrop = (i) => {
|
|
2758
2765
|
const { dropTargetIds: o } = this;
|
|
2759
2766
|
this.dropTargetIds = [], this.actions.hover(o, {
|
|
2760
|
-
clientOffset:
|
|
2767
|
+
clientOffset: J(i)
|
|
2761
2768
|
}), this.actions.drop({
|
|
2762
2769
|
dropEffect: this.getCurrentDropEffect()
|
|
2763
2770
|
}), this.isDraggingNativeItem() ? this.endDragNativeItem() : this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
|
|
2764
2771
|
}, this.handleSelectStart = (i) => {
|
|
2765
2772
|
const o = i.target;
|
|
2766
2773
|
typeof o.dragDrop == "function" && (o.tagName === "INPUT" || o.tagName === "SELECT" || o.tagName === "TEXTAREA" || o.isContentEditable || (i.preventDefault(), o.dragDrop()));
|
|
2767
|
-
}, this.options = new ii(r, n), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.registry = e.getRegistry(), this.enterLeaveCounter = new
|
|
2774
|
+
}, this.options = new ii(r, n), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.registry = e.getRegistry(), this.enterLeaveCounter = new Kn(this.isNodeInDocument);
|
|
2768
2775
|
}
|
|
2769
2776
|
}
|
|
2770
2777
|
const ai = function(e, r, n) {
|
|
@@ -2798,37 +2805,38 @@ const ai = function(e, r, n) {
|
|
|
2798
2805
|
}) => {
|
|
2799
2806
|
const o = re(null), [{ handlerId: s }, a] = Gn({
|
|
2800
2807
|
accept: Xe.FILE,
|
|
2801
|
-
collect(
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
},
|
|
2806
|
-
hover(y, v) {
|
|
2808
|
+
collect: (D) => ({
|
|
2809
|
+
handlerId: D.getHandlerId()
|
|
2810
|
+
}),
|
|
2811
|
+
hover(D, v) {
|
|
2807
2812
|
if (!o.current)
|
|
2808
2813
|
return;
|
|
2809
|
-
const
|
|
2810
|
-
if (
|
|
2814
|
+
const g = D.uid, p = e.uid;
|
|
2815
|
+
if (g === p)
|
|
2811
2816
|
return;
|
|
2812
|
-
const h = W(r, { uid: p }), O = W(r, { uid:
|
|
2817
|
+
const h = W(r, { uid: p }), O = W(r, { uid: g });
|
|
2813
2818
|
if (O === -1 || h === -1)
|
|
2814
2819
|
return;
|
|
2815
|
-
const m = o.current
|
|
2816
|
-
|
|
2820
|
+
const m = o.current.getBoundingClientRect(), d = v.getClientOffset();
|
|
2821
|
+
if (!d)
|
|
2822
|
+
return;
|
|
2823
|
+
const S = (m.bottom - m.top) / 2, b = d.y - m.top;
|
|
2824
|
+
O < h && b < S || O > h && b > S || n(g, p);
|
|
2817
2825
|
},
|
|
2818
2826
|
drop() {
|
|
2819
2827
|
i();
|
|
2820
2828
|
}
|
|
2821
|
-
}), [{ isDragging: u },
|
|
2829
|
+
}), [{ isDragging: u }, f] = An({
|
|
2822
2830
|
type: Xe.FILE,
|
|
2823
2831
|
item: () => ({
|
|
2824
2832
|
uid: e.uid,
|
|
2825
2833
|
index: W(r, { uid: e.uid })
|
|
2826
2834
|
}),
|
|
2827
|
-
collect: (
|
|
2828
|
-
isDragging:
|
|
2835
|
+
collect: (D) => ({
|
|
2836
|
+
isDragging: D.isDragging()
|
|
2829
2837
|
})
|
|
2830
2838
|
}), l = u ? 0 : 1;
|
|
2831
|
-
return
|
|
2839
|
+
return f(a(o)), /* @__PURE__ */ c.jsx("div", { ref: o, style: { opacity: l }, "data-handler-id": s, children: t });
|
|
2832
2840
|
}, Yi = ({
|
|
2833
2841
|
fileGrpKey: t,
|
|
2834
2842
|
onUploadComplete: e,
|
|
@@ -2839,10 +2847,10 @@ const ai = function(e, r, n) {
|
|
|
2839
2847
|
allowedExtensions: s = ci,
|
|
2840
2848
|
maxFileSize: a = 200
|
|
2841
2849
|
}) => {
|
|
2842
|
-
const [u,
|
|
2850
|
+
const [u, f] = F([]);
|
|
2843
2851
|
Y(() => {
|
|
2844
2852
|
t && r && z(r, {
|
|
2845
|
-
crprCd: $()
|
|
2853
|
+
crprCd: $()?.crprCd,
|
|
2846
2854
|
sysCd: __SYS_CD__,
|
|
2847
2855
|
fileGrpKey: t
|
|
2848
2856
|
}).then((p) => {
|
|
@@ -2853,7 +2861,7 @@ const ai = function(e, r, n) {
|
|
|
2853
2861
|
status: "done",
|
|
2854
2862
|
url: `/api/download?filePath=${O.filePath}&logicalName=${O.lgclFileNm}`
|
|
2855
2863
|
}));
|
|
2856
|
-
|
|
2864
|
+
f(h);
|
|
2857
2865
|
}
|
|
2858
2866
|
}).catch((p) => {
|
|
2859
2867
|
console.error("파일 목록 조회 서비스 호출에 실패했습니다.", p), C.error("파일 목록을 불러오는 중 오류가 발생했습니다.");
|
|
@@ -2863,12 +2871,12 @@ const ai = function(e, r, n) {
|
|
|
2863
2871
|
const O = W(u, { uid: p }), m = W(u, { uid: h });
|
|
2864
2872
|
if (O < 0 || m < 0) return;
|
|
2865
2873
|
const d = [...u], [S] = d.splice(O, 1);
|
|
2866
|
-
d.splice(m, 0, S),
|
|
2867
|
-
},
|
|
2874
|
+
d.splice(m, 0, S), f(d);
|
|
2875
|
+
}, D = () => {
|
|
2868
2876
|
if (t && o) {
|
|
2869
2877
|
const p = u.map((h) => h.uid);
|
|
2870
2878
|
z(o, {
|
|
2871
|
-
crprCd: $()
|
|
2879
|
+
crprCd: $()?.crprCd,
|
|
2872
2880
|
sysCd: __SYS_CD__,
|
|
2873
2881
|
fileGrpKey: t,
|
|
2874
2882
|
reorderedFileKeys: p
|
|
@@ -2878,7 +2886,7 @@ const ai = function(e, r, n) {
|
|
|
2878
2886
|
console.error("파일 순서 저장 서비스 호출 실패:", h), C.error("파일 순서 저장 중 오류가 발생했습니다.");
|
|
2879
2887
|
});
|
|
2880
2888
|
}
|
|
2881
|
-
},
|
|
2889
|
+
}, g = {
|
|
2882
2890
|
name: "file",
|
|
2883
2891
|
multiple: !0,
|
|
2884
2892
|
action: "/api/upload",
|
|
@@ -2899,15 +2907,15 @@ const ai = function(e, r, n) {
|
|
|
2899
2907
|
const { status: h, uid: O } = p.file;
|
|
2900
2908
|
if (h === "removed") {
|
|
2901
2909
|
i ? z(i, {
|
|
2902
|
-
crprCd: $()
|
|
2910
|
+
crprCd: $()?.crprCd,
|
|
2903
2911
|
sysCd: __SYS_CD__,
|
|
2904
2912
|
fileGrpKey: t,
|
|
2905
2913
|
fileKey: O
|
|
2906
2914
|
}).then(() => {
|
|
2907
|
-
C.success("파일이 성공적으로 삭제되었습니다."),
|
|
2915
|
+
C.success("파일이 성공적으로 삭제되었습니다."), f(p.fileList);
|
|
2908
2916
|
}).catch((d) => {
|
|
2909
2917
|
console.error("파일 삭제 서비스 호출에 실패했습니다.", d), C.error("파일 삭제 중 오류가 발생했습니다.");
|
|
2910
|
-
}) :
|
|
2918
|
+
}) : f(p.fileList);
|
|
2911
2919
|
return;
|
|
2912
2920
|
}
|
|
2913
2921
|
let m = [...p.fileList];
|
|
@@ -2916,12 +2924,12 @@ const ai = function(e, r, n) {
|
|
|
2916
2924
|
const { uploadedFiles: d } = p.file.response;
|
|
2917
2925
|
d && Array.isArray(d) && d.length > 0 && d.forEach((S) => {
|
|
2918
2926
|
n ? z(n, {
|
|
2919
|
-
crprCd: $()
|
|
2927
|
+
crprCd: $()?.crprCd,
|
|
2920
2928
|
sysCd: __SYS_CD__,
|
|
2921
2929
|
fileGrpKey: t,
|
|
2922
2930
|
sub: [
|
|
2923
2931
|
{
|
|
2924
|
-
crprCd: $()
|
|
2932
|
+
crprCd: $()?.crprCd,
|
|
2925
2933
|
sysCd: __SYS_CD__,
|
|
2926
2934
|
fileGrpKey: t,
|
|
2927
2935
|
physFileNm: S.fileNameP,
|
|
@@ -2933,13 +2941,19 @@ const ai = function(e, r, n) {
|
|
|
2933
2941
|
}
|
|
2934
2942
|
]
|
|
2935
2943
|
}).then((b) => {
|
|
2936
|
-
b?.sub && b.sub.length > 0 &&
|
|
2937
|
-
(x) => x.map((N) =>
|
|
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 ? {
|
|
2938
2950
|
...N,
|
|
2951
|
+
fileGrpKey: b.sub[0].fileGrpKey,
|
|
2952
|
+
fileKey: b.sub[0].fileKey,
|
|
2939
2953
|
uid: b.sub[0].fileKey,
|
|
2940
2954
|
status: "done",
|
|
2941
2955
|
url: `/api/download?filePath=${S.filePath}&logicalName=${S.fileNameL}`
|
|
2942
|
-
} : N)
|
|
2956
|
+
} : N))
|
|
2943
2957
|
);
|
|
2944
2958
|
}).catch((b) => {
|
|
2945
2959
|
console.error("업로드 후처리 서비스 호출 실패:", b), C.error("파일 후처리 중 오류가 발생했습니다.");
|
|
@@ -2948,7 +2962,7 @@ const ai = function(e, r, n) {
|
|
|
2948
2962
|
uid: S.fileNameP,
|
|
2949
2963
|
status: "done",
|
|
2950
2964
|
url: `/api/download?filePath=${S.filePath}&logicalName=${S.fileNameL}`
|
|
2951
|
-
} : b)
|
|
2965
|
+
} : b);
|
|
2952
2966
|
}), C.success(
|
|
2953
2967
|
p.file.response.message || `${p.file.name} 파일이 성공적으로 업로드되었습니다.`
|
|
2954
2968
|
);
|
|
@@ -2959,7 +2973,7 @@ const ai = function(e, r, n) {
|
|
|
2959
2973
|
else h === "error" && C.error(
|
|
2960
2974
|
p.file.response?.message || `${p.file.name} 파일 업로드 중 오류가 발생했습니다.`
|
|
2961
2975
|
);
|
|
2962
|
-
|
|
2976
|
+
f(m);
|
|
2963
2977
|
},
|
|
2964
2978
|
itemRender(p, h, O) {
|
|
2965
2979
|
const m = Ze.cloneElement(p, {
|
|
@@ -2973,14 +2987,14 @@ const ai = function(e, r, n) {
|
|
|
2973
2987
|
file: h,
|
|
2974
2988
|
fileList: O,
|
|
2975
2989
|
moveFile: l,
|
|
2976
|
-
onDrop:
|
|
2990
|
+
onDrop: D
|
|
2977
2991
|
},
|
|
2978
2992
|
h.uid
|
|
2979
2993
|
);
|
|
2980
2994
|
}
|
|
2981
2995
|
};
|
|
2982
|
-
return /* @__PURE__ */ c.jsx(hn, { backend: ai, children: /* @__PURE__ */ c.jsx(H, { ...
|
|
2983
|
-
}, { Text:
|
|
2996
|
+
return /* @__PURE__ */ c.jsx(hn, { backend: ai, children: /* @__PURE__ */ c.jsx(H, { ...g, listType: "picture", children: /* @__PURE__ */ c.jsx(q, { icon: /* @__PURE__ */ c.jsx(Je, {}), children: "파일 선택" }) }) });
|
|
2997
|
+
}, { Text: Q, Link: Ai } = Ke, { Dragger: li } = H, di = [
|
|
2984
2998
|
".pdf",
|
|
2985
2999
|
".xlsx",
|
|
2986
3000
|
".xls",
|
|
@@ -2998,7 +3012,7 @@ const ai = function(e, r, n) {
|
|
|
2998
3012
|
".gif",
|
|
2999
3013
|
// 압축
|
|
3000
3014
|
".zip"
|
|
3001
|
-
],
|
|
3015
|
+
], fi = (t, e = 2) => {
|
|
3002
3016
|
if (t === 0) return "0 Bytes";
|
|
3003
3017
|
const r = 1024, n = e < 0 ? 0 : e, i = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(t) / Math.log(r));
|
|
3004
3018
|
return parseFloat((t / Math.pow(r, o)).toFixed(n)) + " " + i[o];
|
|
@@ -3013,7 +3027,7 @@ const ai = function(e, r, n) {
|
|
|
3013
3027
|
maxFileSize: s = 2048
|
|
3014
3028
|
// 기본값 2GB
|
|
3015
3029
|
}) => {
|
|
3016
|
-
const [a, u] = F([]), [
|
|
3030
|
+
const [a, u] = F([]), [f, l] = F(!1), [D, v] = F(!1), [g, p] = F(0), h = (d) => {
|
|
3017
3031
|
if (o && o.length > 0) {
|
|
3018
3032
|
const b = ((x) => {
|
|
3019
3033
|
const N = x.lastIndexOf(".");
|
|
@@ -3125,15 +3139,15 @@ const ai = function(e, r, n) {
|
|
|
3125
3139
|
]
|
|
3126
3140
|
};
|
|
3127
3141
|
z(n, _).then((E) => {
|
|
3128
|
-
const ce = a.map((
|
|
3142
|
+
const ce = a.map((Z) => ({
|
|
3129
3143
|
crprCd: R.crprCd,
|
|
3130
3144
|
sysCd: __SYS_CD__,
|
|
3131
3145
|
fileGrpKey: E.sub[0].fileGrpKey,
|
|
3132
3146
|
fileKey: E.sub[0].fileKey,
|
|
3133
|
-
lgclFileNm:
|
|
3134
|
-
fileSize:
|
|
3135
|
-
fileExtn:
|
|
3136
|
-
fileType:
|
|
3147
|
+
lgclFileNm: Z.name,
|
|
3148
|
+
fileSize: Z.size,
|
|
3149
|
+
fileExtn: Z.name.split(".").pop(),
|
|
3150
|
+
fileType: Z.type
|
|
3137
3151
|
}));
|
|
3138
3152
|
z(i, {
|
|
3139
3153
|
// 파일 목록에 fileKey를 추가합니다.
|
|
@@ -3186,13 +3200,13 @@ const ai = function(e, r, n) {
|
|
|
3186
3200
|
return /* @__PURE__ */ c.jsx(
|
|
3187
3201
|
St,
|
|
3188
3202
|
{
|
|
3189
|
-
spinning:
|
|
3190
|
-
tip:
|
|
3203
|
+
spinning: f || D,
|
|
3204
|
+
tip: D ? "파일 압축 중..." : `파일 업로드 중... ${g}%`,
|
|
3191
3205
|
children: /* @__PURE__ */ c.jsxs("div", { className: "bwg-large-uploader-container", children: [
|
|
3192
3206
|
/* @__PURE__ */ c.jsx(
|
|
3193
3207
|
Ot,
|
|
3194
3208
|
{
|
|
3195
|
-
title: /* @__PURE__ */ c.jsx(
|
|
3209
|
+
title: /* @__PURE__ */ c.jsx(Q, { strong: !0, children: t }),
|
|
3196
3210
|
extra: /* @__PURE__ */ c.jsx(H, { ...m, children: /* @__PURE__ */ c.jsx(q, { icon: /* @__PURE__ */ c.jsx(Je, {}), children: "파일 선택" }) }),
|
|
3197
3211
|
bodyStyle: { padding: 0 },
|
|
3198
3212
|
children: /* @__PURE__ */ c.jsx(
|
|
@@ -3232,7 +3246,7 @@ const ai = function(e, r, n) {
|
|
|
3232
3246
|
ue.Item,
|
|
3233
3247
|
{
|
|
3234
3248
|
actions: [
|
|
3235
|
-
/* @__PURE__ */ c.jsx(
|
|
3249
|
+
/* @__PURE__ */ c.jsx(Q, { type: "secondary", children: fi(d.size || 0) }, "size"),
|
|
3236
3250
|
/* @__PURE__ */ c.jsx(
|
|
3237
3251
|
q,
|
|
3238
3252
|
{
|
|
@@ -3241,7 +3255,7 @@ const ai = function(e, r, n) {
|
|
|
3241
3255
|
onClick: (N) => {
|
|
3242
3256
|
N.stopPropagation(), m.onRemove?.(d);
|
|
3243
3257
|
},
|
|
3244
|
-
disabled:
|
|
3258
|
+
disabled: f || D
|
|
3245
3259
|
},
|
|
3246
3260
|
"delete"
|
|
3247
3261
|
)
|
|
@@ -3250,7 +3264,7 @@ const ai = function(e, r, n) {
|
|
|
3250
3264
|
ue.Item.Meta,
|
|
3251
3265
|
{
|
|
3252
3266
|
avatar: x,
|
|
3253
|
-
title: /* @__PURE__ */ c.jsx(
|
|
3267
|
+
title: /* @__PURE__ */ c.jsx(Q, { type: b ? "danger" : void 0, children: d.name })
|
|
3254
3268
|
}
|
|
3255
3269
|
)
|
|
3256
3270
|
},
|
|
@@ -3268,7 +3282,7 @@ const ai = function(e, r, n) {
|
|
|
3268
3282
|
style: { padding: "20px 0", minHeight: "120px" },
|
|
3269
3283
|
children: [
|
|
3270
3284
|
/* @__PURE__ */ c.jsx(Ft, { style: { fontSize: "32px", color: "#999" } }),
|
|
3271
|
-
/* @__PURE__ */ c.jsx(
|
|
3285
|
+
/* @__PURE__ */ c.jsx(Q, { type: "secondary", children: "업로드할 파일을 선택하거나 이 영역으로 드래그하세요." })
|
|
3272
3286
|
]
|
|
3273
3287
|
}
|
|
3274
3288
|
) })
|
|
@@ -3284,13 +3298,13 @@ const ai = function(e, r, n) {
|
|
|
3284
3298
|
gap: "large",
|
|
3285
3299
|
style: { marginTop: 16 },
|
|
3286
3300
|
children: [
|
|
3287
|
-
|
|
3301
|
+
f && /* @__PURE__ */ c.jsx("div", { style: { width: "250px" }, children: /* @__PURE__ */ c.jsx(Tt, { percent: g, size: "small" }) }),
|
|
3288
3302
|
/* @__PURE__ */ c.jsx(
|
|
3289
3303
|
q,
|
|
3290
3304
|
{
|
|
3291
3305
|
type: "primary",
|
|
3292
3306
|
onClick: O,
|
|
3293
|
-
disabled:
|
|
3307
|
+
disabled: f || D || a.filter((d) => d.status !== "done").length === 0,
|
|
3294
3308
|
icon: /* @__PURE__ */ c.jsx(kt, {}),
|
|
3295
3309
|
children: "일괄 업로드"
|
|
3296
3310
|
}
|
|
@@ -3322,4 +3336,4 @@ export {
|
|
|
3322
3336
|
Yi as p,
|
|
3323
3337
|
Hi as q
|
|
3324
3338
|
};
|
|
3325
|
-
//# sourceMappingURL=BwgLargeUploader-
|
|
3339
|
+
//# sourceMappingURL=BwgLargeUploader-DsaIHpYz.js.map
|