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