impact-nova 2.2.3 → 2.2.4
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/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/flows/filter-panel/filter-panel.js +36 -35
- package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,55 +1,154 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { mergePartialOrderedColumnState as
|
|
3
|
-
import { afterSynchronousColumnApply as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { useState as U, useRef as S, useCallback as m, useLayoutEffect as et, useEffect as _ } from "react";
|
|
2
|
+
import { mergePartialOrderedColumnState as V } from "./data-table-column-state.js";
|
|
3
|
+
import { afterSynchronousColumnApply as M, normalizeColumnPinned as B, GRID_AUTO_UNPIN_WAIT_MS as nt, alignColumnTreePinMetadata as X, EXTERNAL_SYNC_DEBOUNCE_MS as rt, readGridColumnPinned as ot } from "./data-table-column-apply.js";
|
|
4
|
+
import { computeColumnListSyncFingerprints as Y } from "./data-table-column-list-sync.js";
|
|
5
|
+
import { resolveColumnTreeFromCacheOrGrid as z, peekColumnListSyncWouldSkip as ct, readColumnTreeCache as H, writeColumnTreeCache as ut } from "./data-table-column-tree-cache.js";
|
|
6
|
+
import { patchColumnTreeIndicatorsFromGrid as J } from "./patch-column-tree-indicators-from-grid.js";
|
|
7
|
+
import { subscribeGridApiEvent as P } from "../ag-grid-react/grid-api-event-subscription.js";
|
|
8
|
+
import { subscribeColumnIndicatorSync as Q } from "../ag-grid-react/column-indicator-sync-bus.js";
|
|
9
|
+
function Ct({
|
|
10
|
+
gridApi: t,
|
|
11
|
+
frozenColumnsLabel: d,
|
|
12
|
+
scrollableColumnsLabel: f,
|
|
13
|
+
isSyncActive: a = !0
|
|
12
14
|
}) {
|
|
13
|
-
const [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
(n, e) => {
|
|
18
|
-
const r = y.current, l = z(n);
|
|
19
|
-
y.current = l.structural, G.current = l.indicators, R(n), W(!0), e === "structural" && r !== "" && B((t) => !t);
|
|
15
|
+
const [Z, k] = U([]), [$, x] = U(!1), [q, N] = U(!1), i = S(!1), g = S(null), E = S(0), I = S(""), R = S(""), W = S(a), b = S(!1), T = m(
|
|
16
|
+
(e, n) => {
|
|
17
|
+
const o = I.current, c = Y(e);
|
|
18
|
+
I.current = c.structural, R.current = c.indicators, k(e), x(!0), n === "structural" && o !== "" && N((r) => !r), n === "indicators-only" && b.current && (b.current = !1, N((r) => !r));
|
|
20
19
|
},
|
|
21
20
|
[]
|
|
22
|
-
),
|
|
21
|
+
), p = m(
|
|
23
22
|
() => {
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (!t || i.current) return;
|
|
24
|
+
const e = z({
|
|
25
|
+
gridApi: t,
|
|
26
|
+
labels: {
|
|
27
|
+
frozenColumns: d,
|
|
28
|
+
scrollableColumns: f
|
|
29
|
+
},
|
|
30
|
+
previousFingerprints: {
|
|
31
|
+
structural: I.current,
|
|
32
|
+
indicators: R.current
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
if (e.syncMode === "skip" || !e.rootItems) {
|
|
36
|
+
e.syncMode !== "skip" && x(!0);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
T(
|
|
40
|
+
e.rootItems,
|
|
41
|
+
e.syncMode === "indicators-only" ? "indicators-only" : "structural"
|
|
42
|
+
);
|
|
26
43
|
},
|
|
27
|
-
[
|
|
28
|
-
|
|
44
|
+
[
|
|
45
|
+
T,
|
|
46
|
+
d,
|
|
47
|
+
t,
|
|
48
|
+
f
|
|
49
|
+
]
|
|
50
|
+
), j = m(
|
|
29
51
|
() => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
52
|
+
if (!t || i.current) return;
|
|
53
|
+
const e = z({
|
|
54
|
+
gridApi: t,
|
|
55
|
+
labels: {
|
|
56
|
+
frozenColumns: d,
|
|
57
|
+
scrollableColumns: f
|
|
58
|
+
},
|
|
59
|
+
previousFingerprints: {
|
|
60
|
+
structural: I.current,
|
|
61
|
+
indicators: R.current
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
if (e.syncMode !== "skip" && e.rootItems) {
|
|
65
|
+
if (e.syncMode === "structural") {
|
|
66
|
+
const n = g.current?.querySelector(
|
|
40
67
|
'[data-component="nested-list"] .overflow-y-auto'
|
|
41
68
|
);
|
|
42
|
-
|
|
69
|
+
n && (E.current = n.scrollTop);
|
|
43
70
|
}
|
|
44
|
-
|
|
71
|
+
T(
|
|
72
|
+
e.rootItems,
|
|
73
|
+
e.syncMode === "indicators-only" ? "indicators-only" : "structural"
|
|
74
|
+
);
|
|
45
75
|
}
|
|
46
76
|
},
|
|
47
|
-
[
|
|
77
|
+
[
|
|
78
|
+
T,
|
|
79
|
+
d,
|
|
80
|
+
t,
|
|
81
|
+
f
|
|
82
|
+
]
|
|
48
83
|
);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const n =
|
|
84
|
+
et(() => {
|
|
85
|
+
const e = a && !W.current;
|
|
86
|
+
if (W.current = a, !t || !a) return;
|
|
87
|
+
const n = {
|
|
88
|
+
frozenColumns: d,
|
|
89
|
+
scrollableColumns: f
|
|
90
|
+
}, o = {
|
|
91
|
+
structural: I.current,
|
|
92
|
+
indicators: R.current
|
|
93
|
+
};
|
|
94
|
+
if (!(!e && o.structural !== "" && ct({
|
|
95
|
+
gridApi: t,
|
|
96
|
+
labels: n,
|
|
97
|
+
previousFingerprints: o
|
|
98
|
+
}))) {
|
|
99
|
+
if (e) {
|
|
100
|
+
b.current = !0, queueMicrotask(() => {
|
|
101
|
+
const c = H(t, n);
|
|
102
|
+
if (c) {
|
|
103
|
+
const s = J(
|
|
104
|
+
c.items,
|
|
105
|
+
t
|
|
106
|
+
);
|
|
107
|
+
T(s, "indicators-only");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
p();
|
|
111
|
+
});
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
queueMicrotask(() => {
|
|
115
|
+
p();
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}, [
|
|
119
|
+
t,
|
|
120
|
+
a,
|
|
121
|
+
d,
|
|
122
|
+
f,
|
|
123
|
+
p,
|
|
124
|
+
T
|
|
125
|
+
]), _(() => {
|
|
126
|
+
if (!t || a) return;
|
|
127
|
+
const e = {
|
|
128
|
+
frozenColumns: d,
|
|
129
|
+
scrollableColumns: f
|
|
130
|
+
}, n = () => {
|
|
131
|
+
const r = H(t, e);
|
|
132
|
+
if (!r)
|
|
133
|
+
return;
|
|
134
|
+
const h = J(
|
|
135
|
+
r.items,
|
|
136
|
+
t
|
|
137
|
+
);
|
|
138
|
+
ut(t, h);
|
|
139
|
+
}, o = P(t, "sortChanged", () => {
|
|
140
|
+
n();
|
|
141
|
+
}), c = P(t, "filterChanged", () => {
|
|
142
|
+
n();
|
|
143
|
+
}), s = Q(() => {
|
|
144
|
+
n();
|
|
145
|
+
});
|
|
146
|
+
return () => {
|
|
147
|
+
o(), c(), s();
|
|
148
|
+
};
|
|
149
|
+
}, [t, a, d, f]), _(() => {
|
|
150
|
+
if (!t || !a) return;
|
|
151
|
+
const e = [
|
|
53
152
|
"columnVisible",
|
|
54
153
|
"columnPinned",
|
|
55
154
|
"columnMoved",
|
|
@@ -65,161 +164,161 @@ function ie({
|
|
|
65
164
|
"filterChanged",
|
|
66
165
|
"newColumnsLoaded"
|
|
67
166
|
];
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
i.current || (
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
(
|
|
75
|
-
|
|
167
|
+
let n = null;
|
|
168
|
+
const o = () => {
|
|
169
|
+
i.current || (n && clearTimeout(n), n = setTimeout(() => {
|
|
170
|
+
n = null, !(i.current || t.isDestroyed()) && j();
|
|
171
|
+
}, rt));
|
|
172
|
+
}, c = e.map(
|
|
173
|
+
(r) => P(t, r, () => {
|
|
174
|
+
o();
|
|
76
175
|
})
|
|
77
|
-
),
|
|
78
|
-
|
|
176
|
+
), s = Q(() => {
|
|
177
|
+
o();
|
|
79
178
|
});
|
|
80
179
|
return () => {
|
|
81
|
-
|
|
180
|
+
n && clearTimeout(n), c.forEach((r) => r()), s();
|
|
82
181
|
};
|
|
83
|
-
}, [
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
const
|
|
182
|
+
}, [t, a, j]), _(() => {
|
|
183
|
+
if (E.current === 0) return;
|
|
184
|
+
const e = requestAnimationFrame(() => {
|
|
185
|
+
const n = g.current?.querySelector(
|
|
87
186
|
'[data-component="nested-list"] .overflow-y-auto'
|
|
88
187
|
);
|
|
89
|
-
|
|
188
|
+
n && (n.scrollTop = E.current, E.current = 0);
|
|
90
189
|
});
|
|
91
|
-
return () => cancelAnimationFrame(
|
|
92
|
-
}, [
|
|
93
|
-
const
|
|
94
|
-
(
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
|
|
190
|
+
return () => cancelAnimationFrame(e);
|
|
191
|
+
}, [q]);
|
|
192
|
+
const K = m(
|
|
193
|
+
(e) => {
|
|
194
|
+
const n = [], o = (c, s) => {
|
|
195
|
+
c.forEach((r) => {
|
|
196
|
+
if (r.id === "root-frozen") {
|
|
197
|
+
r.children && o(r.children, "left");
|
|
99
198
|
return;
|
|
100
199
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
200
|
+
if (r.id === "root-scrollable") {
|
|
201
|
+
r.children && o(r.children, null);
|
|
103
202
|
return;
|
|
104
203
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
204
|
+
if (r.category === "group" || r.children && r.children.length > 0)
|
|
205
|
+
r.children && o(r.children, s);
|
|
107
206
|
else {
|
|
108
|
-
let
|
|
109
|
-
if (
|
|
110
|
-
|
|
207
|
+
let u;
|
|
208
|
+
if (s === null)
|
|
209
|
+
u = null;
|
|
111
210
|
else {
|
|
112
|
-
const
|
|
113
|
-
|
|
211
|
+
const y = r.data?.pinned;
|
|
212
|
+
u = y === "left" || y === "right" ? y : s;
|
|
114
213
|
}
|
|
115
|
-
|
|
116
|
-
colId:
|
|
117
|
-
pinned:
|
|
118
|
-
hide: !
|
|
214
|
+
n.push({
|
|
215
|
+
colId: r.id,
|
|
216
|
+
pinned: u,
|
|
217
|
+
hide: !r.checked
|
|
119
218
|
});
|
|
120
219
|
}
|
|
121
220
|
});
|
|
122
221
|
};
|
|
123
|
-
return
|
|
222
|
+
return o(e, null), n;
|
|
124
223
|
},
|
|
125
224
|
[]
|
|
126
|
-
),
|
|
127
|
-
(
|
|
128
|
-
if (!
|
|
225
|
+
), F = m(
|
|
226
|
+
(e) => {
|
|
227
|
+
if (!t) return;
|
|
129
228
|
i.current = !0;
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
|
|
229
|
+
const n = K(e);
|
|
230
|
+
if (n.length === 0) {
|
|
231
|
+
M(() => {
|
|
133
232
|
i.current = !1;
|
|
134
233
|
});
|
|
135
234
|
return;
|
|
136
235
|
}
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
),
|
|
140
|
-
(
|
|
141
|
-
),
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
i.current = !1,
|
|
236
|
+
const o = t.getColumnState(), c = V(o, n), s = new Set(
|
|
237
|
+
o.filter((l) => B(l.pinned)).map((l) => l.colId)
|
|
238
|
+
), r = c.filter(
|
|
239
|
+
(l) => B(l.pinned) && !s.has(l.colId)
|
|
240
|
+
), h = new Set(r.map((l) => l.colId));
|
|
241
|
+
t.applyColumnState({ state: c, applyOrder: !0 });
|
|
242
|
+
const u = () => {
|
|
243
|
+
i.current = !1, p();
|
|
145
244
|
};
|
|
146
|
-
if (
|
|
147
|
-
|
|
245
|
+
if (h.size === 0) {
|
|
246
|
+
M(u);
|
|
148
247
|
return;
|
|
149
248
|
}
|
|
150
|
-
let
|
|
151
|
-
|
|
152
|
-
if (
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
return
|
|
249
|
+
let v = !1, y = null, O = null;
|
|
250
|
+
O = P(t, "columnPinned", () => {
|
|
251
|
+
if (v || t.isDestroyed()) return;
|
|
252
|
+
const l = t.getColumnState();
|
|
253
|
+
if (r.filter((G) => {
|
|
254
|
+
const C = l.find((w) => w.colId === G.colId);
|
|
255
|
+
return C && !C.pinned;
|
|
157
256
|
}).length > 0) {
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
(
|
|
257
|
+
v = !0, y && clearTimeout(y), O?.();
|
|
258
|
+
const G = c.filter(
|
|
259
|
+
(C) => C.pinned && !h.has(C.colId)
|
|
161
260
|
);
|
|
162
|
-
if (
|
|
163
|
-
const
|
|
164
|
-
(
|
|
261
|
+
if (G.length > 0) {
|
|
262
|
+
const C = G[0], w = c.map(
|
|
263
|
+
(D) => D.colId === C.colId ? { ...D, pinned: null } : D
|
|
165
264
|
);
|
|
166
|
-
|
|
265
|
+
t.applyColumnState({ state: w, applyOrder: !0 });
|
|
167
266
|
}
|
|
168
|
-
|
|
267
|
+
M(u);
|
|
169
268
|
}
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
},
|
|
269
|
+
}), y = setTimeout(() => {
|
|
270
|
+
O?.(), v || u();
|
|
271
|
+
}, nt);
|
|
173
272
|
},
|
|
174
|
-
[
|
|
175
|
-
),
|
|
176
|
-
(
|
|
177
|
-
|
|
273
|
+
[t, K, p]
|
|
274
|
+
), L = m(
|
|
275
|
+
(e) => {
|
|
276
|
+
F(X(e));
|
|
178
277
|
},
|
|
179
|
-
[
|
|
180
|
-
),
|
|
181
|
-
(
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
278
|
+
[F]
|
|
279
|
+
), A = m(
|
|
280
|
+
(e, n) => {
|
|
281
|
+
const o = X(e);
|
|
282
|
+
n || F(o), k(o);
|
|
283
|
+
const c = Y(o);
|
|
284
|
+
I.current = c.structural, R.current = c.indicators;
|
|
186
285
|
},
|
|
187
|
-
[
|
|
188
|
-
),
|
|
189
|
-
(
|
|
190
|
-
if (
|
|
191
|
-
const
|
|
192
|
-
...
|
|
286
|
+
[F]
|
|
287
|
+
), tt = m(
|
|
288
|
+
(e, n) => {
|
|
289
|
+
if (k((s) => {
|
|
290
|
+
const r = (h) => h.map((u) => u.id === e ? {
|
|
291
|
+
...u,
|
|
193
292
|
data: {
|
|
194
|
-
...
|
|
195
|
-
pinned:
|
|
293
|
+
...u.data,
|
|
294
|
+
pinned: n
|
|
196
295
|
}
|
|
197
|
-
} :
|
|
198
|
-
...
|
|
199
|
-
children:
|
|
200
|
-
} :
|
|
201
|
-
return
|
|
202
|
-
}), !
|
|
296
|
+
} : u.children ? {
|
|
297
|
+
...u,
|
|
298
|
+
children: r(u.children)
|
|
299
|
+
} : u);
|
|
300
|
+
return r(s);
|
|
301
|
+
}), !t) return;
|
|
203
302
|
i.current = !0;
|
|
204
|
-
const
|
|
205
|
-
{ colId:
|
|
303
|
+
const o = t.getColumnState(), c = V(o, [
|
|
304
|
+
{ colId: e, pinned: n }
|
|
206
305
|
]);
|
|
207
|
-
|
|
208
|
-
i.current = !1,
|
|
306
|
+
t.applyColumnState({ state: c, applyOrder: !0 }), M(() => {
|
|
307
|
+
i.current = !1, ot(t, e) !== n && p();
|
|
209
308
|
});
|
|
210
309
|
},
|
|
211
|
-
[
|
|
310
|
+
[t, p]
|
|
212
311
|
);
|
|
213
312
|
return {
|
|
214
|
-
items:
|
|
215
|
-
isReady:
|
|
216
|
-
externalSyncKey:
|
|
217
|
-
listWrapperRef:
|
|
218
|
-
handleChange:
|
|
219
|
-
handleSubmit:
|
|
220
|
-
handlePinChange:
|
|
313
|
+
items: Z,
|
|
314
|
+
isReady: $,
|
|
315
|
+
externalSyncKey: q,
|
|
316
|
+
listWrapperRef: g,
|
|
317
|
+
handleChange: A,
|
|
318
|
+
handleSubmit: L,
|
|
319
|
+
handlePinChange: tt
|
|
221
320
|
};
|
|
222
321
|
}
|
|
223
322
|
export {
|
|
224
|
-
|
|
323
|
+
Ct as useDataTableColumnListSync
|
|
225
324
|
};
|