impact-nova 2.4.0 → 2.5.1
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/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- 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/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/accordion-nested-list/accordion-nested-list.js +80 -65
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/date-picker/month-picker.js +136 -109
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- 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,185 +1,184 @@
|
|
|
1
1
|
import { useCallback as _ } from "react";
|
|
2
|
-
import { SelectionMode as
|
|
3
|
-
const
|
|
4
|
-
...
|
|
5
|
-
children:
|
|
6
|
-
} :
|
|
7
|
-
const
|
|
2
|
+
import { SelectionMode as a } from "../nested-list.types.js";
|
|
3
|
+
const x = (l, s, r) => l.map((c) => c.id === s ? r(c) : c.children ? {
|
|
4
|
+
...c,
|
|
5
|
+
children: x(c.children, s, r)
|
|
6
|
+
} : c), G = (l, s, r, c) => {
|
|
7
|
+
const t = (e, n) => e.map((h) => ({
|
|
8
8
|
...h,
|
|
9
|
-
checked:
|
|
10
|
-
children: h.children ?
|
|
9
|
+
checked: n,
|
|
10
|
+
children: h.children ? t(h.children, n) : void 0
|
|
11
11
|
}));
|
|
12
|
-
return
|
|
13
|
-
const
|
|
14
|
-
return
|
|
12
|
+
return x(l, s, (e) => {
|
|
13
|
+
const n = { ...e, checked: r };
|
|
14
|
+
return e.children && (c === a.INDEPENDENT ? n.children = [...e.children] : c === a.CASCADE_DOWN ? n.children = t(e.children, r) : c === a.CASCADE_UP_DOWN && (r ? n.children = [...e.children] : n.children = t(e.children, !1))), n;
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
17
|
+
function J(l, s, r, c) {
|
|
18
|
+
const t = /* @__PURE__ */ new Map();
|
|
19
|
+
t.set(s, { checked: r });
|
|
20
|
+
const e = (n) => {
|
|
21
21
|
const h = [];
|
|
22
|
-
return (l.childrenById.get(
|
|
23
|
-
h.push(
|
|
22
|
+
return (l.childrenById.get(n) || []).forEach((p) => {
|
|
23
|
+
h.push(p), h.push(...e(p));
|
|
24
24
|
}), h;
|
|
25
25
|
};
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
}) :
|
|
29
|
-
|
|
30
|
-
}),
|
|
26
|
+
return c === a.CASCADE_DOWN ? e(s).forEach((h) => {
|
|
27
|
+
t.set(h, { checked: r });
|
|
28
|
+
}) : c === a.CASCADE_UP_DOWN && !r && e(s).forEach((h) => {
|
|
29
|
+
t.set(h, { checked: !1 });
|
|
30
|
+
}), t;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
if (
|
|
34
|
-
((
|
|
32
|
+
function K(l, s, r, c) {
|
|
33
|
+
if (c === a.INDEPENDENT) return;
|
|
34
|
+
((n) => {
|
|
35
35
|
const h = [];
|
|
36
|
-
let
|
|
37
|
-
for (;
|
|
38
|
-
h.push(
|
|
36
|
+
let o = l.parentById.get(n) || null;
|
|
37
|
+
for (; o !== null; )
|
|
38
|
+
h.push(o), o = l.parentById.get(o) || null;
|
|
39
39
|
return h;
|
|
40
|
-
})(r).forEach((
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
return
|
|
40
|
+
})(r).forEach((n) => {
|
|
41
|
+
const o = (l.childrenById.get(n) || []).map((f) => {
|
|
42
|
+
const E = s.get(f);
|
|
43
|
+
return E?.checked !== void 0 ? E.checked : l.byId.get(f)?.checked ?? !1;
|
|
44
44
|
});
|
|
45
|
-
let
|
|
46
|
-
|
|
45
|
+
let p;
|
|
46
|
+
c === a.CASCADE_UP_DOWN ? p = o.some((f) => f) : p = o.every((f) => f), s.set(n, { checked: p });
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function B(l,
|
|
49
|
+
function B(l, s) {
|
|
50
50
|
return l.map((r) => {
|
|
51
|
-
const
|
|
51
|
+
const c = s.get(r.id), t = c ? { ...r, ...c } : r;
|
|
52
52
|
return r.children ? {
|
|
53
|
-
...
|
|
54
|
-
children: B(r.children,
|
|
55
|
-
} :
|
|
53
|
+
...t,
|
|
54
|
+
children: B(r.children, s)
|
|
55
|
+
} : t;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const V = ({
|
|
59
59
|
setItems: l,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
itemsRef: s,
|
|
61
|
+
findItemById: r,
|
|
62
|
+
updateParentsUpward: c,
|
|
63
|
+
onChange: t,
|
|
64
|
+
onItemToggle: e,
|
|
65
|
+
getCategory: n,
|
|
66
|
+
setCollapsedItems: h,
|
|
67
|
+
setIsListCollapsed: o,
|
|
68
|
+
setSelectedCategories: p,
|
|
69
|
+
markUserChange: f,
|
|
70
|
+
selectionMode: E,
|
|
70
71
|
// Normalized state helpers
|
|
71
|
-
isNormalized:
|
|
72
|
-
normalizedState:
|
|
73
|
-
batchUpdateItems:
|
|
72
|
+
isNormalized: T = !1,
|
|
73
|
+
normalizedState: D,
|
|
74
|
+
batchUpdateItems: y
|
|
74
75
|
}) => {
|
|
75
|
-
const
|
|
76
|
+
const v = _(
|
|
76
77
|
(d) => {
|
|
77
|
-
if (!
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
if (!
|
|
81
|
-
const u = !
|
|
82
|
-
|
|
78
|
+
if (!D || !y) return;
|
|
79
|
+
f();
|
|
80
|
+
const i = D.byId.get(d);
|
|
81
|
+
if (!i) return;
|
|
82
|
+
const u = !i.checked, N = J(
|
|
83
|
+
D,
|
|
83
84
|
d,
|
|
84
85
|
u,
|
|
85
|
-
|
|
86
|
+
E
|
|
86
87
|
);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return w;
|
|
99
|
-
});
|
|
88
|
+
K(D, N, d, E), y(N);
|
|
89
|
+
const O = B(s.current, N);
|
|
90
|
+
if (l(O), t(O), e) {
|
|
91
|
+
const g = [];
|
|
92
|
+
N.forEach((C, k) => {
|
|
93
|
+
if (C.checked !== void 0) {
|
|
94
|
+
const A = D.byId.get(k), P = A ? n ? n(A) : A.category : void 0;
|
|
95
|
+
g.push({ itemId: k, checked: C.checked, category: P });
|
|
96
|
+
}
|
|
97
|
+
}), e(g);
|
|
98
|
+
}
|
|
100
99
|
},
|
|
101
100
|
[
|
|
101
|
+
D,
|
|
102
|
+
y,
|
|
103
|
+
f,
|
|
104
|
+
s,
|
|
102
105
|
E,
|
|
103
|
-
P,
|
|
104
|
-
i,
|
|
105
|
-
o,
|
|
106
106
|
l,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
t,
|
|
108
|
+
e,
|
|
109
|
+
n
|
|
110
110
|
]
|
|
111
|
-
),
|
|
111
|
+
), W = _(
|
|
112
112
|
(d) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
s(k);
|
|
113
|
+
f();
|
|
114
|
+
const i = s.current, u = r(i, d), N = u ? !u.checked : !1, O = G(
|
|
115
|
+
i,
|
|
116
|
+
d,
|
|
117
|
+
N,
|
|
118
|
+
E
|
|
119
|
+
), g = c(O, d);
|
|
120
|
+
if (l(g), t(g), e && u) {
|
|
121
|
+
const C = [];
|
|
122
|
+
if (E === a.INDEPENDENT) {
|
|
123
|
+
const k = n ? n(u) : u.category;
|
|
124
|
+
C.push({ itemId: u.id, checked: N, category: k });
|
|
125
|
+
} else {
|
|
126
|
+
const k = (A, P, w) => {
|
|
127
|
+
const j = n ? n(A) : A.category;
|
|
128
|
+
w.push({ itemId: A.id, checked: P, category: j }), A.children && A.children.forEach((q) => {
|
|
129
|
+
k(q, P, w);
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
k(u, N, C);
|
|
135
133
|
}
|
|
136
|
-
|
|
137
|
-
}
|
|
134
|
+
e(C);
|
|
135
|
+
}
|
|
138
136
|
},
|
|
139
137
|
[
|
|
138
|
+
r,
|
|
140
139
|
t,
|
|
140
|
+
e,
|
|
141
|
+
c,
|
|
141
142
|
n,
|
|
143
|
+
f,
|
|
142
144
|
s,
|
|
143
|
-
r,
|
|
144
|
-
c,
|
|
145
|
-
i,
|
|
146
145
|
l,
|
|
147
|
-
|
|
146
|
+
E
|
|
148
147
|
]
|
|
149
|
-
),
|
|
148
|
+
), F = _(
|
|
150
149
|
(d) => {
|
|
151
|
-
|
|
150
|
+
T && D && y ? v(d) : W(d);
|
|
152
151
|
},
|
|
153
|
-
[
|
|
154
|
-
),
|
|
152
|
+
[T, D, y, v, W]
|
|
153
|
+
), H = _(
|
|
155
154
|
(d) => {
|
|
156
|
-
|
|
157
|
-
...
|
|
158
|
-
[d]: !
|
|
155
|
+
h((i) => ({
|
|
156
|
+
...i,
|
|
157
|
+
[d]: !i[d]
|
|
159
158
|
}));
|
|
160
159
|
},
|
|
161
|
-
[
|
|
162
|
-
),
|
|
163
|
-
|
|
164
|
-
}, [
|
|
160
|
+
[h]
|
|
161
|
+
), S = _(() => {
|
|
162
|
+
o((d) => !d);
|
|
163
|
+
}, [o]), b = _(
|
|
165
164
|
(d) => {
|
|
166
|
-
|
|
167
|
-
const u = new Set(
|
|
165
|
+
p((i) => {
|
|
166
|
+
const u = new Set(i);
|
|
168
167
|
return u.has(d) ? u.delete(d) : u.add(d), u;
|
|
169
168
|
});
|
|
170
169
|
},
|
|
171
|
-
[
|
|
170
|
+
[p]
|
|
172
171
|
);
|
|
173
172
|
return {
|
|
174
|
-
handleToggle:
|
|
175
|
-
handleToggleCollapse:
|
|
176
|
-
handleCollapseAll:
|
|
177
|
-
handleToggleCategory:
|
|
173
|
+
handleToggle: F,
|
|
174
|
+
handleToggleCollapse: H,
|
|
175
|
+
handleCollapseAll: S,
|
|
176
|
+
handleToggleCategory: b
|
|
178
177
|
};
|
|
179
178
|
};
|
|
180
179
|
export {
|
|
181
180
|
B as applyUpdatesToTree,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
J as toggleItemAndChildrenNormalized,
|
|
182
|
+
K as updateParentsNormalized,
|
|
183
|
+
V as useNestedListHandlers
|
|
185
184
|
};
|
|
@@ -51,11 +51,10 @@ export declare const useNestedListState: ({ initialItems, enableApplyDiscard, en
|
|
|
51
51
|
setSavedNormalizedState: import('react').Dispatch<import('react').SetStateAction<NormalizedItems>>;
|
|
52
52
|
items: NestedListItem[];
|
|
53
53
|
setItems: import('react').Dispatch<import('react').SetStateAction<NestedListItem[]>>;
|
|
54
|
+
itemsRef: import('react').RefObject<NestedListItem[]>;
|
|
54
55
|
savedItems: NestedListItem[];
|
|
55
56
|
setSavedItems: import('react').Dispatch<import('react').SetStateAction<NestedListItem[]>>;
|
|
56
|
-
|
|
57
|
-
current: boolean;
|
|
58
|
-
};
|
|
57
|
+
markUserChange: () => void;
|
|
59
58
|
searchText: string;
|
|
60
59
|
setSearchText: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
61
60
|
collapsedItems: Record<string, boolean>;
|
|
@@ -1,166 +1,167 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useState as o, useCallback as y, useRef as N, useEffect as z, useMemo as ss } from "react";
|
|
2
|
+
function l(t) {
|
|
3
|
+
const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), u = [], i = (I, h) => {
|
|
4
|
+
I.forEach((r) => {
|
|
5
|
+
n.set(r.id, r), e.set(r.id, h), r.children && r.children.length > 0 ? (s.set(r.id, r.children.map((C) => C.id)), i(r.children, r.id)) : s.set(r.id, []), h === null && u.push(r.id);
|
|
6
6
|
});
|
|
7
7
|
};
|
|
8
|
-
return i(
|
|
8
|
+
return i(t, null), { byId: n, childrenById: s, parentById: e, rootIds: u };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
for (const
|
|
14
|
-
const i =
|
|
10
|
+
function T(t) {
|
|
11
|
+
const n = (s) => {
|
|
12
|
+
const e = [];
|
|
13
|
+
for (const u of s) {
|
|
14
|
+
const i = t.byId.get(u);
|
|
15
15
|
if (!i) continue;
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const I = t.childrenById.get(u) || [], h = I.length > 0 ? n(I) : void 0;
|
|
17
|
+
e.push({
|
|
18
18
|
...i,
|
|
19
19
|
children: h
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return e;
|
|
23
23
|
};
|
|
24
|
-
return
|
|
24
|
+
return n(t.rootIds);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
const
|
|
30
|
-
return
|
|
31
|
-
...
|
|
32
|
-
byId:
|
|
26
|
+
function j(t, n, s) {
|
|
27
|
+
const e = t.byId.get(n);
|
|
28
|
+
if (!e) return t;
|
|
29
|
+
const u = new Map(t.byId);
|
|
30
|
+
return u.set(n, { ...e, ...s }), {
|
|
31
|
+
...t,
|
|
32
|
+
byId: u
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function ts(t, n) {
|
|
36
|
+
return t.byId.get(n) || null;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
let
|
|
41
|
-
for (;
|
|
42
|
-
|
|
43
|
-
return
|
|
38
|
+
function es(t, n) {
|
|
39
|
+
const s = [];
|
|
40
|
+
let e = t.parentById.get(n) || null;
|
|
41
|
+
for (; e !== null; )
|
|
42
|
+
s.push(e), e = t.parentById.get(e) || null;
|
|
43
|
+
return s;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
(
|
|
48
|
-
|
|
45
|
+
function ns(t, n) {
|
|
46
|
+
const s = [], e = (u) => {
|
|
47
|
+
(t.childrenById.get(u) || []).forEach((I) => {
|
|
48
|
+
s.push(I), e(I);
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
return n
|
|
51
|
+
return e(n), s;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
initialItems:
|
|
55
|
-
enableApplyDiscard:
|
|
56
|
-
enableNormalizedState:
|
|
57
|
-
initialCollapsedItems:
|
|
53
|
+
const rs = ({
|
|
54
|
+
initialItems: t,
|
|
55
|
+
enableApplyDiscard: n,
|
|
56
|
+
enableNormalizedState: s = !1,
|
|
57
|
+
initialCollapsedItems: e
|
|
58
58
|
}) => {
|
|
59
|
-
const [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}), [r]), C = d !== s, [j, x] = u(s), [v, l] = u(s), [f, w] = u(
|
|
67
|
-
() => t ? p(s) : {
|
|
59
|
+
const [u, i] = o(t), [I, h] = o(!1), r = y(() => h(!0), []), C = u !== t, [m, x] = o(t), [p, w] = o(t), k = N(p);
|
|
60
|
+
z(() => {
|
|
61
|
+
k.current = p;
|
|
62
|
+
}, [p]);
|
|
63
|
+
const [f, B] = o(
|
|
64
|
+
() => s ? l(t) : {
|
|
68
65
|
byId: /* @__PURE__ */ new Map(),
|
|
69
66
|
childrenById: /* @__PURE__ */ new Map(),
|
|
70
67
|
parentById: /* @__PURE__ */ new Map(),
|
|
71
68
|
rootIds: []
|
|
72
69
|
}
|
|
73
|
-
), [
|
|
74
|
-
() =>
|
|
70
|
+
), [E, U] = o(
|
|
71
|
+
() => s ? l(t) : {
|
|
75
72
|
byId: /* @__PURE__ */ new Map(),
|
|
76
73
|
childrenById: /* @__PURE__ */ new Map(),
|
|
77
74
|
parentById: /* @__PURE__ */ new Map(),
|
|
78
75
|
rootIds: []
|
|
79
76
|
}
|
|
80
|
-
), [
|
|
77
|
+
), [q, G] = o(""), [J, K] = o(e ?? {}), [P, Q] = o(!1), [V, W] = o(null), [X, Y] = o(null), [Z, _] = o(
|
|
81
78
|
/* @__PURE__ */ new Set()
|
|
82
|
-
), [
|
|
83
|
-
if (C
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
79
|
+
), [$, b] = o(/* @__PURE__ */ new Set());
|
|
80
|
+
if (C) {
|
|
81
|
+
if (i(t), I)
|
|
82
|
+
h(!1);
|
|
83
|
+
else if (w(t), n && x(t), s) {
|
|
84
|
+
const c = l(t);
|
|
85
|
+
B(c), n && U(c);
|
|
86
|
+
}
|
|
87
|
+
} else I && h(!1);
|
|
88
|
+
const L = y((c) => s ? ts(f, c) : null, [s, f]), A = y((c, g) => {
|
|
89
|
+
s && (B((d) => j(d, c, g)), w((d) => T(j(l(d), c, g))));
|
|
90
|
+
}, [s]), F = y((c) => s ? es(f, c) : [], [s, f]), R = y((c) => s ? ns(f, c) : [], [s, f]), D = y((c) => {
|
|
91
|
+
s && (B((g) => {
|
|
92
|
+
const d = new Map(g.byId);
|
|
93
|
+
return c.forEach((a, M) => {
|
|
94
|
+
const v = d.get(M);
|
|
95
|
+
v && d.set(M, { ...v, ...a });
|
|
96
|
+
}), { ...g, byId: d };
|
|
97
|
+
}), w((g) => {
|
|
98
|
+
const d = l(g);
|
|
99
|
+
return c.forEach((a, M) => {
|
|
100
|
+
const v = d.byId.get(M);
|
|
101
|
+
v && d.byId.set(M, { ...v, ...a });
|
|
102
|
+
}), T(d);
|
|
103
103
|
}));
|
|
104
|
-
}, [
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
}, [
|
|
109
|
-
findItemByIdFast:
|
|
110
|
-
updateItemFast:
|
|
111
|
-
getAncestors:
|
|
112
|
-
getDescendants:
|
|
113
|
-
batchUpdateItems:
|
|
114
|
-
syncToTreeState:
|
|
115
|
-
syncToNormalizedState:
|
|
116
|
-
isNormalized:
|
|
104
|
+
}, [s]), H = y(() => {
|
|
105
|
+
s && w(T(f));
|
|
106
|
+
}, [s, f]), O = y(() => {
|
|
107
|
+
s && B(l(p));
|
|
108
|
+
}, [s, p]), S = ss(() => ({
|
|
109
|
+
findItemByIdFast: L,
|
|
110
|
+
updateItemFast: A,
|
|
111
|
+
getAncestors: F,
|
|
112
|
+
getDescendants: R,
|
|
113
|
+
batchUpdateItems: D,
|
|
114
|
+
syncToTreeState: H,
|
|
115
|
+
syncToNormalizedState: O,
|
|
116
|
+
isNormalized: s,
|
|
117
117
|
normalizedState: f,
|
|
118
|
-
setNormalizedState:
|
|
119
|
-
savedNormalizedState:
|
|
120
|
-
setSavedNormalizedState:
|
|
118
|
+
setNormalizedState: B,
|
|
119
|
+
savedNormalizedState: E,
|
|
120
|
+
setSavedNormalizedState: U
|
|
121
121
|
}), [
|
|
122
|
-
U,
|
|
123
122
|
L,
|
|
124
123
|
A,
|
|
125
124
|
F,
|
|
126
|
-
|
|
125
|
+
R,
|
|
127
126
|
D,
|
|
128
127
|
H,
|
|
129
|
-
|
|
128
|
+
O,
|
|
129
|
+
s,
|
|
130
130
|
f,
|
|
131
|
-
|
|
131
|
+
E
|
|
132
132
|
]);
|
|
133
133
|
return {
|
|
134
134
|
// Standard state (backward compatible)
|
|
135
|
-
items:
|
|
136
|
-
setItems:
|
|
137
|
-
|
|
135
|
+
items: p,
|
|
136
|
+
setItems: w,
|
|
137
|
+
itemsRef: k,
|
|
138
|
+
savedItems: m,
|
|
138
139
|
setSavedItems: x,
|
|
139
|
-
|
|
140
|
-
searchText:
|
|
141
|
-
setSearchText:
|
|
142
|
-
collapsedItems:
|
|
143
|
-
setCollapsedItems:
|
|
144
|
-
isListCollapsed:
|
|
145
|
-
setIsListCollapsed:
|
|
146
|
-
activeId:
|
|
147
|
-
setActiveId:
|
|
148
|
-
overId:
|
|
149
|
-
setOverId:
|
|
150
|
-
selectedCategories:
|
|
151
|
-
setSelectedCategories:
|
|
152
|
-
itemsToBlink:
|
|
140
|
+
markUserChange: r,
|
|
141
|
+
searchText: q,
|
|
142
|
+
setSearchText: G,
|
|
143
|
+
collapsedItems: J,
|
|
144
|
+
setCollapsedItems: K,
|
|
145
|
+
isListCollapsed: P,
|
|
146
|
+
setIsListCollapsed: Q,
|
|
147
|
+
activeId: V,
|
|
148
|
+
setActiveId: W,
|
|
149
|
+
overId: X,
|
|
150
|
+
setOverId: Y,
|
|
151
|
+
selectedCategories: Z,
|
|
152
|
+
setSelectedCategories: _,
|
|
153
|
+
itemsToBlink: $,
|
|
153
154
|
setItemsToBlink: b,
|
|
154
155
|
// Normalized state helpers (for optimized operations)
|
|
155
156
|
...S
|
|
156
157
|
};
|
|
157
158
|
};
|
|
158
159
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
T as denormalizeItems,
|
|
161
|
+
es as getAncestorIds,
|
|
162
|
+
ns as getDescendantIds,
|
|
163
|
+
ts as getItemById,
|
|
164
|
+
l as normalizeItems,
|
|
165
|
+
j as updateNormalizedItem,
|
|
166
|
+
rs as useNestedListState
|
|
166
167
|
};
|