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,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
|
};
|