impact-nova 1.7.20 → 1.7.22
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/components/ui/create-item-flow/create-item-flow.js +2 -2
- package/dist/components/ui/header.d.ts +6 -1
- package/dist/components/ui/header.js +59 -41
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +93 -95
- package/dist/components/ui/nested-list/nested-list.js +204 -190
- package/dist/components/ui/report-card/index.d.ts +1 -1
- package/dist/components/ui/report-card/index.js +6 -4
- package/dist/components/ui/report-card/report-card.d.ts +8 -5
- package/dist/components/ui/report-card/report-card.js +96 -55
- package/dist/icons/assets/Product.svg.js +5 -0
- package/dist/icons/assets/report_1.svg.js +5 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +178 -174
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +329 -326
- package/package.json +1 -1
|
@@ -220,7 +220,7 @@ const K = n.forwardRef(
|
|
|
220
220
|
"div",
|
|
221
221
|
{
|
|
222
222
|
ref: c,
|
|
223
|
-
className: r("flex items-center justify-between mt-auto shrink-0 pb-[27px]", t),
|
|
223
|
+
className: r("flex items-center justify-between mt-auto shrink-0 pt-6 pb-[27px]", t),
|
|
224
224
|
"data-slot": "actions",
|
|
225
225
|
...m,
|
|
226
226
|
children: e
|
|
@@ -229,7 +229,7 @@ const K = n.forwardRef(
|
|
|
229
229
|
"div",
|
|
230
230
|
{
|
|
231
231
|
ref: c,
|
|
232
|
-
className: r("flex items-center justify-between mt-auto shrink-0 pb-[27px]", t),
|
|
232
|
+
className: r("flex items-center justify-between mt-auto shrink-0 pt-6 pb-[27px]", t),
|
|
233
233
|
"data-slot": "actions",
|
|
234
234
|
...m,
|
|
235
235
|
children: [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BadgeProps } from './badge';
|
|
1
2
|
import { KeyBinding } from './command-palette/utils';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
declare const Header: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -6,6 +7,10 @@ declare const HeaderRight: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
6
7
|
declare const HeaderLogo: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
8
|
declare const HeaderSeparator: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-separator').SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
9
|
declare const HeaderTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
declare const HeaderBadge: {
|
|
11
|
+
({ className, children, style, ...props }: Omit<BadgeProps, "size" | "shape">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
9
14
|
type HeaderBotButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
15
|
declare const HeaderBotButton: React.ForwardRefExoticComponent<HeaderBotButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
16
|
interface NotificationIconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
@@ -16,4 +21,4 @@ interface NotificationIconButtonProps extends Omit<React.ButtonHTMLAttributes<HT
|
|
|
16
21
|
tooltipKeybinding?: KeyBinding;
|
|
17
22
|
}
|
|
18
23
|
declare const NotificationIconButton: React.ForwardRefExoticComponent<NotificationIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
-
export { Header, HeaderLeft, HeaderRight, HeaderLogo, HeaderSeparator, HeaderTitle, HeaderBotButton, NotificationIconButton, };
|
|
24
|
+
export { Header, HeaderLeft, HeaderRight, HeaderLogo, HeaderSeparator, HeaderTitle, HeaderBadge, HeaderBotButton, NotificationIconButton, };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as o, jsxs as d, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Button as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as d, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { cn as i } from "../../lib/utils.js";
|
|
4
|
+
import { Button as f } from "./button.js";
|
|
5
|
+
import { Badge as p } from "./badge.js";
|
|
6
|
+
import { Separator as x } from "./separator.js";
|
|
7
|
+
import { Alan as N, IA as h, Bell as u } from "../../icons/index.js";
|
|
7
8
|
/* empty css */
|
|
8
|
-
import { useImpactNovaI18n as
|
|
9
|
-
const
|
|
9
|
+
import { useImpactNovaI18n as g } from "../../i18n/ImpactNovaI18nContext.js";
|
|
10
|
+
const y = n.forwardRef(
|
|
10
11
|
({ className: t, children: e, ...a }, r) => /* @__PURE__ */ o(
|
|
11
12
|
"header",
|
|
12
13
|
{
|
|
13
14
|
ref: r,
|
|
14
|
-
className:
|
|
15
|
+
className: i(
|
|
15
16
|
"sticky top-0 z-40 flex h-14 w-full items-center justify-between bg-canvas-elevated px-6 shadow-elevation-header",
|
|
16
17
|
t
|
|
17
18
|
),
|
|
@@ -20,33 +21,33 @@ const g = i.forwardRef(
|
|
|
20
21
|
}
|
|
21
22
|
)
|
|
22
23
|
);
|
|
23
|
-
|
|
24
|
-
const v =
|
|
24
|
+
y.displayName = "Header";
|
|
25
|
+
const v = n.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__ */ o(
|
|
25
26
|
"div",
|
|
26
27
|
{
|
|
27
28
|
ref: r,
|
|
28
|
-
className:
|
|
29
|
+
className: i("flex flex-row items-center justify-start", t),
|
|
29
30
|
...a,
|
|
30
31
|
children: e
|
|
31
32
|
}
|
|
32
33
|
));
|
|
33
34
|
v.displayName = "HeaderLeft";
|
|
34
|
-
const w =
|
|
35
|
+
const w = n.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__ */ o(
|
|
35
36
|
"div",
|
|
36
37
|
{
|
|
37
38
|
ref: r,
|
|
38
|
-
className:
|
|
39
|
+
className: i("flex flex-row items-center justify-start gap-5", t),
|
|
39
40
|
...a,
|
|
40
41
|
children: e
|
|
41
42
|
}
|
|
42
43
|
));
|
|
43
44
|
w.displayName = "HeaderRight";
|
|
44
|
-
const
|
|
45
|
+
const H = n.forwardRef(({ className: t, children: e, href: a = "/", ...r }, s) => /* @__PURE__ */ o(
|
|
45
46
|
"a",
|
|
46
47
|
{
|
|
47
48
|
href: a,
|
|
48
49
|
ref: s,
|
|
49
|
-
className:
|
|
50
|
+
className: i(
|
|
50
51
|
"h-9 flex items-center justify-center cursor-pointer",
|
|
51
52
|
t
|
|
52
53
|
),
|
|
@@ -54,43 +55,59 @@ const y = i.forwardRef(({ className: t, children: e, href: a = "/", ...r }, s) =
|
|
|
54
55
|
children: e || /* @__PURE__ */ o(h, { width: 91, height: 36 })
|
|
55
56
|
}
|
|
56
57
|
));
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
H.displayName = "HeaderLogo";
|
|
59
|
+
const b = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
60
|
+
x,
|
|
60
61
|
{
|
|
61
62
|
ref: a,
|
|
62
63
|
orientation: "vertical",
|
|
63
|
-
className:
|
|
64
|
+
className: i("h-6 mx-3", t),
|
|
64
65
|
...e
|
|
65
66
|
}
|
|
66
67
|
));
|
|
67
|
-
|
|
68
|
-
const
|
|
68
|
+
b.displayName = "HeaderSeparator";
|
|
69
|
+
const R = n.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__ */ o(
|
|
69
70
|
"h1",
|
|
70
71
|
{
|
|
71
72
|
ref: r,
|
|
72
|
-
className:
|
|
73
|
+
className: i("text-base font-extrabold leading-6 text-content", t),
|
|
73
74
|
...a,
|
|
74
75
|
children: e
|
|
75
76
|
}
|
|
76
|
-
))
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
)), B = ({ className: t, children: e, style: a, ...r }) => /* @__PURE__ */ o(
|
|
78
|
+
p,
|
|
79
|
+
{
|
|
80
|
+
size: "sm",
|
|
81
|
+
shape: "circle",
|
|
82
|
+
className: i(t),
|
|
83
|
+
style: {
|
|
84
|
+
background: "linear-gradient(270deg, #BE77EE 0%, #4259EE 100%)",
|
|
85
|
+
border: "none",
|
|
86
|
+
color: "#FFF",
|
|
87
|
+
...a
|
|
88
|
+
},
|
|
89
|
+
...r,
|
|
90
|
+
children: e
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
B.displayName = "HeaderBadge";
|
|
94
|
+
R.displayName = "HeaderTitle";
|
|
95
|
+
const T = n.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__ */ o(
|
|
79
96
|
"button",
|
|
80
97
|
{
|
|
81
98
|
ref: r,
|
|
82
99
|
type: "button",
|
|
83
|
-
className:
|
|
100
|
+
className: i(
|
|
84
101
|
"impact-header-bot-container relative flex items-center justify-center w-[106px] h-[34px] gap-[7px] px-[11px] py-0 rounded-lg cursor-pointer border-0 outline-none",
|
|
85
102
|
t
|
|
86
103
|
),
|
|
87
104
|
...a,
|
|
88
|
-
children: e || /* @__PURE__ */ d(
|
|
89
|
-
/* @__PURE__ */ o(
|
|
105
|
+
children: e || /* @__PURE__ */ d(m, { children: [
|
|
106
|
+
/* @__PURE__ */ o(N, { size: 20, className: "text-brand-foreground" }),
|
|
90
107
|
/* @__PURE__ */ o("span", { className: "text-sm font-semibold leading-[20px] text-brand-foreground whitespace-nowrap", children: "Ask Alan" })
|
|
91
108
|
] })
|
|
92
109
|
}
|
|
93
|
-
)),
|
|
110
|
+
)), j = n.forwardRef(
|
|
94
111
|
({
|
|
95
112
|
className: t,
|
|
96
113
|
showIndicator: e,
|
|
@@ -98,9 +115,9 @@ const k = i.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__
|
|
|
98
115
|
tooltipKeybinding: r,
|
|
99
116
|
...s
|
|
100
117
|
}, c) => {
|
|
101
|
-
const { t: l } =
|
|
118
|
+
const { t: l } = g();
|
|
102
119
|
return /* @__PURE__ */ d(
|
|
103
|
-
|
|
120
|
+
f,
|
|
104
121
|
{
|
|
105
122
|
variant: "ghost",
|
|
106
123
|
size: "icon",
|
|
@@ -109,13 +126,13 @@ const k = i.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__
|
|
|
109
126
|
tooltipSide: a,
|
|
110
127
|
tooltipKeybinding: r,
|
|
111
128
|
"data-indicator": e ? "" : void 0,
|
|
112
|
-
className:
|
|
129
|
+
className: i(
|
|
113
130
|
"relative text-content-header-notification [&_svg]:size-6 hover:text-content",
|
|
114
131
|
t
|
|
115
132
|
),
|
|
116
133
|
...s,
|
|
117
134
|
children: [
|
|
118
|
-
/* @__PURE__ */ o(
|
|
135
|
+
/* @__PURE__ */ o(u, { size: 24 }),
|
|
119
136
|
e && /* @__PURE__ */ d("div", { className: "notification-indicator", children: [
|
|
120
137
|
/* @__PURE__ */ o("div", { className: "notification-pulse" }),
|
|
121
138
|
/* @__PURE__ */ o("div", { className: "notification-dot" })
|
|
@@ -125,14 +142,15 @@ const k = i.forwardRef(({ className: t, children: e, ...a }, r) => /* @__PURE__
|
|
|
125
142
|
);
|
|
126
143
|
}
|
|
127
144
|
);
|
|
128
|
-
|
|
145
|
+
j.displayName = "NotificationIconButton";
|
|
129
146
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
147
|
+
y as Header,
|
|
148
|
+
B as HeaderBadge,
|
|
149
|
+
T as HeaderBotButton,
|
|
132
150
|
v as HeaderLeft,
|
|
133
|
-
|
|
151
|
+
H as HeaderLogo,
|
|
134
152
|
w as HeaderRight,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
153
|
+
b as HeaderSeparator,
|
|
154
|
+
R as HeaderTitle,
|
|
155
|
+
j as NotificationIconButton
|
|
138
156
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { useSensors as W, useSensor as
|
|
3
|
-
import { arrayMove as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
if (f.startsWith(
|
|
7
|
-
const c = f.slice(
|
|
8
|
-
if (
|
|
1
|
+
import { useCallback as h } from "react";
|
|
2
|
+
import { useSensors as W, useSensor as A, MouseSensor as X, TouchSensor as j, closestCorners as q } from "@dnd-kit/core";
|
|
3
|
+
import { arrayMove as w } from "@dnd-kit/sortable";
|
|
4
|
+
const B = "droppable-", O = /* @__PURE__ */ new Set(["root-frozen", "root-scrollable"]);
|
|
5
|
+
function Y(f) {
|
|
6
|
+
if (f.startsWith(B)) {
|
|
7
|
+
const c = f.slice(B.length);
|
|
8
|
+
if (O.has(c)) return c;
|
|
9
9
|
}
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
const c = q(f),
|
|
14
|
-
(s) => !
|
|
12
|
+
const K = (f) => {
|
|
13
|
+
const c = q(f), a = c.filter(
|
|
14
|
+
(s) => !O.has(s.id)
|
|
15
15
|
);
|
|
16
|
-
return
|
|
16
|
+
return a.length > 0 ? a : c;
|
|
17
17
|
};
|
|
18
|
-
function
|
|
19
|
-
for (const
|
|
20
|
-
if (
|
|
21
|
-
if (
|
|
22
|
-
const s =
|
|
18
|
+
function F(f, c) {
|
|
19
|
+
for (const a of f) {
|
|
20
|
+
if (a.id === c) return a;
|
|
21
|
+
if (a.children) {
|
|
22
|
+
const s = F(a.children, c);
|
|
23
23
|
if (s) return s;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const Q = ({
|
|
28
28
|
items: f,
|
|
29
29
|
onDragEnd: c
|
|
30
30
|
}) => {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
), s =
|
|
31
|
+
const a = W(
|
|
32
|
+
A(X),
|
|
33
|
+
A(j)
|
|
34
|
+
), s = h(
|
|
35
35
|
(t, r, o = 0) => {
|
|
36
36
|
for (const n of t) {
|
|
37
37
|
if (n.id === r) return o;
|
|
@@ -43,19 +43,19 @@ const U = ({
|
|
|
43
43
|
return null;
|
|
44
44
|
},
|
|
45
45
|
[]
|
|
46
|
-
),
|
|
46
|
+
), S = h(
|
|
47
47
|
(t, r, o = null) => {
|
|
48
48
|
for (const n of t) {
|
|
49
49
|
if (n.id === r) return o;
|
|
50
50
|
if (n.children) {
|
|
51
|
-
const e =
|
|
51
|
+
const e = S(n.children, r, n.id);
|
|
52
52
|
if (e !== null) return e;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
return null;
|
|
56
56
|
},
|
|
57
57
|
[]
|
|
58
|
-
),
|
|
58
|
+
), M = h(
|
|
59
59
|
(t, r, o) => t.map((n) => {
|
|
60
60
|
if (n.children && n.children.length > 0) {
|
|
61
61
|
const e = n.children.findIndex(
|
|
@@ -64,7 +64,7 @@ const U = ({
|
|
|
64
64
|
(l) => l.id === o
|
|
65
65
|
);
|
|
66
66
|
if (e !== -1 && i !== -1) {
|
|
67
|
-
const l =
|
|
67
|
+
const l = w(n.children, e, i);
|
|
68
68
|
return {
|
|
69
69
|
...n,
|
|
70
70
|
children: l
|
|
@@ -72,15 +72,15 @@ const U = ({
|
|
|
72
72
|
}
|
|
73
73
|
return {
|
|
74
74
|
...n,
|
|
75
|
-
children:
|
|
75
|
+
children: M(n.children, r, o)
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
return n;
|
|
79
79
|
}),
|
|
80
80
|
[]
|
|
81
|
-
),
|
|
81
|
+
), _ = h(
|
|
82
82
|
(t, r, o) => {
|
|
83
|
-
const n =
|
|
83
|
+
const n = S(t, o);
|
|
84
84
|
if (!n) return null;
|
|
85
85
|
const e = t.findIndex(
|
|
86
86
|
(l) => l.id === n
|
|
@@ -88,7 +88,7 @@ const U = ({
|
|
|
88
88
|
(l) => l.id === r
|
|
89
89
|
);
|
|
90
90
|
if (e !== -1 && i !== -1) {
|
|
91
|
-
const l =
|
|
91
|
+
const l = w(
|
|
92
92
|
t,
|
|
93
93
|
i,
|
|
94
94
|
e
|
|
@@ -97,122 +97,120 @@ const U = ({
|
|
|
97
97
|
}
|
|
98
98
|
return null;
|
|
99
99
|
},
|
|
100
|
-
[
|
|
101
|
-
),
|
|
100
|
+
[S, c]
|
|
101
|
+
), g = h(
|
|
102
102
|
(t, r, o) => {
|
|
103
103
|
const n = t.findIndex((i) => i.id === r), e = t.findIndex((i) => i.id === o);
|
|
104
104
|
if (n !== -1 && e !== -1) {
|
|
105
|
-
const i =
|
|
105
|
+
const i = w(t, n, e);
|
|
106
106
|
return c?.(r, o), i;
|
|
107
107
|
}
|
|
108
108
|
return null;
|
|
109
109
|
},
|
|
110
110
|
[c]
|
|
111
|
-
),
|
|
111
|
+
), p = h(
|
|
112
112
|
(t, r, o) => {
|
|
113
|
-
const n =
|
|
113
|
+
const n = M(t, r, o);
|
|
114
114
|
return c?.(r, o), n;
|
|
115
115
|
},
|
|
116
|
-
[
|
|
117
|
-
),
|
|
116
|
+
[M, c]
|
|
117
|
+
), y = h(
|
|
118
118
|
(t, r, o, n = !1) => {
|
|
119
|
-
const e =
|
|
120
|
-
if (!e
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
if (u.id === i) {
|
|
130
|
-
const d = u.children ? [...u.children] : [], C = d.findIndex(
|
|
131
|
-
(S) => S.id === o
|
|
132
|
-
);
|
|
133
|
-
if (C !== -1) {
|
|
134
|
-
const S = n ? C + 1 : C;
|
|
135
|
-
d.splice(S, 0, l);
|
|
136
|
-
} else
|
|
137
|
-
d.push(l);
|
|
138
|
-
return {
|
|
139
|
-
...u,
|
|
140
|
-
children: d
|
|
141
|
-
};
|
|
119
|
+
const e = F(t, r);
|
|
120
|
+
if (!e) return null;
|
|
121
|
+
const i = (C) => C.filter((u) => u.id !== r).map(
|
|
122
|
+
(u) => u.children ? { ...u, children: i(u.children) } : u
|
|
123
|
+
), l = (C) => {
|
|
124
|
+
const u = C.findIndex((d) => d.id === o);
|
|
125
|
+
if (u !== -1) {
|
|
126
|
+
const d = [...C], T = n ? u + 1 : u;
|
|
127
|
+
return d.splice(T, 0, e), { nodes: d, inserted: !0 };
|
|
142
128
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
129
|
+
let P = !1;
|
|
130
|
+
return { nodes: C.map((d) => {
|
|
131
|
+
if (P || !d.children) return d;
|
|
132
|
+
const T = l(d.children);
|
|
133
|
+
return T.inserted ? (P = !0, { ...d, children: T.nodes }) : d;
|
|
134
|
+
}), inserted: P };
|
|
135
|
+
}, L = i(t), { nodes: x, inserted: R } = l(L);
|
|
136
|
+
return R ? (c?.(r, o), x) : null;
|
|
146
137
|
},
|
|
147
|
-
[
|
|
148
|
-
),
|
|
138
|
+
[c]
|
|
139
|
+
), b = h(
|
|
149
140
|
(t, r, o) => {
|
|
150
|
-
const n =
|
|
141
|
+
const n = F(t, r);
|
|
151
142
|
if (!n) return t;
|
|
152
143
|
const e = t.map((i) => {
|
|
153
|
-
let l = i.children ? i.children.filter((
|
|
144
|
+
let l = i.children ? i.children.filter((L) => L.id !== r) : [];
|
|
154
145
|
return i.id === o && (l = [n, ...l]), { ...i, children: l };
|
|
155
146
|
});
|
|
156
147
|
return c?.(r, o), e;
|
|
157
148
|
},
|
|
158
149
|
[c]
|
|
159
|
-
), k =
|
|
150
|
+
), k = h(
|
|
160
151
|
(t, r) => {
|
|
161
152
|
const { active: o, over: n } = t;
|
|
162
153
|
!n || o.id === n.id || r((e) => {
|
|
163
|
-
const i = o.id, l = n.id,
|
|
164
|
-
if (
|
|
165
|
-
return
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
154
|
+
const i = o.id, l = n.id, L = Y(l);
|
|
155
|
+
if (L)
|
|
156
|
+
return console.log("[NL-drop] route=section", { activeId: i, sectionId: L }), b(e, i, L);
|
|
157
|
+
const x = s(e, i), R = s(e, l), C = S(e, i), u = S(e, l);
|
|
158
|
+
if (console.log("[NL-drop] event", {
|
|
159
|
+
activeId: i,
|
|
160
|
+
overId: l,
|
|
161
|
+
activeLevel: x,
|
|
162
|
+
overLevel: R,
|
|
163
|
+
activeParentId: C,
|
|
164
|
+
overParentId: u
|
|
165
|
+
}), O.has(l) && x !== null && x > 0)
|
|
166
|
+
return b(e, i, l);
|
|
167
|
+
if (x === 0 && R !== null && R > 0)
|
|
168
|
+
return _(
|
|
171
169
|
e,
|
|
172
170
|
i,
|
|
173
171
|
l
|
|
174
172
|
) || e;
|
|
175
|
-
if (
|
|
173
|
+
if (x === null || R === null)
|
|
176
174
|
return e;
|
|
177
|
-
if (
|
|
178
|
-
const
|
|
179
|
-
let
|
|
180
|
-
if (
|
|
181
|
-
const H =
|
|
182
|
-
|
|
175
|
+
if (x > 0 && R > 0 && C !== u) {
|
|
176
|
+
const P = o.rect.current.translated, N = n.rect;
|
|
177
|
+
let d = !1;
|
|
178
|
+
if (P && N) {
|
|
179
|
+
const H = P.top + P.height / 2, V = N.top + N.height / 2;
|
|
180
|
+
d = H > V;
|
|
183
181
|
}
|
|
184
|
-
return
|
|
182
|
+
return y(e, i, l, d) || e;
|
|
185
183
|
}
|
|
186
|
-
return
|
|
184
|
+
return x === 0 ? g(e, i, l) || e : p(e, i, l);
|
|
187
185
|
});
|
|
188
186
|
},
|
|
189
187
|
[
|
|
190
188
|
s,
|
|
191
|
-
|
|
192
|
-
N,
|
|
189
|
+
S,
|
|
193
190
|
_,
|
|
191
|
+
g,
|
|
192
|
+
p,
|
|
194
193
|
y,
|
|
195
|
-
|
|
196
|
-
O
|
|
194
|
+
b
|
|
197
195
|
]
|
|
198
|
-
), z =
|
|
196
|
+
), z = h(
|
|
199
197
|
(t, r) => {
|
|
200
198
|
if (!t || !r || t === r)
|
|
201
199
|
return !1;
|
|
202
200
|
const o = t ? s(f, t) : null, n = r ? s(f, r) : null;
|
|
203
|
-
return
|
|
201
|
+
return Y(r) !== null || O.has(r) ? !0 : o === null || n === null ? !1 : o === 0 && n > 0 || o === n || o > 0 && n > 0;
|
|
204
202
|
},
|
|
205
203
|
[f, s]
|
|
206
204
|
);
|
|
207
205
|
return {
|
|
208
|
-
sensors:
|
|
206
|
+
sensors: a,
|
|
209
207
|
handleDragEnd: k,
|
|
210
208
|
isValidDrop: z,
|
|
211
209
|
findItemLevel: s,
|
|
212
|
-
findParentId:
|
|
210
|
+
findParentId: S
|
|
213
211
|
};
|
|
214
212
|
};
|
|
215
213
|
export {
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
K as customCollisionDetection,
|
|
215
|
+
Q as useNestedListDragDrop
|
|
218
216
|
};
|