impact-nova 1.7.29 → 1.7.30
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/data-table/data-table-column-list.js +86 -82
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +2 -1
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +134 -133
- package/dist/components/ui/nested-list/hooks/useNestedListState.d.ts +2 -1
- package/dist/components/ui/nested-list/hooks/useNestedListState.js +67 -66
- package/dist/components/ui/nested-list/nested-list.js +183 -175
- package/dist/components/ui/types/nested-list.types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { SortableItem as
|
|
1
|
+
import { jsx as L, jsxs as ne } from "react/jsx-runtime";
|
|
2
|
+
import F, { useMemo as D, useCallback as T } from "react";
|
|
3
|
+
import { SortableItem as je } from "./components/SortableItem.js";
|
|
4
4
|
import { SelectionMode as b } from "../types/nested-list.types.js";
|
|
5
|
-
import { useNestedListDragDrop as
|
|
6
|
-
import { useNestedListSelectAll as
|
|
7
|
-
import { useNestedListState as
|
|
8
|
-
import { useNestedListHandlers as
|
|
9
|
-
import { NestedListHeader as
|
|
10
|
-
import { NestedListCategoryFilters as
|
|
11
|
-
import { NestedListContent as
|
|
12
|
-
import { NestedListApplyDiscardButtons as
|
|
13
|
-
import { cn as
|
|
14
|
-
import { useImpactNovaI18n as
|
|
15
|
-
const
|
|
5
|
+
import { useNestedListDragDrop as Fe } from "./hooks/useNestedListDragDrop.js";
|
|
6
|
+
import { useNestedListSelectAll as Je } from "./hooks/useNestedListSelectAll.js";
|
|
7
|
+
import { useNestedListState as qe } from "./hooks/useNestedListState.js";
|
|
8
|
+
import { useNestedListHandlers as Ke } from "./hooks/useNestedListHandlers.js";
|
|
9
|
+
import { NestedListHeader as Qe } from "./components/NestedListHeader.js";
|
|
10
|
+
import { NestedListCategoryFilters as Xe } from "./components/NestedListCategoryFilters.js";
|
|
11
|
+
import { NestedListContent as Ye } from "./components/NestedListContent.js";
|
|
12
|
+
import { NestedListApplyDiscardButtons as Ze } from "./components/NestedListApplyDiscardButtons.js";
|
|
13
|
+
import { cn as $e } from "../../../lib/utils.js";
|
|
14
|
+
import { useImpactNovaI18n as Me } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
15
|
+
const le = (d, t) => {
|
|
16
16
|
if (!t || typeof t != "string") return d;
|
|
17
17
|
const c = t.toLowerCase(), o = [];
|
|
18
18
|
return d.forEach((s) => {
|
|
19
|
-
const l = s.label.toLowerCase().includes(c), f = s.children ?
|
|
19
|
+
const l = s.label.toLowerCase().includes(c), f = s.children ? le(s.children, t) : void 0;
|
|
20
20
|
(l || f && f.length > 0) && o.push({
|
|
21
21
|
...s,
|
|
22
22
|
children: f || s.children
|
|
23
23
|
});
|
|
24
24
|
}), o;
|
|
25
|
-
},
|
|
25
|
+
}, ce = (d) => d.map((t) => {
|
|
26
26
|
if (t.children && t.children.length > 0) {
|
|
27
|
-
const c =
|
|
27
|
+
const c = ce(t.children), o = c.every((s) => s.checked);
|
|
28
28
|
return {
|
|
29
29
|
...t,
|
|
30
30
|
checked: o,
|
|
@@ -32,7 +32,7 @@ const ne = (d, t) => {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
return t;
|
|
35
|
-
}),
|
|
35
|
+
}), Ge = (d, t) => {
|
|
36
36
|
const c = /* @__PURE__ */ new Set(), o = (s) => {
|
|
37
37
|
s.forEach((l) => {
|
|
38
38
|
const f = t ? t(l) : l.category;
|
|
@@ -40,24 +40,24 @@ const ne = (d, t) => {
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
return o(d), Array.from(c).sort();
|
|
43
|
-
},
|
|
43
|
+
}, oe = (d, t, c) => {
|
|
44
44
|
if (t.size === 0) return d;
|
|
45
45
|
const o = [];
|
|
46
46
|
return d.forEach((s) => {
|
|
47
|
-
const l = c ? c(s) : s.category, f = l && t.has(l), m = s.children ?
|
|
47
|
+
const l = c ? c(s) : s.category, f = l && t.has(l), m = s.children ? oe(s.children, t, c) : void 0;
|
|
48
48
|
(f || m && m.length > 0) && o.push({
|
|
49
49
|
...s,
|
|
50
50
|
children: m
|
|
51
51
|
});
|
|
52
52
|
}), o;
|
|
53
|
-
},
|
|
53
|
+
}, de = (d, t, c, o = 0) => {
|
|
54
54
|
const s = [];
|
|
55
55
|
return d.forEach((l) => {
|
|
56
56
|
s.push({ item: l, level: o }), !t[l.id] && l.children && l.children.length > 0 && l.id !== c && s.push(
|
|
57
|
-
...
|
|
57
|
+
...de(l.children, t, c, o + 1)
|
|
58
58
|
);
|
|
59
59
|
}), s;
|
|
60
|
-
},
|
|
60
|
+
}, pt = ({
|
|
61
61
|
items: d,
|
|
62
62
|
onChange: t,
|
|
63
63
|
onSubmit: c,
|
|
@@ -66,71 +66,79 @@ const ne = (d, t) => {
|
|
|
66
66
|
onDragEnd: l,
|
|
67
67
|
enableSearch: f = !0,
|
|
68
68
|
enableDragDrop: m = !0,
|
|
69
|
-
enableSelectAll:
|
|
70
|
-
enableGroupBy:
|
|
71
|
-
getCategory:
|
|
72
|
-
searchPlaceholder:
|
|
73
|
-
className:
|
|
74
|
-
groupLabel:
|
|
69
|
+
enableSelectAll: ie = !0,
|
|
70
|
+
enableGroupBy: k = !1,
|
|
71
|
+
getCategory: I,
|
|
72
|
+
searchPlaceholder: ae,
|
|
73
|
+
className: he = "",
|
|
74
|
+
groupLabel: ue,
|
|
75
75
|
enableApplyDiscard: p = !1,
|
|
76
|
-
enableCollapse:
|
|
77
|
-
enableGlobalCollapse:
|
|
78
|
-
submitButtonLabel:
|
|
79
|
-
cancelButtonLabel:
|
|
80
|
-
selectionMode:
|
|
76
|
+
enableCollapse: J = !0,
|
|
77
|
+
enableGlobalCollapse: fe = !0,
|
|
78
|
+
submitButtonLabel: pe,
|
|
79
|
+
cancelButtonLabel: me,
|
|
80
|
+
selectionMode: v = b.CASCADE_DOWN,
|
|
81
|
+
initialCollapsedItems: Ne,
|
|
82
|
+
onCollapseChange: q
|
|
81
83
|
}) => {
|
|
82
|
-
const { t:
|
|
84
|
+
const { t: w } = Me(), Se = ae ?? w("nestedList.searchPlaceholder"), Ce = pe ?? w("nestedList.apply"), Ie = me ?? w("nestedList.reset"), {
|
|
83
85
|
items: a,
|
|
84
|
-
setItems:
|
|
85
|
-
savedItems:
|
|
86
|
-
setSavedItems:
|
|
87
|
-
isUserChangeRef:
|
|
88
|
-
searchText:
|
|
89
|
-
setSearchText:
|
|
90
|
-
collapsedItems:
|
|
91
|
-
setCollapsedItems:
|
|
86
|
+
setItems: g,
|
|
87
|
+
savedItems: P,
|
|
88
|
+
setSavedItems: K,
|
|
89
|
+
isUserChangeRef: x,
|
|
90
|
+
searchText: z,
|
|
91
|
+
setSearchText: ve,
|
|
92
|
+
collapsedItems: N,
|
|
93
|
+
setCollapsedItems: ge,
|
|
92
94
|
isListCollapsed: B,
|
|
93
|
-
setIsListCollapsed:
|
|
94
|
-
activeId:
|
|
95
|
+
setIsListCollapsed: Le,
|
|
96
|
+
activeId: S,
|
|
95
97
|
setActiveId: U,
|
|
96
98
|
setOverId: _,
|
|
97
99
|
selectedCategories: O,
|
|
98
|
-
setSelectedCategories:
|
|
99
|
-
itemsToBlink:
|
|
100
|
+
setSelectedCategories: ke,
|
|
101
|
+
itemsToBlink: Q,
|
|
100
102
|
setItemsToBlink: y,
|
|
101
103
|
// Normalized state helpers (for optimized operations)
|
|
102
|
-
isNormalized:
|
|
103
|
-
normalizedState:
|
|
104
|
-
batchUpdateItems:
|
|
105
|
-
} =
|
|
104
|
+
isNormalized: Ee,
|
|
105
|
+
normalizedState: Ae,
|
|
106
|
+
batchUpdateItems: De
|
|
107
|
+
} = qe({
|
|
106
108
|
initialItems: d,
|
|
107
109
|
enableApplyDiscard: p,
|
|
108
110
|
// Enable normalized state for large datasets (can be made configurable via props)
|
|
109
|
-
enableNormalizedState: d.length > 1e3
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
111
|
+
enableNormalizedState: d.length > 1e3,
|
|
112
|
+
initialCollapsedItems: Ne
|
|
113
|
+
});
|
|
114
|
+
F.useEffect(() => {
|
|
115
|
+
q?.(N);
|
|
116
|
+
}, [N, q]);
|
|
117
|
+
const [R, X] = F.useState(0), [V, Te] = F.useState(0), {
|
|
118
|
+
sensors: we,
|
|
119
|
+
handleDragEnd: Pe,
|
|
120
|
+
isValidDrop: Y
|
|
121
|
+
} = Fe({
|
|
115
122
|
items: a,
|
|
116
|
-
onDragEnd: l
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
123
|
+
onDragEnd: l,
|
|
124
|
+
collapsedItems: N
|
|
125
|
+
}), xe = D(
|
|
126
|
+
() => k ? Ge(a, I) : [],
|
|
127
|
+
[a, k, I]
|
|
128
|
+
), C = D(() => {
|
|
121
129
|
let e = a;
|
|
122
|
-
return
|
|
123
|
-
}, [a,
|
|
124
|
-
() =>
|
|
125
|
-
[
|
|
126
|
-
), { allChecked:
|
|
130
|
+
return k && O.size > 0 && (e = oe(e, O, I)), z && (e = le(e, z)), e;
|
|
131
|
+
}, [a, z, k, O, I]), ze = D(
|
|
132
|
+
() => de(C, N, S),
|
|
133
|
+
[C, N, S]
|
|
134
|
+
), { allChecked: E, someChecked: Be } = D(() => {
|
|
127
135
|
let e = !0, r = !1;
|
|
128
136
|
const n = (u) => {
|
|
129
137
|
for (const h of u)
|
|
130
138
|
if (h.children && h.children.length > 0 ? n(h.children) : h.checked ? r = !0 : e = !1, r && !e) return;
|
|
131
139
|
};
|
|
132
|
-
return n(
|
|
133
|
-
}, [
|
|
140
|
+
return n(C), { allChecked: e && r, someChecked: r };
|
|
141
|
+
}, [C]), Oe = Be && !E, H = (e, r) => {
|
|
134
142
|
for (const n of e) {
|
|
135
143
|
if (n.id === r) return n;
|
|
136
144
|
if (n.children) {
|
|
@@ -139,69 +147,69 @@ const ne = (d, t) => {
|
|
|
139
147
|
}
|
|
140
148
|
}
|
|
141
149
|
return null;
|
|
142
|
-
},
|
|
150
|
+
}, Re = T(
|
|
143
151
|
(e, r) => {
|
|
144
|
-
if (
|
|
152
|
+
if (v === b.INDEPENDENT)
|
|
145
153
|
return e;
|
|
146
154
|
const n = (h, i) => h.id === i ? !0 : h.children ? h.children.some(
|
|
147
|
-
(
|
|
155
|
+
(A) => n(A, i)
|
|
148
156
|
) : !1, u = (h) => h.map((i) => {
|
|
149
157
|
if (i.id === r)
|
|
150
158
|
return i;
|
|
151
159
|
if (i.children && n(i, r)) {
|
|
152
|
-
const
|
|
160
|
+
const A = u(i.children);
|
|
153
161
|
let W;
|
|
154
|
-
return
|
|
162
|
+
return v === b.CASCADE_UP_DOWN ? W = A.some((j) => j.checked) : W = A.every((j) => j.checked), {
|
|
155
163
|
...i,
|
|
156
164
|
checked: W,
|
|
157
|
-
children:
|
|
165
|
+
children: A
|
|
158
166
|
};
|
|
159
167
|
}
|
|
160
168
|
return i;
|
|
161
169
|
});
|
|
162
170
|
return u(e);
|
|
163
171
|
},
|
|
164
|
-
[
|
|
165
|
-
),
|
|
172
|
+
[v]
|
|
173
|
+
), Z = (e) => {
|
|
166
174
|
const r = [];
|
|
167
175
|
return e.forEach((n) => {
|
|
168
|
-
n.children && n.children.length > 0 && (r.push(n.id), r.push(...
|
|
176
|
+
n.children && n.children.length > 0 && (r.push(n.id), r.push(...Z(n.children)));
|
|
169
177
|
}), r;
|
|
170
178
|
}, {
|
|
171
|
-
handleToggle:
|
|
172
|
-
handleToggleCollapse:
|
|
173
|
-
handleCollapseAll:
|
|
174
|
-
handleToggleCategory:
|
|
175
|
-
} =
|
|
176
|
-
setItems:
|
|
179
|
+
handleToggle: $,
|
|
180
|
+
handleToggleCollapse: M,
|
|
181
|
+
handleCollapseAll: Ve,
|
|
182
|
+
handleToggleCategory: be
|
|
183
|
+
} = Ke({
|
|
184
|
+
setItems: g,
|
|
177
185
|
findItemById: H,
|
|
178
|
-
updateParentsUpward:
|
|
186
|
+
updateParentsUpward: Re,
|
|
179
187
|
onChange: (e) => {
|
|
180
|
-
|
|
188
|
+
X((r) => r + 1), t(e);
|
|
181
189
|
},
|
|
182
190
|
onItemToggle: s,
|
|
183
|
-
getCategory:
|
|
184
|
-
setCollapsedItems:
|
|
185
|
-
setIsListCollapsed:
|
|
186
|
-
setSelectedCategories:
|
|
187
|
-
isUserChangeRef:
|
|
188
|
-
selectionMode:
|
|
191
|
+
getCategory: I,
|
|
192
|
+
setCollapsedItems: ge,
|
|
193
|
+
setIsListCollapsed: Le,
|
|
194
|
+
setSelectedCategories: ke,
|
|
195
|
+
isUserChangeRef: x,
|
|
196
|
+
selectionMode: v,
|
|
189
197
|
// Pass normalized state helpers for optimized operations
|
|
190
|
-
isNormalized:
|
|
191
|
-
normalizedState:
|
|
192
|
-
batchUpdateItems:
|
|
198
|
+
isNormalized: Ee,
|
|
199
|
+
normalizedState: Ae,
|
|
200
|
+
batchUpdateItems: De
|
|
193
201
|
}), {
|
|
194
|
-
collectVisibleItemIds:
|
|
195
|
-
findItemsNotSelected:
|
|
196
|
-
collectVisibleItemsForCallback:
|
|
197
|
-
updateVisibleItems:
|
|
198
|
-
} =
|
|
202
|
+
collectVisibleItemIds: G,
|
|
203
|
+
findItemsNotSelected: ee,
|
|
204
|
+
collectVisibleItemsForCallback: te,
|
|
205
|
+
updateVisibleItems: se
|
|
206
|
+
} = Je({
|
|
199
207
|
findItemById: H,
|
|
200
|
-
getCategory:
|
|
201
|
-
}),
|
|
202
|
-
|
|
203
|
-
const r =
|
|
204
|
-
|
|
208
|
+
getCategory: I
|
|
209
|
+
}), Ue = T(() => {
|
|
210
|
+
x.current = !0, g((e) => {
|
|
211
|
+
const r = G(C), n = ee(
|
|
212
|
+
C,
|
|
205
213
|
e,
|
|
206
214
|
r
|
|
207
215
|
);
|
|
@@ -209,119 +217,119 @@ const ne = (d, t) => {
|
|
|
209
217
|
const i = new Set(n);
|
|
210
218
|
y(i), setTimeout(() => y(/* @__PURE__ */ new Set()), 600);
|
|
211
219
|
}
|
|
212
|
-
const u =
|
|
220
|
+
const u = se(
|
|
213
221
|
e,
|
|
214
222
|
r,
|
|
215
|
-
!
|
|
216
|
-
), h =
|
|
223
|
+
!E
|
|
224
|
+
), h = v === b.INDEPENDENT ? u : ce(u);
|
|
217
225
|
if (t(h), s) {
|
|
218
|
-
const i =
|
|
226
|
+
const i = te(
|
|
219
227
|
e,
|
|
220
228
|
r,
|
|
221
|
-
!
|
|
229
|
+
!E
|
|
222
230
|
);
|
|
223
231
|
s(i);
|
|
224
232
|
}
|
|
225
233
|
return h;
|
|
226
234
|
});
|
|
227
235
|
}, [
|
|
228
|
-
|
|
236
|
+
E,
|
|
229
237
|
t,
|
|
230
238
|
s,
|
|
231
|
-
|
|
232
|
-
$,
|
|
233
|
-
M,
|
|
239
|
+
C,
|
|
234
240
|
G,
|
|
235
241
|
ee,
|
|
236
|
-
|
|
237
|
-
|
|
242
|
+
te,
|
|
243
|
+
se,
|
|
244
|
+
x,
|
|
245
|
+
g,
|
|
238
246
|
y,
|
|
239
|
-
|
|
240
|
-
]),
|
|
247
|
+
v
|
|
248
|
+
]), _e = T(
|
|
241
249
|
(e, r) => {
|
|
242
|
-
const n =
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
-
|
|
250
|
+
const n = S ? Y(S, e.id) : !1, u = Q.has(e.id);
|
|
251
|
+
return /* @__PURE__ */ L(
|
|
252
|
+
je,
|
|
245
253
|
{
|
|
246
254
|
item: e,
|
|
247
255
|
level: r,
|
|
248
|
-
isCollapsed:
|
|
249
|
-
onToggle:
|
|
250
|
-
onToggleCollapse:
|
|
251
|
-
isAnyDragging:
|
|
256
|
+
isCollapsed: N[e.id] || !1,
|
|
257
|
+
onToggle: $,
|
|
258
|
+
onToggleCollapse: M,
|
|
259
|
+
isAnyDragging: S !== null,
|
|
252
260
|
isValidDrop: n,
|
|
253
261
|
enableDragDrop: m,
|
|
254
|
-
enableCollapse:
|
|
262
|
+
enableCollapse: J,
|
|
255
263
|
shouldBlink: u
|
|
256
264
|
},
|
|
257
265
|
e.id
|
|
258
266
|
);
|
|
259
267
|
},
|
|
260
268
|
[
|
|
261
|
-
|
|
269
|
+
N,
|
|
270
|
+
$,
|
|
271
|
+
M,
|
|
272
|
+
S,
|
|
262
273
|
Y,
|
|
263
|
-
Z,
|
|
264
|
-
C,
|
|
265
|
-
Q,
|
|
266
274
|
m,
|
|
267
|
-
|
|
268
|
-
|
|
275
|
+
Q,
|
|
276
|
+
J
|
|
269
277
|
]
|
|
270
|
-
),
|
|
271
|
-
p && (
|
|
272
|
-
}, [p, a, c,
|
|
273
|
-
p && (
|
|
274
|
-
}, [p,
|
|
275
|
-
return /* @__PURE__ */
|
|
278
|
+
), ye = Z(a).length > 0, re = D(() => p ? a.length > 1e3 ? R !== V : JSON.stringify(a) !== JSON.stringify(P) : !1, [p, a, P, R, V]), He = T(() => {
|
|
279
|
+
p && (K(a), Te(R), c?.(a));
|
|
280
|
+
}, [p, a, c, K, R]), We = T(() => {
|
|
281
|
+
p && (g(P), X(V), o?.());
|
|
282
|
+
}, [p, P, o, g, V]);
|
|
283
|
+
return /* @__PURE__ */ ne(
|
|
276
284
|
"div",
|
|
277
285
|
{
|
|
278
|
-
className:
|
|
286
|
+
className: $e("flex flex-col", he),
|
|
279
287
|
"data-component": "nested-list",
|
|
280
|
-
"data-has-changes":
|
|
288
|
+
"data-has-changes": re ? "" : void 0,
|
|
281
289
|
"data-list-collapsed": B ? "" : void 0,
|
|
282
290
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
|
|
291
|
+
/* @__PURE__ */ ne("div", { className: "flex-shrink-0", children: [
|
|
292
|
+
/* @__PURE__ */ L(
|
|
293
|
+
Qe,
|
|
286
294
|
{
|
|
287
|
-
hasItemsWithChildren:
|
|
295
|
+
hasItemsWithChildren: ye,
|
|
288
296
|
isListCollapsed: B,
|
|
289
|
-
onCollapseAll:
|
|
297
|
+
onCollapseAll: Ve,
|
|
290
298
|
enableSearch: f,
|
|
291
|
-
enableSelectAll:
|
|
292
|
-
groupLabel:
|
|
293
|
-
allChecked:
|
|
294
|
-
isIndeterminate:
|
|
295
|
-
onSelectAll:
|
|
296
|
-
searchText:
|
|
299
|
+
enableSelectAll: ie,
|
|
300
|
+
groupLabel: ue,
|
|
301
|
+
allChecked: E,
|
|
302
|
+
isIndeterminate: Oe,
|
|
303
|
+
onSelectAll: Ue,
|
|
304
|
+
searchText: z,
|
|
297
305
|
onSearchChange: (e) => {
|
|
298
|
-
|
|
306
|
+
ve(e.target.value);
|
|
299
307
|
},
|
|
300
|
-
searchPlaceholder:
|
|
301
|
-
selectAllLabel:
|
|
302
|
-
enableCollapse:
|
|
308
|
+
searchPlaceholder: Se,
|
|
309
|
+
selectAllLabel: w("nestedList.selectAll"),
|
|
310
|
+
enableCollapse: fe
|
|
303
311
|
}
|
|
304
312
|
),
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
|
|
313
|
+
/* @__PURE__ */ L(
|
|
314
|
+
Xe,
|
|
307
315
|
{
|
|
308
316
|
isListCollapsed: B,
|
|
309
|
-
enableGroupBy:
|
|
310
|
-
categories:
|
|
317
|
+
enableGroupBy: k,
|
|
318
|
+
categories: xe,
|
|
311
319
|
selectedCategories: O,
|
|
312
|
-
onToggleCategory:
|
|
320
|
+
onToggleCategory: be
|
|
313
321
|
}
|
|
314
322
|
)
|
|
315
323
|
] }),
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
|
|
324
|
+
/* @__PURE__ */ L("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ L(
|
|
325
|
+
Ye,
|
|
318
326
|
{
|
|
319
327
|
isListCollapsed: B,
|
|
320
328
|
enableDragDrop: m,
|
|
321
|
-
sensors:
|
|
322
|
-
items:
|
|
323
|
-
renderItem:
|
|
324
|
-
activeId:
|
|
329
|
+
sensors: we,
|
|
330
|
+
items: ze,
|
|
331
|
+
renderItem: _e,
|
|
332
|
+
activeId: S,
|
|
325
333
|
onDragStart: (e) => {
|
|
326
334
|
U(e.active.id);
|
|
327
335
|
},
|
|
@@ -329,9 +337,9 @@ const ne = (d, t) => {
|
|
|
329
337
|
_(e.over?.id);
|
|
330
338
|
},
|
|
331
339
|
onDragEnd: (e) => {
|
|
332
|
-
U(null), _(null),
|
|
340
|
+
U(null), _(null), x.current = !0, Pe(e, (r) => {
|
|
333
341
|
const n = r(a);
|
|
334
|
-
|
|
342
|
+
g(n), t(n);
|
|
335
343
|
});
|
|
336
344
|
},
|
|
337
345
|
onDragCancel: () => {
|
|
@@ -339,14 +347,14 @@ const ne = (d, t) => {
|
|
|
339
347
|
}
|
|
340
348
|
}
|
|
341
349
|
) }),
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
|
|
350
|
+
/* @__PURE__ */ L(
|
|
351
|
+
Ze,
|
|
344
352
|
{
|
|
345
353
|
enableApplyDiscard: p,
|
|
346
|
-
hasChanges:
|
|
347
|
-
onDiscard:
|
|
348
|
-
onApply:
|
|
349
|
-
cancelButtonLabel:
|
|
354
|
+
hasChanges: re,
|
|
355
|
+
onDiscard: We,
|
|
356
|
+
onApply: He,
|
|
357
|
+
cancelButtonLabel: Ie,
|
|
350
358
|
submitButtonLabel: Ce
|
|
351
359
|
}
|
|
352
360
|
)
|
|
@@ -355,5 +363,5 @@ const ne = (d, t) => {
|
|
|
355
363
|
);
|
|
356
364
|
};
|
|
357
365
|
export {
|
|
358
|
-
|
|
366
|
+
pt as NestedList
|
|
359
367
|
};
|
|
@@ -56,6 +56,8 @@ export interface NestedListProps {
|
|
|
56
56
|
enableGlobalCollapse?: boolean;
|
|
57
57
|
selectionMode?: SelectionMode;
|
|
58
58
|
getCategory?: (item: NestedListItem) => string | undefined;
|
|
59
|
+
initialCollapsedItems?: Record<string, boolean>;
|
|
60
|
+
onCollapseChange?: (collapsedItems: Record<string, boolean>) => void;
|
|
59
61
|
searchPlaceholder?: string;
|
|
60
62
|
className?: string;
|
|
61
63
|
groupLabel?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-nova",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.30",
|
|
4
4
|
"description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|