impact-nova 1.7.25 → 1.7.26
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/ag-grid-react/cell-renderers/editors/input-cell-editor.js +45 -36
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +0 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +92 -75
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +52 -41
- package/dist/components/ui/ag-grid-react/hooks/useStopEditingOnClickOutside.d.ts +5 -0
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/calendar.js +3 -2
- package/dist/components/ui/data-table/data-table-column-list.js +119 -108
- package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -0
- package/dist/components/ui/nested-list/components/NestedListContent.js +134 -63
- package/dist/components/ui/nested-list/components/SortableItem.js +65 -82
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +176 -153
- package/dist/components/ui/nested-list/nested-list.js +190 -203
- package/dist/components/ui/select/components/Submenu.js +7 -5
- package/dist/components/ui/select/select.js +390 -369
- package/dist/i18n/defaultMessages.d.ts +3 -0
- package/dist/i18n/defaultMessages.js +14 -11
- package/dist/i18n/locales/de.js +4 -1
- package/dist/i18n/locales/es.js +4 -1
- package/dist/i18n/locales/hi.js +4 -1
- package/dist/i18n/locales/kn.js +4 -1
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import { NestedList as
|
|
5
|
-
import { SelectionMode as
|
|
6
|
-
import { mergePartialOrderedColumnState as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
const
|
|
9
|
-
enableApplyDiscard:
|
|
10
|
-
showSearch:
|
|
11
|
-
showSelectAll:
|
|
12
|
-
showCollapse:
|
|
1
|
+
import { jsx as N } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as I, useCallback as C, useEffect as F } from "react";
|
|
3
|
+
import { useDataTable as Q } from "./data-table-context.js";
|
|
4
|
+
import { NestedList as X } from "../nested-list/nested-list.js";
|
|
5
|
+
import { SelectionMode as Y } from "../types/nested-list.types.js";
|
|
6
|
+
import { mergePartialOrderedColumnState as Z } from "./data-table-column-state.js";
|
|
7
|
+
import { useImpactNovaI18n as ee } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const ue = ({
|
|
9
|
+
enableApplyDiscard: T = !1,
|
|
10
|
+
showSearch: q = !0,
|
|
11
|
+
showSelectAll: j = !0,
|
|
12
|
+
showCollapse: K = !0
|
|
13
13
|
}) => {
|
|
14
|
-
const { gridApi:
|
|
15
|
-
if (!
|
|
16
|
-
const o =
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
const { gridApi: r } = Q(), { t: p } = ee(), [V, z] = w([]), [W, B] = w(!1), f = I(!1), v = I(null), b = I(0), [O, P] = w(!1), L = I(/* @__PURE__ */ new Map()), g = C(() => {
|
|
15
|
+
if (!r || f.current) return;
|
|
16
|
+
const o = r.getColumnState(), s = new Map(o.map((l) => [l.colId, l]));
|
|
17
|
+
L.current = s;
|
|
18
|
+
const c = r.getColumns() || [], i = new Map(c.map((l) => [l.getColId(), l])), t = [], e = [], k = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), J = (l, a) => {
|
|
19
|
+
const n = l.getGroupId(), u = `${n}::${a === t ? "f" : "s"}`, d = k.get(u);
|
|
20
|
+
if (d && d.list === a && a[a.length - 1] === d.node)
|
|
21
|
+
return d.node;
|
|
22
|
+
const m = D.get(u) || 0;
|
|
23
|
+
D.set(u, m + 1);
|
|
24
|
+
const S = l.getColGroupDef(), h = a === t ? "f" : "s", R = {
|
|
25
|
+
id: m === 0 ? `${n}__${h}` : `${n}__${h}__${m}`,
|
|
26
|
+
label: S?.headerName || n,
|
|
26
27
|
checked: !0,
|
|
27
28
|
children: [],
|
|
28
29
|
category: "group"
|
|
29
|
-
}
|
|
30
|
+
};
|
|
31
|
+
return a.push(R), k.set(u, { list: a, node: R }), R;
|
|
30
32
|
};
|
|
31
|
-
let
|
|
32
|
-
o.forEach((
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
let
|
|
36
|
-
if (
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
|
|
33
|
+
let E = 0, $ = 0, G = 0, A = 0;
|
|
34
|
+
o.forEach((l) => {
|
|
35
|
+
const a = i.get(l.colId);
|
|
36
|
+
if (!a) return;
|
|
37
|
+
let n = r.getDisplayNameForColumn(a, "header");
|
|
38
|
+
if (n === "") return;
|
|
39
|
+
if (n == null) {
|
|
40
|
+
const h = a.getColDef();
|
|
41
|
+
if (h.headerName === "") return;
|
|
42
|
+
n = h.headerName || h.field || l.colId;
|
|
41
43
|
}
|
|
42
|
-
if (!
|
|
44
|
+
if (!n || n.trim() === "")
|
|
43
45
|
return;
|
|
44
|
-
const
|
|
45
|
-
id:
|
|
46
|
-
label:
|
|
47
|
-
checked:
|
|
46
|
+
const u = !l.hide, d = {
|
|
47
|
+
id: l.colId,
|
|
48
|
+
label: n,
|
|
49
|
+
checked: u
|
|
48
50
|
};
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
51
|
+
l.pinned ? (E++, u && $++) : (G++, u && A++);
|
|
52
|
+
const m = l.pinned ? t : e, S = a.getOriginalParent();
|
|
53
|
+
S?.getColGroupDef()?.children ? J(S, m).children.push(d) : m.push(d);
|
|
52
54
|
});
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
for (const
|
|
56
|
-
|
|
57
|
-
return
|
|
55
|
+
const M = (l) => {
|
|
56
|
+
let a = l.length > 0;
|
|
57
|
+
for (const n of l)
|
|
58
|
+
n.children && (n.checked = M(n.children)), n.checked || (a = !1);
|
|
59
|
+
return a;
|
|
58
60
|
};
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
61
|
+
M(t), M(e);
|
|
62
|
+
const x = [];
|
|
63
|
+
t.length > 0 && x.push({
|
|
62
64
|
id: "root-frozen",
|
|
63
|
-
label:
|
|
64
|
-
checked:
|
|
65
|
-
children:
|
|
65
|
+
label: p("dataTable.frozenColumns"),
|
|
66
|
+
checked: E > 0 && $ === E,
|
|
67
|
+
children: t,
|
|
66
68
|
category: "structure",
|
|
67
69
|
isDragDisabled: !0
|
|
68
|
-
}), e.length > 0 &&
|
|
70
|
+
}), e.length > 0 && x.push({
|
|
69
71
|
id: "root-scrollable",
|
|
70
|
-
label:
|
|
71
|
-
checked:
|
|
72
|
+
label: p("dataTable.scrollableColumns"),
|
|
73
|
+
checked: G > 0 && A === G,
|
|
72
74
|
children: e,
|
|
73
75
|
category: "structure",
|
|
74
76
|
isDragDisabled: !0
|
|
75
|
-
}), x
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
if (!
|
|
79
|
-
const o = setTimeout(() =>
|
|
77
|
+
}), z(x), B(!0);
|
|
78
|
+
}, [r, p]);
|
|
79
|
+
F(() => {
|
|
80
|
+
if (!r) return;
|
|
81
|
+
const o = setTimeout(() => g(), 0), s = [
|
|
80
82
|
"columnVisible",
|
|
81
83
|
"columnPinned",
|
|
82
84
|
"columnMoved",
|
|
@@ -90,78 +92,87 @@ const ne = ({
|
|
|
90
92
|
"columnValueChanged",
|
|
91
93
|
"displayedColumnsChanged"
|
|
92
94
|
];
|
|
93
|
-
let
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
95
|
+
let c = null;
|
|
96
|
+
const i = () => {
|
|
97
|
+
c && clearTimeout(c), c = setTimeout(() => {
|
|
98
|
+
c = null;
|
|
99
|
+
const t = !f.current;
|
|
100
|
+
f.current = !1, g(), t && P((e) => !e);
|
|
99
101
|
}, 150);
|
|
100
102
|
};
|
|
101
|
-
return
|
|
102
|
-
clearTimeout(o),
|
|
103
|
+
return r.isDestroyed() || s.forEach((t) => r.addEventListener(t, i)), () => {
|
|
104
|
+
clearTimeout(o), c && clearTimeout(c), r.isDestroyed() || s.forEach((t) => r.removeEventListener(t, i));
|
|
103
105
|
};
|
|
104
|
-
}, [
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
}, [r, g]), F(() => {
|
|
107
|
+
if (b.current === 0) return;
|
|
108
|
+
const o = requestAnimationFrame(() => {
|
|
109
|
+
const s = v.current?.querySelector('[data-component="nested-list"] .overflow-y-auto');
|
|
110
|
+
s && (s.scrollTop = b.current, b.current = 0);
|
|
111
|
+
});
|
|
112
|
+
return () => cancelAnimationFrame(o);
|
|
113
|
+
}, [O]);
|
|
114
|
+
const _ = C((o) => {
|
|
115
|
+
const s = [], c = (i, t) => {
|
|
116
|
+
i.forEach((e) => {
|
|
108
117
|
if (e.id === "root-frozen") {
|
|
109
|
-
e.children &&
|
|
118
|
+
e.children && c(e.children, "left");
|
|
110
119
|
return;
|
|
111
120
|
}
|
|
112
121
|
if (e.id === "root-scrollable") {
|
|
113
|
-
e.children &&
|
|
122
|
+
e.children && c(e.children, null);
|
|
114
123
|
return;
|
|
115
124
|
}
|
|
116
|
-
e.category === "group" || e.children && e.children.length > 0 ? e.children &&
|
|
125
|
+
e.category === "group" || e.children && e.children.length > 0 ? e.children && c(e.children, t) : r?.getColumn(e.id) && s.push({
|
|
117
126
|
colId: e.id,
|
|
118
|
-
pinned:
|
|
127
|
+
pinned: t,
|
|
119
128
|
hide: !e.checked
|
|
120
129
|
});
|
|
121
130
|
});
|
|
122
131
|
};
|
|
123
|
-
return
|
|
124
|
-
}, [
|
|
125
|
-
if (!
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
132
|
+
return c(o, null), s;
|
|
133
|
+
}, [r]), y = C((o) => {
|
|
134
|
+
if (!r) return;
|
|
135
|
+
f.current = !0;
|
|
136
|
+
const s = _(o);
|
|
137
|
+
if (s.length === 0) {
|
|
129
138
|
setTimeout(() => {
|
|
130
|
-
|
|
139
|
+
f.current = !1;
|
|
131
140
|
}, 300);
|
|
132
141
|
return;
|
|
133
142
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
state:
|
|
143
|
+
const c = r.getColumnState(), i = Z(c, s);
|
|
144
|
+
r.applyColumnState({
|
|
145
|
+
state: i,
|
|
137
146
|
applyOrder: !0
|
|
138
147
|
}), setTimeout(() => {
|
|
139
|
-
|
|
148
|
+
f.current = !1;
|
|
149
|
+
const t = v.current?.querySelector('[data-component="nested-list"] .overflow-y-auto');
|
|
150
|
+
t && (b.current = t.scrollTop), g(), P((e) => !e);
|
|
140
151
|
}, 300);
|
|
141
|
-
}, [
|
|
142
|
-
|
|
143
|
-
}, [
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
return
|
|
147
|
-
|
|
152
|
+
}, [r, _, g]), U = C((o) => {
|
|
153
|
+
y(o);
|
|
154
|
+
}, [y]), H = C((o) => {
|
|
155
|
+
T || y(o), z(o);
|
|
156
|
+
}, [T, y]);
|
|
157
|
+
return W ? /* @__PURE__ */ N("div", { ref: v, className: "flex flex-col h-full bg-canvas-elevated", children: /* @__PURE__ */ N(
|
|
158
|
+
X,
|
|
148
159
|
{
|
|
149
|
-
items:
|
|
150
|
-
onChange:
|
|
151
|
-
onSubmit:
|
|
152
|
-
enableApplyDiscard:
|
|
153
|
-
enableSearch:
|
|
154
|
-
enableSelectAll:
|
|
160
|
+
items: V,
|
|
161
|
+
onChange: H,
|
|
162
|
+
onSubmit: U,
|
|
163
|
+
enableApplyDiscard: T,
|
|
164
|
+
enableSearch: q,
|
|
165
|
+
enableSelectAll: j,
|
|
155
166
|
enableDragDrop: !0,
|
|
156
167
|
enableCollapse: !0,
|
|
157
|
-
enableGlobalCollapse:
|
|
158
|
-
selectionMode:
|
|
159
|
-
searchPlaceholder:
|
|
168
|
+
enableGlobalCollapse: K,
|
|
169
|
+
selectionMode: Y.CASCADE_DOWN,
|
|
170
|
+
searchPlaceholder: p("dataTable.searchColumnsPlaceholder"),
|
|
160
171
|
className: "h-full"
|
|
161
172
|
},
|
|
162
|
-
|
|
163
|
-
) }) : /* @__PURE__ */
|
|
173
|
+
O ? "sync-a" : "sync-b"
|
|
174
|
+
) }) : /* @__PURE__ */ N("div", { className: "p-4 text-[13px] text-content-placeholder", children: p("dataTable.loadingColumns") });
|
|
164
175
|
};
|
|
165
176
|
export {
|
|
166
|
-
|
|
177
|
+
ue as DataTableColumnList
|
|
167
178
|
};
|
|
@@ -14,6 +14,7 @@ interface NestedListContentProps {
|
|
|
14
14
|
onDragOver: (event: DragOverEvent) => void;
|
|
15
15
|
onDragEnd: (event: DragEndEvent) => void;
|
|
16
16
|
onDragCancel: () => void;
|
|
17
|
+
activeId: string | null;
|
|
17
18
|
}
|
|
18
19
|
export declare const NestedListContent: React.FC<NestedListContentProps>;
|
|
19
20
|
export {};
|
|
@@ -1,74 +1,145 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { customCollisionDetection as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sensors: c,
|
|
11
|
-
items: e,
|
|
12
|
-
renderItem: m,
|
|
13
|
-
onDragStart: f,
|
|
14
|
-
onDragOver: u,
|
|
15
|
-
onDragEnd: p,
|
|
16
|
-
onDragCancel: h
|
|
17
|
-
}) => {
|
|
18
|
-
const r = C(null), n = y({
|
|
19
|
-
count: e.length,
|
|
20
|
-
getScrollElement: () => r.current,
|
|
21
|
-
estimateSize: () => 32,
|
|
22
|
-
overscan: 5
|
|
23
|
-
}), x = z.useMemo(() => e.map((o) => o.item.id), [e]);
|
|
24
|
-
if (a) return null;
|
|
25
|
-
const i = n.getVirtualItems(), g = n.getTotalSize(), v = i.length > 0 ? i[0].start : 0, l = /* @__PURE__ */ t(
|
|
1
|
+
import { jsxs as z, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import b, { useRef as P, useState as v, useEffect as R, useCallback as f } from "react";
|
|
3
|
+
import { createPortal as T } from "react-dom";
|
|
4
|
+
import { DndContext as X } from "@dnd-kit/core";
|
|
5
|
+
import { SortableContext as $ } from "@dnd-kit/sortable";
|
|
6
|
+
import { customCollisionDetection as j } from "../hooks/useNestedListDragDrop.js";
|
|
7
|
+
import { Drag as H } from "../../../../icons/index.js";
|
|
8
|
+
const q = "0 -2px 0 0 var(--color-primary)", G = "0 2px 0 0 var(--color-primary)", J = () => null, K = ({ item: u, pointerX: m, pointerY: p }) => T(
|
|
9
|
+
/* @__PURE__ */ c(
|
|
26
10
|
"div",
|
|
27
11
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
position: "relative"
|
|
32
|
-
},
|
|
33
|
-
children: /* @__PURE__ */ t(
|
|
12
|
+
className: "fixed z-50 pointer-events-none",
|
|
13
|
+
style: { top: `${p + 16}px`, left: `${m + 12}px` },
|
|
14
|
+
children: /* @__PURE__ */ z(
|
|
34
15
|
"div",
|
|
35
16
|
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
transform: `translateY(${v}px)`
|
|
42
|
-
},
|
|
43
|
-
children: i.map((o) => {
|
|
44
|
-
const { item: s, level: b } = e[o.index];
|
|
45
|
-
return /* @__PURE__ */ t(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
"data-index": o.index,
|
|
49
|
-
ref: n.measureElement,
|
|
50
|
-
children: m(s, b)
|
|
51
|
-
},
|
|
52
|
-
s.id
|
|
53
|
-
);
|
|
54
|
-
})
|
|
17
|
+
className: "inline-flex items-center gap-1.5 bg-canvas-elevated border border-stroke-subtle rounded px-2.5 py-1 shadow-md",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ c(H, { size: "12px", className: "text-content-icon shrink-0" }),
|
|
20
|
+
/* @__PURE__ */ c("span", { className: "text-[13px] text-content capitalize select-none whitespace-nowrap", children: u.label })
|
|
21
|
+
]
|
|
55
22
|
}
|
|
56
23
|
)
|
|
57
24
|
}
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
25
|
+
),
|
|
26
|
+
document.body
|
|
27
|
+
), ne = ({
|
|
28
|
+
isListCollapsed: u,
|
|
29
|
+
enableDragDrop: m,
|
|
30
|
+
sensors: p,
|
|
31
|
+
items: n,
|
|
32
|
+
renderItem: L,
|
|
33
|
+
onDragStart: y,
|
|
34
|
+
onDragOver: w,
|
|
35
|
+
onDragEnd: N,
|
|
36
|
+
onDragCancel: C,
|
|
37
|
+
activeId: o
|
|
38
|
+
}) => {
|
|
39
|
+
const E = P(null), [h, d] = v(null), [_, O] = v(0), [x, Y] = v(0);
|
|
40
|
+
R(() => {
|
|
41
|
+
if (!o) return;
|
|
42
|
+
const e = (t) => {
|
|
43
|
+
O(t.clientX), Y(t.clientY);
|
|
44
|
+
};
|
|
45
|
+
return window.addEventListener("pointermove", e), () => window.removeEventListener("pointermove", e);
|
|
46
|
+
}, [o]), R(() => {
|
|
47
|
+
if (!o) return;
|
|
48
|
+
const e = document.createElement("style");
|
|
49
|
+
return e.setAttribute("data-drag-cursor", "true"), e.textContent = "body, body * { cursor: grabbing !important; }", document.head.appendChild(e), () => {
|
|
50
|
+
e.remove();
|
|
51
|
+
};
|
|
52
|
+
}, [o]);
|
|
53
|
+
const g = b.useMemo(() => {
|
|
54
|
+
if (!h || !o) return null;
|
|
55
|
+
let e = h, t = "after";
|
|
56
|
+
if (e === "root-frozen" || e === "root-scrollable") {
|
|
57
|
+
const s = n.findIndex((l) => l.item.id === e);
|
|
58
|
+
if (s !== -1) {
|
|
59
|
+
const l = n.slice(s + 1).find(
|
|
60
|
+
(i) => i.item.id !== "root-frozen" && i.item.id !== "root-scrollable"
|
|
61
|
+
);
|
|
62
|
+
if (l)
|
|
63
|
+
e = l.item.id, t = "before";
|
|
64
|
+
else {
|
|
65
|
+
const i = n.slice(0, s).filter(
|
|
66
|
+
(a) => a.item.id !== "root-frozen" && a.item.id !== "root-scrollable"
|
|
67
|
+
);
|
|
68
|
+
i.length > 0 && (e = i[i.length - 1].item.id, t = "after");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
const s = E.current;
|
|
73
|
+
if (s) {
|
|
74
|
+
const l = s.querySelector(`[data-item-id="${e}"]`);
|
|
75
|
+
if (l) {
|
|
76
|
+
const i = l.getBoundingClientRect(), a = i.top + i.height / 2;
|
|
77
|
+
t = x < a ? "before" : "after";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return { overId: e, position: t };
|
|
82
|
+
}, [h, o, x, n]), k = b.useMemo(() => n.map((e) => e.item.id), [n]), S = b.useMemo(() => o && n.find((e) => e.item.id === o) || null, [o, n]), A = f((e) => {
|
|
83
|
+
y(e);
|
|
84
|
+
}, [y]), B = f((e) => {
|
|
85
|
+
const { active: t, over: r } = e;
|
|
86
|
+
!r || t.id === r.id ? d(null) : d(r.id), w(e);
|
|
87
|
+
}, [w]), F = f((e) => {
|
|
88
|
+
d(null), N(e);
|
|
89
|
+
}, [N]), M = f(() => {
|
|
90
|
+
d(null), C();
|
|
91
|
+
}, [C]);
|
|
92
|
+
if (u) return null;
|
|
93
|
+
const D = () => {
|
|
94
|
+
const e = o !== null;
|
|
95
|
+
let t = null;
|
|
96
|
+
if (e && g) {
|
|
97
|
+
const r = n.findIndex((s) => s.item.id === g.overId);
|
|
98
|
+
r !== -1 && (t = g.position === "before" ? r : r + 1);
|
|
69
99
|
}
|
|
70
|
-
|
|
100
|
+
return /* @__PURE__ */ c("div", { className: "w-full pb-12", children: n.map(({ item: r, level: s }, l) => {
|
|
101
|
+
const i = t === l, a = t === l + 1 && l === n.length - 1, I = i ? q : a ? G : void 0;
|
|
102
|
+
return /* @__PURE__ */ c(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
className: "relative",
|
|
106
|
+
style: I ? { boxShadow: I } : void 0,
|
|
107
|
+
children: L(r, s)
|
|
108
|
+
},
|
|
109
|
+
r.id
|
|
110
|
+
);
|
|
111
|
+
}) });
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ z("div", { className: "flex flex-col min-h-0 h-full", children: [
|
|
114
|
+
/* @__PURE__ */ c(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
ref: E,
|
|
118
|
+
className: "flex-1 p-1 overflow-y-auto relative",
|
|
119
|
+
children: m ? /* @__PURE__ */ c(
|
|
120
|
+
X,
|
|
121
|
+
{
|
|
122
|
+
sensors: p,
|
|
123
|
+
collisionDetection: j,
|
|
124
|
+
onDragStart: A,
|
|
125
|
+
onDragOver: B,
|
|
126
|
+
onDragEnd: F,
|
|
127
|
+
onDragCancel: M,
|
|
128
|
+
children: /* @__PURE__ */ c($, { items: k, strategy: J, children: D() })
|
|
129
|
+
}
|
|
130
|
+
) : D()
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
o && S && /* @__PURE__ */ c(
|
|
134
|
+
K,
|
|
135
|
+
{
|
|
136
|
+
item: S.item,
|
|
137
|
+
pointerX: _,
|
|
138
|
+
pointerY: x
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
] });
|
|
71
142
|
};
|
|
72
143
|
export {
|
|
73
|
-
|
|
144
|
+
ne as NestedListContent
|
|
74
145
|
};
|